I’ve Been Hacked
I am doing IT security for a long time. Backups, updates, patches, whatever needs to be done. I am also doing monitoring and that saved my butt.
My morning started after breakfast with a nice cup of coffee browsing through my emails. One got my immediate attention:
Verify database on webserver.
What? A script monitoring the database had detected some additions. The relaxed morning ended quite rapidly. I dumped the database and yes, two more admins had been added. Great. This WordPress installation had been compromised.
I mounted a backup disk and ran a script comparing the files on the backup and in the live installation. What I found confirmed what I already suspected. The attacker installed:
admin-utils-64f32ed287.php
direct.php
loot.php
which allowed him to access pretty much everything on the server under the UID of the webserver. Crap. I stopped access to the server, secured the compromised WordPress and synced with the backup to remove malicious files, than updated the wordpress installation (more about that in a minute). Finally I replaced the database with a “last known good”, changed the passwords, rotated the salts and terminated all possible current authorized connections. So far, so good.
Let’s see what happened:
I checked the logs and found the culprit:
/wp-json/batch/v1
which points to the wp2shell attack, combining CVE-2026-63030 (WordPress REST API batch-route confusion) and CVE-2026-60137 (SQL injection) to gain access to the installation. These vulnerabilities were 3 months old, my WordPress updates itself, so how could this old bug be used to compromise the site (more on this in a minute) ?
The server was stopped, everything compared to a “known good” backup, the compromised site stored for forensics, database cleaned and passwords changed, WordPress sites verified updated, salts rotated, session cancelled. Time to restart the server again.
So .. why did this one server didn’t update?
Turns out the installation ran WordPress 7.0-alpha-61406 . Why? No clue why I installed this version. WordPress treats alpha/development builds differently from normal releases. They follow a separate update channel, with their own eligibility rules. And it wasn’t updated.
Now that the system was up and running, I decided that I needed some more protection in case I f*ck up again. I installed CrowdSec which would have detected and blocked this attack. CrowdSec is an open-source, collaborative intrusion detection and prevention system (IDPS), web application firewall (WAF), and bot-detection software.
It monitors my system logs to spot aggressive or suspicious behavior like brute-force attacks, port scans, or web scraping. It than blocks the offending IPs from accessing the server. This alone might not have detected the attack. But the CrowdSec WAF (Web Application Firewall) would have. Because it can also be embedded into the web-server itself to monitor the data stream. And again – if it detects a malicious attempt, it block the offender before the data even reaches the PHP engine.
I also created CrowdSec sensors for Home Automation / MQTT to be able to see the threat levels and as an additional benefit, how many IPs are currently banned. The record is 199 / 24h. We’ll see how that proceeds.
In Summary:
I was alerted to the compromise fairly fast by my own security system. I also run a consistent backup (on an unmounted hard disk), so I could use a “last known good” to verify the system and clean it properly. That limited the reach of the exploit and the systems were back up and running within a day.
But we are living in a time where AI generated exploits are raining down like candy in a parade. While I meticulously updated operating systems, servers and related modules, I relied on WordPress’ auto-update. Which worked great, just not on this one server.
CrowdSec brings even more bang into the equation. While my security system was designed to detect a problem after the fact (and it worked nicely), CrowdSec can stop an intrusion before it happens. One more layer and hopefully enough to prevent further problems.
Michaela Merz is an entrepreneur and first generation hacker. Her career started even before the Internet was available. She invented and developed a number of technologies now considered to be standard in modern web-environments. She is a software engineer, a Medical Rescue volunteer, an Advanced Emergency Medical Technician, a FAA Part 61 (PPL , IFR) , Part 107 certified UAS pilot and a licensed ham . More about Michaela ..