WordPress frequently comes under attack by hackers, due to its popularity.
In early 2013, WordPress installations around the world were subjected to large-scale brute force attacks.
These attacks were caused by networks of infected computers programmed to attack other vulnerable sites, also commonly known as “botnets”.
How To Protect Your WordPress Site From A Brute-Force Attack
What Are Brute Force Attacks?
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 use to try and break into a WordPress site is by trying to guess the site’s administration login username and password. This can be achieved using software tools that can guess hundreds of login possibilities in minutes.
If you’re using obvious usernames and predictable passwords, your site can be easily hacked by persistent attempts to work out your site’s login details.
This is called a “brute force” attack.
Botnets – What Are They?
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.org)
A “Botnet” is a network of private computers that have been infected with malicious software, which can then be controlled remotely as a group, typically without the computer owners’ knowledge or awareness.
Botnets are regularly used to blast mass spam emails.
Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the world since 2009 called “Zeus” …
(The Zeus botnet has been actively compromising computer networks all around the globe since 2009. Image: SecureList.com)
These were well organized and highly distributed attacks. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The large-scale brute-force attacks continued after this, with over 30,000 WordPress sites being hacked per day.
Coverage of the April 2013 brute force botnet attack was reported by all the major webhosting companiesand leading technology publications, such as TechNews Daily, Forbes, PC Magazine, BBC News, Tech Crunch, and even on the official US Department of Homeland Security website …
(WordPress is often the target of malicious attacks by hackers)
Does This Mean We Should Stop Using WordPress?
No. In fact, there are lots of good reasons why you should choose WordPress if you are concerned about the security of your web presence.
We explain what makes WordPress a very secure web platform in this article: Can You Build A Secure Business Online Using WordPress?
It’s important to note that, in the case of April 2013 brute-force attack described above, there was actually no WordPress vulnerability being exploited (the same script was also attacking sites built using other CMS applications like Joomla).
Mike Little, the co-founder of WordPress, made the following comment about the botnet 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 Protect Your WordPress Website From Brute-Force Attacks – Ten Security Points
You may think that your website is of no interest to hackers, but the reality is that to a hacker, every website is an opportunity to gain some benefit at your expense.
If a hacker can find a vulnerability that allows them to control your website or blog, the website or blog can then be employed to attack other valued websites.
Additional undesirable results of having your website hacked include being blacklisted by search engines, having spammy links advertising things like gambling, discounted fashion, etc. inserted in your content and page title and descriptions, malicious redirects to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.
The reality is that hackers are probably scouring for exploits and trying to break into your web site as you are reading this article. Whether they can hack in will depend on how difficult you have made things for hackers to continue persisting until they can find a way to get in, or are forced to give up and decide to look for a less protected target.
How Much Information Are You Broadcasting To Hackers About Your Site?
If you visit Hackertarget.com and run your website through their WordPress security check …
(Hackertarget – Website Security Check Screenshot image: Hackertarget.com)
You will see that the scan returns a number of results and information about your website …
(WP security check results. Screenshot: Hackertarget.com)
It should be obvious after using the tool shown above that if you can access all of this information about your site, then so can hackers.
(Image source: BlogDefender site)
The ability to see which version of WordPress you are using, which plugins and themes you have installed on your site, and which files have been uploaded to certain directories can all be potentially valuable information to hackers, as this informs them about any potential holes or weaknesses, especially in older versions.
If your website is powered by WordPress and you are not taking appropriate steps to toughen up your site, then we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress sites worldwide!
Whenever a website or blog is compromised, webmasters will find themselves completely “locked out” of their own site, or notice that their content has been interfered with or even entirely wiped out. Often, most compromised sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.
To avoid the heartache and aggravation (and potential loss of valuable business data) of discovering that your site has been hacked into, we have listed below ten simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute force botnets.
Note: A few of the steps below need some technical understanding of how to modify core WordPress and/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 service provider and ask them what systems have been put into place to help prevent your site from botnet attacks, and what they are doing to make sure that your server files are being regularly backed up.
It is important to check that your web host regularly backs up your sites and that, if disaster strikes, you can quickly and easily get back your files.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Maintained
You should never rely on your web host for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this done for you and maintain a habit of religiously performing a complete WordPress site maintenance routine frequently (e.g. weekly, fortnightly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary data and files are deleted,
- All files and data are free of errors, optimized and backed up,
- All WP plugins, themes and software components are up-to-date,
- etc …
A proper WP site maintenance routine looks like this …
(Maintaining your WP website or blog backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)
Again, we cannot stress enough how vitally important it is to maintain your WP website or blog backed up and updated. WordPress site maintenance is not hard to do 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 maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the next most important thing you should do after making sure that your heart is still beating!
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 automate your backup process here: Back Up, Clone & Protect Your WordPress Site With Backup Creator Plugin For WordPress
Security Measure #3 – Do Not Use “Admin” As The Admin Username
the worldwide brute force attack on WordPress is mostly an attempt to compromise site admin panels by exploiting installations with “admin” as their user name.
For reasons of website security, never set up a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s user name is admin, you will need to change it immediately.
For a detailed tutorial that shows you how to change your WordPress admin username, go here: How To Change Your WP Username From Admin To A More Secure User Name
Security Measure #4 – Use A Strong Password
A “brute force” attack occurs when malicious software persistently tries to guess the right combination of characters in a username and password that will give the hacker access to your site.
Unless some measure is put into place to block the brute force attack from happening (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 works out the combination.
Weak passwords, therefore, become very easy targets for botnets. Make sure that you change your password to something that is at least eight characters long, with upper and lowercase letters, and “special” characters (e.g. ^, #, @, etc).
Roboform is a password program that lets you create different difficult passwords …
(Roboform is a password tool that lets you create strong login passwords)
We have created a tutorial on how to change your admin password here: What To Do If You Need To Reset Your Password
Security Measure #5 – Prevent Your wp-config.php File From Being Easily Accessible
The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.
(WP Config file)
If hackers break into your website, they will typically try to access 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.
To protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must prevent people from accessing 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 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 delete these files, then 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 earlier versions of WordPress that they can exploit, including out-of-date versions of themes and plugins.
Make sure to always keep your files, plugins, themes, etc. up-to-date.
Security Measure #8 – Disable Your Theme Editor
WordPress installations come with a built-in editor feature that lets the site administrator edit plugin and theme files from the dashboard area.
In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in your admin menu …
(Accessing the WordPress theme editor using the dashboard menu)
This means that anyone logging into your blog can view and make changes to your theme templates, and create mayhem on your site.
To prevent unauthorized people from accessing your 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 Site’s Uploads Folder
The “uploads” directory contains all the media that gets uploaded to your site.
Normally, this folder is visible to online users. All a person needs to do to see the contents stored in your “uploads” directory is visit your directory using a web browser …
(WordPress uploads directory)
If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this could threaten the security of your website.
Protecting your directories will prevent online users from accessing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, adding a blank index.php file (this is literally an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to get professional assistance if you are not sure about what to do.
Security Measure #10 – Use Security Plugins
A number of WordPress security plugins are available that will address most security issues faced by WordPress website owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your site from botnets, preventing injections of code into files, 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 potential issues that could lead to hackers accessing your website files and causing damage to your site is SecureScanPro.
(SecureScanPro – WP complete security software solution)
SecureScanPro is easy to install and easy to use, and addresses most of the security issues that WordPress users need to address.
Another great plugin you may want to look at using is BlogDefender.
Blog Defender WordPress Security Solution
This product is a package of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.
BlogDefender scans you WordPress installation for security weaknesses …
And lets you easily fix these …
If you don’t want to purchase 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 updating your WordPress software, plugins and themes, tightening file and data security 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, you cannot ignore the importance of web security.
As one last reminder of the importance of keeping your websites protected, 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article will help keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.
Also, please subscribe to WPCompendium.org to be notified via email whenever we publish new articles and tutorials on WordPress security and reviews of new WordPress security plugins and solutions.
***
"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now
***