Detectionhightest

Meterpreter or Cobalt Strike Getsystem Service Installation - Security

Detects the use of getsystem Meterpreter/Cobalt Strike command by detecting a specific service installation

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
Teymur Kheirkhabarov, Ecco, Florian Roth (Nextron Systems)Created Sat Oct 26Updated Wed Nov 15ecbc5e16-58e0-4521-9c60-eb9a7ea4ad34windows
Log Source
Windowssecurity
ProductWindows← raw: windows
Servicesecurity← raw: security

Definition

The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697

Detection Logic
Detection Logic4 selectors
detection:
    selection_eid:
        EventID: 4697
    selection_cli_cmd:
        # meterpreter getsystem technique 1: cmd.exe /c echo 559891bb017 > \\.\pipe\5e120a
        # cobaltstrike getsystem technique 1: %COMSPEC% /c echo 559891bb017 > \\.\pipe\5e120a
        # cobaltstrike getsystem technique 1b (expanded %COMSPEC%): %COMSPEC% /c echo 559891bb017 > \\.\pipe\5e120a
        ServiceFileName|contains|all:
            - '/c'
            - 'echo'
            - '\pipe\'
        ServiceFileName|contains:
            - 'cmd'
            - '%COMSPEC%'
    selection_cli_rundll:
        # meterpreter getsystem technique 2: rundll32.exe C:\Users\test\AppData\Local\Temp\tmexsn.dll,a /p:tmexsn
        ServiceFileName|contains|all:
            - 'rundll32'
            - '.dll,a'
            - '/p:'
    selection_cli_share:
        ServiceFileName|startswith: '\\\\127.0.0.1\\ADMIN$\'  # https://twitter.com/svch0st/status/1413688851877416960?lang=en
    condition: selection_eid and 1 of selection_cli_*
False Positives
Unlikely

False positives are unlikely for most environments. High confidence detection.

Rule Metadata
Rule ID
ecbc5e16-58e0-4521-9c60-eb9a7ea4ad34
Status
test
Level
high
Type
Detection
Created
Sat Oct 26
Modified
Wed Nov 15
Path
rules/windows/builtin/security/win_security_meterpreter_or_cobaltstrike_getsystem_service_install.yml
Raw Tags
attack.defense-evasionattack.privilege-escalationattack.t1134.001attack.t1134.002
View on GitHub