Why do WordPress websites get hacked?
These are some major reasons for a WordPress Website to be hacked.
- Vulnerable WordPress installation
- Outdated WP Core, themes & plugins
- Insecure hosting platform
- Weak password
- Poorly coded plugin
Let’s focus on Backdoors that may be hidden in your system if you face repeated malicious activity.
WordPress Administrator creator script
If you suspect your previous developer or an insider job, the best place to find the backdoor is your theme & plugin.
This simple script below can create a WordPress administrator account with username as
support and password:
PassWord just by visiting your website this way.
This script can hide administrator account
support from the user list and decrease the total user count by 1!
Web shell backdoors can be placed anywhere on your website. Most WordPress security plugins can detect only well-known web shells. Here is some location to hide web shells on the WordPress website.
The majority of hidden web-shells backdoors we found into inactive themes. Because hacker knows that the site owner won’t update the theme they don’t use! The site owner’s simple thinking, the inactive theme doesn’t have anything to do with the website, so leave it!. That’s a great mistake. We recommend never to keep an unused theme installed on your website; updates or outdated don’t matter.
Hackers choose plugins to hide backdoors because site owners are sometimes afraid to update plugins that may break the website. Premium plugins are the main target, while pirated plugins are heaven because pirated plugins (premium plugins without a license) can’t be updated!
The uploads directory is the directory where all user-uploaded files, such as images; document contents, are usually stored. It’s a safe place to hide a web shell because you don’t risk being deleted by WordPress, theme, or plugin updates!
The wp-config.php file is a popular target. Because this file contains a Database name, usernames, password, hostname, and the first file, WordPress.
the wp-includes directory is another place to hide the web-shell backdoor because only senior developers and security experts have the courage to touch this directory.
cPanel and SFTP/FTP Backdoor
Not only is your WordPress website hackable, but your web hosting control panel is a good place to hide the root of the hack.
cPanel hidden contact and password reset email
Check these 2 files under your cPanel home directory if they contain any unknown email:
Those 2 files should contain your own email address. This email address is used to send password reset emails and cPanel notifications.
.lastlogin file and see if you can recognize the IP address listed there. This is the list of IP addresses being used to access the cPanel.
Don’t forget to reset the cPanel password immediately.
These days FTP is not a secure protocol anymore. When doing website security hardening and trying to solve a mysterious hack coming back repeatedly, ensure you don’t have old used FTP accounts. We recommend deleting all FTP accounts and, if possible, using SFTP with a strong password or Public Key authentication.
SSH key/SFTP user
Check for authorized SSH keys and SFTP user accounts in your control panel. A good place to hide a legit backdoor!