Suspicious Obfuscated PowerShell Code
Detects suspicious UTF16 and base64 encoded and often obfuscated PowerShell code often used in command lines
Sigma rule (View on GitHub)
1title: Suspicious Obfuscated PowerShell Code
2id: 8d01b53f-456f-48ee-90f6-bc28e67d4e35
3status: test
4description: Detects suspicious UTF16 and base64 encoded and often obfuscated PowerShell code often used in command lines
5references:
6 - https://app.any.run/tasks/fcadca91-3580-4ede-aff4-4d2bf809bf99/
7author: Florian Roth (Nextron Systems)
8date: 2022-07-11
9modified: 2023-02-14
10tags:
11 - attack.defense-evasion
12logsource:
13 category: process_creation
14 product: windows
15detection:
16 selection:
17 CommandLine|contains:
18 # -bxor 0x
19 - 'IAAtAGIAeABvAHIAIAAwAHgA'
20 - 'AALQBiAHgAbwByACAAMAB4A'
21 - 'gAC0AYgB4AG8AcgAgADAAeA'
22 # .Invoke() |
23 - 'AC4ASQBuAHYAbwBrAGUAKAApACAAfAAg'
24 - 'AuAEkAbgB2AG8AawBlACgAKQAgAHwAI'
25 - 'ALgBJAG4AdgBvAGsAZQAoACkAIAB8AC'
26 # {1}{0}" -f
27 # {0}{3}" -f
28 # {2}{0}" -f
29 - 'AHsAMQB9AHsAMAB9ACIAIAAtAGYAI'
30 - 'B7ADEAfQB7ADAAfQAiACAALQBmAC'
31 - 'AewAxAH0AewAwAH0AIgAgAC0AZgAg'
32 - 'AHsAMAB9AHsAMwB9ACIAIAAtAGYAI'
33 - 'B7ADAAfQB7ADMAfQAiACAALQBmAC'
34 - 'AewAwAH0AewAzAH0AIgAgAC0AZgAg'
35 - 'AHsAMgB9AHsAMAB9ACIAIAAtAGYAI'
36 - 'B7ADIAfQB7ADAAfQAiACAALQBmAC'
37 - 'AewAyAH0AewAwAH0AIgAgAC0AZgAg'
38 # {1}{0}' -f
39 # {0}{3}' -f
40 # {2}{0}' -f
41 - 'AHsAMQB9AHsAMAB9ACcAIAAtAGYAI'
42 - 'B7ADEAfQB7ADAAfQAnACAALQBmAC'
43 - 'AewAxAH0AewAwAH0AJwAgAC0AZgAg'
44 - 'AHsAMAB9AHsAMwB9ACcAIAAtAGYAI'
45 - 'B7ADAAfQB7ADMAfQAnACAALQBmAC'
46 - 'AewAwAH0AewAzAH0AJwAgAC0AZgAg'
47 - 'AHsAMgB9AHsAMAB9ACcAIAAtAGYAI'
48 - 'B7ADIAfQB7ADAAfQAnACAALQBmAC'
49 - 'AewAyAH0AewAwAH0AJwAgAC0AZgAg'
50 condition: selection
51falsepositives:
52 - Unknown
53level: high
References
Related rules
- AD Object WriteDAC Access
- ADS Zone.Identifier Deleted By Uncommon Application
- AMSI Bypass Pattern Assembly GetType
- APT PRIVATELOG Image Load Pattern
- APT27 - Emissary Panda Activity