Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/filter/accessor_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (ps *psAccessor) Get(f Field, e *event.Event) (params.Value, error) {
}
mods := make([]string, 0, len(ps.Modules))
for _, m := range ps.Modules {
mods = append(mods, filepath.Base(m.Name))
mods = append(mods, m.Name)
}
return mods, nil
case fields.PsUUID:
Expand Down
4 changes: 2 additions & 2 deletions pkg/filter/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func TestProcFilter(t *testing.T) {

{`evt.name = 'CreateProcess' and ps.name contains 'svchost'`, true},

{`ps.modules IN ('kernel32.dll')`, true},
{`ps.modules IN ('C:\\Windows\\System32\\kernel32.dll')`, true},
{`evt.name = 'CreateProcess' and evt.pid != ps.ppid`, true},
{`ps.parent.name = 'svchost.exe'`, true},

Expand All @@ -328,7 +328,7 @@ func TestProcFilter(t *testing.T) {
{`ps.args iintersects ('-K', 'DComLaunch')`, true},
{`ps.args iintersects ('-W', 'DcomLaunch')`, false},

{`foreach(ps.modules, $mod, $mod imatches 'us?r32.dll')`, true},
{`foreach(ps.modules, $mod, $mod imatches '?:\\*\\us?r32.dll')`, true},
{`foreach(ps._modules, $mod, $mod.path imatches '?:\\Windows\\System32\\us?r32.dll')`, true},
{`foreach(ps._modules, $mod, $mod.name imatches 'USER32.*')`, true},
{`foreach(ps._modules, $mod, $mod.name imatches 'USER32.*' and $mod.size >= 212354)`, true},
Expand Down