When you are the world’s leading content management system and the preferred online publishing platform used by millions of businesses and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers.
In early 2013, WordPress installations around the world were subjected to a worldwide brute force attack.
These attacks were caused by botnets (infected computer networks programmed to attack other computers).
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 WordPress sites. One of these is by trying to guess the site’s administration login username and password. This can be done with scripts and tools that automatically tries to guess hundreds of login permutations in minutes.
If you’re using weak login details, your site can be an easy target for hacking attempts.
This is called a “brute force” attack.
Botnet Definition
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)
”Botnets” are networks of private computers that have been infected with malicious scripts or code, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.
Botnets are regularly used to send mass spam emails from computers of unsuspecting users.
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 globe since 2009. Image source: SecureList.com)
These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The large-scale attacks then continued, with over 30,000 WordPress sites and blogs being hacked every day.
Coverage of the large-scale brute-force attack was reported by all the major webhosting companies, as well as the leading technology publications, such as TechNews Daily, Forbes, BBC News, PC Magazine, Tech Crunch, and even on the official US Department of Homeland Security website …
(Being the world’s most popular content management system makes WordPress a target for hackers)
Does This Mean We Should Stop Using WordPress?
No. In fact, there are lots of great reasons why you should use WordPress if you are concerned at all about the security of your web presence.
To learn why WordPress is a secure platform for websites, read this article: Is WordPress A Secure Platform For Websites?
It’s important to understand that, in the case of April 2013 worldwide brute-force attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other web platforms like Joomla).
Mike Little, one of the co-founders of WordPress with Matt Mullenweg, 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.
How To Protect Your WordPress Blog From Brute Force Attacks – Ten Security Measures
You may think that your site has no value to hackers, but the reality is that to a hacker, every website is an opportunity to gain some advantage at your expense.
If a hacker can find a way to break in and control your website or blog, your blog can then be employed to target larger and more highly-valued web sites.
Additional undesirable consequences of being hacked and your site security compromised include being blacklisted by Google, having spammy links advertising things like casinos, discounted fashion, etc. in your content and meta data, redirecting visitors to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasties.
The truth is that hackers are very likely trying to break into your website or blog right now. Whether they will do this successfully depends on how hard or easy you will make it for hackers or bots to keep persisting until they can discover a way to get access, or are forced to decide to look for a less secure target.
How Much Information About Your WordPress 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 …
(WP Security Scan Screenshot: Hackertarget.com)
You will see that the check will yield a number of results and details about your website setup …
(website security scan results. Screenshot image: Hackertarget.com)
It should be obvious after using the tool shown above that if you are able to see all of this information, hackers can too.
(Image source: BlogDefender.com)
The ability to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories on your server are all useful information to hackers, as this informs them about any holes or weaknesses, especially where site owners haven’t updated their software versions.
If your website runs on WordPress and you’re not precautionary steps to harden your site, we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress sites worldwide!
Whenever a site gets hacked, webmasters can find themselves “locked out” of their own site, or notice that their files have been altered or even that their content has been entirely wiped out. Often, most compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.
To avoid the heartache (and significant loss of valuable business data) that comes with discovering that your web site has been hacked into, below are 10 simple, yet essential and effective security measures that will help to protect your WordPress site from being brute force attacked.
Note: A few of the measures below need some technical understanding of how 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 search for a professional WordPress technical provider in our WordPress Services Directory.
***
Security Measure #1 – Contact Your Hosting Provider
Get in touch with your webhosting service and ask them exactly what systems they have put into place to protect your site from being attacked, and what is done to ensure that your server files and data get backed up.
Make sure that your hosting company backs up your sites and that, if anything should happen, you can quickly and easily get back your files.
Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Frequently Maintained
You should never rely on your hosting provider for your site backups. Instead, learn how to maintain and manage your WordPress site or get this done for you and maintain a habit of religiously performing a complete WordPress site maintenance routine frequently (e.g. daily, weekly, fortnightly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary files and data are deleted,
- All WP files and data are free of errors, optimized and backed up,
- All WP plugins, themes and software components are up-to-date,
- etc …
A full WP site maintenance routine looks like this …
(Maintaining your WP web site frequently backed up and updated is vitally important for WordPress security. Image source: WPTrainMe.com)
Again, we cannot stress enough how vitally important it is to maintain your WP installation backed up and up-to-date. 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 do not want to learn how to do WP site maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that your heart is still beating!
If you don’t want to perform manual backups, there are many WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Clone & Keep Your WordPress Websites And Blogs Protected With Backup Creator Plugin For WordPress
Security Measure #3 – Do Not Use “Admin” As Your Username
the worldwide brute force botnet attack on WordPress sites was mostly an attempt to compromise website admin panels by exploiting sites using “admin” as their user name.
For reasons of website security, avoid installing sites with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s user name is “admin”, change this immediately.
We have created a tutorial created especially for non-technical WordPress admin users on how to change your username here: How To Change Your Admin User Name In WordPress To A More Secure Username
Security Measure #4 – Choose Strong Passwords
A “brute force” attack occurs when malicious software continually hits a username and password field with different strings of characters in an attempt to guess the right combination that will unlock your site.
Unless some measure is put into place to prevent the brute-force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.
Passwords that are easy to guess, therefore, are very easy targets for hacking attacks. Make sure that you change your password combination to something that is at least eight characters long, with upper and lowercase letters, combined with “special” characters (e.g. %, $, &, etc).
If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all of your online logins, then use a password software tool like Roboform …
(Roboform is a password management tool you can use to help you generate very secure passwords)
For a tutorial created especially for WordPress users that shows you how to change your password, go here: How To Reset WordPress Passwords
Security Measure #5 – Prevent Your wp-config.php File From Being Accessible
The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced WordPress options.
(WordPress WP Config file)
If hackers break into your WordPress site, they will normally search for your wp-config.php file, because this is the file that contains your database details, security keys, etc. Getting access to this information would allow someone 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 your wp-config.php file from being accessed. 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
Rename or delete the install.php, upgrade.php and readme.html files from your server.
These files can be deleted after installation. If you don’t want to delete these files, just rename them.
Security Measure #7 – Keep Your WordPress CMS, Plugins And Themes Up-To-Date
Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that can be exploited, including outdated versions of WordPress plugins and themes.
Ensure that all of your WordPress application files, plugins, themes, etc. are always up to date.
Security Measure #8 – Disable Your WordPress Theme Editor
WordPress installations come with a built-in editor feature that lets the site administrator edit plugin and theme code inside the dashboard area.
You can access your WordPress Theme Editor by selecting Appearance > Editor in the main menu …
(Accessing the WordPress theme editor via the admin menu)
The WordPress theme editor lets anyone accessing your site see and edit all of your files, and cause mayhem on your site.
If you want to prevent unauthorized people from being able to access your 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 Folder
The “uploads” directory contains all the media files that get uploaded to your site.
Normally, this folder is visible to online users. All a person needs to do to see all of the contents stored in the “uploads” folder is navigate to your directory using their browser …
(WordPress has an uploads directory where your media files are stored)
If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, someone could upload unauthorized file types or compromise 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 file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone with experience if you are not sure about what to do.
Security Measure #10 – WordPress Security Plugins
There are some great WordPress security plugins available that specifically address most common security issues WordPress website owners face, such as preventing hackers from gaining access to vital areas of your site, protecting your site from brute-force attacks, preventing injections of code into files, etc.
Many WordPress plugins address some but not all areas of WordPress security. One plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your website files and causing irreparable damage to your site is SecureScanPro.
(SecureScanPro – total security software solution for WordPress)
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.
Blog Defender Security Product Suite For WordPress Sites
(Blog Defender Security Solution For WordPress)
Blog Defender is a suite of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender scans you website for security weaknesses …
And then shows you how to fix these quickly …
If you don’t want to purchase a premium security plugin like SecureScanPro or BlogDefender, you can use various free plugins, such as Limit Login Attempts …
WordPress is a very secure platform, but neglecting basic maintenance tasks like keeping your WordPress software, plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can expose your site to attacks by hackers and bots.
Regardless of the kind of business you run or plan to run online and how small you think your web presence is, web security is something you simply cannot ignore.
As a final reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users following the global 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 information in this 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 seek help from a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.
Also, please subscribe to WPCompendium.org to be notified via email when we publish new tutorials on WordPress security and reviews of new security plugins.
***
"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya
***