When you are the most popular CMS platform in the world and the preferred online publishing platform for 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 wanting to score a “big win”.
In early 2013, WordPress installations around the world were subjected to worldwide brute-force attacks.
These attacks were caused by infected computer networks programmed to attack other computers (called “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)
There are many ways hackers try to break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. To do this, hackers use scripts and tools that can guess hundreds of possible login combinations in minutes.
If you’re using weak user names and weak passwords that are easy to guess, your site can be an easy target for hackers.
This is called a “brute-force” login 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.org)
A “Botnet” is a network of private computers that have been infected with malicious scripts or 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 from computers of unsuspecting users.
Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …
(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Screenshot: SecureList.com)
These were well organized and highly distributed attacks. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress user administration areas took place. The worldwide brute-force attacks then continued, with over 30,000 WordPress blogs being hacked each day.
Coverage of this large-scale brute-force botnet attack was widely reported in all the major webhosting companiesand leading technology media publications, such as Forbes, TechNews Daily, Tech Crunch, PC Magazine, BBC News, and even on the official website of the US Department of Homeland Security …
(WordPress powers millions of websites and blogs around the world, making it an obvious target for hacking)
Does This Mean WordPress Is Not Secure And We Should Stop Using It?
No. In fact, there are lots of good reasons why you should continue using WordPress if you are concerned at all about the security of your website.
To learn why WordPress is a secure platform for websites, read this article: Is WordPress Secure?
It’s important to understand that, in the case of April 2013 large-scale brute force attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using other applications like Joomla).
Mike Little, the co-founder of WordPress with Matt Mullenweg, made the following 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.
Preventing Your WordPress Website From Brute-Force Attacks – 10 Security Points
You may think that the information in your site has no value to hackers, but the reality is that to a hacker, every website provides an opportunity to profit or benefit at your expense.
If a hacker can exploit a way to remotely control your web site, that site can then be employed as a “bot” to attack other valuable sites.
Additional undesirable impacts of being hacked and your site security compromised include being blacklisted by search engines, having spammy links promoting things like gambling, discounted fashion, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasties.
The reality is that hackers are very likely looking for security weaknesses and trying to break into your site while you are reading this. Whether they will be successful will depend on how hard you have made things for hackers to continue trying until they can discover a way to get in, or are forced to decide to look for a less protected target.
How Much Information About Your WordPress Site Are You Broadcasting To Hackers?
If you visit a site like Hackertarget.com and run your site through their WordPress security scan …
(WordPress Security Check Product image: Hackertarget.com)
You will see that the test will display various results and information about your WordPress installation …
(WP security check results. Screenshot: Hackertarget.com)
It should be obvious after using the above tool that if you can see all of this information, then hackers can too.
Being able 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 on your server can be valuable information to hackers, as this informs them about any potential vulnerabilities, especially in older versions.
If your site or blog runs on WordPress and you’re not preventive steps to toughen up your site, then we can practically guarantee that, at some point in time, someone will attempt to hack your website, because these attacks are systematically targeting WordPress installations worldwide!
Typically, whenever a site is hacked, blog owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Often, sites will be infected with malicious scripts without the owner even being aware that this has happened.
To avoid the heartache and aggravation (and significant loss of valuable business data) of discovering that your website has been hacked into, we have listed below ten essential and effective security measures that will help to prevent your WordPress site from brute force botnet attacks.
Note: Some of the recommended measures listed below need some technical skills to modify core WordPress and/or server files. If you have no technical skills, or don’t want to mess around with file code, then ask your web host or search for a professional WordPress service provider in our WordPress Services Directory.
***
Security Measure #1 – Contact Your Webhosting Service Provider
Get in touch with your webhosting provider and ask them what security systems have been put into place to help prevent your site from being attacked, and what they do to make sure that your files and data are regularly being backed up.
Make sure that your hosting company backs up your sites and that, if disaster strikes, you can easily get your files and data back.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Up-To-Date
Never rely only on your web host for your site backups. Instead, learn how to maintain your WordPress site or get this done for you and develop a habit of performing a complete site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All WordPress data and files are free of errors, optimized and backed up,
- All themes, plugins and software components are up-to-date,
- etc …
A complete WordPress site maintenance routine looks like this …
(Maintaining your WordPress website or blog completely backed up and updated is vitally important for WordPress security. Screenshot image: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WordPress web site backed up and updated is. WordPress 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 WordPress site maintenance yourself, pay someone 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 you still have a pulse!
If you don’t want to perform manual backups, there are a number of free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone And Keep Your WP Web Site Protected With Backup Creator WordPress Plugin
Security Measure #3 – Do Not Use “Admin” As Your Admin Username
The mass brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels and gain access to sites by exploiting WordPress sites that used “admin” as their user name.
For reasons of website security, never install 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 tutorial created especially for WP admin users that shows you how to change your WordPress username here: Changing Your Admin User Name In WordPress To A More Secure Username
Security Measure #4 – Choose Strong Passwords
A “brute force” attack occurs when a malicious script continually tries to guess the right combination of characters in a username and password that will give them entry to your website.
Unless you put some measure in place to prevent the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually “cracks” the code.
Weak passwords, therefore, make very easy targets for bot attacks. Make sure that you change your password to something that is at least 8 or 9 characters long, with upper and lowercase letters, and “special” characters (^%$#&@*).
If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all your online logins, then use a password program like Roboform …
(Roboform is a password management software that lets you create different strong passwords)
We have created a detailed tutorial that shows you how to change your admin password here: How To Change Passwords
Security Measure #5 – Protect Your wp-config.php File
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.
(wp-config.php)
If a hacker breaks into your WordPress site, they will typically search for the wp-config.php file, because this file contains your database information, security keys, etc. Getting access to this information would allow them 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, 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 – Rename Or Delete Unnecessary Installation Files
Rename or delete the install.php, upgrade.php and readme.html files from your server.
These files are not required after installation and can be deleted. If you don’t want to delete these files, then just rename them.
Security Measure #7 – Update Your WordPress Software, Themes And Plugins To Their Latest Version
Hackers search for vulnerabilities they can exploit in earlier versions of WordPress, including outdated versions of WP plugins and themes.
Ensure that all of your software files, themes, plugins, etc. are always up to date.
Security Measure #8 – Disable The Theme Editor
WordPress comes with a built-in editor feature that lets you edit plugin and theme files from the dashboard.
You can access your WordPress Theme Editor by selecting Appearance > Editor from your admin menu …
(The WordPress theme editor can be accessed using the WP admin menu)
This allows anyone accessing your blog to view and change your WordPress theme template files, or create mayhem on your site.
If you want to prevent 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 stores all the media that gets uploaded to your blog.
Normally, this folder is visible to online users. All someone has to do to see the contents stored in your “uploads” folder is visit the 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 can compromise the security of your site.
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, uploading a blank index.php file (this is literally a blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone with experience if you are unsure about what to do.
Security Measure #10 – Use WordPress Security Plugins
Several security plugins for WordPress are available that specifically address many common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your website from malicious scripts, preventing unauthorized file uploads, etc.
Most WordPress plugins address some but not all areas of WordPress security. One security plugin that seems to do a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and damaging your site is SecureScanPro.
(SecureScanPro – security software 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 great plugin you may want to consider using is BlogDefender.
Blog Defender
This product is a package of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender shows you where the security holes in your WordPress site are …
And then shows you how to fix these quickly and easily …
If you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, then use various free WP plugins, such as Limit Login Attempts …
WordPress is a very secure web platform, but neglecting basic maintenance tasks like keeping your WP installation, WordPress plugins and WordPress themes updated to their latest versions, tightening file and data protection 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 securing your website or blog.
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 large-scale brute-force attacks by botnets on WordPress in 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 consult a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.
Also, do yourself a favor and subscribe to WPCompendium.org to be notified via email when we publish new articles 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
***