Microsoft Threat Intelligence has published analysis of TerminalFix, a multistage intrusion campaign that combines three techniques we are seeing converge across the threat landscape in 2025–2026: ClickFix-style social engineering (fake CAPTCHA verification prompts), DLL sideloading for defense evasion, and a reverse tunnel for resilient, firewall-friendly command and control.
This is not a vulnerability story — there is no patch to deploy. TerminalFix succeeds because it convinces a human to execute the initial payload for the attacker, then wraps its persistence and C2 in techniques specifically engineered to blend into legitimate Windows administration activity. If your detection strategy still assumes malware arrives via email attachment or exploit kit, this campaign will walk straight past it.
Every organization with Windows endpoints and users who browse the web is in scope. The ClickFix lure family has been adopted by initial access brokers, ransomware affiliates, and nation-state operators alike over the past 18 months because it works. Defenders need behavioral detections for the pattern — user-initiated clipboard execution, signed-binary proxy execution, and reverse tunnel establishment — not just IOCs for this one campaign.
Technical Analysis
The Attack Chain
Based on Microsoft's analysis, the TerminalFix intrusion progresses through the following stages:
Stage 1 — ClickFix lure and fake CAPTCHA. The victim lands on a compromised or attacker-controlled page presenting a fake "verify you are human" CAPTCHA. Instead of clicking images, the page instructs the user to press Win+R, paste from the clipboard (Ctrl+V), and press Enter — a sequence the page has silently staged by copying a malicious command to the clipboard via JavaScript. This is the defining ClickFix tradecraft: the user becomes the execution vector, which neutralizes email gateways, attachment sandboxes, and most web filtering.
Stage 2 — Staging via living-off-the-land binaries. The pasted command typically invokes powershell.exe, mshta.exe, or curl.exe to pull a second-stage payload from attacker infrastructure. Because the execution chain originates from explorer.exe (the Run dialog) with user interaction, parent-child process analytics that key on Office or browser parents will miss it entirely.
Stage 3 — DLL sideloading. The staged payload includes a legitimate, signed executable paired with a malicious DLL sharing an expected module name. When the signed binary launches, it loads the attacker's DLL from a user-writable directory (commonly under %APPDATA%, %LOCALAPPDATA%, or %TEMP%). This gives the attacker execution under the identity and reputation of a trusted signed process — defeating application allowlisting and blunting EDR heuristics that weight signer reputation heavily.
Stage 4 — Reverse tunnel C2. Rather than beaconing outbound to a suspicious domain, TerminalFix establishes a reverse tunnel — an outbound-initiated tunnel that exposes an inbound listening channel back to the operator. Reverse SSH-style tunnels and tunneling tools are effective because the initial connection is outbound (permitted by default egress policy), often over TCP/443, and the traffic patterns resemble legitimate remote administration. Once established, the operator has an interactive channel into the host that survives NAT and most perimeter controls.
Why This Combination Is Dangerous
Each stage is individually known; the operational significance of TerminalFix is the composition:
- ClickFix removes the delivery-layer detections (no attachment, no macro, no exploit).
- DLL sideloading removes signer-based trust signals at execution time.
- Reverse tunneling removes egress-based C2 detection that relies on beacon periodicity or rare-domain analysis.
Exploitation Status
This is confirmed active in-the-wild activity documented by Microsoft Threat Intelligence with associated detection and hunting guidance. No CVE is associated with this campaign — it abuses legitimate OS functionality (Run dialog, DLL search order, outbound tunneling) rather than a software flaw. There is no CISA KEV entry because there is no vulnerability to catalog. The defensive response is behavioral detection, hardening, and user awareness.
MITRE ATT&CK Mapping
| Stage | Technique | ID |
|---|---|---|
| Fake CAPTCHA lure / clipboard staging | User Execution: Malicious Copy and Paste | T1204.004 |
| Run dialog → script execution | Command and Scripting Interpreter: PowerShell | T1059.001 |
| Sideloaded malicious DLL | Hijack Execution Flow: DLL Side-Loading | T1574.002 |
| Signed binary proxy execution | System Binary Proxy Execution | T1218 |
| Reverse tunnel C2 | Protocol Tunneling | T1572 |
| Interactive remote channel | Remote Access Software / External Remote Services | T1219 / T1133 |
Detection & Response
The detections below target the behaviors Microsoft describes. They are written to be tunable — deploy in audit mode first, baseline your admin and helpdesk activity, then enforce.
Sigma Rules
---
title: ClickFix-Style Clipboard Command Execution via Run Dialog
description: Detects long, encoded, or download-cradle-style commands executed under explorer.exe, consistent with ClickFix fake CAPTCHA lures that instruct users to paste commands into the Run dialog (Win+R). Microsoft attributes this initial access pattern to the TerminalFix campaign.
references:
- https://www.microsoft.com/en-us/security/blog/2026/08/28/terminalfix-campaign-deploys-reverse-tunnel-through-multistage-intrusion/
- https://attack.mitre.org/techniques/T1204/004/
- https://attack.mitre.org/techniques/T1059/001/
author: Security Arsenal
date: 2026/08/28
status: experimental
id: 3f8c1a94-2b7d-4e61-9c05-7a2d4f8b1e36
tags:
- attack.execution
- attack.t1204.004
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith: '\explorer.exe'
selection_child:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- '\mshta.exe'
- '\curl.exe'
- '\cmd.exe'
- '\wscript.exe'
- '\cscript.exe'
selection_flags:
CommandLine|contains:
- ' -enc'
- ' -e '
- 'FromBase64String'
- 'Invoke-WebRequest'
- 'Invoke-RestMethod'
- 'iwr '
- 'irm '
- 'iex'
- 'http://'
- 'https://'
- 'Start-Process'
condition: selection_parent and selection_child and selection_flags
falsepositives:
- Administrators running one-liners via the Run dialog
- Software deployment tooling that stages scripts interactively
level: high
---
title: DLL Sideloading - Signed Binary Loading Unsigned DLL from User-Writable Path
description: Detects image load events where a DLL is loaded from a user-writable directory (AppData, Temp, Downloads, Public) by a process running outside that same directory, a pattern consistent with TerminalFix DLL sideloading. Tune known-good enterprise sideloading cases before enforcement.
references:
- https://www.microsoft.com/en-us/security/blog/2026/08/28/terminalfix-campaign-deploys-reverse-tunnel-through-multistage-intrusion/
- https://attack.mitre.org/techniques/T1574/002/
author: Security Arsenal
date: 2026/08/28
status: experimental
id: 9d4e2b17-6c38-4f52-a891-0e6c3d7b5a24
tags:
- attack.defense_evasion
- attack.persistence
- attack.t1574.002
logsource:
category: image_load
product: windows
detection:
selection_path:
ImageLoaded|contains:
- '\AppData\Roaming\'
- '\AppData\Local\Temp\'
- '\AppData\Local\'
- '\Downloads\'
- '\Users\Public\'
- '\ProgramData\'
filter_system_image:
Image|startswith:
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
filter_microsoft_signed_dirs:
ImageLoaded|contains:
- '\AppData\Local\Microsoft\'
- '\AppData\Local\Programs\Microsoft\'
condition: selection_path and not filter_system_image and not filter_microsoft_signed_dirs
falsepositives:
- Electron-based apps (Teams, Slack, VS Code) that load modules from AppData
- Legitimate per-user installed software
level: medium
---
title: Reverse SSH Tunnel or Tunneling Tool Execution
description: Detects command lines indicative of reverse tunnel establishment (ssh -R / -N flags, plink, or common tunneling utilities) on Windows endpoints, consistent with the reverse tunnel C2 stage of the TerminalFix campaign.
references:
- https://www.microsoft.com/en-us/security/blog/2026/08/28/terminalfix-campaign-deploys-reverse-tunnel-through-multistage-intrusion/
- https://attack.mitre.org/techniques/T1572/
author: Security Arsenal
date: 2026/08/28
status: experimental
id: 5b71c3e8-1a46-4d29-bf73-2c8e9a4d6f10
tags:
- attack.command_and_control
- attack.t1572
- attack.t1219
logsource:
category: process_creation
product: windows
detection:
selection_ssh_reverse:
Image|endswith:
- '\ssh.exe'
- '\plink.exe'
CommandLine|contains:
- ' -R '
- ' -N '
selection_tunnel_tools:
Image|endswith:
- '\ngrok.exe'
- '\cloudflared.exe'
- '\chisel.exe'
- '\frpc.exe'
- '\ligolo.exe'
- '\socat.exe'
- '\iodine.exe'
- '\dnscat2.exe'
condition: 1 of selection_*
falsepositives:
- Developers and DevOps staff using SSH remote port forwarding
- Cloudflare Tunnel or ngrok deployed for legitimate internal tooling
level: high
KQL — Microsoft Sentinel / Defender
The following hunt correlates the TerminalFix chain: user-initiated script execution, followed by DLL staging in user-writable paths, followed by outbound tunnel-like connections. Run each stage independently first to gauge volume in your environment.
// Stage 1: ClickFix-style execution - script interpreters spawned by explorer with download/encoded flags
let lookback = 7d;
DeviceProcessEvents
| where Timestamp > ago(lookback)
| where InitiatingProcessFileName =~ "explorer.exe"
| where FileName in~ ("powershell.exe", "pwsh.exe", "mshta.exe", "curl.exe", "cmd.exe", "wscript.exe")
| where ProcessCommandLine has_any ("-enc", "FromBase64String", "Invoke-WebRequest", "Invoke-RestMethod",
"iwr ", "irm ", "iex", "https://", "http://")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName
| sort by Timestamp desc;
// Stage 2: DLL written to user-writable paths shortly before signed process execution
let lookback2 = 7d;
DeviceFileEvents
| where Timestamp > ago(lookback2)
| where FileName endswith ".dll"
| where FolderPath has_any ("\\AppData\\Roaming\\", "\\AppData\\Local\\Temp\\", "\\Downloads\\", "\\Users\\Public\\")
| where InitiatingProcessFileName in~ ("powershell.exe", "pwsh.exe", "curl.exe", "mshta.exe", "cmd.exe", "rundll32.exe")
| project Timestamp, DeviceName, FileName, FolderPath, SHA256, InitiatingProcessCommandLine
| sort by Timestamp desc;
// Stage 3: Reverse tunnel indicators - ssh with -R flag or tunneling tools, plus their network connections
let lookback3 = 7d;
let TunnelProcs = DeviceProcessEvents
| where Timestamp > ago(lookback3)
| where (FileName in~ ("ssh.exe", "plink.exe") and ProcessCommandLine has_any (" -R ", " -N ", "-R", "-N"))
or FileName in~ ("ngrok.exe", "cloudflared.exe", "chisel.exe", "frpc.exe", "socat.exe", "ligolo.exe")
| summarize by DeviceId, DeviceName, ProcessId, FileName, ProcessCommandLine, AccountName, Timestamp;
DeviceNetworkEvents
| where Timestamp > ago(lookback3)
| join kind=inner TunnelProcs on DeviceId, ProcessId
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
RemoteIP, RemotePort, RemoteUrl, ActionType
| sort by Timestamp desc;
Velociraptor VQL
Use this artifact to sweep a fleet for the file-system and process artifacts TerminalFix leaves behind: recently dropped DLLs in user-writable paths, and live processes with tunneling command lines.
-- TerminalFix hunt: sideloaded DLL artifacts and live reverse-tunnel processes
-- 1. Recently created DLLs in user-writable directories (last 14 days)
LET dll_drops = SELECT FullPath, Size, Mtime, Ctime
FROM glob(globs=[
'C:/Users/*/AppData/Roaming/**/*.dll',
'C:/Users/*/AppData/Local/Temp/**/*.dll',
'C:/Users/*/Downloads/**/*.dll',
'C:/Users/Public/**/*.dll'
])
WHERE Mtime > now() - 1209600
AND FullPath !~ 'Microsoft'
ORDER BY Mtime DESC
-- 2. Live processes with reverse tunnel or tunneling tool indicators
LET tunnel_procs = SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ ' -R | -N |ngrok|cloudflared|chisel|frpc|socat|ligolo'
OR Name =~ 'ssh|plink|ngrok|cloudflared|chisel|frpc'
SELECT * FROM dll_drops
UNION ALL
SELECT * FROM tunnel_procs
Hardening & Verification Script
This PowerShell script audits a Windows endpoint for the exposure TerminalFix exploits: unsigned DLLs staged in user-writable paths, tunneling binaries on disk, suspicious RunMRU entries (evidence of Win+R pasted commands), and current tunnel-like network connections. Run it elevated; it is read-only and safe for broad deployment.
# TerminalFix endpoint audit - run as Administrator
# 1. Check RunMRU for pasted ClickFix-style commands (per-user evidence of Win+R execution)
$users = Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList' |
Where-Object { $_.GetValue('ProfileImagePath') -like 'C:\Users\*' }
foreach ($u in $users) {
$sid = $u.PSChildName
$runMRU = "Registry::HKEY_USERS\$sid\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU"
if (Test-Path $runMRU) {
$vals = Get-ItemProperty $runMRU
$vals.PSObject.Properties | Where-Object { $_.Name -match '^[a-z]$' } | ForEach-Object {
if ($_.Value -match 'powershell|mshta|curl|iex|iwr|http| -enc') {
Write-Host "[ALERT] Suspicious RunMRU entry for SID $sid : $($_.Value)" -ForegroundColor Red
}
}
}
}
# 2. Scan for DLLs in user-writable paths modified in the last 14 days
$cutoff = (Get-Date).AddDays(-14)
$paths = @("$env:SystemDrive\Users\*\AppData\Roaming", "$env:SystemDrive\Users\*\Downloads", "$env:SystemDrive\Users\Public")
foreach ($p in $paths) {
Get-ChildItem $p -Recurse -Filter *.dll -ErrorAction SilentlyContinue |
Where-Object { $_.LastWriteTime -gt $cutoff } |
ForEach-Object {
$sig = Get-AuthenticodeSignature $_.FullName
if ($sig.Status -ne 'Valid') {
Write-Host "[ALERT] Unsigned/invalid DLL recently written: $($_.FullName)" -ForegroundColor Red
}
}
}
# 3. Detect tunneling tools present on disk
$tunnelTools = @('ngrok.exe','cloudflared.exe','chisel.exe','frpc.exe','ligolo.exe','socat.exe')
foreach ($tool in $tunnelTools) {
$found = Get-ChildItem "$env:SystemDrive\Users" -Recurse -Filter $tool -ErrorAction SilentlyContinue
if ($found) { Write-Host "[ALERT] Tunneling tool found: $($found.FullName)" -ForegroundColor Red }
}
# 4. Check for live SSH reverse tunnel processes
Get-CimInstance Win32_Process -Filter "Name='ssh.exe' OR Name='plink.exe'" |
Where-Object { $_.CommandLine -match ' -R | -N ' } |
ForEach-Object { Write-Host "[ALERT] Reverse tunnel process: PID $($_.ProcessId) - $($_.CommandLine)" -ForegroundColor Red }
# 5. Audit outbound connections on common tunneling ports from non-standard processes
Get-NetTCPConnection -State Established -ErrorAction SilentlyContinue |
Where-Object { $_.RemotePort -in 22,443,4443,8080 -and $_.OwningProcess -gt 4 } |
ForEach-Object {
$proc = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
if ($proc.Path -notlike 'C:\Windows\*' -and $proc.Path -notlike 'C:\Program Files*') {
Write-Host "[REVIEW] Outbound $($_.RemoteAddress):$($_.RemotePort) from $($proc.Path)" -ForegroundColor Yellow
}
}
Write-Host "Audit complete. Investigate any ALERT entries before REVIEW items." -ForegroundColor Cyan
Remediation
Because TerminalFix exploits user behavior and legitimate OS functionality rather than a patchable flaw, remediation is layered:
1. Neutralize the ClickFix lure (highest ROI).
- Deploy user awareness content specifically covering fake CAPTCHA lures: no legitimate verification flow will ever ask a user to press Win+R and paste a command. This single message defeats the entire initial access stage.
- Consider disabling the Run dialog for standard users via GPO (
User Configuration > Administrative Templates > Start Menu and Taskbar > Remove Run menu from Start Menu) where operationally feasible. - Use browser isolation or web filtering policies to block known ClickFix lure page patterns; several secure web gateway vendors now ship dedicated ClickFix detections.
2. Constrain script execution.
- Enforce PowerShell Constrained Language Mode via WDAC or AppLocker for standard users, and enable PowerShell Script Block Logging + Module Logging fleet-wide.
- Block or alert on
mshta.exe,wscript.exe, andcurl.exeexecuting underexplorer.exe— there is virtually no legitimate user workflow for this.
3. Control DLL sideloading.
- Deploy WDAC or AppLocker DLL rules for standard users to prevent unsigned DLL loads from user-writable paths.
- Audit
%APPDATA%,%TEMP%, and%ProgramData%for recently written unsigned DLLs using the script above.
4. Kill the reverse tunnel.
- Egress filtering: deny outbound TCP/22 from user VLANs, and alert on long-lived outbound TLS sessions from non-browser processes on endpoints.
- Block known tunneling tools (ngrok, cloudflared, chisel, frp, ligolo) by hash and publisher via AppLocker/WDAC; Microsoft Defender for Endpoint customers should enable the associated ASR rules and block executable content from email client and webmail style rules where applicable.
- Detonate and investigate any
ssh.exe -Rprocess on an endpoint as a probable incident until proven otherwise.
5. If you find evidence of execution: treat it as hands-on-keyboard. The reverse tunnel means an operator had interactive access. Preserve memory and triage with Velociraptor, review RunMRU and PowerShell history for the initial command, hunt laterally for the same staged DLL hashes, and reset credentials for any account active on the host during the dwell window.
Reference: Microsoft Security Blog — TerminalFix campaign deploys a reverse tunnel through multistage intrusion
Related Resources
Security Arsenal Managed SOC Services AlertMonitor Platform Book a SOC Assessment soc-mdr Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.