| ID | Technique | Tactic |
|---|---|---|
| T1027.010 | Command Obfuscation | Stealth |
| T1218 | System Binary Proxy Execution | Stealth |
Detection: Windows Command Line Obfuscation Via Superscript Characters
Description
The following analytic detects Windows system binaries executed with command line arguments that contain superscript or modifier letter characters (for example the Unicode characters used in "/ᵖᵃckᵃge") in place of regular ASCII letters. Windows command line parsers such as msiexec.exe normalize these look-alike characters, so the argument still works while evading string-based detections. This technique has been observed in ClickFix-style campaigns where victims paste a command into the Run dialog that silently installs a remote MSI package with msiexec.exe.
Search
1
2| tstats `security_content_summariesonly`
3 count min(_time) as firstTime
4 max(_time) as lastTime
5
6FROM datamodel=Endpoint.Processes WHERE
7
8Processes.process_path = "*:\\Windows\\*"
9
10NOT Processes.process_name IN (
11 "backgroundTaskHost.exe",
12 "csrss.exe",
13 "csrss.exe",
14 "dllhost.exe",
15 "lsass.exe",
16 "msedgewebview2.exe",
17 "RuntimeBroker.exe",
18 "SensorRuntimeBroker.exe",
19 "services.exe",
20 "sihost.exe",
21 "smss.exe",
22 "svchost.exe",
23 "taskhostw.exe",
24 "wininit.exe",
25 "winlogon.exe",
26 "WmiPrvSE.exe",
27 "WUDFHost.exe"
28 )
29
30by Processes.action Processes.dest Processes.original_file_name
31 Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid
32 Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path
33 Processes.process Processes.process_exec Processes.process_guid Processes.process_hash
34 Processes.process_id Processes.process_integrity_level Processes.process_name Processes.process_path
35 Processes.user Processes.user_id Processes.vendor_product
36
37
38| `drop_dm_object_name(Processes)`
39
40
41| regex process="(?:\\-\\-
42|/)(?:[a-zA-Z0-9]+)?[\\x{1D00}-\\x{1D7F}\\x{02B0}-\\x{02FF}\\x{1D80}-\\x{1DBF}\\x{2070}-\\x{209F}\\x{FF00}-\\x{FFEF}]+(?:[a-zA-Z0-9]+)?"
43
44
45| `security_content_ctime(firstTime)`
46
47| `security_content_ctime(lastTime)`
48
49| `windows_command_line_obfuscation_via_superscript_characters_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| CrowdStrike ProcessRollup2 | Other | 'crowdstrike:events:sensor' |
'crowdstrike' |
| Windows Event Log Security 4688 | 'XmlWinEventLog' |
'XmlWinEventLog:Security' |
|
| Sysmon EventID 1 | 'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| windows_command_line_obfuscation_via_superscript_characters_filter | search * |
windows_command_line_obfuscation_via_superscript_characters_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | Yes |
| Rule Title | %name% |
| Rule Description | %description% |
| Notable Event Fields | user, dest |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed.
To implement this search, you must ingest logs that contain the process GUID, process name, and parent process.
Additionally, you must ingest complete command-line executions.
These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product.
The logs must also be mapped to the Processes node of the Endpoint data model.
Use the Splunk Common Information Model (CIM) to normalize the field
names and speed up the data modeling process.
Known False Positives
Legitimate use of superscript or modifier characters in arguments to Windows binaries is very rare. Locales or applications that pass fullwidth characters (for example East Asian input methods) in command line switches may generate false positives. Filter by process or parent process as needed.
Associated Analytic Story
Finding
| Title | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| Superscript characters found in the command line [$process$] of [$process_name$] on endpoint [$dest$] by user [$user$]. | dest | system | 50 |
Threat Objects
| Field | Type |
|---|---|
| parent_process_name | parent_process_name |
| process | process |
References
-
https://app.any.run/tasks/a2ac674c-0b4c-42c9-b669-03f4699c8b96/
-
https://www.huntress.com/blog/the-evolving-tradecraft-of-clickfix
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
| Integration | ✅ Passing | Dataset | XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 1