WordPress powers millions of websites around the world, which makes it an easy target for hackers.
In April 2013 a global brute force attack struck WordPress installations on almost every host server in existence around the world.
These attacks were caused by botnets (infected computer networks programmed to attack other sites with security vulnerabilities).
How To Protect Your WordPress Site From A Brute-Force Attack
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 a WordPress site. One of these is by trying to guess the site admin’s login username and password. This is done using scripts and tools that automatically tries to guess hundreds of login combinations in minutes.
If you’re not using strong usernames or unguessable passwords, your site could be easily hacked by persistent attempts to work out your site’s login details.
This is called a “brute force” login attack.
What Is A Botnet?
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)
A “Botnet” is a network of private computers that have been infected with malicious code or scripts, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware of this.
Botnets are regularly 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 compromising computer networks all around the globe since 2009 …
(The Zeus botnet has been actively compromising computer networks all around the globe since 2009. Source: SecureList.com)
These were well organized and highly distributed attacks on WordPress sites. 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 users admin areas occurred. The worldwide brute-force attacks continued after this, with over 30,000 WordPress sites being hacked each day.
News of this brute force attack was reported by all the major webhosting companies, as well as the leading technology publications, such as TechNews Daily, Forbes, PC Magazine, BBC News, Tech Crunch, and even on the official website of the US Department of Homeland Security …
(Powering millions of websites and blogs around the world makes WordPress a target for malicious attacks by hackers)
Does This Mean WordPress Is Not Secure And We Should Stop Using It?
No. In fact, there are many very good reasons why you should use WordPress if you are concerned about the security of your online presence.
To understand why WordPress is a secure platform for websites, read this article: Why WordPress Is A Secure Platform For Websites –
It’s important to understand that, in the case of April 2013 large-scale brute force attack described above, there was actually no WordPress vulnerability being exploited (the same script was also targeting sites built using other CMS applications like Joomla).
Mike Little, the co-founder of WordPress with Matt Mullenweg, said this 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 Being Brute-Force Attacked – 10 Security Points
Every site with a security vulnerability offers some degree of value to hackers. A compromised site presents hackers with a valuable resource for launching DDoS attacks, spreading malware and as a source of information theft.
If a malicious user can hack into and gain access and control of your blog, the web site can then be employed to target more highly-valued websites.
Additional undesirable effects of having your site hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like casinos, discounted fashion, etc. inserted into your content, malicious redirects to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasties.
The reality is that software-driven bots are most likely scouring for exploits and trying to break into your website or blog while you are reading this right now. Whether they will achieve this depends on how difficult you will make it for hackers and botnets to continue persisting until they either discover a way to break in, or are forced to give up and go look for a more vulnerable target.
How Much Information About Your WordPress Site Are You Broadcasting To Hackers?
Do you own a WordPress site? If so, visit a site like Hackertarget.com and run your site through their WordPress security check …
(Website Security Scan Screenshot: https://hackertarget.com/wordpress-security-scan)
You will see that the check returns various results and information about your site …
(WordPress 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, then so can hackers.
(Image source: BlogDefender.com)
The ability to see what 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 in your site can all be potentially useful information to hackers, as this can inform them about potentially exploitable holes or weaknesses, especially in older versions.
If your site or blog is powered by WordPress and you are not taking steps to bullet-proof your site, then it’s practically guaranteed that, at some point, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress installations worldwide!
Typically, when a website gets broken into, webmasters will find themselves “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Typically, most compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.
To avoid the heartache (and potential loss of valuable business data) that comes with discovering that your web site has been hacked into, below are 10 essential and effective security measures that will help to protect your WordPress site from brute force attacks.
Note: A few of the measures shown below need 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 file code, then ask your web host or a professional WordPress technical provider for help.
***
Security Measure #1 – Contact Your Webhosting Company
Get in touch with your host and ask them exactly what precautions are in place to help prevent your site from being attacked, and what they do to ensure that your server files and data are being backed up.
Check that your hosting provider is backing up your server files and that, if disaster strikes, you can easily recover your files and data.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Up-To-Date
Never rely on your hosting provider for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this service done for you and develop a habit of religiously performing a complete site maintenance routine frequently (e.g. daily, weekly, monthly, etc …)
A full 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 WP software, plugins and themes are up-to-date,
- etc …
A complete WP maintenance routine looks like this …
(Maintaining your WordPress installation fully backed up and up-to-date is vitally important for WordPress security. Image source: WPTrainMe.com)
Again, we cannot stress enough how important it is to maintain your WordPress website completely backed up and up-to-date. 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, get someone else to do it but make sure it gets done. Backing up your site is the next most important thing you should do after making sure that your heart is still beating!
If you don’t want to back up your files manually, there are a number of free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate And Keep Your WordPress Site Protected With Backup Creator Plugin For WordPress
Security Measure #3 – Make Sure That Your Username Is Not “Admin”
The large scale brute force botnet attack on WordPress is mostly an attempt to compromise website administrator panels by exploiting installations with “admin” as the user name.
For reasons of website security, avoid setting up a WordPress site with the username “admin”. This is the first thing hackers will test. If your blog’s username is “admin”, change it immediately.
We have created a simple step-by-step tutorial that shows you how to change your WordPress admin username here: Changing Your Admin User Name In WordPress
Security Measure #4 – Choose Strong Passwords
A “brute force” attack occurs when a malicious script continually and persistently hits a username and password field with different strings of characters in an attempt to guess the right combination that will unlock your website.
Unless you put some measure in place to prevent the brute force attack from happening (see further below for a couple of simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually gets access.
Weak passwords, therefore, make really easy targets for attacks. Make sure that you change your password to a string that is at least eight or nine characters long, with both upper and lowercase letters, and add a few “special” characters (e.g. %, $, &, etc).
Roboform is a password tool you can use to generate different secure passwords …
(You can use a password management software tool like Roboform to create strong passwords)
For a simple tutorial that shows you how to change your admin password, go here: Changing Your Password In WordPress
Security Measure #5 – Prevent Access To Your wp-config.php File
The wp-config.php file contains information about your website’s database and is used to define advanced WordPress options.
(wp-config.php)
If hackers break into your website, they will try to access your wp-config.php file, because this is the file that 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 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 – Delete Or Rename Unnecessary Installation Files
Delete or rename the install.php, upgrade.php and readme.html files from your server.
You can remove these files after installation, as they are unnecessary. If you don’t want to delete these files, just rename them.
Security Measure #7 – Keep Your WordPress Installation, Themes And Plugins Up-To-Date
Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that can be exploited, including out-of-date versions of WP plugins and themes.
Ensure that all of your WordPress installation files, plugins, themes, etc. are always up to date.
Security Measure #8 – Disable Your Theme Editor
WordPress installations come with a built-in editor feature that allows the site administrator to edit plugin and theme files from the dashboard area.
You can access the WordPress Theme Editor by selecting Appearance > Editor from your main menu …
(Accessing the WordPress theme editor via the WordPress admin menu)
This means that anyone logging into your site’s admin can view and edit all of your WordPress theme template files, or create mayhem on your site.
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 – Prevent Access To Your Site’s Uploads Folder
The “uploads” folder stores all the media files that get uploaded to your WordPress site.
Normally, this folder is visible to anyone online. All someone has to do to view the contents in the “uploads” directory is visit your directory using their web browser …
(WordPress has an uploads directory where all of your media files are stored)
If any directories in your website have vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types or compromise the security of your website.
Protecting your directories will prevent online users from viewing 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 named “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 – Security Plugins
A number of great WordPress security plugins are available that specifically address many common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your files from botnets, 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 causing irreparable damage to your site is SecureScanPro.
(SecureScanPro – 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 issues that WordPress users need to address.
Another great security plugin you may want to consider using is BlogDefender.
Blog Defender
(Blog Defender WordPress Security Plugin)
This product is a suite of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.
BlogDefender scans you WordPress installation for potential security vulnerabilities …
And then shows you how to quickly and easily fix these …
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 very secure platform, but neglecting essential maintenance tasks like keeping your WordPress core files, plugins and themes up-to-date, 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, securing your site is something you cannot ignore.
As a final reminder, below is the advice given by an expert on web security to all WordPress users following the mass brute force attacks by botnets 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 consult a professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new tutorials on WordPress security and reviews of new security plugins.
***
"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com
***