---
title: ClickFix attacks and hacked WordPress sites
canonical: https://wpsecurityninja.com/clickfix-attacks-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](https://wpsecurityninja.com/media/2018/12/hackers-cybersecurity.webp)

## 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](https://www.microsoft.com/en-us/security/blog/2025/08/21/think-before-you-clickfix-analyzing-the-clickfix-social-engineering-technique/) notes that paths often use PowerShell cmdlets such as `IWR`, `IRM`, and `IEX` to pull payloads. [Proofpoint](https://www.proofpoint.com/us/blog/threat-insight/security-brief-clickfix-social-engineering-technique-floods-threat-landscape) 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](https://blog.sucuri.net/2025/02/wordpress-clickfix-malware-causes-google-warnings-and-infected-computers.html) 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](https://blog.sucuri.net/2025/05/another-fake-cloudflare-verification-targets-wordpress-sites.html) 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:

- [Signs your WordPress site is hacked](https://wpsecurityninja.com/signs-wordpress-site-is-hacked/)
- [Check if WordPress is hacked](https://wpsecurityninja.com/check-if-wordpress-site-is-hacked/)
- [What to do if your site is hacked](https://wpsecurityninja.com/what-should-you-do-if-your-wordpress-site-is-hacked/)
- [WordPress malware removal](https://wpsecurityninja.com/wordpress-malware-removal/)

If the overlay is gone and you are still unsure how someone got in, we can help with [cleanup and review](https://wpsecurityninja.com/consultation/).

## 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

- [Think before you Click(Fix) (Microsoft Security Blog, 2025)](https://www.microsoft.com/en-us/security/blog/2025/08/21/think-before-you-clickfix-analyzing-the-clickfix-social-engineering-technique/)
- [ClickFix social engineering brief (Proofpoint)](https://www.proofpoint.com/us/blog/threat-insight/security-brief-clickfix-social-engineering-technique-floods-threat-landscape)
- [WordPress ClickFix malware (Sucuri, 2025)](https://blog.sucuri.net/2025/02/wordpress-clickfix-malware-causes-google-warnings-and-infected-computers.html)
- [Fake Cloudflare verification on WordPress (Sucuri, 2025)](https://blog.sucuri.net/2025/05/another-fake-cloudflare-verification-targets-wordpress-sites.html)

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.
