| name | T1204.004_malicious-copy-and-paste |
| description | An adversary may rely upon a user copying and pasting code in order to gain execution. |
| category | input-validation |
| version | 18.1 |
| author | cyberstrike-official |
| tags | ["mitre-attack","enterprise","t1204.004","execution","linux","macos","windows","sub-technique"] |
| technique_id | T1204.004 |
| tactic | execution |
| all_tactics | ["execution"] |
| platforms | ["Linux","macOS","Windows"] |
| mitre_url | https://attack.mitre.org/techniques/T1204/004 |
| tech_stack | ["linux","macos","windows"] |
| cwe_ids | ["CWE-94"] |
| chains_with | ["T1204","T1204.001","T1204.002","T1204.003","T1204.005"] |
| prerequisites | ["T1204"] |
| severity_boost | {"T1204":"Chain with T1204 for deeper attack path","T1204.001":"Chain with T1204.001 for deeper attack path","T1204.002":"Chain with T1204.002 for deeper attack path"} |
T1204.004 Malicious Copy and Paste
Sub-technique of: T1204
High-Level Description
An adversary may rely upon a user copying and pasting code in order to gain execution. Users may be subjected to social engineering to get them to copy and paste code directly into a Command and Scripting Interpreter. One such strategy is "ClickFix," in which adversaries present users with seemingly helpful solutions—such as prompts to fix errors or complete CAPTCHAs—that instead instruct the user to copy and paste malicious code.
Malicious websites, such as those used in Drive-by Compromise, may present fake error messages or CAPTCHA prompts that instruct users to open a terminal or the Windows Run Dialog box and execute an arbitrary command. These commands may be obfuscated using encoding or other techniques to conceal malicious intent. Once executed, the adversary will typically be able to establish a foothold on the victim's machine.
Adversaries may also leverage phishing emails for this purpose. When a user attempts to open an attachment, they may be presented with a fake error and offered a malicious command to paste as a solution, consistent with the "ClickFix" strategy.
Tricking a user into executing a command themselves may help to bypass email filtering, browser sandboxing, or other mitigations designed to protect users against malicious downloaded files.
Kill Chain Phase
Platforms: Linux, macOS, Windows
What to Check
How to Test
Manual Testing
-
Identify Attack Surface: Determine if the target environment is susceptible to Malicious Copy and Paste by examining the target platforms (Linux, macOS, Windows).
-
Assess Existing Defenses: Review whether mitigations for T1204.004 are in place. If defenses are absent or misconfigured, this technique may be exploitable.