Invoke-Obfuscation STDIN+ Launcher - System

Detects Obfuscated use of stdin to execute PowerShell

Sigma rule (View on GitHub)

 1title: Invoke-Obfuscation STDIN+ Launcher - System
 2id: 72862bf2-0eb1-11eb-adc1-0242ac120002
 3status: test
 4description: Detects Obfuscated use of stdin to execute PowerShell
 5references:
 6    - https://github.com/SigmaHQ/sigma/issues/1009  # (Task 25)
 7author: Jonathan Cheong, oscd.community
 8date: 2020/10/15
 9modified: 2022/11/29
10tags:
11    - attack.defense_evasion
12    - attack.t1027
13    - attack.execution
14    - attack.t1059.001
15logsource:
16    product: windows
17    service: system
18detection:
19    selection_main:
20        Provider_Name: 'Service Control Manager'
21        EventID: 7045
22        # ImagePath|re: 'cmd.{0,5}(?:\/c|\/r).+powershell.+(?:\$\{?input\}?|noexit).+\"'
23        # Example 1: c:\windows\sYstEm32\CmD.eXE /C"echO\Invoke-Expression (New-Object Net.WebClient).DownloadString | POwersHELl -NoEXiT -"
24        # Example 2: c:\WiNDOws\sysTEm32\cmd.EXe /C " ECHo Invoke-Expression (New-Object Net.WebClient).DownloadString | POwersHELl -nol ${EXEcUtIONCONTeXT}.INvOkEComMANd.InvOKEScRIPt( $InpUt )"
25        ImagePath|contains|all:
26            - 'cmd'
27            - 'powershell'
28        ImagePath|contains:
29            - '/c'
30            - '/r'
31    selection_other:
32        - ImagePath|contains: 'noexit'
33        - ImagePath|contains|all:
34              - 'input'
35              - '$'
36    condition: all of selection_*
37falsepositives:
38    - Unknown
39level: high

References

Related rules

to-top