diff --git a/detections/endpoint/macos_lolbin.yml b/detections/endpoint/macos_lolbin.yml new file mode 100644 index 0000000000..089dff4447 --- /dev/null +++ b/detections/endpoint/macos_lolbin.yml @@ -0,0 +1,70 @@ +name: MacOS LOLbin +id: 58d270fb-5b39-418e-a855-4b8ac046805e +version: 1 +date: '2022-03-04' +author: Patrick Bareiss, Splunk +type: TTP +datamodel: +- Endpoint +description: Detect multiple executions of Living off the Land (LOLbin) binaries in a + short period of time. +search: '`osquery` name=es_process_events columns.cmdline IN ("find*", "crontab*", "screencapture*", "openssl*", "curl*", "wget*", "killall*", "funzip*") + | rename columns.* as * + | stats min(_time) as firstTime max(_time) as lastTime values(cmdline) as cmdline, values(pid) as pid, values(parent) as parent, values(path) as path, + values(signing_id) as signing_id, dc(path) as dc_path by username host + | rename username as User, cmdline as process, path as process_path + | `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)` + | `macos_lolbin_filter`' +how_to_implement: This detection uses osquery and endpoint security on MacOS. + Follow the link in references, which describes how to setup process auditing in MacOS + with endpoint security and osquery. +known_false_positives: None identified. +references: +- https://osquery.readthedocs.io/en/stable/deployment/process-auditing/ +tags: + analytic_story: + - Living Off The Land + asset_type: Endpoint + cis20: + - CIS 3 + - CIS 5 + - CIS 16 + confidence: 50 + context: + - Source:Endpoint + - Stage:Execution + dataset: + - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.004/macos_lolbin/osquery.log + impact: 50 + kill_chain_phases: + - Actions on Objectives + message: Multiplle LOLbin are executed on host $host$ by user $user$ + mitre_attack_id: + - T1059.004 + - T1059 + nist: + - DE.CM + observable: + - name: user + type: User + role: + - Victim + - name: process + type: Process + role: + - Child Process + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + required_fields: + - _time + - columns.cmdline + - columns.pid + - columns.parent + - columns.path + - columns.signing_id + - columns.username + - host + risk_score: 25 + security_domain: endpoint diff --git a/macros/osquery.yml b/macros/osquery.yml new file mode 100644 index 0000000000..93de155245 --- /dev/null +++ b/macros/osquery.yml @@ -0,0 +1,4 @@ +definition: sourcetype=osquery:results +description: customer specific splunk configurations(eg- index, source, sourcetype). + Replace the macro definition with configurations for your Splunk Environmnent. +name: osquery \ No newline at end of file diff --git a/tests/endpoint/macos_lolbin.yml b/tests/endpoint/macos_lolbin.yml new file mode 100644 index 0000000000..28e50dd605 --- /dev/null +++ b/tests/endpoint/macos_lolbin.yml @@ -0,0 +1,12 @@ +name: MacOS LOLbin Unit Test +tests: +- name: MacOS LOLbin + file: endpoint/macos_lolbin.yml + pass_condition: '| stats count | where count > 0' + earliest_time: '-24h' + latest_time: 'now' + attack_data: + - file_name: osquery.log + data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.004/macos_lolbin/osquery.log + source: osquery + sourcetype: osquery:results \ No newline at end of file