Skip to content

Commit 402f870

Browse files
authored
Merge pull request #3467 from splunk/linux_syscall_auditd_update
linux_syscall_auditd_update
2 parents d869952 + 3f8a13a commit 402f870

11 files changed

Lines changed: 89 additions & 52 deletions

data_sources/linux_auditd_syscall.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ fields:
5959
- EGID
6060
- SGID
6161
- FSGID
62+
output_fields:
63+
- comm
64+
- exe
65+
- syscall
66+
- uid
67+
- ppid
68+
- pid
69+
- dest
6270
example_log: 'type=SYSCALL msg=audit(1723035666.627:3663): arch=c000003e syscall=59
6371
success=yes exit=0 a0=556a6d697a58 a1=556a6d68ad00 a2=556a6d69c980 a3=0 items=2
6472
ppid=1300 pid=1301 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0

detections/endpoint/linux_auditd_at_application_execution.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ description: The following analytic detects the execution of the "At" applicatio
1616
and mitigate potential risks.
1717
data_source:
1818
- Linux Auditd Syscall
19-
search: '`linux_auditd` type=SYSCALL comm IN ("at", "atd") OR exe IN ("/usr/bin/at","/usr/bin/atd")
20-
AND NOT (UID IN("daemon")) | rename host as dest | stats count min(_time) as firstTime
21-
max(_time) as lastTime by comm exe SYSCALL UID ppid pid dest | `security_content_ctime(firstTime)`
22-
| `security_content_ctime(lastTime)`| `linux_auditd_at_application_execution_filter`'
19+
search: '`linux_auditd` type=SYSCALL comm IN ("at", "atd") OR exe IN ("/usr/bin/at","/usr/bin/atd") AND NOT (uid IN ("daemon"))
20+
| rename host as dest
21+
| stats count min(_time) as firstTime max(_time) as lastTime
22+
by comm exe syscall uid ppid pid dest
23+
| `security_content_ctime(firstTime)`
24+
| `security_content_ctime(lastTime)`
25+
| `linux_auditd_at_application_execution_filter`'
2326
how_to_implement: To implement this detection, the process begins by ingesting auditd
2427
data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line
2528
executions and process details on Unix/Linux systems. These logs should be ingested
@@ -75,6 +78,6 @@ tests:
7578
- name: True Positive Test
7679
attack_data:
7780
- data:
78-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.002/linux_auditd_at/linux_auditd_at_execution.log
81+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.002/linux_new_auditd_at/linux_auditd_new_at.log
7982
source: auditd
8083
sourcetype: auditd

detections/endpoint/linux_auditd_data_transfer_size_limits_via_split_syscall.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ description: The following analytic detects suspicious data transfer activities
1515
from the network.
1616
data_source:
1717
- Linux Auditd Syscall
18-
search: '`linux_auditd` type=SYSCALL comm=split OR exe= "*/split" | rename host as
19-
dest | stats count min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL
20-
UID ppid pid success dest | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`|
21-
`linux_auditd_data_transfer_size_limits_via_split_syscall_filter`'
18+
search: '`linux_auditd` type=SYSCALL comm=split OR exe= "*/split"
19+
| rename host as dest
20+
| stats count min(_time) as firstTime max(_time) as lastTime
21+
by comm exe syscall uid ppid pid success dest
22+
| `security_content_ctime(firstTime)`
23+
| `security_content_ctime(lastTime)`
24+
| `linux_auditd_data_transfer_size_limits_via_split_syscall_filter`'
2225
how_to_implement: To implement this detection, the process begins by ingesting auditd
2326
data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line
2427
executions and process details on Unix/Linux systems. These logs should be ingested
@@ -72,6 +75,6 @@ tests:
7275
- name: True Positive Test
7376
attack_data:
7477
- data:
75-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1030/linux_auditd_split_syscall/linux_auditd_split_syscall.log
78+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1030/linux_auditd_split_syscall_new/linux_auditd_new_split.log
7679
source: auditd
7780
sourcetype: auditd

detections/endpoint/linux_auditd_doas_tool_execution.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ description: The following analytic detects the execution of the 'doas' tool on
1414
the entire system.
1515
data_source:
1616
- Linux Auditd Syscall
17-
search: '`linux_auditd` type=SYSCALL comm=doas | rename host as dest | stats count
18-
min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL UID ppid pid
19-
success dest | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`|
20-
`linux_auditd_doas_tool_execution_filter`'
17+
search: '`linux_auditd` type=SYSCALL comm=doas
18+
| rename host as dest
19+
| stats count min(_time) as firstTime max(_time) as lastTime
20+
by comm exe syscall uid ppid pid success dest
21+
| `security_content_ctime(firstTime)`
22+
| `security_content_ctime(lastTime)`
23+
| `linux_auditd_doas_tool_execution_filter`'
2124
how_to_implement: To implement this detection, the process begins by ingesting auditd
2225
data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line
2326
executions and process details on Unix/Linux systems. These logs should be ingested
@@ -71,6 +74,6 @@ tests:
7174
- name: True Positive Test
7275
attack_data:
7376
- data:
74-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.003/linux_auditd_doas/linux_auditd_doas.log
77+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.003/linux_auditd_doas_new/linux_auditd_new_doas.log
7578
source: auditd
7679
sourcetype: auditd

