Skip to content

Commit 0297b6c

Browse files
authored
Update execution_unusual_kthreadd_execution.toml
1 parent e2da0b3 commit 0297b6c

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

rules/linux/execution_unusual_kthreadd_execution.toml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,23 @@ timestamp_override = "event.ingested"
5656
type = "new_terms"
5757
query = '''
5858
host.os.type:linux and event.category:process and event.type:start and event.action:exec and process.parent.name:kthreadd and (
59-
process.executable:("/tmp/*" or "/var/tmp/*" or "/dev/shm/*" or "/var/www/*") or
60-
process.name:(bash or dash or sh or tcsh or csh or zsh or ksh or fish or whoami or curl or wget or id or nohup or setsid)
61-
) and
59+
process.executable:(/dev/shm/* or /tmp/* or /var/tmp/* or /var/www/*) or
60+
process.name:(bash or csh or curl or dash or fish or id or ksh or nohup or setsid or sh or tcsh or wget or whoami or zsh)
61+
) and
62+
process.command_line:(
63+
*/dev/shm/* or */dev/tcp/* or */etc/init.d* or */etc/ld.so* or */etc/profile* or */etc/rc.local* or */etc/shadow* or */etc/ssh* or
64+
*/etc/sudoers* or */home/*/.ssh/* or */root/.ssh* or */tmp/* or */var/log/* or */var/run/* or */var/tmp/* or */var/www/* or
65+
*base64* or *cron* or *xxd* or *~/.ssh/*
66+
) and not (
67+
process.name:(true or cifs.upcall or dpkg or flock or gdbus or getopt or grep or mount or touch or umount or uname) or
6268
process.command_line:(
63-
*cron* or */etc/rc.local* or */dev/tcp/* or */etc/init.d* or */etc/ld.so* or */etc/sudoers* or *base64* or */etc/profile* or
64-
*/dev/shm/* or */etc/ssh* or */home/*/.ssh/* or */root/.ssh* or *~/.ssh/* or *xxd* or */etc/shadow* or */tmp/* or
65-
*/var/tmp/* or */var/www/* or */var/log/* or */var/run/*
66-
) and not (
67-
process.name:(dpkg or true or flock or uname or mount or umount or cifs.upcall or touch or gdbus or grep or getopt) or
68-
process.command_line:"sh -c /bin/true" or
69-
process.executable:(/tmp/newroot/* or /var/lib/docker/overlay2/* or /vz/root/* or /lib/systemd/systemd-cgroups-agent or /usr/local/axs-haproxy-monitoring/haproxy_stats.sh or /proc/self/exe) or
70-
process.command_line:(*/bin/ps* or *pgrep* or *omsagent* or */usr/bin/find* or */usr/bin/grep* or *ds_agent* or *nagios* or *gitlabrunner*)
69+
"sh -c /bin/true" or */bin/ps* or */usr/bin/find* or */usr/bin/grep* or *ds_agent* or *gitlabrunner* or *nagios* or
70+
*omsagent* or *pgrep*
71+
) or
72+
process.executable:(
73+
/lib/systemd/systemd-cgroups-agent or /proc/self/exe or /usr/local/axs-haproxy-monitoring/haproxy_stats.sh or /tmp/newroot/* or
74+
/var/lib/docker/overlay2/* or /vz/root/*
75+
)
7176
)
7277
'''
7378

0 commit comments

Comments
 (0)