The FBI says over 1,000 hacked WordPress sites hid ransomware lures in Google. You can open yours and see a normal page.

Details

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.

Topics Hardening & checklists Beginner guides

ClickFix attacks and hacked WordPress sites Open larger image: ClickFix attacks and hacked WordPress sites

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.

ClickFix and site security

How the lure works

A typical flow looks like this:

  1. The user lands on a compromised page, often the home page.
  2. A dialog or fullscreen overlay mimics Google reCAPTCHA, Cloudflare Turnstile, or a generic error fix.
  3. One click copies a hidden PowerShell or cmd command to the clipboard.
  4. On-screen steps say to press Win+R, paste, and press Enter. Newer variants point to PowerShell instead of Run.

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.

Why attackers put ClickFix on WordPress

WordPress sites get traffic and visitors trust the domain. A script hooked into wp_head can:

  • Show the overlay only to logged-out visitors, so admins see a clean site.
  • Load the payload from another domain, blockchain storage, or an encoded plugin file.
  • Pair with SEO spam or redirects after the overlay has run a few times.

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.

Signs your WordPress site may be serving ClickFix

Check from a logged-out window or a phone on mobile data, not from your admin session:

  • Fullscreen overlay on load with Verify you are human, Cloudflare check, or fix this error wording.
  • Browser DevTools, Elements tab: unknown script tags or iframes at the top of <head>.
  • Safe Browsing, antivirus, or customer reports about paste-a-command instructions.
  • New plugins you did not install, especially very short folder names under wp-content/plugins/.
  • Unexpected files in wp-content/mu-plugins/.
  • Theme functions.php or footer edits you did not make.
  • Large encoded options rows (attackers sometimes abuse code snippet plugins).

If only admins see a normal site, suspect malware that skips logged-in administrators.

Cleanup on WordPress

  1. Contain: maintenance mode if visitors are still hit. Capture a backup for forensics.
  2. Find the injection: compare plugins and themes to a clean install or last known good backup. Search for wp_head, clipboard, powershell, recaptcha, and cloudflare in files and the database (carefully on production).
  3. Remove persistence: delete rogue plugins and mu-plugins, revert theme edits, remove malicious snippet entries. Do not leave a dropper that restores files from cron.
  4. Update and harden: WordPress core, all plugins, and PHP on a supported branch. Enable 2FA on every privileged account. Tighten file permissions.
  5. Rotate secrets: WordPress passwords, application passwords, hosting, FTP, database, and payment gateway keys if staff accounts were exposed.
  6. Scan: malware and core integrity scans. Re-check from a logged-out session.
  7. Request review: after cleanup, request Google Safe Browsing review if warnings appeared.

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.

Prevention habits

  • Fewer plugins, prompt updates, and 2FA for all roles that can install software.
  • Scheduled malware scanning and Events review for new admin accounts.
  • File edit disabled in wp-config.php when policy allows.
  • Cloud Firewall on Security Ninja Pro helps with login abuse and known bad IPs. Pair it with clean code on the site.
  • Tell staff never to paste PowerShell commands from a website prompt, even on their own machine.

Sources and further reading

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.

Frequently asked questions

What is a ClickFix attack? +

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.

How do ClickFix injections appear on WordPress? +

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.

Does ClickFix infect the WordPress server or the visitor PC? +

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.

What should I do first on a WordPress site with ClickFix? +

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.

Larger screenshot

Enlarged image