detections/endpoint/linux_auditd_edit_cron_table_parameter.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ description: The following analytic detects the suspicious editing of cron jobs
1414
compromise.
1515
data_source:
1616
- Linux Auditd Syscall
17-
search: '`linux_auditd` type=SYSCALL SYSCALL=rename (comm IN ("crontab") OR exe IN
18-
("*/crontab")) success=yes AND NOT (UID IN("daemon")) | rename host as dest | stats
19-
count min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL UID ppid
20-
pid dest | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`|
21-
`linux_auditd_edit_cron_table_parameter_filter`'
17+
search: '`linux_auditd` type=SYSCALL syscall IN ("rename", "execve") (comm IN ("crontab") OR exe IN ("*/crontab")) success=yes AND NOT (UID IN("daemon"))
18+
| rename host as dest
19+
| stats count min(_time) as firstTime max(_time) as lastTime
20+
by comm exe syscall uid ppid pid dest
21+
| `security_content_ctime(firstTime)`
22+
| `security_content_ctime(lastTime)`
23+
| `linux_auditd_edit_cron_table_parameter_filter`'
2224
how_to_implement: To implement this detection, the process begins by ingesting auditd
2325
data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line
2426
executions and process details on Unix/Linux systems. These logs should be ingested
@@ -73,6 +75,6 @@ tests:
7375
- name: True Positive Test
7476
attack_data:
7577
- data:
76-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.003/linux_auditd_crontab_edit/linux_auditd_crontab_edit.log
78+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.003/linux_auditd_crontab_edit_new/linux_auditd_new_crontab.log
7779
source: auditd
7880
sourcetype: auditd

detections/endpoint/linux_auditd_insert_kernel_module_using_insmod_utility.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ description: The following analytic detects the insertion of a Linux kernel modu
1414
execution, persistent access, and severe compromise of the affected system.
1515
data_source:
1616
- Linux Auditd Syscall
17-
search: '`linux_auditd` type=SYSCALL comm=insmod | rename host as dest | stats count
18-
min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL UID ppid pid
19-
success dest | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`|
20-
`linux_auditd_insert_kernel_module_using_insmod_utility_filter`'
17+
search: '`linux_auditd` type=SYSCALL comm=insmod
18+
| rename host as dest
19+
| stats count min(_time) as firstTime max(_time) as lastTime
20+
by comm exe syscall uid ppid pid success dest
21+
| `security_content_ctime(firstTime)`
22+
| `security_content_ctime(lastTime)`
23+
| `linux_auditd_insert_kernel_module_using_insmod_utility_filter`'
2124
how_to_implement: To implement this detection, the process begins by ingesting auditd
2225
data, that consists of SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures
2326
command-line executions and process details on Unix/Linux systems. These logs should
@@ -74,6 +77,6 @@ tests:
7477
- name: True Positive Test
7578
attack_data:
7679
- data:
77-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.006/linux_auditd_insmod/linux_auditd_insmod.log
80+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.006/linux_auditd_insmod_new/linux_auditd_new_insmod.log
7881
source: auditd
7982
sourcetype: auditd

detections/endpoint/linux_auditd_install_kernel_module_using_modprobe_utility.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ description: The following analytic detects the installation of a Linux kernel m
1414
access to the system, compromising its integrity and security.
1515
data_source:
1616
- Linux Auditd Syscall
17-
search: '`linux_auditd` type=SYSCALL comm=modprobe | rename host as dest | stats count
18-
min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL UID ppid pid
19-
success dest | `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)`|
20-
`linux_auditd_install_kernel_module_using_modprobe_utility_filter`'
17+
search: '`linux_auditd` type=SYSCALL comm=modprobe
18+
| rename host as dest
19+
| stats count min(_time) as firstTime max(_time) as lastTime
20+
by comm exe syscall uid ppid pid success dest
21+
| `security_content_ctime(firstTime)`
22+
| `security_content_ctime(lastTime)`
23+
| `linux_auditd_install_kernel_module_using_modprobe_utility_filter`'
2124
how_to_implement: To implement this detection, the process begins by ingesting auditd
2225
data, that consists of SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures
2326
command-line executions and process details on Unix/Linux systems. These logs should
@@ -73,6 +76,6 @@ tests:
7376
- name: True Positive Test
7477
attack_data:
7578
- data:
76-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.006/linux_auditd_modprobe/linux_auditd_modprobe.log
79+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.006/linux_auditd_modprobe_new/linux_auditd_new_modprobe.log
7780
source: auditd
7881
sourcetype: auditd

