WordPress is often the target of attacks by hackers, due to its global popularity.
In April 2013, WordPress installations around the world were subjected to a global-scale brute-force attack.
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
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 ways hackers try to break into WordPress sites. One of these is by trying to guess the site admin’s login username and password. This is achieved using scripts and software that automatically tries to guess hundreds of possible login combinations in minutes.
If you’re using predictable user names and passwords that are easy to guess, your site could be an easy target for hacking attempts.
This is called a “brute force” login 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 computers that have been infected with malicious scripts or code, which can then be controlled remotely as a group, often without the computer owners even being aware of this.
Botnets are normally used used to send out mass spam emails.
Below is a screenshot 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 globe since 2009 …
(The Zeus botnet has been actively infecting computer networks all around the world since 2009. Source: SecureList.com)
These were highly distributed and well organized botnet attacks on WordPress. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when millions of attempts to force their way into WordPress site admin areas took place. The attack then continued, with over 30,000 WordPress sites being hacked per day.
Coverage of this brute force botnet attack was widely reported in all the major webhosting companiesand leading technology publications, such as Forbes, TechNews Daily, BBC News, PC Magazine, Tech Crunch, and even on the official US Department of Homeland Security website …
(WordPress is the world’s most popular CMS which makes it a frequent target for hacking attacks)
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 at all about website security.
To learn what makes WordPress a very secure platform for websites, see this article: Why WordPress Is A Secure Platform For Websites –
It’s important to understand that, in the case of the brute force botnet attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using other CMS applications like Joomla).
Mike Little, one of the co-founders 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.
Protecting Your WordPress Site From Being Brute Force Attacked – Ten Security Measures
Every website with a security vulnerability provides an opportunity to hackers. No site is completely safe from a cyber-attack. Corporate websites, personal blogs, government sites … even sites owned by online security experts can and have been targeted.
If a malicious user can discover a vulnerability in your security, your website can then be employed to attack larger and more valued websites.
Additional undesirable impacts of having your website hacked include getting blacklisted by search engines, having spammy links advertising things like casinos, porn, etc. in your content and meta data, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.
The truth is that malicious bots are probably trying to break into your web site at this very moment. Whether they will do this successfully will depend on how challenging you will make it for hackers or bots to continue persisting until they discover a way to get access, or are forced to 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 Hackertarget.com and run your website through their WordPress security check …
You will see that the scan returns various results and details about your website setup …
(Hackertarget – WordPress security check results. Image source: Hackertarget.com)
It should be obvious after using the scanning tool that if you can freely access all of this information about your blog, so can hackers.
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 are all useful information to hackers, as this can inform them about any potential holes or weaknesses, especially in older versions.
If your site or blog runs on WordPress and you’re not taking steps to bullet-proof your site, we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these attacks are systematically hitting WordPress installations worldwide!
Typically, whenever a website gets compromised, blog owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been vandalized or even entirely wiped out. Often, compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.
To avoid the heartache of discovering that your web site has been hacked into, we have listed below ten essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force botnet hacking attempts.
Note: A few of the measures shown below require some technical understanding of how to modify core WordPress and 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 help.
Security Measure #1 – Get In Touch With Your Webhosting Company
Contact your hosting service provider and ask them exactly what systems have been put in place to help prevent your site from brute force attacks, and what they are doing to make sure that your files and data are being regularly backed up.
It’s important to check that your web host backs up your sites and that, if disaster strikes, you can quickly and easily get back your files.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Updated
You should never rely on your hosting provider for site backups. Instead, learn how to maintain and manage your WordPress site or get this done for you and develop a habit of religiously performing a complete site maintenance routine frequently (e.g. daily, weekly, monthly, etc …)
A complete WordPress maintenance routine ensures that:
- All unnecessary data and files are deleted,
- All WordPress files and data are free of errors, optimized and backed up,
- All WordPress software, themes and plugins are up-to-date,
- etc …
A proper WordPress maintenance routine looks like this …
(Maintaining your WordPress web site backed up and updated is vitally important for WordPress security. Image: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WP web site completely 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 or blog. If you do not want to learn how to do WordPress maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the second 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 WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Clone And Keep Your WordPress Site Protected With Backup Creator WordPress Plugin
Security Measure #3 – Do Not Use “Admin” As The Admin Username
The brute force attack on WordPress is mostly an attempt to compromise site admin panels and gain access to sites by exploiting installations that used “admin” as their account name.
For reasons of website security, avoid installing WordPress sites with the username admin. This is the first thing hackers will test. If your site’s username is “admin”, then change it immediately.
We have created a simple tutorial that shows you how to change your WordPress admin username here: How To Change Your WordPress Admin User Name To A More Secure Username
Security Measure #4 – Make Sure Your Password Is Strong
A “brute force” attack occurs when a malicious script persistently hits a login or password field with different character strings in an attempt to guess the right login combination that will give them entry to your site.
Unless you put some measure in place to stop the brute-force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just continue attacking your site until it eventually breaks into your admin area.
Weak passwords, therefore, become really easy targets for hackers. Make sure that you change your password combination to a string containing at least eight characters long, and that includes upper and lowercase letters, and add a few “special” characters (e.g. %, #, *, etc).
Roboform is a password management software you can use to generate different secure login passwords …
(Roboform is a password software that lets you easily create very secure passwords)
We have created a simple tutorial created especially for WordPress admin users on how to change your password here: Changing Passwords In WordPress
Security Measure #5 – Prevent The wp-config.php File From Being Easily Accessed
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.
If hackers break into your WordPress site, they will typically look for 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 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, you must 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 WordPress Installation Files
Delete or rename the install.php, upgrade.php and readme.html files from your server.
These files are completely unnecessary after installation and can be removed. If you don’t want to delete these files, just rename them.
Security Measure #7 – Upgrade Your WordPress Installation, Themes And Plugins
Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that can be exploited, including out-of-date versions of WordPress plugins and themes.
Make sure to always keep your installation files, themes, plugins, etc. up-to-date.
Security Measure #8 – Disable Your Theme Editor
WordPress installations come with a built-in editor that allows site administrators to edit plugin and theme files inside the dashboard area.
You can access the WordPress Theme Editor by selecting Appearance > Editor from the main menu …
(The WordPress theme editor can be accessed using the admin menu)
The WordPress theme editor lets anyone accessing your blog view and make changes to all of your WordPress theme template files, 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 editing your wp-config.php file.
Security Measure #9 – Prevent Access To Your Site’s Uploads Directory
The “uploads” folder stores all the media that gets uploaded to your website.
By default, this folder is visible to online users. All someone has to do to see all of the contents stored in the “uploads” folder is navigate to your directory using their web browser …
(WordPress uploads directory)
If any directories in your website have vulnerabilities that can be exploited by hackers or malicious users, this could compromise the security of your site.
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 blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are not sure about what to do.
Security Measure #10 – Use Security Plugins
A number of great security plugins for WordPress are available that specifically address common security issues faced by WordPress website owners, such as preventing hackers from accessing vital areas of your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.
Most WordPress plugins address some but not all areas of WordPress security. One plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.
(SecureScanPro – security software solution for WordPress)
SecureScanPro is easy to install and easy to use, and addresses most of the security areas that WordPress users need to address.
Another great plugin you may want to consider using is BlogDefender.
Blog Defender Security Plugin
This product is a package of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender scans you WordPress installation for security weaknesses …
WordPress is a secure platform, but neglecting basic maintenance tasks like keeping your WordPress core files, plugins and themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your website to malicious by hackers and bots.
No matter what type of business you run or plan to run online and how small you think your web presence is, website security is something you cannot afford to ignore.
As one last reminder, below is the advice given by an expert on web security to all WordPress users after 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article will help 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 professional WordPress service provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to be notified when we publish new tips on WordPress security and tutorials about WordPress security plugins and solutions.
"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