WordPress frequently comes under attack by hackers.
In April 2013 a mass brute-force attack hit WordPress installations on virtually every web host in existence around the world.
These attacks were caused by botnets (infected computer networks programmed to attack other vulnerable computers).
How To Protect Your WordPress Site From A Brute-Force Attack
What Is A Brute Force Attack?
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)
One of the many ways hackers will attempt to break into WordPress sites is by trying to guess the site admin’s login username and password. This can be done using software programs and scripts that automatically tries to guess hundreds of login permutations in minutes.
If you’re using easy-to-guess login details, your site could be easily hacked by repeated attempts to guess your site’s login details.
This is called a “brute force” attack.
Botnets
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.
(Source: Wikipedia/botnet)
A “Botnet” is a network of private computers that have been compromised and infected with malicious code or software, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.
Botnets are typically used to send out mass spam emails.
Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …
(The Zeus botnet has been actively infecting computer networks all around the world since 2009. Screenshot image: SecureList.com)
These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress users admin areas occurred. The large-scale attack then continued, with over 30,000 WordPress sites being hacked per day.
News of this worldwide brute force botnet attack was widely reported in all of the major webhosting companies, as well as the leading technology media publications, such as TechNews Daily, Forbes, BBC News, PC Magazine, Tech Crunch, and even on the official US Department of Homeland Security website …
(Powering millions of websites and blogs around the world makes WordPress a target for hacking attacks)
Does This Mean We Should Stop Using WordPress?
No. In fact, there are many very good reasons why you should choose WordPress if you are concerned at all about the security of your website.
To learn why WordPress is a secure web platform, read this article: Are Open Source CMS Platforms Like WordPress Secure?
It’s important to understand that, in the case of April 2013 brute-force attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using other platforms like Joomla).
Mike Little, the co-founder of WordPress, said this 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.
Protecting Your WordPress Blog From Being Brute Force Attacked – 10 Security Checks
Every site with a security vulnerability presents an opportunity to hackers. No website or blog is guaranteed immunity from cyber attacks. Business web sites, personal blogs, government web sites … even web sites owned by online security experts can and have been targeted.
If someone can discover a security weakness, your website or blog can then be employed to attack more highly-valued websites.
Additional undesirable effects of having your site hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links promoting things like online meds, cheap offers on brand names, etc. in your content, malicious redirects to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasties.
The reality is that hackers are very likely trying to hack into your site at this very moment. Whether they will achieve this depends on how difficult you can make things for them to keep trying until they discover how to get in, or are forced to give up and decide to look for a more vulnerable target.
How Much Information About Your Site Are You Broadcasting To Hackers?
Do you own a WordPress site? If so, visit Hackertarget.com and run your website through their WordPress security scan …
(Hackertarget – WordPress Security Check Screenshot image: Hackertarget.com)
You will see that the scan returns a number of results and details about your website …
(Hackertarget – website security check results. Product image source: Hackertarget.com)
It should be obvious after using this scanning tool that if you are able to see all of this information, so can hackers.
(Screenshot source: BlogDefender.com)
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 are all useful information to hackers, as this informs them about potentially exploitable security weaknesses, especially where the owners haven’t updated their software versions.
If your website is driven by WordPress and you are not preventive steps to toughen up your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these brute-force attacks are systematically targeting WordPress sites worldwide!
When a website or blog is hacked, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or that everything has been entirely wiped out. Often, sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.
To help avoid the heartache (and potential loss of valuable business data) that comes with having your web site being hacked into, we have listed below ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute force hackers.
Note: Some of the recommended measures below need some technical skills to modify core WordPress or server files. If you have no technical skills, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress technical provider for help.
***
Security Measure #1 – Get In Touch With Your Webhosting Company
Contact your webhosting provider and ask them what security precautions are in place to protect your site from being attacked, and what they are doing to ensure that your server files and data are being regularly backed up.
It’s important to make sure that your web host is backing up your sites and that, if disaster strikes, you can easily get your files and data back.
Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Regularly Updated
You should never rely just on your host for site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and maintain a habit of religiously performing a complete site maintenance routine frequently (e.g. daily, weekly, fortnightly, etc …)
A complete WordPress maintenance routine ensures that:
- All unnecessary files and data are deleted,
- All WordPress data and files are free of errors, optimized and backed up,
- All WordPress plugins, themes and software components are up-to-date,
- etc …
A proper WP maintenance routine looks like this …
(Maintaining your WordPress web site regularly backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WP installation backed up and updated is. WordPress maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WordPress maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your website is the next most important thing you must do after making sure that you are still breathing!
If you don’t want to back up your site manually, there are a number of WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone & Protect Your WordPress Sites With Backup Creator WordPress Plugin
Security Measure #3 – Do Not Use “Admin” As Your Admin Username
The large scale brute-force botnet attack on WordPress sites was mostly attempting to compromise site admin panels by exploiting WP sites that used “admin” as their account name.
For reasons of website security, avoid setting up a WordPress site with the username “admin”. This is the first area hackers will test. If your site’s user name is “admin”, then make sure you change it immediately.
We have created a detailed tutorial for admin users on how to change your login username 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 hits a login or password field with different strings of characters in an attempt to guess the right combination that will give the hacker access to your website.
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 keep attacking your site until it eventually “cracks” the code.
Passwords that are easy to guess, therefore, become very easy targets for hackers. Make sure that you change your password combination to something that is at least eight or nine characters long, and that includes upper and lowercase letters, and “special” characters (e.g. ^, $, @, etc).
You can use a password tool like Roboform to generate hard-to-crack passwords …
(You can use a password software tool like Roboform to generate unbreakable passwords)
For a step-by-step tutorial created especially for WordPress admin users on how to change your admin password, go here: What To Do If You Need To Reset Passwords In WordPress
Security Measure #5 – Protect Your WP Config File
The wp-config.php file contains information about your WP database and is used to define advanced WordPress options.
(wp-config.php file)
If hackers break into your website, they will typically search for your wp-config.php file, because this file contains your WordPress database information, 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.
To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent people getting to your wp-config.php file. This requires knowing how to edit database information, move files around in your server and changing access permissions.
Security Measure #6 – Rename Or Delete Unnecessary Website Installation Files
Delete or rename your install.php, upgrade.php and readme.html files.
These files are completely unnecessary after installation and can be deleted. If you don’t want to remove these files, just rename them.
Security Measure #7 – Update Your WordPress Installation, Themes & Plugins
Hackers look for vulnerabilities in earlier versions of WordPress that can be exploited, including out-of-date versions of WordPress themes and plugins.
Make sure to keep your WordPress installation files, themes, plugins, etc. up-to-date.
Security Measure #8 – Disable The Theme Editor
WordPress comes with a built-in editor that lets the administrator edit plugin and theme files from the dashboard.
You can access the WordPress Theme Editor by selecting Appearance > Editor from your dashboard menu …
(The WordPress theme editor can be accessed using the WP main menu)
The WordPress theme feature lets anyone accessing your blog view and change your theme templates, or cause havoc on your site.
If you want to prevent people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.
Security Measure #9 – Secure Your WordPress Uploads Folder
The WordPress “uploads” directory stores all the media files that get uploaded to your site.
By default, this folder is visible to all users online. All a person needs to do to see the contents in your site’s “uploads” directory is visit your directory using their 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, this can become a serious threat to the security of 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 who knows what they are doing if you are not sure about what to do.
Security Measure #10 – Use WordPress Security Plugins
There are several WordPress security plugins available that will address common security issues WordPress website owners face, such as preventing hackers from gaining access to vital information about your site, protecting your files from brute-force attacks, preventing injections of code into files, etc.
Most 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 potential issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.
(SecureScanPro – total security software solution for WordPress)
SecureScanPro is easy to install and easy to use, and addresses most of the security issues that WordPress users need to address.
Another great security plugin you may want to look at using is BlogDefender.
Blog Defender Security Product Suite For WordPress Websites
Blog Defender is a package of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender shows you where the security weaknesses in your website are …
And lets you fix these quickly, easily and inexpensively …
If you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, then use various free plugins, such as Limit Login Attempts …
WordPress is a secure web platform, but neglecting basic maintenance tasks like ensuring that your WP installation, WP plugins and themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.
Regardless of the kind of business you run or plan to run online and how small you think your web presence is, securing your website or blog is something you simply cannot ignore.
As a final reminder of the importance of website security, below is the advice given by a website security expert to all WordPress users following the mass 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 of the utmost importance if you run a WordPress site. Hopefully, the information in this article has given you the initial steps you need to take to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to be notified whenever we publish new information on WordPress security and tutorials about new security plugins.
***
"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group
***