feat(go): port process access detectors
This commit is contained in:
parent
f02509aab5
commit
fc9b5f0448
22 changed files with 554 additions and 40 deletions
8
tests/fixtures/go/deleted-exe.json
vendored
8
tests/fixtures/go/deleted-exe.json
vendored
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"processes": [
|
||||
{"pid": 300, "comm": "tmpdrop", "cmdline": "tmpdrop", "exe": "/tmp/x (deleted)"},
|
||||
{"pid": 301, "comm": "memdrop", "cmdline": "memdrop", "exe": "/memfd:foo (deleted)"},
|
||||
{"pid": 302, "comm": "upgrade", "cmdline": "upgrade", "exe": "/usr/bin/x (deleted)"},
|
||||
{"pid": 303, "comm": "normal", "cmdline": "normal", "exe": "/usr/bin/x"}
|
||||
]
|
||||
}
|
||||
16
tests/fixtures/go/process-detectors.json
vendored
Normal file
16
tests/fixtures/go/process-detectors.json
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"ld_preload": "/tmp/global.so\n/opt/second.so",
|
||||
"processes": [
|
||||
{"pid": 200, "comm": "sleep", "cmdline": "sleep", "exe": "/usr/bin/sleep", "environ": {"LD_PRELOAD": "/tmp/evil.so"}},
|
||||
{"pid": 201, "comm": "safe", "cmdline": "safe", "exe": "/usr/bin/safe", "environ": {"LD_PRELOAD": "/usr/lib/libfoo.so"}},
|
||||
{"pid": 300, "comm": "tmpdrop", "cmdline": "tmpdrop", "exe": "/tmp/x (deleted)"},
|
||||
{"pid": 301, "comm": "memdrop", "cmdline": "memdrop", "exe": "/memfd:foo (deleted)"},
|
||||
{"pid": 302, "comm": "upgrade", "cmdline": "upgrade", "exe": "/usr/bin/x (deleted)"},
|
||||
{"pid": 303, "comm": "normal", "cmdline": "normal", "exe": "/usr/bin/x"},
|
||||
{"pid": 320, "comm": "hoxha", "cmdline": "hoxha", "exe": "/tmp/hoxha", "fd_targets": {"7": "/dev/input/event3"}},
|
||||
{"pid": 321, "comm": "Xorg", "cmdline": "Xorg", "exe": "/usr/bin/Xorg", "fd_targets": {"8": "/dev/hidraw0"}},
|
||||
{"pid": 330, "comm": "hoxha", "cmdline": "hoxha", "exe": "/tmp/hoxha", "fd_targets": {"4": "/etc/shadow"}},
|
||||
{"pid": 331, "comm": "collector", "cmdline": "collector", "exe": "/tmp/collector", "fd_targets": {"5": "/home/luna/.ssh/id_ed25519"}},
|
||||
{"pid": 332, "comm": "firefox", "cmdline": "firefox", "exe": "/usr/lib/firefox/firefox", "fd_targets": {"8": "/home/luna/.mozilla/firefox/a/key4.db"}}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue