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 website designers, it’s inevitable that at some point in time, WordPress will become an easy target for attacks by hackers.
In 2013 a mass brute force attack hit WordPress installations across virtually every WP host server in existence around the world.
These attacks were caused by botnets (networks of infected computers programmed to attack other sites).
How To Protect Your WordPress Site From A Brute-Force Attack
About 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 use to try and break into WordPress sites is by trying to guess the site’s administration login username and password. This is done with scripts and tools that can work through hundreds of possible login combinations in minutes.
If you’re not using strong usernames or unguessable passwords, your site can be an easy target for hacking attempts.
This is called a “brute-force” login attack.
What Are 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.
A “Botnet” is a network of private computers that have been infected with malicious code or software, which are then controlled remotely as a group, often without the computer owners’ knowledge.
Botnets are regularly used to blast out mass spam emails.
The screenshot below was 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 globe since 2009 called “Zeus” …
(The Zeus botnet has been actively infecting computer networks all around the globe since 2009. Image source: SecureList.com)
These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The large-scale attacks then continued, with over 30,000 WordPress sites being hacked every day.
Coverage of the April 2013 brute-force botnet attack was widely reported in all the major webhosting companiesand leading technology 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 is often the target of malicious attacks by hackers)
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 online business.
To learn why WordPress is a secure platform for websites, read this article: Are Open Source Platforms Like WordPress Secure? What Every Blog Owner Needs To Know About WordPress
It’s important to understand that, in the case of April 2013 large-scale brute force botnet attack described above, was no specific vulnerability in WordPress being exploited (the same script was also targeting sites built using other CMS platforms like Joomla).
Mike Little, the co-founder of WordPress with Matt Mullenweg, made this 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.
Protecting Your WordPress Blog From Brute Force Attacks – Ten Security Measures
You may think that the information in your site provides no value to hackers, but the reality is that every website has some value to a malicious user.
If a hacker can find a way to break in and gain access and control of your site, that website or blog can then be employed as a “bot” to attack larger and more valued web sites.
Additional undesirable impacts of having your website hacked include getting blacklisted by Google, having stealthy spam links advertising things like gambling, discounted fashion, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.
The reality is that brute-force software bots are looking for weaknesses and trying to break into your web site at this very moment. Whether they can be successful or not, depends on how difficult you can make things for hackers or bots to continue persisting until they can either discover how to get access, or give up and go look for a less secure target.
How Much Information Are You Broadcasting To Hackers About Your Site?
If you visit a site like Hackertarget.com and run your site through their WordPress security scan …
You will see that the scan will display various results and information about your website …
(Hackertarget – WP security check results. Source: Hackertarget.com)
It should be obvious after using this 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, and which files have been uploaded to certain directories on your server can all be useful information to hackers, as this informs them about exploitable security weaknesses, especially where the owners haven’t updated their files.
If your website is powered by WordPress and you’re not proactive 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 targeting WordPress sites worldwide!
When a website is broken into, site owners can find themselves completely “locked out” of their own site, or notice that their files have been altered or that everything has been entirely wiped out. Typically, most compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.
To avoid the heartache that comes with discovering that your web site has been hacked into, below are ten simple, yet essential and effective security measures that will help to prevent your WordPress site from brute-force botnet attacks.
Note: A few of the steps listed below require some technical understanding of how 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 Provider
Contact your hosting provider and ask them exactly what security systems have been put into place to protect your site from brute force attacks, and what they do to ensure that your site files get regularly backed up.
Check that your web host is regularly backing up your sites and that, if disaster strikes, you can easily recover your files.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Frequently Maintained
Never rely only on your web host for site backups. Instead, learn how to manage your WordPress site or get this service done for you and develop a habit of religiously performing a full site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)
A full WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All WordPress files and data are free of errors, optimized and backed up,
- All software, plugins and themes are up-to-date,
- etc …
A proper WP site maintenance routine looks like this …
(Maintaining your WP site frequently backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)
Again, we cannot stress enough how vitally important maintaining your WordPress website or blog frequently backed up and up-to-date is. WP site maintenance is not hard 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 WP site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the second most important thing you must do after making sure that you are still breathing!
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 & Keep Your WP Web Site Protected With Backup Creator Plugin For WP
Security Measure #3 – Do Not Use “Admin” As A Username
The mass brute-force botnet attack on WordPress sites was mostly attempting to compromise website administrator panels by exploiting installations that used “admin” as their account name.
For reasons of website security, avoid setting up 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 this immediately.
For a tutorial for non-technical WordPress users that shows you how to change your admin username, go here: How To Change Your Admin User Name In WordPress To A More Secure Username
Security Measure #4 – Avoid Weak Passwords
A “brute force” attack occurs when a malicious script persistently tries to guess the right password and username character string that will unlock your site.
Unless some measure is put into place to block the brute force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just persist in attacking your site until it eventually breaks into your admin area.
Passwords that are easy to guess, therefore, are very easy targets for brute force attacks. Make sure that you change your password combination to a string containing at least 8 or 9 characters long, with upper and lowercase letters, combined with a few “special” characters (^%$#&@*).
Roboform is a password tool you can use to create very secure passwords …
(You can use a password software tool like Roboform to create hard-to-guess passwords)
We have created a tutorial that shows you how to change your WordPress password here: How To Reset Passwords In WordPress
Security Measure #5 – Prevent Your wp-config.php File From Being Accessible
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.
(WordPress WP Config file)
If hackers break into your site, they will normally search for your wp-config.php file, because this file contains your WordPress 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 attacks and even being used as part of a bot net, therefore, you must 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 – Rename Or Delete Unnecessary Installation Files
Delete or rename the install.php, upgrade.php and readme.html files from your server.
These files can be removed after installation. If you don’t want to remove these files, just rename them.
Security Measure #7 – Update Your WordPress Files, Themes And Plugins To Their Latest Version
Hackers search for vulnerabilities in previous versions of WordPress that they can exploit, including outdated versions of WordPress plugins and themes.
Ensure that all of your WordPress files, plugins, themes, etc. are always up to date.
Security Measure #8 – Disable The Theme Editor
WordPress installations come with a built-in editor feature that lets administrators edit theme and plugin code inside the dashboard.
In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor in your admin menu …
(Accessing the WordPress theme editor using the WordPress admin menu)
The WordPress theme feature lets anyone accessing your site’s admin view and change your files, and create mayhem on your site.
To prevent unauthorized 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 – Remove Access To The Site’s Uploads Directory
The “uploads” folder contains all the media that gets uploaded to your website.
Normally, this folder is visible to all users online. All a person needs to do to view the contents in your site’s “uploads” directory 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 hackers or malicious users, someone could upload unauthorized file types or 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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are unsure about what to do.
Security Measure #10 – WordPress Security Plugins
Several security plugins for WordPress are available that specifically address many common security issues WordPress website owners face, such as preventing hackers from accessing your site, protecting your files from malicious exploits, preventing unauthorized file uploads, etc.
Many 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 irreparable damage to your site is SecureScanPro.
(SecureScanPro – WordPress complete security plugin)
SecureScanPro is easy to install and easy to use, and takes care of most of the security areas that WordPress users need to address.
Another security plugin you may want to consider 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 site for security holes …
WordPress is a secure platform, but neglecting essential maintenance tasks like keeping your WordPress installation, WordPress plugins and WordPress themes up-to-date, tightening file and data security 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 website is something you cannot ignore.
As a final reminder, below is the advice given by a web security expert 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, website security is very important if you run a WordPress site. Hopefully, 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 WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.
Also, please remember to subscribe to WPCompendium.org to be notified via email when we publish new information 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