Malicious Copy and Paste
Adversaries may rely upon a user copying and pasting code to gain execution (ClickFix). Victims are presented with fake error messages, CAPTCHA prompts, or troubleshooting instructions on malicious websites or in phishing emails that instruct them to open a terminal, Windows Run dialog, or command prompt and paste a pre-supplied command. The pasted command typically includes download cradles, encoded payloads, or inline scripts designed to establish a foothold on the victim machine. ClickFix bypasses email filtering, browser sandboxing, and file execution controls because the user themselves executes the payload. Threat actors including Contagious Interview (DPRK-linked), Havoc C2 operators, and Lumma Stealer distribution campaigns have heavily leveraged this technique against enterprise users.
let SuspiciousInterpreters = dynamic(["powershell.exe", "pwsh.exe", "cmd.exe", "mshta.exe", "wscript.exe", "cscript.exe"]);
let ClickFixPatterns = dynamic([
// Download cradles
"DownloadString", "DownloadFile", "Net.WebClient", "Invoke-WebRequest", "IWR ",
"curl ", "wget ", "certutil -urlcache", "bitsadmin /transfer",
// Execution and obfuscation
"-EncodedCommand", "-enc ", "Invoke-Expression", "IEX(", "IEX ",
"FromBase64String",
// Inline execution patterns (mshta/wscript)
"javascript:", "vbscript:",
// Direct HTTP payload execution
"msiexec /i http", "msiexec /i https",
"regsvr32 /s /n /u /i:http"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (
// Branch 1: Run Dialog — explorer.exe spawning scripting tools with malicious command patterns
(InitiatingProcessFileName =~ "explorer.exe"
and FileName in~ (SuspiciousInterpreters)
and ProcessCommandLine has_any (ClickFixPatterns))
// Branch 2: Browser spawning script interpreters with malicious patterns (fake CAPTCHA page)
or (InitiatingProcessFileName in~ ("chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe", "brave.exe")
and FileName in~ (SuspiciousInterpreters)
and ProcessCommandLine has_any (ClickFixPatterns))
// Branch 3: mshta/wscript executing inline scripts or fetching remote content from user-context parents
or (FileName in~ ("mshta.exe", "wscript.exe")
and ProcessCommandLine has_any ("javascript:", "vbscript:", "http://", "https://")
and InitiatingProcessFileName in~ ("explorer.exe", "chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe", "brave.exe"))
)
| extend RunDialogExecution = InitiatingProcessFileName =~ "explorer.exe"
| extend BrowserSpawn = InitiatingProcessFileName in~ ("chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe", "brave.exe")
| extend InlineScript = ProcessCommandLine has_any ("javascript:", "vbscript:")
| extend DownloadCradle = ProcessCommandLine has_any ("DownloadString", "DownloadFile", "Net.WebClient", "Invoke-WebRequest", "IWR ", "curl ", "certutil -urlcache", "bitsadmin /transfer")
| extend EncodedPayload = ProcessCommandLine has_any ("-EncodedCommand", "-enc ", "FromBase64String")
| extend InvokeExpression = ProcessCommandLine has_any ("IEX(", "IEX ", "Invoke-Expression")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
RunDialogExecution, BrowserSpawn, InlineScript, DownloadCradle, EncodedPayload, InvokeExpression
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- IT administrators opening PowerShell from Run dialog (Win+R → powershell) for legitimate admin tasks — suppress by allowlisting specific known-good command line patterns tied to documented admin workflows
- Software installation scripts that launch PowerShell from explorer.exe context during user-initiated installs (e.g., clicking a setup.exe in Explorer that chains to PowerShell)
- Browser native messaging hosts spawned by browser extensions for legitimate inter-process communication — these typically lack download cradle patterns but may share the browser-parent signal
- Enterprise HTA applications (mshta.exe) that fetch content over HTTP from internal corporate servers — allowlist by internal IP/domain ranges in the ProcessCommandLine filter
References (8)
- https://attack.mitre.org/techniques/T1204/004/
- https://www.proofpoint.com/us/blog/threat-insight/security-brief-clickfix-social-engineering-technique-floods-threat-landscape
- https://www.reliaquest.com/blog/using-captcha-for-compromise/
- https://www.cloudsek.com/blog/unmasking-the-danger-lumma-stealer-malware-exploits-fake-captcha-pages
- https://blog.sekoia.io/clickfake-interview-campaign-by-lazarus/
- https://asec.ahnlab.com/en/73952/
- https://asec.ahnlab.com/en/85699/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1204.004/T1204.004.md
Unlock Pro Content
Get the full detection package for T1204.004 including response playbook, investigation guide, and atomic red team tests.