A paste-to-run lure, sold under names like ClickFix and fake CAPTCHA, gets the user to run the attacker's command by hand. A page shows a verification check or an error, script on the page puts a command on the clipboard, and the instructions say which keys to press. Microsoft's Digital Defense Report 2025 put it first among initial access methods its Defender Experts saw, ahead of phishing.
Most detections for it watch one registry key, RunMRU, because the original lure said to press Win+R and paste into the Run dialog. That key is a good signal for that lure. The lures have since moved: into the File Explorer address bar, into a browser's file upload dialog, and into Windows Terminal. None of those writes RunMRU. This post shows what each one does write, and how to detect all three from the one record they share.
What the Run dialog leaves, and why rules lean on it
When a user runs something from the Run dialog, Explorer saves the string under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU, and the command starts as a child of explorer.exe. Microsoft's ClickFix analysis adds a detail that matters for triage: no entry is created if the process fails to start. Its published hunting query keys on explorer.exe writing to that key, and both SigmaHQ's ClickFix registry rule and Elastic's Run dialog rule watch the same key.
It works because the value holds the whole command as the user pasted it, with the URL and the obfuscation intact, before any process has run. MITRE gave the technique its own sub-technique, T1204.004 Malicious Copy and Paste, and the obvious first rule follows from the obvious first lure.
Where the lures went
FileFix: the File Explorer address bar. A researcher published FileFix in June 2025, and Kaspersky's write-up describes the flow: open File Explorer, press Ctrl+L, paste what looks like a file path, press Enter. The command is padded with spaces and ends in a comment holding a plausible path, so the address bar shows only the path. Many campaigns open the dialog for the user with the page's own file upload button. That dialog belongs to the browser, so the command starts as a child of the browser process. Acronis later found a FileFix campaign in the wild that hid its next stage in images, reported by BleepingComputer.
The registry record moves with it. Security Risk Advisors note that FileFix leaves its trace under ...\Explorer\TypedPaths, the address bar's history, rather than RunMRU. Elastic now ships a TypedPaths rule whose description names the writer as explorer.exe or the browser hosting the upload dialog.
Windows Terminal: Win+X. Bert-Jan Pals analyzed roughly 3,000 live payloads and published in June 2026. The Hacker News' summary reports that the 2024 Win+R lure gave way, through 2025 and into 2026, to lures that send users to Win+X and Windows Terminal. A terminal looks more ordinary and leaves nothing in RunMRU.
The terminal route removes more than the registry value. The user pastes into a PowerShell session that is already running, so the pasted line never becomes a process command line. A cmdlet pipeline such as a web request piped to Invoke-Expression runs inside that shell. What the sensor records is what the line starts next, a curl, msiexec, tar or headless conhost, and the PowerShell script block log if it is enabled.
cmd each appeared as the launcher in about 39% and msiexec in 34%, with some payloads using more than one. A rule tied to one launcher misses most of the traffic.
First, check which records you actually have
A rule matching a record your sensor never collects returns nothing, and an empty result looks the same as a quiet week. Before writing anything, count what arrives. In Microsoft Defender XDR, or Microsoft Sentinel with the Defender XDR connector:
// Source: DeviceRegistryEvents (Microsoft Defender for Endpoint)
// Purpose: confirm both history keys reach your tenant before a rule depends on either.
// A key with zero rows is not proof nothing happened; it is a gap in collection.
DeviceRegistryEvents
| where Timestamp > ago(30d)
| where ActionType == "RegistryValueSet"
| where RegistryKey has @"\Explorer\RunMRU" or RegistryKey has @"\Explorer\TypedPaths"
| extend HistoryKey = iff(RegistryKey has "RunMRU", "RunMRU", "TypedPaths")
| summarize Writes = count(), Devices = dcount(DeviceId) by HistoryKey, InitiatingProcessFileName
| sort by Writes descExpect explorer.exe as the writer for both keys, and on a fleet where users browse folders, far more TypedPaths writes than RunMRU writes. A browser among the TypedPaths writers is the upload dialog at work, which is normal: people type paths there to attach files. If TypedPaths returns nothing at all, the FileFix registry rule below will never fire on your data, and the process rule has to carry it alone.
On Sysmon, the same check is a configuration question. Registry events arrive only for keys the configuration includes, and many shared configurations focus on machine-wide keys. Search your RegistryEvent section for RunMRU and TypedPaths before trusting a rule that reads them.
The registry rules, kept but widened
The RunMRU rule still catches the original lure, and TypedPaths needs a sibling. The difference between them is the noise: Run dialog history holds commands, while address bar history is mostly folder paths, so the TypedPaths rule has to look for a command rather than any value.
// Source: DeviceRegistryEvents (Microsoft Defender for Endpoint)
// Detection: a command, not a path, written to Run dialog or address bar history.
// RunMRU = ClickFix through Win+R; TypedPaths = FileFix through Explorer or an upload dialog.
let interpreters = dynamic(["powershell", "pwsh", "mshta", "cmd", "curl", "msiexec",
"rundll32", "certutil", "conhost", "wscript", "cscript", "bitsadmin"]);
DeviceRegistryEvents
| where Timestamp > ago(1h)
| where ActionType == "RegistryValueSet"
| where RegistryKey has @"\Explorer\RunMRU" or RegistryKey has @"\Explorer\TypedPaths"
| where RegistryValueName != "MRUList" // RunMRU's ordering value, never a command
| where RegistryValueData has_any (interpreters)
// A typed path to a folder holds no interpreter name; a pasted command almost always does.
// FileFix pads the command and ends it in "#" plus a fake path: both are worth surfacing.
| extend Padded = RegistryValueData matches regex @"\s{20,}", HasComment = RegistryValueData has "#"
| project Timestamp, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName,
RegistryKey, RegistryValueData, Padded, HasCommentA hit gives you the full pasted string, which is the best evidence you will get for the FileFix route. Read it for the domain, the encoded block and the file it fetched, then go to the process tree for what actually ran.
The rule that covers all three: the process chain
Every route ends the same way: a shell or a living-off-the-land binary starts from a parent users do not normally start them from, with arguments that fetch or decode something. That is also the shape of MITRE's detection strategy for the technique, DET0340, which chains a user application to an interpreter with a suspicious one-liner and then to a network connection.
// Source: DeviceProcessEvents (Microsoft Defender for Endpoint)
// Detection: paste-to-run execution by any route.
// Run dialog / address bar: parent explorer.exe
// Upload dialog (FileFix): parent is the browser
// Windows Terminal: parent is the interactive shell the user pasted into
let launchers = dynamic(["powershell.exe", "pwsh.exe", "cmd.exe", "mshta.exe", "curl.exe",
"msiexec.exe", "rundll32.exe", "certutil.exe", "wscript.exe", "cscript.exe", "conhost.exe"]);
let browsers = dynamic(["chrome.exe", "msedge.exe", "firefox.exe", "brave.exe", "opera.exe"]);
DeviceProcessEvents
| where Timestamp > ago(1h)
| where FileName in~ (launchers)
| where InitiatingProcessFileName in~ (browsers)
or InitiatingProcessFileName =~ "explorer.exe"
or (InitiatingProcessFileName in~ ("powershell.exe", "pwsh.exe", "cmd.exe")
and InitiatingProcessParentFileName in~ ("WindowsTerminal.exe", "explorer.exe"))
// The payload shape: a URL, a download or eval cmdlet, an encoded command, a hidden window.
// A regex, because switches like -e and -w h are punctuation that term matching handles badly.
| where ProcessCommandLine matches regex
@"(?i)(https?://|\biwr\b|\birm\b|\biex\b|invoke-(webrequest|restmethod|expression)|\s-e(nc|ncodedcommand)?\s|frombase64string|--headless|\s-w(indowstyle)?\s+h)"
| extend Route = case(
InitiatingProcessFileName in~ (browsers), "browser dialog (FileFix)",
InitiatingProcessFileName =~ "explorer.exe", "Run dialog or address bar",
"terminal session")
| project Timestamp, DeviceName, AccountName, Route, InitiatingProcessFileName,
InitiatingProcessCommandLine, FileName, ProcessCommandLineTwo details make this tighter than it looks. Chromium browsers run the file dialog in a utility process, and Elastic's FileFix process rule identifies it by two arguments on the parent, --message-loop-type-ui and --service-sandbox-type=none. Adding InitiatingProcessCommandLine has "--message-loop-type-ui" to the browser branch separates a file dialog launch from everything else a browser starts. And explorer.exe starts shells legitimately all day, which is why that branch only counts with a payload-shaped command line.
The terminal branch is the weakest, and on purpose: a user with an interactive PowerShell open in Terminal is normal for administrators and developers. It finds the pasted line's children, not the line. The line itself is in the script block log.
The same detections in Splunk and Sigma
On Sysmon in Splunk, the process chain is Event ID 1 and the history keys are Event ID 13. Field names follow the Sysmon add-on's extraction; change the index and source to your own:
index=sysmon EventCode=1
(Image="*\\powershell.exe" OR Image="*\\pwsh.exe" OR Image="*\\cmd.exe" OR Image="*\\mshta.exe"
OR Image="*\\curl.exe" OR Image="*\\msiexec.exe" OR Image="*\\rundll32.exe" OR Image="*\\conhost.exe")
(ParentImage="*\\chrome.exe" OR ParentImage="*\\msedge.exe" OR ParentImage="*\\firefox.exe"
OR ParentImage="*\\explorer.exe")
| regex CommandLine="(?i)(https?://|iwr|irm|iex|invoke-(webrequest|restmethod|expression)|-enc|frombase64string|--headless|-w(indowstyle)? h)"
| eval route=if(match(ParentImage, "(?i)\\\\explorer\\.exe$"), "run dialog or address bar", "browser dialog")
| table _time host User route ParentImage ParentCommandLine Image CommandLineThe terminal route needs the PowerShell Operational log. With script block logging on, Event ID 4104 holds the pasted line as PowerShell compiled it:
index=wineventlog source="XmlWinEventLog:Microsoft-Windows-PowerShell/Operational" EventCode=4104
| regex ScriptBlockText="(?i)(iwr|irm|invoke-(webrequest|restmethod)).{0,200}(iex|invoke-expression)"
| table _time host UserID ScriptBlockId ScriptBlockTextThe TypedPaths rule as Sigma, written by us for this post and marked experimental: it complements SigmaHQ's RunMRU rule rather than replacing it.
title: Command Written to Explorer Address Bar History (FileFix)
id: 3b4f2c8e-6a1d-4e7b-9c35-8f0d2e61a7c4
status: experimental
description: >
A shell or LOLBin command written to TypedPaths, the File Explorer address bar history.
FileFix lures have users paste commands there or into a browser upload dialog.
references:
- https://attack.mitre.org/techniques/T1204/004/
- https://sra.io/?p=256521
author: Ridgeline Cyber
date: 2026-11-24
tags:
- attack.execution
- attack.t1204.004
logsource:
category: registry_set
product: windows
detection:
selection_key:
TargetObject|contains: '\Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths\'
selection_cmd:
Details|contains:
- 'powershell'
- 'pwsh'
- 'mshta'
- 'cmd /c'
- 'cmd.exe'
- 'curl'
- 'msiexec'
- 'conhost'
condition: selection_key and selection_cmd
falsepositives:
- An administrator typing a command into the Explorer address bar on purpose, which is rare
level: highWhen one of them fires
A hit means a user ran something they were told to run, so the first question is what it fetched, and the second is what it took. Work outward from the process the rule found:
// Source: DeviceNetworkEvents, DeviceFileEvents, DeviceProcessEvents (Defender for Endpoint)
// Purpose: what the flagged process did in the 30 minutes after it started: where it
// connected, what it wrote, what it launched. Set the three values from the alert.
let dev = "ws-0311";
let pid = 7412;
let t0 = datetime(2026-11-24T09:14:05Z);
union
(DeviceNetworkEvents | where Timestamp between (t0 .. (t0 + 30m))
| where DeviceName == dev and InitiatingProcessId == pid
| project Timestamp, Kind = "network", Detail = strcat(RemoteUrl, " ", RemoteIP)),
(DeviceFileEvents | where Timestamp between (t0 .. (t0 + 30m))
| where DeviceName == dev and InitiatingProcessId == pid
| project Timestamp, Kind = "file", Detail = FolderPath),
(DeviceProcessEvents | where Timestamp between (t0 .. (t0 + 30m))
| where DeviceName == dev and InitiatingProcessId == pid
| project Timestamp, Kind = "child", Detail = ProcessCommandLine)
| sort by Timestamp asc
// Rerun with each child's ProcessId to follow the chain a level further.Infostealers are the most common payload, with Lumma the most prolific according to Help Net Security's summary of recent research, so treat a confirmed run as a credential and session incident, not only a host one. Isolate the device, then list what the user was signed in to from that browser: browser sessions are the stealer's main target, and a password reset alone leaves a stolen session working. Revoke sessions for the user's identity provider account and their high-value SaaS apps, then reset the password. Block the domain from the command and search for it across the fleet; the same lure usually reaches more than one person.
Test it before you trust it
Atomic Red Team has a ClickFix test, number 12 under T1204.002, that writes an mshta command into RunMRU. It exercises the registry rule and nothing else, which makes it a useful illustration of the gap this post is about. Test each route on a lab machine with a harmless command that has the lure's shape:
- Run dialog. Win+R, paste
powershell -w h -c "iwr https://example.com -UseBasicParsing | Out-Null", Enter. Expect a RunMRU hit and a process hit on the explorer branch. - Address bar. The same line in File Explorer after Ctrl+L, padded with spaces and ending in
# C:\Reports\Q3.docx. Expect a TypedPaths hit and the explorer branch. - Upload dialog. Open any page with a file input in Chrome or Edge, click it, and paste the same line into the dialog's address bar. Expect the browser branch, and note which process wrote TypedPaths on your build.
- Terminal. Win+X, open Terminal, paste
curl.exe -s https://example.com -o $env:TEMP\t.txt. Expect the terminal branch oncurl.exe. Then paste a pure cmdlet line and confirm it shows only in 4104.
A route that produces no hit is a gap you now know about instead of one you assumed was covered.
Where to read more
- Microsoft Threat Intelligence, Think before you Click(Fix), with its hunting queries and the Run dialog mitigations.
- MITRE ATT&CK, T1204.004 Malicious Copy and Paste and detection strategy DET0340.
- Elastic prebuilt rules for the Run dialog, the Explorer address bar and the browser file dialog, each with an investigation guide.
- Security Risk Advisors, FileFix advisory; Kaspersky, FileFix explained; BleepingComputer on FileFix in the wild.
- SigmaHQ, Potential ClickFix Execution Pattern, Registry; Red Canary, Malicious Copy and Paste.
What to do this week
- Run the collection check. Count RunMRU and TypedPaths writes over 30 days in Defender, or search your Sysmon configuration for both keys. Any key that returns nothing is a rule you cannot rely on.
- Add the TypedPaths rule beside your RunMRU rule, in KQL or as the Sigma rule above, and read its first week of hits to confirm folder paths stay out.
- Deploy the process chain rule with the
--message-loop-type-uicondition on the browser branch, then review a week of explorer and terminal hits before raising its severity. - Turn on PowerShell script block logging where it is off, and send Event ID 4104 to your SIEM. It is the only record of a line pasted into Terminal.
- Run the four route tests on a lab machine and write down which detection fired for each. Every route without one goes on the gap list.