When you are the world’s most popular content management system and the online publishing platform of choice for millions of websites and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will become an obvious target for attacks by hackers.
In April 2013 a global brute force attack began hitting WordPress installations on almost every web host in existence around the world.
These attacks were caused by botnets (computer networks infected with viruses and programmed to attack other installations).
How To Protect Your WordPress Site From A Brute-Force Attack
Brute-Force Attacks – Definition
A brute-force attack is a technique used to break an encryption or authentication system by trying all possibilities.
(Source: Chinese University Of Hong Kong)
There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This is achieved using software tools that automatically tries to guess hundreds of login permutations in minutes.
If you’re using predictable usernames and passwords that are easy to guess, your website can be easily hacked by a malicious script’s persistent attempts to work out your site’s login details.
This is called a “brute force” login attack.
A botnet is a number of Internet-connected computers communicating with other similar machines in an effort to complete repetitive tasks and objectives. This can be as mundane as keeping control of an Internet Relay Chat (IRC) channel, or it could be used to send spam email or participate in distributed denial-of-service attacks. The word botnet is a combination of the words robot and network.
”Botnets” are networks of computers that have been infected with malicious code, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge.
Botnets are typically used to blast out mass spam emails.
The screenshot below was taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively compromising computer networks all around the globe since 2009 …
(The Zeus botnet has been actively infecting computer networks all around the world since 2009. Source: SecureList.com)
These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by several hosting companies just in the initial attack, when millions of attempts to force their way into WordPress user admin areas took place. The large-scale attack then continued, with over 30,000 WordPress sites being hacked every day.
News of this brute-force botnet attack was widely reported in all of the major webhosting companies, as well as the leading technology media publications, such as Forbes, TechNews Daily, Tech Crunch, BBC News, PC Magazine, and even on the official US Department of Homeland Security website …
(WordPress often is targeted by hackers)
Does This Mean WordPress Is Not Secure And We Should Stop Using It?
No. In fact, there are lots of great reasons why you should use WordPress if you are concerned at all about website security.
To understand why WordPress is a secure web platform, read this article: Is WordPress A Secure Platform For Websites?
It’s important to understand that, in the case of the brute force attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other platforms like Joomla).
Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made this comment about the brute-force attacks:
It is a “simple” script that attempts to login using the admin login and a generated password. So if your password is too short or based on dictionary words it will be guessed and then the script can login legitimately and do whatever it wants including installing scripts (as plugins) or editing files. The attack tries to guess your password, if it succeeds, the most secure site in the world is wide open because they have your password.
How To Prevent Your WordPress Site From Being Brute-Force Attacked – Ten Security Checks
You may think that the information in your website has no value to hackers, but the reality is that every website has value to a malicious user.
If a malicious user can discover a web security flaw, the site can then be employed to target more valuable web sites.
Additional undesirable consequences of having your site hacked include getting blacklisted by Google, having stealthy spam links promoting things like online meds, discounted fashion, etc. inserted into your content, malicious redirects to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasty things.
The truth is that brute-force software bots are very likely trying to break into your web site at this very moment. Whether they will get into your site will depend on how hard you have made things for hackers to keep trying until they either can find how to break in, or give up and decide to look for a less secure target.
How Much Information Are You Broadcasting To Hackers About Your Site?
Does your website run on WordPress? If so visit a site like Hackertarget.com and run your site through their WordPress security scan …
You will see that the test returns various results and information about your site setup …
(WordPress security scan results. Image source: Hackertarget.com)
It should be obvious after using the tool shown above that if you can freely access all of this information, then hackers can too.
Being able to see what version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories in your site can all be potentially valuable information to hackers, as this informs them about potential security vulnerabilities, especially where site owners haven’t updated their sites.
If your website runs on WordPress and you are not preventive steps to harden your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these attacks are systematically targeting WordPress sites all the world!
When a site is broken into, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Typically, most sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.
To avoid the heartache and frustration (and significant financial loss) that comes with discovering that your site has been hacked into, below are ten essential and effective security checks that will help to prevent your WordPress site from brute force attacks.
Note: Some of the recommended steps listed below require some technical skills to modify core WordPress and/or server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or search for a professional WordPress service provider in our WordPress Services Directory.
Security Measure #1 – Get In Touch With Your Host
Contact your host and ask them exactly what security measures have been put into place to protect your site from botnet attacks, and what is done to ensure that your site files get regularly backed up.
It is important to make sure that your web host backs up your server files and that, if anything goes wrong, you can easily recover your site.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Maintained
You should never rely on your hosting company for your site backups. Instead, learn how to maintain your WordPress site or get this service done for you and maintain a habit of performing a full site maintenance routine frequently (e.g. weekly, monthly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All data and files are free of errors, optimized and backed up,
- All WordPress software, themes and plugins are up-to-date,
- etc …
A proper WP maintenance routine looks like this …
(Maintaining your WordPress installation fully backed up and updated is vitally important for WordPress security. Screenshot source: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WP site completely backed up and updated is. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WP site maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your site is the second most important thing you should do after making sure that you are still breathing!
If you don’t want to perform manual backups, there are a number of plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy And Protect Your WordPress Site With Backup Creator Plugin For WordPress
Security Measure #3 – Make Sure That Your Username Is Not “Admin”
the worldwide brute-force attack on WordPress sites was mostly an attempt to compromise website administrator panels and gain access to sites by exploiting WP installations that used “admin” as their account name.
For reasons of website security, avoid installing WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, then make sure you change it immediately.
For a tutorial on how to change your login username, go here: Changing Your WP Admin User Name
Security Measure #4 – Make Sure Your Password Is Hard To Guess
A “brute force” attack occurs when malicious software continually and persistently hits a login or password field with different character strings in an attempt to guess the right login combination that will unlock your site.
Unless you put some measure in place to block the brute force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.
Passwords that are easy to guess, therefore, become very easy targets for brute-force attacks. Make sure that you change your password to something that contains at least 8 or 9 characters long, and that includes upper and lowercase letters, and “special” characters (^%$#&@*).
You can use a password management program like Roboform to generate difficult passwords …
(You can use a password software tool like Roboform to generate really secure passwords)
We have created a simple tutorial created especially for non-technical WP admin users that shows you how to change your admin password here: What To Do If You Need To Change The Login Password
Security Measure #5 – Prevent Access To The wp-config.php File
The wp-config.php file contains information about your WordPress site’s database and is used to define advanced options for WordPress.
If hackers break into your website, they will search for the wp-config.php file, because this file contains important information about your site’s database, security keys, etc. Getting access to this information would allow a hacker to change anything in your database, create a user account, upload files and take control of your site.
In order to protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily accessible. This requires knowing how to edit database information, move files around in your server and changing access permissions.
Security Measure #6 – Delete Or Rename Unnecessary Site Installation Files
Delete or rename your install.php, upgrade.php and readme.html files.
These files can be removed after installation. If you don’t want to remove these files, just rename them.
Security Measure #7 – Upgrade Your WordPress Site, Themes And Plugins To Their Latest Version
Hackers are always on the lookout for vulnerabilities in older versions of WordPress that they can exploit, including outdated versions of plugins and themes.
Ensure that all of your software files, plugins, themes, etc. are always up to date.
Security Measure #8 – Disable Your Theme Editor
WordPress comes with a built-in editor feature that lets the administrator edit plugin and theme files from the dashboard area.
You can access your WordPress Theme Editor by selecting Appearance > Editor in the dashboard menu …
(Accessing the WordPress theme editor using the WP main menu)
The WordPress theme editor lets anyone accessing your site view and edit your theme template files, and create havoc on your site.
To prevent people from being able to access the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.
Security Measure #9 – Remove Access To The Site’s Uploads Directory
The WordPress “uploads” directory stores all the media files that get uploaded to your blog.
Normally, this folder is visible to all users online. All a person needs to do to view the contents in the “uploads” folder is visit your directory using a web browser …
(WordPress has an uploads directory where your media files are stored)
If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, someone can upload unauthorized file types to your site.
Protecting your directories will prevent unauthorized people from accessing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, uploading a blank index.php file (this is literally a blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are not sure about what to do.
Security Measure #10 – Security Plugins
A number of security plugins for WordPress are available that specifically address common security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your website from botnets, preventing unauthorized file uploads, etc.
Many WordPress plugins address some but not all areas of WordPress security. One plugin that seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.
(SecureScanPro – WordPress complete security software)
SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security areas that WordPress users need to address.
Another security plugin you may want to look at using is BlogDefender.
This product is a suite of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender scans you WordPress installation for security holes …
WordPress is a very secure web platform, but neglecting basic maintenance tasks like updating your WordPress software, plugins and WordPress themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.
No matter what type of business you run or plan to run online and how small you think your web presence is, you simply cannot ignore the importance of web security.
As a final reminder, below is the advice given by an expert on web security to all WordPress users following the large-scale brute-force attacks on WordPress in April 2013 …
Owners of websites based on WordPress CMS must improve at least basic security settings and implement best practices such as the use of robust passwords and the accurate management of “admin” accounts.
Pierluigi Paganini, Chief Information Security Officer, Security Affairs
As you can see, website security is very important if you run a WordPress site. Hopefully, the above article has shown you what to do to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.
Also, don’t forget to subscribe to WPCompendium.org to be notified when we publish new articles and tutorials on WordPress security and tutorials about new security plugins.
"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum