@@ -18,15 +18,15 @@ search: |
1818 `linux_auditd`
1919 (type=PATH OR type=CWD)
2020 | rex "msg=audit\([^)]*:(?<audit_id>\d+)\)"
21-
21+
2222 | stats
2323 values(type) as types
2424 values(name) as names
2525 values(nametype) as nametype
2626 values(cwd) as cwd_list
2727 values(_time) as event_times
2828 by audit_id, host
29-
29+
3030 | eval current_working_directory = coalesce(mvindex(cwd_list, 0), "N/A")
3131 | eval candidate_paths = mvmap(names, if(match(names, "^/"), names, current_working_directory + "/" + names))
3232 | eval matched_paths = mvfilter(match(candidate_paths, "/etc/profile|/etc/shells|/etc/profile\\.d/.*|/etc/bash\\.bashrc.*|/etc/bashrc|.*/zsh/zprofile|.*/zsh/zshrc|.*/zsh/zlogin|.*/zsh/zlogout|/etc/csh\\.cshrc.*|/etc/csh\\.login.*|/root/\\.bashrc.*|/root/\\.bash_profile.*|/root/\\.profile.*|/root/\\.zshrc.*|/root/\\.zprofile.*|/home/.*/\\.bashrc.*|/home/.*/\\.zshrc.*|/home/.*/\\.bash_profile.*|/home/.*/\\.zprofile.*|/home/.*/\\.profile.*|/home/.*/\\.bash_login.*|/home/.*/\\.bash_logout.*|/home/.*/\\.zlogin.*|/home/.*/\\.zlogout.*"))
@@ -35,15 +35,15 @@ search: |
3535 | eval e_time = mvindex(event_times, 0)
3636 | where match_count > 0
3737 | rename host as dest
38-
38+
3939 | stats count min(e_time) as firstTime max(e_time) as lastTime
4040 values(nametype) as nametype
4141 by current_working_directory
4242 reconstructed_path
4343 match_count
4444 dest
4545 audit_id
46-
46+
4747 | `security_content_ctime(firstTime)`
4848 | `security_content_ctime(lastTime)`
4949 | `linux_auditd_unix_shell_configuration_modification_filter`
@@ -69,7 +69,8 @@ drilldown_searches:
6969 earliest_offset : $info_min_time$
7070 latest_offset : $info_max_time$
7171 - name : View risk events for the last 7 days for - "$dest$"
72- search : ' | from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
72+ search :
73+ ' | from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
7374 starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
7475 values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
7576 as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
@@ -78,7 +79,8 @@ drilldown_searches:
7879 earliest_offset : $info_min_time$
7980 latest_offset : $info_max_time$
8081rba :
81- message : A [$type$] event occurred on host - [$dest$] to modify the unix shell configuration
82+ message :
83+ A [$nametype$] event occurred on host - [$dest$] to modify the unix shell configuration
8284 file.
8385 risk_objects :
8486 - field : dest
@@ -102,7 +104,6 @@ tags:
102104tests :
103105 - name : True Positive Test
104106 attack_data :
105- - data :
106- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.004/linux_auditd_unix_shell_mod_config//linux_path_profile_d.log
107- source : auditd
108- sourcetype : auditd
107+ - data : https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.004/linux_auditd_unix_shell_mod_config//linux_path_profile_d.log
108+ source : auditd
109+ sourcetype : auditd
0 commit comments