@@ -168,7 +168,7 @@ func TestEventSourceEnableFlagsDynamically(t *testing.T) {
168168
169169 r := & config.RulesCompileResult {
170170 HasProcEvents : true ,
171- HasImageEvents : true ,
171+ HasModuleEvents : true ,
172172 HasRegistryEvents : true ,
173173 HasNetworkEvents : true ,
174174 HasFileEvents : true ,
@@ -177,7 +177,7 @@ func TestEventSourceEnableFlagsDynamically(t *testing.T) {
177177 HasAuditAPIEvents : true ,
178178 UsedEvents : []event.Type {
179179 event .CreateProcess ,
180- event .LoadImage ,
180+ event .LoadModule ,
181181 event .RegCreateKey ,
182182 event .RegSetValue ,
183183 event .CreateFile ,
@@ -191,7 +191,7 @@ func TestEventSourceEnableFlagsDynamically(t *testing.T) {
191191 EventSource : config.EventSourceConfig {
192192 EnableThreadEvents : true ,
193193 EnableRegistryEvents : true ,
194- EnableImageEvents : true ,
194+ EnableModuleEvents : true ,
195195 EnableFileIOEvents : true ,
196196 EnableAuditAPIEvents : true ,
197197 },
@@ -212,7 +212,7 @@ func TestEventSourceEnableFlagsDynamically(t *testing.T) {
212212 // rules compile result doesn't have the thread event
213213 // and thread events are enabled in the config
214214 require .True (t , flags & etw .Thread == 0 )
215- require .True (t , flags & etw .ImageLoad != 0 )
215+ require .True (t , flags & etw .Module != 0 )
216216 require .True (t , flags & etw .Registry != 0 )
217217 // rules compile result has the network event
218218 // but network I/O is disabled in the config
@@ -222,7 +222,7 @@ func TestEventSourceEnableFlagsDynamically(t *testing.T) {
222222 // but VAMap is disabled in the config
223223 require .True (t , flags & etw .VaMap == 0 )
224224
225- require .False (t , cfg .EventSource .TestDropMask (event .UnloadImage ))
225+ require .False (t , cfg .EventSource .TestDropMask (event .UnloadModule ))
226226 require .True (t , cfg .EventSource .TestDropMask (event .WriteFile ))
227227 require .True (t , cfg .EventSource .TestDropMask (event .UnmapViewFile ))
228228 require .False (t , cfg .EventSource .TestDropMask (event .OpenProcess ))
@@ -248,15 +248,15 @@ func TestEventSourceEnableFlagsDynamicallyWithYaraEnabled(t *testing.T) {
248248
249249 r := & config.RulesCompileResult {
250250 HasProcEvents : true ,
251- HasImageEvents : true ,
251+ HasModuleEvents : true ,
252252 HasRegistryEvents : true ,
253253 HasNetworkEvents : true ,
254254 HasFileEvents : false ,
255255 HasThreadEvents : false ,
256256 HasAuditAPIEvents : true ,
257257 UsedEvents : []event.Type {
258258 event .CreateProcess ,
259- event .LoadImage ,
259+ event .LoadModule ,
260260 event .RegCreateKey ,
261261 event .RegSetValue ,
262262 event .RenameFile ,
@@ -268,7 +268,7 @@ func TestEventSourceEnableFlagsDynamicallyWithYaraEnabled(t *testing.T) {
268268 EventSource : config.EventSourceConfig {
269269 EnableThreadEvents : true ,
270270 EnableRegistryEvents : true ,
271- EnableImageEvents : true ,
271+ EnableModuleEvents : true ,
272272 EnableFileIOEvents : true ,
273273 EnableAuditAPIEvents : true ,
274274 EnableVAMapEvents : false ,
@@ -326,7 +326,7 @@ func TestEventSourceRundownEvents(t *testing.T) {
326326
327327 evsConfig := config.EventSourceConfig {
328328 EnableThreadEvents : true ,
329- EnableImageEvents : true ,
329+ EnableModuleEvents : true ,
330330 EnableFileIOEvents : true ,
331331 EnableNetEvents : true ,
332332 EnableRegistryEvents : true ,
@@ -348,7 +348,7 @@ func TestEventSourceRundownEvents(t *testing.T) {
348348 rundownsByType := map [event.Type ]bool {
349349 event .ProcessRundown : false ,
350350 event .ThreadRundown : false ,
351- event .ImageRundown : false ,
351+ event .ModuleRundown : false ,
352352 event .FileRundown : false ,
353353 event .RegKCBRundown : false ,
354354 }
@@ -435,11 +435,11 @@ func TestEventSourceAllEvents(t *testing.T) {
435435 false ,
436436 },
437437 {
438- "load image " ,
438+ "load module " ,
439439 nil ,
440440 func (e * event.Event ) bool {
441441 img := filepath .Join (os .Getenv ("windir" ), "System32" , "notepad.exe" )
442- return e .IsLoadImage () && strings .EqualFold (img , e .GetParamAsString (params .ImagePath ))
442+ return e .IsLoadModule () && strings .EqualFold (img , e .GetParamAsString (params .ModulePath ))
443443 },
444444 false ,
445445 },
@@ -491,7 +491,7 @@ func TestEventSourceAllEvents(t *testing.T) {
491491 {
492492 "map view section" ,
493493 func () error {
494- const SecImage = 0x01000000
494+ const SecModule = 0x01000000
495495 const SectionRead = 0x4
496496
497497 var sec windows.Handle
@@ -514,7 +514,7 @@ func TestEventSourceAllEvents(t *testing.T) {
514514 0 ,
515515 uintptr (unsafe .Pointer (& size )),
516516 windows .PAGE_READONLY ,
517- SecImage ,
517+ SecModule ,
518518 windows .Handle (f .Fd ()),
519519 ); err != nil {
520520 return fmt .Errorf ("NtCreateSection: %v" , err )
@@ -539,7 +539,7 @@ func TestEventSourceAllEvents(t *testing.T) {
539539 func (e * event.Event ) bool {
540540 return e .CurrentPid () && e .Type == event .MapViewFile &&
541541 e .GetParamAsString (params .MemProtect ) == "EXECUTE_READWRITE|READONLY" &&
542- e .GetParamAsString (params .FileViewSectionType ) == "IMAGE " &&
542+ e .GetParamAsString (params .FileViewSectionType ) == "Module " &&
543543 strings .Contains (e .GetParamAsString (params .FilePath ), "_fixtures\\ yara-test.dll" )
544544 },
545545 false ,
@@ -717,7 +717,7 @@ func TestEventSourceAllEvents(t *testing.T) {
717717
718718 evsConfig := config.EventSourceConfig {
719719 EnableThreadEvents : true ,
720- EnableImageEvents : true ,
720+ EnableModuleEvents : true ,
721721 EnableFileIOEvents : true ,
722722 EnableVAMapEvents : true ,
723723 EnableNetEvents : true ,
@@ -889,10 +889,10 @@ func testCallstackEnrichment(t *testing.T, hsnap handle.Snapshotter, psnap ps.Sn
889889 false ,
890890 },
891891 {
892- "load image callstack" ,
892+ "load Module callstack" ,
893893 nil ,
894894 func (e * event.Event ) bool {
895- if e .IsLoadImage () && filepath .Ext (e .GetParamAsString (params .FilePath )) == ".dll" {
895+ if e .IsLoadModule () && filepath .Ext (e .GetParamAsString (params .FilePath )) == ".dll" {
896896 callstack := e .Callstack .String ()
897897 return strings .Contains (strings .ToLower (callstack ), strings .ToLower ("\\ WINDOWS\\ System32\\ KERNELBASE.dll!LoadLibraryExW" )) &&
898898 strings .Contains (strings .ToLower (callstack ), strings .ToLower ("\\ WINDOWS\\ system32\\ ntoskrnl.exe!NtMapViewOfSection" ))
@@ -1202,7 +1202,7 @@ func testCallstackEnrichment(t *testing.T, hsnap handle.Snapshotter, psnap ps.Sn
12021202
12031203 evsConfig := config.EventSourceConfig {
12041204 EnableThreadEvents : true ,
1205- EnableImageEvents : true ,
1205+ EnableModuleEvents : true ,
12061206 EnableFileIOEvents : true ,
12071207 EnableRegistryEvents : true ,
12081208 EnableMemEvents : true ,
@@ -1327,7 +1327,7 @@ func TestEvasionScanner(t *testing.T) {
13271327
13281328 evsConfig := config.EventSourceConfig {
13291329 EnableThreadEvents : true ,
1330- EnableImageEvents : true ,
1330+ EnableModuleEvents : true ,
13311331 EnableFileIOEvents : false ,
13321332 EnableVAMapEvents : true ,
13331333 EnableNetEvents : true ,
0 commit comments