You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: detections/endpoint/linux_add_files_in_known_crontab_directories.yml
+29-9Lines changed: 29 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,30 @@
1
1
name: Linux Add Files In Known Crontab Directories
2
2
id: 023f3452-5f27-11ec-bf00-acde48001122
3
-
version: 3
4
-
date: '2024-09-30'
3
+
version: '4'
4
+
date: '2024-12-17'
5
5
author: Teoderick Contreras, Splunk
6
6
status: production
7
7
type: Anomaly
8
-
description: The following analytic detects unauthorized file creation in known crontab directories on Unix-based systems. It leverages filesystem data to identify new files in directories such as /etc/cron* and /var/spool/cron/*. This activity is significant as it may indicate an attempt by threat actors or malware to establish persistence on a compromised host. If confirmed malicious, this could allow attackers to execute arbitrary code at scheduled intervals, potentially leading to further system compromise and unauthorized access to sensitive information.
8
+
description: The following analytic detects unauthorized file creation in known crontab
9
+
directories on Unix-based systems. It leverages filesystem data to identify new
10
+
files in directories such as /etc/cron* and /var/spool/cron/*. This activity is
11
+
significant as it may indicate an attempt by threat actors or malware to establish
12
+
persistence on a compromised host. If confirmed malicious, this could allow attackers
13
+
to execute arbitrary code at scheduled intervals, potentially leading to further
14
+
system compromise and unauthorized access to sensitive information.
9
15
data_source:
10
16
- Sysmon for Linux EventID 11
11
-
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path IN ("*/etc/cron*", "*/var/spool/cron/*") by Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.process_guid Filesystem.file_path | `drop_dm_object_name(Filesystem)` | `security_content_ctime(lastTime)` | `security_content_ctime(firstTime)` | `linux_add_files_in_known_crontab_directories_filter`'
12
-
how_to_implement: To successfully implement this search, you need to be ingesting logs with the file name, file path, and process_guid executions from your endpoints. If you are using Sysmon, you can use the Add-on for Linux Sysmon from Splunkbase.
13
-
known_false_positives: Administrator or network operator can create file in crontab folders for automation purposes. Please update the filter macros to remove false positives.
17
+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
18
+
as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path IN ("*/etc/cron*",
19
+
"*/var/spool/cron/*") by Filesystem.dest Filesystem.file_create_time Filesystem.file_name
- name: View risk events for the last 7 days for - "$dest$"
23
-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
37
+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
38
+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
39
+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
40
+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
41
+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
Copy file name to clipboardExpand all lines: detections/endpoint/linux_auditd_file_permission_modification_via_chmod.yml
+38-10Lines changed: 38 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,37 @@
1
1
name: Linux Auditd File Permission Modification Via Chmod
2
2
id: 5f1d2ea7-eec0-4790-8b24-6875312ad492
3
-
version: 3
4
-
date: '2024-12-02'
5
-
author: Teoderick Contreras, Splunk, Ivar Nygård
3
+
version: '4'
4
+
date: '2024-12-17'
5
+
author: "Teoderick Contreras, Splunk, Ivar Nyg\xE5rd"
6
6
status: production
7
7
type: Anomaly
8
-
description: The following analytic detects suspicious file permission modifications using the `chmod` command, which may indicate an attacker attempting to alter access controls on critical files or directories. Such modifications can be used to grant unauthorized users elevated privileges or to conceal malicious activities by restricting legitimate access. By monitoring for unusual or unauthorized `chmod` usage, this analytic helps identify potential security breaches, allowing security teams to respond promptly to prevent privilege escalation, data tampering, or other unauthorized actions on the system.
8
+
description: The following analytic detects suspicious file permission modifications
9
+
using the `chmod` command, which may indicate an attacker attempting to alter access
10
+
controls on critical files or directories. Such modifications can be used to grant
11
+
unauthorized users elevated privileges or to conceal malicious activities by restricting
12
+
legitimate access. By monitoring for unusual or unauthorized `chmod` usage, this
13
+
analytic helps identify potential security breaches, allowing security teams to
14
+
respond promptly to prevent privilege escalation, data tampering, or other unauthorized
15
+
actions on the system.
9
16
data_source:
10
17
- Linux Auditd Proctitle
11
-
search: '`linux_auditd` `linux_auditd_normalized_proctitle_process` | rename host as dest | where LIKE(process_exec, "%chmod%") AND (LIKE(process_exec, "% 777 %") OR LIKE(process_exec, "% 755 %") OR LIKE(process_exec, "%+%x%") OR LIKE(process_exec, "% 754 %") OR LIKE(process_exec, "% 700 %")) | stats count min(_time) as firstTime max(_time) as lastTime by process_exec proctitle dest | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`| `linux_auditd_file_permission_modification_via_chmod_filter`'
12
-
how_to_implement: To implement this detection, the process begins by ingesting auditd data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line executions and process details on Unix/Linux systems. These logs should be ingested and processed using Splunk Add-on for Unix and Linux (https://splunkbase.splunk.com/app/833), which is essential for correctly parsing and categorizing the data. The next step involves normalizing the field names to match the field names set by the Splunk Common Information Model (CIM) to ensure consistency across different data sources and enhance the efficiency of data modeling. This approach enables effective monitoring and detection of linux endpoints where auditd is deployed
13
-
known_false_positives: Administrator or network operator can use this application for automation purposes. Please update the filter macros to remove false positives.
- name: View risk events for the last 7 days for - "$dest$"
22
-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
43
+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
44
+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
45
+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
46
+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
47
+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
48
+
| `security_content_ctime(lastTime)`'
23
49
earliest_offset: $info_min_time$
24
50
latest_offset: $info_max_time$
25
51
tags:
26
52
analytic_story:
53
+
- XorDDos
27
54
- Linux Living Off The Land
55
+
- Compromised Linux Host
28
56
- Linux Privilege Escalation
29
57
- Linux Persistence Techniques
30
-
- Compromised Linux Host
31
58
asset_type: Endpoint
32
59
confidence: 50
33
60
impact: 50
34
-
message: A [$process_exec$] event occurred on host - [$dest$] to modify file permissions using the "chmod" command.
61
+
message: A [$process_exec$] event occurred on host - [$dest$] to modify file permissions
Copy file name to clipboardExpand all lines: detections/endpoint/linux_auditd_insert_kernel_module_using_insmod_utility.yml
+35-10Lines changed: 35 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,34 @@
1
1
name: Linux Auditd Insert Kernel Module Using Insmod Utility
2
2
id: bc0ca53f-dea6-4906-9b12-09c396fdf1d3
3
-
version: 2
4
-
date: '2024-09-30'
3
+
version: '3'
4
+
date: '2024-12-17'
5
5
author: Teoderick Contreras, Splunk
6
6
status: production
7
7
type: Anomaly
8
-
description: The following analytic detects the insertion of a Linux kernel module using the insmod utility. It leverages data from Linux Auditd, focusing on process execution logs that include process names and command-line details. This activity is significant as it may indicate the installation of a rootkit or malicious kernel module, potentially allowing an attacker to gain elevated privileges and bypass security detections. If confirmed malicious, this could lead to unauthorized code execution, persistent access, and severe compromise of the affected system.
8
+
description: The following analytic detects the insertion of a Linux kernel module
9
+
using the insmod utility. It leverages data from Linux Auditd, focusing on process
10
+
execution logs that include process names and command-line details. This activity
11
+
is significant as it may indicate the installation of a rootkit or malicious kernel
12
+
module, potentially allowing an attacker to gain elevated privileges and bypass
13
+
security detections. If confirmed malicious, this could lead to unauthorized code
14
+
execution, persistent access, and severe compromise of the affected system.
9
15
data_source:
10
16
- Linux Auditd Syscall
11
-
search: '`linux_auditd` type=SYSCALL comm=insmod | rename host as dest | stats count min(_time) as firstTime max(_time) as lastTime by comm exe SYSCALL UID ppid pid success dest | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`| `linux_auditd_insert_kernel_module_using_insmod_utility_filter`'
12
-
how_to_implement: To implement this detection, the process begins by ingesting auditd data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line executions and process details on Unix/Linux systems. These logs should be ingested and processed using Splunk Add-on for Unix and Linux (https://splunkbase.splunk.com/app/833), which is essential for correctly parsing and categorizing the data. The next step involves normalizing the field names to match the field names set by the Splunk Common Information Model (CIM) to ensure consistency across different data sources and enhance the efficiency of data modeling. This approach enables effective monitoring and detection of linux endpoints where auditd is deployed
13
-
known_false_positives: Administrator or network operator can execute this command. Please update the filter macros to remove false positives.
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)`|
- name: View risk events for the last 7 days for - "$dest$"
24
-
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
42
+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
43
+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
44
+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
45
+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
46
+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
47
+
| `security_content_ctime(lastTime)`'
25
48
earliest_offset: $info_min_time$
26
49
latest_offset: $info_max_time$
27
50
tags:
28
51
analytic_story:
29
-
- Linux Privilege Escalation
52
+
- XorDDos
30
53
- Linux Rootkit
31
-
- Linux Persistence Techniques
32
54
- Compromised Linux Host
55
+
- Linux Privilege Escalation
56
+
- Linux Persistence Techniques
33
57
asset_type: Endpoint
34
58
confidence: 80
35
59
impact: 80
36
-
message: A SYSCALL - [$comm$] event was executed on host - [$dest$] to insert a Linux kernel module using the insmod utility.
60
+
message: A SYSCALL - [$comm$] event was executed on host - [$dest$] to insert a
0 commit comments