{"id":"15619216-e993-4721-b590-4c520615a67d","title":"Potential Meterpreter/CobaltStrike Activity","description":"Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting a specific service starting","author":"Teymur Kheirkhabarov, Ecco, Florian Roth","status":"test","level":"high","date":"2019-10-26","modified":"2023-02-05","tags":["attack.privilege-escalation","attack.stealth","attack.t1134.001","attack.t1134.002"],"technique_ids":["T1134.001","T1134.002"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Commandlines containing components like cmd accidentally","Jobs and services started with cmd"],"references":["https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment","https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/"],"source_path":"rules/windows/process_creation/proc_creation_win_hktl_meterpreter_getsystem.yml","source_sha256":"88fe73438af18fbe00d308b30f9fde8d9873b18f76ca5f259d599b2459d9ff71","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_hktl_meterpreter_getsystem.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Potential Meterpreter/CobaltStrike Activity\nid: 15619216-e993-4721-b590-4c520615a67d\nstatus: test\ndescription: Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting a specific service starting\nreferences:\n    - https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment\n    - https://blog.cobaltstrike.com/2014/04/02/what-happens-when-i-type-getsystem/\nauthor: Teymur Kheirkhabarov, Ecco, Florian Roth\ndate: 2019-10-26\nmodified: 2023-02-05\ntags:\n    - attack.privilege-escalation\n    - attack.stealth\n    - attack.t1134.001\n    - attack.t1134.002\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        ParentImage|endswith: '\\services.exe'\n    selection_technique_1:\n        # Examples:\n        #   Meterpreter  getsystem technique 1: cmd.exe /c echo 559891bb017 > \\\\.\\pipe\\5e120a\n        #   CobaltStrike getsystem technique 1b (expanded env var): %COMSPEC% /c echo 559891bb017 > \\\\.\\pipe\\5e120a\n        #   CobaltStrike getsystem technique 1: %COMSPEC% /c echo 559891bb017 > \\\\.\\pipe\\5e120a\n        CommandLine|contains|all:\n            - '/c'\n            - 'echo'\n            - '\\pipe\\'\n        CommandLine|contains:\n            - 'cmd'\n            - '%COMSPEC%'\n    selection_technique_2:\n        # meterpreter getsystem technique 2: rundll32.exe C:\\Users\\test\\AppData\\Local\\Temp\\tmexsn.dll,a /p:tmexsn\n        CommandLine|contains|all:\n            - 'rundll32'\n            - '.dll,a'\n            - '/p:'\n    filter_defender:\n        CommandLine|contains: 'MpCmdRun'\n    condition: selection_img and 1 of selection_technique_* and not 1 of filter_*\nfalsepositives:\n    - Commandlines containing components like cmd accidentally\n    - Jobs and services started with cmd\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1134.001","id":"T1134.001","name":"Token Impersonation/Theft","page":"techniques/enterprise/T1134.001/"},{"key":"enterprise/T1134.002","id":"T1134.002","name":"Create Process with Token","page":"techniques/enterprise/T1134.002/"}],"data_path":"data/detection-rules/15619216-e993-4721-b590-4c520615a67d.json","kind":"sigma"}
