Hacker slipping past Wordfence
-
I’ve recently had security breaches on two different websites. Both instances followed this same pattern:
First, I receive an alert from wordfence@ [website url] with the subject “Login Verification Required” that asks me to please verify a login attempt, and to change my password immediately if I did not attempt to log in. I’m uncertain whether this alert is coming from WordPress core or from Wordfence. (obviously I don’t click the “verify” link).
When I log in to the website normally, I find that all of the Wordfence email alerts under “All Options” have been unchecked, and scan scheduling has been disabled. When I run a scan it does indeed find an unknown, suspicious file, which I delete. Looking at the live traffic logs under registered users, I can see an unsuccessful login using my username, from somewhere in Europe (not my location). I should note that I do have 2FA enabled.
Additionally, when I look at my user profile under “Users,” the “log out everywhere else” button is active, meaning my account is logged in from another location (which it shouldn’t be).
I delete the malware file and change all passwords: all WordPress user accounts (there are only two), database, FTP, and hosting account control panel). I keep a close eye on it for the next couple of days, but then…
The exact same thing happens six days later. Login verification email, Wordfence settings changed, my account showing as logged in from a different location, malware file present. This time, they’ve added the malware file to the exclusion list, so the scan doesn’t catch it until I notice that change. Also, once I do detect it, there is something going on with the permissions where I can’t delete the file, either via Wordfence, direct FTP, or the files section on the hosting account control panel. I have to call the hosting company and have them manually delete the file, although they say they can’t see any reason why I shouldn’t be able to delete it from my end.
I redo the same cleaning steps listed above. Not two hours after doing that, I get another “Login Verification Required” email. At this point I’m way out of my depth, so I just delete the entire website and database, then do a fresh WordPress install and restore the website using a backup from January, before all of this started. That was yesterday, and so far, so good…
My questions are (I don’t know a lot about this so please forgive me if these questions seem obvious):
First of all, has anyone else seen anything like this before? I’ve been managing multiple WordPress websites for over 10 years and this is a new one on me.
How did the hacker gain access to my WordPress admin in the first place? The “verification required” email implies that someone is trying to log in using my username and password, but presumably failing because they’re not able to click the verify link in the email. Also, Wordfence live traffic logs show a failed login attempt but no successful ones other than those I know are actually me.
Why did I not get a “admin login” alert from Wordfence when they did get in? It seems like there should be some space between when they successfully logged in and when they turned off the Wordfence email alerts.
Most importantly, what can I do to harden my websites against this type of attack? As far as I know I’m following best practices for WordPress security: strong passwords, 2FA, Wordfence installed, core software and plugins kept up to date. I did some reading this morning that suggests that XML-RPC could be how they’re bypassing Wordfence, so I’ve checked “disable XML-RPC authentication” in the Wordfence login security options, and also added the “deny from all” code to the .htaccess file for one of the two affected sites. Is it redundant to do both of these steps? Is XML-RPC relevant at all?
I would greatly appreciate any insight or advice from the Wordfence devs and also from the community at large. Thank you very much for your time.
- The topic ‘Hacker slipping past Wordfence’ is closed to new replies.