Powering millions of sites around the world makes WordPress an obvious target for attempted attacks by hackers.
In 2013, WordPress installations around the world were subjected to global-scale brute-force attacks.
These attacks were caused by botnets (computers infected with viruses and programmed to attack other vulnerable computers).
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 will attempt to break into WordPress sites is by trying to guess the site’s administration login username and password. This can be done using scripts and tools that can guess hundreds of login possibilities in minutes.
If you’re using obvious usernames and predictable passwords, your website could be an easy target for hacking attempts.
This is called a “brute force” attack.
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.
”Botnets” are networks of private computers that have been infected with malicious code, which are then controlled remotely as a group, typically without the computer owners even being aware of this.
Botnets are normally used used to send out mass spam emails from computers of compromised user accounts.
The screenshot below was taken from an online security monitoring site 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 botnet attacks on WordPress are well organized and highly distributed. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The attack then continued, with over 30,000 WordPress sites and blogs being hacked each day.
News of this large-scale brute force botnet attack was reported by all of the major webhosting companiesand leading technology publications, such as Forbes, TechNews Daily, PC Magazine, Tech Crunch, BBC News, and even on the official website of the US Department of Homeland Security …
(WordPress is the world’s most popular content management system which makes it a frequent target for attacks by hackers)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are lots of good reasons why you should choose WordPress if you are concerned about the security of your website.
To understand what makes WordPress a very secure platform for websites, see this article: Is WordPress A Secure Platform For Websites?
It’s important to note that, in the case of April 2013 large-scale brute-force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also attacking sites built using other applications like Joomla).
Mike Little, the co-founder of WordPress, 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 Being Brute Force Attacked – 10 Security Measures
Every site with a security vulnerability offers value to hackers. A compromised blog not only presents wannabe hackers opportunities to improve their skills and claim “bragging rights” among their peers, but it can also acts as a valuable platform for launching distributed attacks, spreading malware and defrauding site visitors through information theft.
If a hacker can exploit a security flaw in your system and gain remote access and control of your website or blog, your site can then be used as a “bot” in a planned cyber attack against larger and more highly-valued websites.
Additional undesirable consequences of having your website hacked and your site security compromised include being blacklisted by search engines, having spammy links advertising things like viagra, porn, etc. inserted into your content and meta data, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.
The harsh reality is that malicious bots are scouring for exploits and trying to hack into your blog as you are reading this page right now. Whether they will get into your site or not, will depend on how hard or easy you can make it for hackers and botnets to continue persisting until they can either discover how to get access, or decide to look for an easier target.
How Much Information About Your Site Are You Broadcasting To Hackers?
Do you own a WordPress site? If so, visit a site like Hackertarget.com and run your website through their WordPress security check …
You will see that the check returns a number of results and information about your WordPress setup …
(Hackertarget – website security scan results. Screenshot source: Hackertarget.com)
It should be obvious after using the tool shown above that if you are able to see all of this information, then so can hackers.
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 on your server can be useful information to hackers, as these can inform them about exploitable holes or weaknesses, especially in older versions.
If your site or blog is driven by WordPress and you’re not precautionary steps to bullet-proof your site, we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically hitting WordPress installations all the world!
When a website is compromised, website owners will find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Typically, sites will be infected with malicious software or viruses without the owner even being aware of it.
To avoid the heartache and frustration that comes with discovering that your 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 attacked by brute force botnet hacking attempts.
Note: Some of the recommended measures below need some technical understanding of how to modify core WordPress or server files. If you have no web coding 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 hosting company and ask them what security precautions have been put into place to help prevent your site from being attacked, and what is done to ensure that your server files get backed up.
Make sure that your webhosting provider regularly backs up your server files and that, if disaster strikes, you can quickly and easily get back your files.
Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Regularly Up-To-Date
Never rely on your hosting provider for site backups. Instead, learn how to maintain your WordPress site or pay someone to get this service done for you and develop a habit of performing a full site maintenance routine frequently (e.g. daily, weekly, fortnightly, etc …)
A full WordPress maintenance routine ensures that:
- All unnecessary files and data are deleted,
- All files and data are free of errors, optimized and backed up,
- All WordPress 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 frequently backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WordPress website or blog fully backed up and up-to-date is. WordPress 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 your heart is still beating!
If you don’t want to perform manual backups, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone And Protect Your WordPress Websites And Blogs With Backup Creator WP Plugin
Security Measure #3 – Do Not Use “Admin” As The Admin Username
the worldwide brute force attack on WordPress is mostly an attempt to compromise website admin panels by exploiting sites that used “admin” as the username.
For security purposes, avoid setting up sites with the username admin. This is the first thing hackers will test. If your blog’s username is “admin”, then make sure you change it immediately.
We have created a detailed tutorial created especially for WordPress admin users on how to change your admin username here: Changing Your WP Username From Admin To Another Username
Security Measure #4 – Use Strong Passwords
A “brute force” attack occurs when malicious software continually hits a login or password field with different character strings in an attempt to guess the right combination that will give them entry 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 suggestions for doing this), the “bot” will just keep attacking your site until it eventually “cracks” the code.
Passwords that are easy to guess, therefore, make very easy targets for hacking attacks. Make sure that you change your password combination to a string containing at least 8 characters long, and that includes upper and lowercase letters, combined with a few “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 tool like Roboform …
(You can use a password program like Roboform to help you generate very secure passwords)
We have created a simple step-by-step tutorial for non-technical WordPress admin users on how to change your password here: What To Do If You Need To Change WordPress Passwords
Security Measure #5 – Prevent Access To 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 file)
If hackers break into your website, they will typically 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 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 – Delete Or Rename Unnecessary WP Installation Files
Rename or delete your install.php, upgrade.php and readme.html files.
You can remove these files after installation, as they are unnecessary. If you don’t want to remove these files, just rename them.
Security Measure #7 – Update Your WordPress Installation, Themes & Plugins To Their Latest Version
Hackers search for vulnerabilities they can exploit in earlier 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 that lets administrators edit theme and plugin code from the dashboard.
You can access the WordPress Theme Editor by selecting Appearance > Editor from the admin menu …
(Accessing the WordPress theme editor via the admin menu)
This allows anyone accessing your site’s admin to view and edit all of your WP theme templates, and cause havoc on your site.
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 – Protect The WordPress Uploads Folder
The “uploads” folder contains all the media that gets uploaded to your WordPress site.
By default, this folder is visible to online users. All someone has to do to see the contents in your “uploads” directory is visit your directory using their browser …
(WordPress uploads folder)
If any files stored in his folder have vulnerabilities that can be exploited by hackers, this can become a serious threat to the security of your website.
Protecting your directories will prevent unauthorized people 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 file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone who knows what they are doing if you are not sure about what to do.
Security Measure #10 – Use Security Plugins
Several WordPress security plugins are available that will address most security issues WordPress website owners face, such as preventing hackers from gaining access to vital areas of 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 security plugin that seems to do a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.
(SecureScanPro – security plugin 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 plugin you may want to consider using is BlogDefender.
Blog Defender Security Suite For WordPress
This product is a suite of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender scans you website for potential security weaknesses …
WordPress is a very secure web platform, but neglecting simple maintenance tasks like keeping your WordPress installation, WP plugins and WP themes up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.
No matter what kind of business you run or plan to run online and how small you think your web presence is, securing your web site is something you cannot ignore.
As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users following the global 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, WordPress security is very important 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 seek help from a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.
Also, please remember to subscribe to WPCompendium.org to receive notifications when we publish new information on WordPress security and tutorials about new WordPress security plugins.
"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