ClickFix attacks and hacked WordPress sites
ClickFix on hacked WordPress sites: fake captcha overlays that copy PowerShell commands, how to spot them, clean the site, and stop reinfection.
ClickFix on hacked WordPress sites: fake captcha overlays that copy PowerShell commands, how to spot them, clean the site, and stop reinfection.
ClickFix is a social engineering pattern. A fake captcha or verification box tells the visitor to paste a command into Windows Run or PowerShell. That command installs malware on the visitor PC. When WordPress is hacked, attackers often inject JavaScript so a real domain on your site serves the lure. Microsoft, Proofpoint, and Sucuri have published write-ups on fake reCAPTCHA and fake Cloudflare variants.
A typical flow looks like this:
Microsoft’s analysis notes that paths often use PowerShell cmdlets such as IWR, IRM, and IEX to pull payloads. Proofpoint reported fake captcha kits in email and web campaigns, sometimes hiding the command after fake verification text in the Run dialog.
The visitor’s PC runs the pasted command. Your WordPress install is what displayed the overlay.
WordPress sites get traffic and visitors trust the domain. A script hooked into wp_head can:
Sucuri documented fake Google reCAPTCHA on WordPress home pages, often through malicious five-character plugin folders whose index.php hooks wp_head and strips security headers. A May 2025 Sucuri post described fake Cloudflare verification with the same Run-and-paste steps.
Check from a logged-out window or a phone on mobile data, not from your admin session:
<head>.wp-content/plugins/.wp-content/mu-plugins/.functions.php or footer edits you did not make.If only admins see a normal site, suspect malware that skips logged-in administrators.
wp_head, clipboard, powershell, recaptcha, and cloudflare in files and the database (carefully on production).Related guides on this site:
If the overlay is gone and you are still unsure how someone got in, we can help with cleanup and review.
wp-config.php when policy allows.We have protected 100,000+ sites since 2011 with Security Ninja. We cannot stop every social engineering trick on a visitor PC. We can help you find and remove the injection on WordPress before your domain keeps serving it.
Found this useful? Share it.
ClickFix is a social engineering trick. A page shows a fake error, captcha, or Cloudflare check and tells the visitor to open Windows Run or PowerShell, paste from the clipboard, and press Enter. The clipboard holds a malicious command. Microsoft and Proofpoint document the pattern in phishing and drive-by lures. On WordPress, attackers inject JavaScript or PHP so your legitimate site shows the lure to visitors.
Infected sites often load a fullscreen overlay or fake reCAPTCHA from wp_head. Sucuri has found short random plugin folders, must-use plugins, theme edits, and database snippets that inject the script. The overlay may say Verify you are human and hide a PowerShell command in the clipboard after one click.
The WordPress site delivers the lure. The malware runs on the visitor Windows PC if they paste and run the command. You still need to remove the injection because visitors get hit, Safe Browsing can flag the site, and the overlay can show again on the next page view.
Put the site in maintenance mode if needed. Scan for unknown plugins, mu-plugins, theme changes, and wp_options injections. Remove malicious code, update everything, rotate all passwords and salts, then follow our hacked-site recovery path. Tell affected visitors to run antivirus on Windows if they pasted the command.