WU Balance
HomeCase studiesLess than two days from patch to hack: anatomy of a WordPress attack
Security
under 2 days
from patch release to the site being hacked
July 2026

Less than two days from patch to hack: anatomy of a WordPress attack

Manufacturing company · WordPress website
Website security
under 2 days
from patch release to the site being hacked
10
rogue administrators found and removed
~40
malicious objects sent to quarantine

The challenge: find out how the site was hacked and clean it up

The client came to us with a typical complaint: the hosting sent a malware alert, and an unfamiliar verified owner appeared in Google Search Console. A manufacturing company's website on WordPress, about twenty plugins, steady traffic from search. Web server logs had been turned on literally at the moment the client contacted us, so there was no request history. We had to figure out how the attacker got in and what they managed to do, clean out every last file and close the entry point, without breaking the working site.

How it all started

The client's three observations at the time they contacted us:

  1. 1The hosting antivirus found a file in the plugins folder named something like "system-monitor" with a random string of characters at the end.
  2. 2In the file manager, several folders had today's modification date, even though nobody had touched anything.
  3. 3Someone else appeared as an owner in Google Search Console, verified through an HTML file in the site root.
The third point is the most telling. Verifying ownership in Search Console isn't about harming the site. It's about tracking how your own spam gets indexed on someone else's domain. In other words, the site was already working for someone else.

The entry point: not a plugin, but the core itself

The first hypothesis was obvious: a vulnerable plugin. The site had a file manager plugin known for a critical vulnerability in the past, and it looked like the main suspect: the site root had service folders that only this plugin creates.

The hypothesis turned out to be wrong. The installed version was newer than the vulnerable one, and the traces of the file manager's activity dated to after the first rogue administrator appeared. It was a tool for holding on to the site, not the way in.

The real entry point turned out to be the WordPress core. A vulnerability that was fresh at the time, CVE-2026-63030 (the campaign was named wp2shell), combines route confusion in the REST API with SQL injection in the post query parameter. Exploiting it needs neither authentication nor any user action: the attacker directly creates an administrator and uploads code.

July 17
The patch is released: the vulnerability becomes public
July 18
A working exploit appears on GitHub: a ready-made attack tool
July 19, night
Mass scanning of the internet begins
July 19, 04:52
The first rogue administrator is created on the site
Timeline of the wp2shell campaign and the hack of the client's site: less than two days passed from the patch release to the intrusion
Less than two days passed from the patch release to the hack of this particular site. That is the key number of the whole case: the window between "the vulnerability became known" and "mass exploitation started" is now measured in hours, not weeks.

Timeline of the takeover

