| ID | Technique | Tactic |
|---|---|---|
| T1059.001 | PowerShell | Execution |
| T1059.003 | Windows Command Shell | Execution |
| T1202 | Indirect Command Execution | Stealth |
Detection: Windows Content Copied from Browser was Executed
Description
The following analytic correlates modifications to the Windows RunMRU registry key with clipboard content changes initiated by browsers. It aims to detect ClickFix scenarios in which commands copied from a browser are subsequently executed on the Windows system through the Run dialog box.
Search
1`sysmon`
2EventID IN (13, 24)
3(
4 registry_key_name=*RunMRU*
5 OR
6 process_name IN (
7 "360se.exe", "arc.exe", "atlas.exe", "avastbrowser.exe", "avgbrowser.exe", "blpbrowser.exe", "brave.exe", "braveupdate.exe",
8 "chrome.exe", "chromium.exe", "coccoc.exe", "dragon.exe", "duckduckgo.exe", "epic.exe", "firefox.exe", "ghost.exe",
9 "iexplore.exe", "iridium.exe", "iron.exe", "maxthon.exe", "microsoftedge.exe", "microsoftedgeupdate.exe", "msedge.exe",
10 "msedgewebview2.exe", "opera.exe", "opera_autoupdate.exe", "perplexity.exe", "rave.exe", "safari.exe", "shift.exe",
11 "sidekick.exe", "thorium.exe", "torch.exe", "vivaldi.exe", "wavebrowser.exe", "whale.exe", "zen.exe"
12 )
13)
14
15| eval trimmed_command = rtrim(registry_value_data, "\1")
16
17| eval utf16le_command = urldecode(replace(trimmed_command, "(.)", "\1%00"))
18
19| eval sha256_process=upper(sha256(utf16le_command))
20
21| eval hash_command=coalesce(SHA256,sha256_process)
22
23| stats min(_time) as firstTime max(_time) as lastTime values(process_name) as process_name
24 values(trimmed_command) as process values(EventID) as EventID dc(EventID) as dc_EventID count
25 by hash_command dest user
26
27| search dc_EventID>1
28
29| eval process_name = mvfilter(
30 process_name IN (
31 "360se.exe", "arc.exe", "atlas.exe", "avastbrowser.exe", "avgbrowser.exe", "blpbrowser.exe", "brave.exe", "braveupdate.exe",
32 "chrome.exe", "chromium.exe", "coccoc.exe", "dragon.exe", "duckduckgo.exe", "epic.exe", "firefox.exe", "ghost.exe",
33 "iexplore.exe", "iridium.exe", "iron.exe", "maxthon.exe", "microsoftedge.exe", "microsoftedgeupdate.exe", "msedge.exe",
34 "msedgewebview2.exe", "opera.exe", "opera_autoupdate.exe", "perplexity.exe", "rave.exe", "safari.exe", "shift.exe",
35 "sidekick.exe", "thorium.exe", "torch.exe", "vivaldi.exe", "wavebrowser.exe", "whale.exe", "zen.exe"
36 )
37 )
38
39| `security_content_ctime(firstTime)`
40
41| `security_content_ctime(lastTime)`
42
43| `windows_content_copied_from_browser_was_executed_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Sysmon EventID 24 | 'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
|
| Sysmon EventID 13 | 'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| windows_content_copied_from_browser_was_executed_filter | search * |
windows_content_copied_from_browser_was_executed_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
This detection requires Sysmon event logs. Configure your environment to ingest Sysmon registry modification (Event ID 13) and clipboard change (Event ID 24) events. Ensure that registry modification events are collected for the RunMRU registry key and clipboard change events are collected from common browser processes. Ingest the data through the appropriate Splunk technology add-on and normalize field names using the Splunk Common Information Model (CIM).
Known False Positives
No false positives have been identified at this time.
Associated Analytic Story
Finding
| Title | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| The content [$process$] was copied from [$process_name$] to the clipboard and was executed through the Run dialog box on [$dest$] | dest | system | 50 |
Threat Objects
| Field | Type |
|---|---|
| hash_command | process_hash |
| process | process |
References
-
https://www.huntress.com/blog/clickfix-matanbuchus-astarionrat-analysis
-
https://socradar.io/blog/doublecup-clickfix-loader-devicemanager-rats/
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