{"id":"ecbc5e16-58e0-4521-9c60-eb9a7ea4ad34","title":"Meterpreter or Cobalt Strike Getsystem Service Installation - Security","description":"Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting a specific service installation","author":"Teymur Kheirkhabarov, Ecco, Florian Roth (Nextron Systems)","status":"test","level":"high","date":"2019-10-26","modified":"2023-11-15","tags":["attack.privilege-escalation","attack.stealth","attack.t1134.001","attack.t1134.002"],"technique_ids":["T1134.001","T1134.002"],"logsource":{"product":"windows","service":"security","definition":"The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697"},"falsepositives":["Unlikely"],"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/builtin/security/win_security_meterpreter_or_cobaltstrike_getsystem_service_install.yml","source_sha256":"93f073039811ea310322aebca44e791f1f31f32d8c4199a16d297d193d056eee","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/builtin/security/win_security_meterpreter_or_cobaltstrike_getsystem_service_install.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Meterpreter or Cobalt Strike Getsystem Service Installation - Security\nid: ecbc5e16-58e0-4521-9c60-eb9a7ea4ad34\nrelated:\n    - id: 843544a7-56e0-4dcc-a44f-5cc266dd97d6\n      type: derived\nstatus: test\ndescription: Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting a specific service installation\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 (Nextron Systems)\ndate: 2019-10-26\nmodified: 2023-11-15\ntags:\n    - attack.privilege-escalation\n    - attack.stealth\n    - attack.t1134.001\n    - attack.t1134.002\nlogsource:\n    product: windows\n    service: security\n    definition: The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697\ndetection:\n    selection_eid:\n        EventID: 4697\n    selection_cli_cmd:\n        # meterpreter getsystem technique 1: cmd.exe /c echo 559891bb017 > \\\\.\\pipe\\5e120a\n        # cobaltstrike getsystem technique 1: %COMSPEC% /c echo 559891bb017 > \\\\.\\pipe\\5e120a\n        # cobaltstrike getsystem technique 1b (expanded %COMSPEC%): %COMSPEC% /c echo 559891bb017 > \\\\.\\pipe\\5e120a\n        ServiceFileName|contains|all:\n            - '/c'\n            - 'echo'\n            - '\\pipe\\'\n        ServiceFileName|contains:\n            - 'cmd'\n            - '%COMSPEC%'\n    selection_cli_rundll:\n        # meterpreter getsystem technique 2: rundll32.exe C:\\Users\\test\\AppData\\Local\\Temp\\tmexsn.dll,a /p:tmexsn\n        ServiceFileName|contains|all:\n            - 'rundll32'\n            - '.dll,a'\n            - '/p:'\n    selection_cli_share:\n        ServiceFileName|startswith: '\\\\\\\\127.0.0.1\\\\ADMIN$\\'  # https://twitter.com/svch0st/status/1413688851877416960?lang=en\n    condition: selection_eid and 1 of selection_cli_*\nfalsepositives:\n    - Unlikely\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/ecbc5e16-58e0-4521-9c60-eb9a7ea4ad34.json","kind":"sigma"}
