When you are the leading content management system in the world and the online publishing platform of choice for millions of websites and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will become a prime target for attacks by hackers.
In April 2013, WordPress installations around the world were subjected to a global-scale brute-force attack.
These attacks were caused by computer networks infected with malware and programmed to attack other sites (botnets).
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)
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 is done with software tools that can work through hundreds of possible login combinations in minutes.
If you’re using easy-to-guess login details, your website can be easily hacked by persistent attempts to work out your site’s login details.
This is called a “brute-force” attack.
Botnet – What Is This?
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 computers that have been compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge.
Botnets are regularly used to blast mass spam emails.
Below is a screenshot taken from a site that monitors online security 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” …
(ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009. Screenshot source: SecureList.com)
These were well organized and highly distributed attacks on WordPress. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when millions of attempts to force their way into WordPress site administration areas occurred. The worldwide brute force attacks continued after this, with over 30,000 WordPress blogs being hacked every day.
Coverage of the mass brute-force botnet attack was reported by all of the major webhosting companiesand leading technology publications, such as TechNews Daily, Forbes, Tech Crunch, PC Magazine, BBC News, and even on the official US Department of Homeland Security website …
(Being the world’s most used content management system makes WordPress an obvious target for malicious attacks by hackers)
Does This Mean We Should Stop Using WordPress?
No. In fact, there are many good reasons why you should use WordPress if you are concerned at all about the security of your online business.
We explain what makes WordPress a very secure platform for websites in this article: Why WordPress Is A Secure Platform For Websites –
It’s important to understand that, in the case of the brute force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also attacking sites built using other CMS platforms like Joomla).
Mike Little, one of the co-founders of WordPress, 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.
How To Prevent Your WordPress Site From Brute-Force Attacks – Ten Security Points
Every website or blog with a vulnerability provides some type of opportunity to hackers. No site is immune from being attacked by hackers. Large, medium and small business web sites, personal blogs, government websites … even web sites owned by online security and anti-hacking experts can and have been targeted.
If a malicious user can access and take over your website or blog, your web site can then be used as a “bot” to attack more valued sites.
Additional undesirable impacts of being hacked and your site security compromised include getting blacklisted by search engines, having stealthy spam links promoting things like viagra, discounted fashion, etc. in your content, malicious redirects to phishing sites and other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.
The reality is that software-driven bots are scouring for security exploits and trying to break into your website at this very moment. Whether they will hack in successfully depends on how hard you have made things for them to continue trying until they either can discover how to get in, or give up and decide to look for a more vulnerable target.
How Much Information Are You Broadcasting To Hackers About Your Site?
Does your website run on WordPress? If so visit a site like Hackertarget.com and run your website through their WordPress security check …
(Hackertarget – Website Security Check Product image source: https://hackertarget.com/wordpress-security-scan)
You will see that the check will yield a number of results and details about your website …
(WordPress security scan results. Image source: Hackertarget.com)
It should be obvious after using the tool shown above that if you can freely access all of this information, then hackers can too.
(Product image source: Blog Defender)
The ability 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 on your server can be valuable information to hackers, as this informs them about any potential vulnerabilities, especially where the owners haven’t updated their files.
If your site or blog is powered by WordPress and you’re not preventive steps to bolster the security of 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 targeting WordPress sites around the world!
Typically, whenever a website gets broken into, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been interfered with or that everything has been entirely wiped out. Often, most compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.
To help avoid the heartache and frustration of having your website being hacked into, below are ten essential and effective security measures that will help to protect your WordPress site from being brute force attacked.
Note: Some of the 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 file code, then ask your web host or a professional WordPress technical provider for assistance.
***
Security Measure #1 – Get In Touch With Your Hosting Service Provider
Get in touch with your webhosting company and ask them exactly what measures have been put in place to help prevent your site from being attacked, and what they do to make sure that your files and data get regularly backed up.
Make sure that your webhosting service provider is backing up your sites and that, if disaster strikes, you can quickly and easily recover your files and data.
Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Frequently Maintained
You should never rely only on your host for site backups. Instead, learn how to maintain and manage your WordPress site or get this service done for you and develop a habit of religiously performing a full WordPress site maintenance routine frequently (e.g. weekly, monthly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All WP data and files are free of errors, optimized and backed up,
- All plugins, themes and software components are up-to-date,
- etc …
A proper WordPress maintenance routine looks like this …
(Maintaining your WP website or blog completely backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)
Again, we cannot stress enough how vitally important it is to maintain your WP web site completely 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. 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 site is the next most important thing you should do after making sure that you still have a pulse!
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, Duplicate & Protect Your WP Web Sites With Backup Creator WordPress Plugin
Security Measure #3 – Do Not Use “Admin” As The Admin Username
The large scale brute force attack on WordPress sites was mostly attempting to compromise site admin panels by exploiting installations that used “admin” as the username.
For security reasons, avoid setting up sites with the username “admin”. This is the first area hackers will test. If your blog’s username is admin, change it immediately.
For a detailed step-by-step tutorial created especially for non-technical admin users that shows you how to change your admin username, go here: How To Change Your Admin User Name In WordPress To A Different Username
Security Measure #4 – Make Sure Your Password Is Secure
A “brute force” attack occurs when malicious software continually and persistently hits a login or password field with different strings of characters trying to guess the right combination that will unlock 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 attacking your site until it eventually “cracks” the code.
Weak passwords, therefore, make very easy targets for hacking attacks. Make sure that you change your password combination to something containing at least 8 or 9 characters long, and that includes upper and lowercase letters, and add a few “special” characters (%^#$@&*).
You can use a password management tool like Roboform to create hard-to-guess passwords …
(You can use a password tool like Roboform to help you generate hard-to-crack passwords)
For a tutorial created especially for non-technical WordPress users on how to change your password, go here: How To Change Login Passwords In WordPress
Security Measure #5 – Prevent Access To The wp-config.php File
The wp-config.php file contains important information about your blog’s database and is used to define advanced options for WordPress.
(wp-config.php)
If hackers break into your website, they will try to access the 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 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 attacks and even being used as part of a bot net, therefore, prevent people 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 – Delete Or Rename Unnecessary WP Installation Files
Rename or delete the install.php, upgrade.php and readme.html files from your server.
These files are not required after installation. If you don’t want to delete these files, then just rename them.
Security Measure #7 – Upgrade Your WordPress Blog, Plugins And Themes To Their Latest Version
Hackers look for vulnerabilities they can exploit in previous versions of WordPress, including outdated versions of WP themes and plugins.
Ensure that all of your installation files, themes, plugins, etc. are always up to date.
Security Measure #8 – Disable The WordPress Theme Editor
WordPress installations come with a built-in editor feature that allows the administrator to edit plugin and theme code from the dashboard area.
In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor in the admin menu …
(The WordPress theme editor can be accessed using the main menu)
The WordPress theme editor lets anyone accessing your site’s admin area view and modify your WordPress theme templates, and create mayhem on your site.
If you want to prevent people from accessing your WordPress Theme editor, you will need to disable it. This can be done by adding code to your wp-config.php file.
Security Measure #9 – Prevent Access To Your WordPress Uploads Directory
The WordPress “uploads” folder stores all the media files that get uploaded to your blog.
By default, this folder is visible to all users online. All someone has to do to see all of the contents stored in the “uploads” folder is visit the 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 weaknesses or vulnerabilities that can be exploited by hackers, this can 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 a blank 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 – WordPress Security Plugins
There are a number of WordPress security plugins available that will address most security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your website from malicious software, preventing injections of code into files, etc.
Most WordPress plugins address some but not all areas of WordPress security. One WordPress security 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 – WordPress complete security software)
SecureScanPro is easy to install and easy to use, and addresses most of the security areas that WordPress users need to address.
Another great security plugin you may want to look at using is BlogDefender.
Blog Defender Security Product Suite
Blog Defender is a suite 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 holes …
And then shows you how to fix these quickly, easily and inexpensively …
If you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, then use various free WP plugins, such as Limit Login Attempts …
WordPress is a secure platform, but neglecting simple maintenance tasks like keeping your WordPress software, plugins and WordPress 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, you simply cannot afford to ignore the importance of securing your site.
As one last reminder of the importance of keeping your websites protected, below is the advice given by an expert on website security to all WordPress users after the worldwide 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 provided you with the initial steps you need to take 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 technical provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new articles on WordPress security and reviews of WordPress security plugins and solutions.
***
"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum
***