detections/endpoint/linux_auditd_kernel_module_enumeration.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ description: The following analytic identifies the use of the 'kmod' process to
1414
other malicious actions within the system.
1515
data_source:
1616
- Linux Auditd Syscall
17-
search: '`linux_auditd` type=SYSCALL comm=lsmod | rename host as dest | stats count
18-
min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL UID ppid pid
19-
success dest | `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)`
17+
search: '`linux_auditd` type=SYSCALL comm=lsmod
18+
| rename host as dest
19+
| stats count min(_time) as firstTime max(_time) as lastTime
20+
by comm exe syscall uid ppid pid success dest
21+
| `security_content_ctime(firstTime)`
22+
| `security_content_ctime(lastTime)`
2023
| `linux_auditd_kernel_module_enumeration_filter`'
2124
how_to_implement: To implement this detection, the process begins by ingesting auditd
2225
data, that consists of SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures
@@ -71,6 +74,6 @@ tests:
7174
- name: True Positive Test
7275
attack_data:
7376
- data:
74-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1082/linux_auditd_lsmod/linux_auditd_lsmod.log
77+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1082/linux_auditd_lsmod_new/linux_auditd_new_lsmod.log
7578
source: auditd
7679
sourcetype: auditd

detections/endpoint/linux_auditd_kernel_module_using_rmmod_utility.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ description: The following analytic detects suspicious use of the `rmmod` utilit
1515
to protect system integrity and security.
1616
data_source:
1717
- Linux Auditd Syscall
18-
search: '`linux_auditd` type=SYSCALL comm=rmmod | rename host as dest | stats count
19-
min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL UID ppid pid
20-
success dest | `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)`|
21-
`linux_auditd_kernel_module_using_rmmod_utility_filter`'
18+
search: '`linux_auditd` type=SYSCALL comm=rmmod
19+
| rename host as dest
20+
| stats count min(_time) as firstTime max(_time) as lastTime
21+
by comm exe syscall uid ppid pid success dest
22+
| `security_content_ctime(firstTime)`
23+
| `security_content_ctime(lastTime)`
24+
| `linux_auditd_kernel_module_using_rmmod_utility_filter`'
2225
how_to_implement: To implement this detection, the process begins by ingesting auditd
2326
data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line
2427
executions and process details on Unix/Linux systems. These logs should be ingested
@@ -72,6 +75,6 @@ tests:
7275
- name: True Positive Test
7376
attack_data:
7477
- data:
75-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.006/linux_auditd_rmmod/linux_auditd_rmmod.log
78+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.006/linux_auditd_rmmod_new/linux_auditd_new_rmmod.log
7679
source: auditd
7780
sourcetype: auditd

detections/endpoint/linux_auditd_system_network_configuration_discovery.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ description: The following analytic detects suspicious system network configurat
1515
reconnaissance operations, mitigating the risk of further compromise.
1616
data_source:
1717
- Linux Auditd Syscall
18-
search: '`linux_auditd` type=SYSCALL comm IN ("arp", "ifconfig", "ip", "netstat",
19-
"firewall-cmd", "ufw", "iptables", "ss", "route") | bucket _time span=15m | rename
20-
host as dest | stats dc(comm) as unique_commands, values(comm) as comm, values(exe)
21-
as exe, values(SYSCALL) as SYSCALL, values(UID) as UID, values(ppid) as ppid, values(pid)
22-
as pid, count, min(_time) as firstTime, max(_time) as lastTime by success dest |
23-
where unique_commands >= 4 | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
18+
search: '`linux_auditd` type=SYSCALL comm IN ("arp", "ifconfig", "ip", "netstat", "firewall-cmd", "ufw", "iptables", "ss", "route")
19+
| bucket _time span=15m
20+
| rename host as dest
21+
| stats dc(comm) as unique_commands, values(comm) as comm, values(exe)
22+
as exe, values(syscall) as syscall, values(uid) as uid, values(ppid) as ppid, values(pid)
23+
as pid, count, min(_time) as firstTime, max(_time) as lastTime by success dest
24+
| where unique_commands >= 4
25+
| `security_content_ctime(firstTime)`
26+
| `security_content_ctime(lastTime)`
2427
| `linux_auditd_system_network_configuration_discovery_filter`'
2528
how_to_implement: To implement this detection, the process begins by ingesting auditd
2629
data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line
@@ -75,6 +78,6 @@ tests:
7578
- name: True Positive Test
7679
attack_data:
7780
- data:
78-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1016/linux_auditd_net_tool/linux_auditd_net_tool.log
81+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1016/linux_auditd_net_tool_new/linux_auditd_net_tool_bucket_new.log
7982
source: auditd
8083
sourcetype: auditd

0 commit comments

Comments
 (0)