From then on, the site lived a life of its own for more than a week. The reconstructed picture:

  1. July 19
    Two administrators are created with names resembling service accounts, counting on the owner taking them for system ones
  2. July 19-21
    Three more administrators from other tools: judging by the email domains in their profiles, several different groups found and took over the site
  3. July 21
    Two fake plugins are deployed in the plugins folder: a web shell for running commands and a file manager for uploading files
  4. July 22
    A must-use plugin appears (WordPress always loads these and doesn't show them in the regular list), plus another shell disguised as a caching plugin
  5. July 25-26
    New administrators with names like "administrator" followed by numbers, and shells spreading through the image folders
  6. July 27
    A mass change of modification times on hundreds of files, and someone else's ownership verified in Search Console
10
rogue administrator accounts
~40
malicious objects by the time the client contacted us

Three tricks worth knowing

1. Forged file modification dates

The nastiest surprise. The malicious files had dates from 2022-2024, so they looked old, long-standing and therefore harmless. In fact, all this code appeared within a single week: the attacker mass-set arbitrary modification times on files, a simple operation available to anyone who can run commands.

What we foundDate on the fileActually
Web shell disguised as a pluginJanuary 2024this week
Folders with spam dataNovember 2022this week
File modification dates were forged: the "ancient" finds actually appeared within a single week
When investigating a hack, you can't rely on file dates. The standard approach of "show what changed in the last week" gives a false picture: fresh backdoors, the hidden entrances an attacker leaves behind, don't show up in it, while harmless files someone happened to touch do.

2. A malicious .htaccess that keeps out competitors

The site root had a rewritten server configuration file with unusual logic: it denied execution of all PHP files except a short whitelist. The list included WordPress system files and about fifteen unfamiliar names.

# Outline of the malicious .htaccess (not the literal code)
# PHP execution is denied to everyone...
<FilesMatch "\.php
quot;> Deny from all </FilesMatch> # ...except system files and the first group's backdoors <FilesMatch "^(index|wp-login|defaults|mah|networks|...)\.php
quot;> Allow from all </FilesMatch>
A whitelist of about fifteen names: other groups' backdoors stopped working, their own kept running. The system file wp-cron.php didn't make the list, so WordPress scheduled tasks quietly died

In other words, the first group to take over the site locked out everyone else, leaving only its own backdoors working. A side effect: WordPress scheduled tasks stopped running on the site. The owner didn't notice.

3. A "Security Patch" plugin closing the very same hole

The most elegant find. The must-use plugins folder had a file presenting itself as "Security Patch: REST API hardening". And it really did block access to the vulnerable route, for everyone except those who know a secret header with a password.

One group of attackers patched the vulnerability against its competitors while keeping a way in for itself. The irony is that this very file finally confirmed the entry point: the attacker showed us exactly how they got in.

What it was all for

Not destruction. The site was turned into a tool for someone else's SEO.

A real visitor

Sees the company's normal website, nothing suspicious

A search engine bot

Gets spam pages targeting someone else's commercial queries

Cloaking: the same address serves different content, which is why an owner may not notice for a long time that the site is working for someone else's SEO
  • Code was stitched into the site's main file that loaded content from an external server. It checked who was visiting and served spam only to search engine bots, while ordinary visitors saw the normal site.
  • The root held about a dozen doorway files generating pages for someone else's commercial queries. By the time of the investigation, Googlebot and AI service crawlers were already actively crawling them: the spam had made it into the index.
  • Additional entry points were planted in image folders and inside legitimate plugins. Their folders had plausible names, like cloudflare, nextjs and jquery3, impossible to tell from the real thing at a glance.

The damage here is to reputation and search: someone else's pages in the index, a risk of search engine penalties, and a rogue owner verified in Search Console.

What helped restore everything

The main investigation tool turned out to be a git repository, a version control system we had set up ourselves a few months before the incident, simply to make development easier.

Since file dates couldn't be trusted and there were no logs, the only reliable reference was "the state of the site at the last commit". Comparing against it gave a complete answer: which files were changed, which were added and what the originals looked like. More than that, it disproved the initial theory. Judging by the dates, the site seemed to have been infected since 2022; the comparison with the repository showed that at the time of the commit the site was completely clean, and everything happened within one week.

Perhaps the main practical takeaway of this case: keep your site under version control, even if you are not doing any development. During an incident, the repository becomes a reference you can check every file against.

How we cleaned up and secured the WordPress site

  • Collected evidence before making any changes: an archive of the malicious files and a database dump, needed both for the investigation and in case anything went wrong
  • Removed the ten rogue administrators first: through the admin panel, an attacker can upload everything again in a minute
  • Isolated the malicious code: not deleted but moved to quarantine outside the public folder, a reversible operation that preserves the evidence
  • Restored modified files from clean versions
  • Updated the WordPress core to the patched version: until this step, the site stayed vulnerable and could be hacked again at any moment
  • Updated plugins and deleted unused ones: an inactive plugin is still executable code reachable by a direct link
  • Changed the secret keys in the configuration to log everyone out, including the attacker
  • Blocked PHP execution in the upload and image folders: those hold files from users, and executable code has no business there
  • Set up a "gone for good" response (code 410) for spam pages that got into the index: search engines drop them faster that way than with a regular 404 error
  • Revoked the rogue access in Search Console manually: deleting the verification file does not revoke ownership that is already verified
  • Fixed the styling that broke after the plugin update: the needed styles had once been written straight into the plugin files, and the update wiped them. We moved the changes into the theme, where they survive updates, and along the way found and fixed a bug that had kept some styles from applying on mobile devices for years

The result: the site is clean and the entry point is closed

The site is fully cleaned and closed: ten rogue administrators removed, about forty malicious objects sent to quarantine, the core and plugins updated, and the spam pages are dropping out of search. The main investigation tool was a git repository we had set up ourselves a few months before the incident to make development easier: comparing against it let us check every file and prove the infection lasted a week, not years. Details in the breakdown above.

Checklist: what to do with your site today

1Check your WordPress version

If the core hasn't been updated in several months, that is your main risk, bigger than any plugin. Here, less than two days passed from the vulnerability's publication to the hack.

2Review the list of users

You should know every administrator. Accounts with "service-like" names are counting on you to take them for system accounts.

3Look into must-use plugins

WordPress always loads them and doesn't show them in the regular list, which makes them an ideal hiding place. Normally the folder is either empty or holds what you installed yourself.

4Check core integrity

WordPress's own tools do this with a single command, and it immediately shows any foreign files.

5Delete unused plugins

Delete them, don't just deactivate them: an inactive plugin is still executable code reachable by a direct link.

6Turn on web server logs in advance

Not having them in this case cost the most valuable part of the picture: the exact vector of the first request.

7Set up a repository

Even for a site with no active development: during an incident, it becomes a reference you can check every file against.

What else we checked

The hosting handled this story correctly: the sites on one account were isolated from each other, so the hack of one didn't give access to its neighbors. This is worth checking when choosing hosting: on platforms without such isolation, one vulnerable site compromises all the others on the account.

We also checked separately whether the email sending credentials had leaked. They hadn't, for a pleasant reason: the site sent email through system tools that need no login or password. There was nothing to store.

What did leak were the password hashes of all users: irreversible "fingerprints" that let someone guess passwords by brute force on their own computer, without contacting the site. Some of the hashes were in an outdated format where such guessing is especially fast. Changing passwords after an incident is a must, even if it seems the attacker "never saw the passwords".

More case studies

All case studies
AI searchSEOWebsite+1
#1
in the ChatGPT answer about an office for a team
September 2026

Office rental in Phuket: a page built for SEO and AI, recommended by ChatGPT, Perplexity and Yandex Alice five weeks later

Coworking and office rental · Phuket, Thailand

The challenge. A coworking space in the south of Phuket has five floors, and besides desks it rents out separate offices: furnished rooms for 5-6 people, whole-floor spaces and a virtual office with a registered business address. But the site had no dedicated page about offices: office ads led to Google Maps, and for queries like "office for rent phuket" the search engine showed listing portals. It needed a page that both Google and AI assistants find, since expats and people relocating to the island increasingly ask AI where to rent an office there. And it had to be built into the existing Tilda site, without moving it, in two languages: English and Russian.

#1
in the ChatGPT answer about an office for a team
3 of 3
AI assistants recommend it: ChatGPT, Perplexity, Yandex Alice
99%
of cluster queries covered by the page copy
Read the case study
WebsiteSEOPrototyping
×3
Google impressions over the summer, June vs September
September 2026

Boat tour website in Phuket: two languages, static pages behind a CDN, and targeted clicks from Google in the very first season

Private boat tours · Phuket, Thailand

The challenge. A small company in Phuket with two new boats built in 2025: private day trips at sea for families and couples, with a sun roof, soft seats, a shower and gear on board. Online, it only had an old website on a domain made from the company name and an Instagram account. It needed a website that brings in guests from search on its own: in English for tourists from around the world and in Russian; fast on a phone over mobile internet from anywhere on the planet; selling not "a transfer to an island" but comfort and the freedom to choose the route, because that is exactly what the client charges more for than the standard boats on the beach. One more requirement: the site had to be understood correctly not only by Google but also by AI assistants, which tourists increasingly ask which boat to take in Phuket.

×3
Google impressions over the summer, June vs September
4.3%
Google CTR: the share of impressions that led to a click
~60 ms
server response: pages are served from the Cloudflare cache
Read the case study
SpeedSEO
+60%
clicks from search a month after the fixes
August 2026

Home page 2.5x faster without a redesign: 12 targeted fixes and +60% clicks from search a month later

Upholstered furniture repair and reupholstery workshop · MODX website

The challenge. A furniture reupholstery workshop website: steady traffic from search, inquiries through forms, chat and calls, and a MODX CMS that is many years old. The owner's complaint was general: "the site is slow". The standard answer to that is "compress your images and turn on caching". We decided to measure first: where exactly the seconds are lost and which of them visitors actually feel. The constraints were the usual ones for a working business: don't break the inquiry forms, the captcha or the admin panel, don't start a redesign, and don't take the site down even for a minute. Speed here is not only about convenience: page load metrics are ranking factors for both Google and Yandex, Russia's largest search engine.

+60%
clicks from search a month after the fixes
-61%
time to show the main content (LCP)
12 fixes
found and closed, each measured before and after
Read the case study

Want similar results for your business?

Tell us what you need, and we'll suggest a solution and estimate the timeline.