wordfence.php removed during website attack?
-
A few days ago I logged in to a WordPress site I’m managing due to issues reported by the site owner. All logged in, I was met by a message saying something along the lines of WordFence being inactive because of wordfence.php missing. So, I checked my installed plugins, and WordFence was not even visible there.
Having a feeling something was very wrong, I looked around the admin area only to find two new admin accounts, with random names, being registered. I reinstalled WordFence, by first having to manually remove the WordFence folder from wp-content/plugins because of WordPress complaining about the folder already existing upon installing, to run a scan. Running the scan, it found a bunch of possibly malicious files and themes and the two new admin accounts, and manually I found unknown plugin folders in the plugin directory.
In a panicky rush to un-compromise the site I deleted all the suspicious files and the two admin accounts, and a plugin whose name showed in the file paths of a lot of the suspicious files.
Having sort of afterwards trying to find traces of the intrusion, regretting I was so fast to delete the files, I can see in the WordFence login log database table that one of the aforementioned admin accounts had a successful login the same day all the suspicious files were created.
Now to my wonders. Is it actually possible to deactivate the WordFence firewall by deleting wordfence.php through a vulnerability in a plugin or theme? I checked with the hosting provider, and they could not see any SFTP logins to the server in their log a few days prior to and after the attack. How can such an attack have happened? The scan stated that the two new admin accounts had been created outside WordPress. What does that mean?
Installed plugins and themes during attack:
- Akismet (deactivated)
- Hello Dolly (deactivated)
- SVG Support
- Polylang
- WordFence (status unknown)
- Custom Theme* (active)
- Twenty Twenty-One
* Very basic; no input — no comment sections or search capabilities.
I’m no website security expert, so I’m trying to learn how this attack could have happened so that I can protect my websites better going forward. Any help appreciated.
Note: Wondering why WordFence did not alert me through email during the attack I’ve discovered afterwards that the mail sending capabilities of the WordPress installation was not set up properly. Also, 2FA was not in use during the attack.
- The topic ‘wordfence.php removed during website attack?’ is closed to new replies.