WordPress is frequently the target of malicious attempts by hackers, due to its global popularity.
In early 2013 a global brute-force attack began hitting WordPress installations on almost every web host in existence around the world.
These attacks were caused by networks of infected computers programmed to attack other vulnerable sites (botnets).
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)
There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This is done using software programs that automatically tries to guess hundreds of login permutations in minutes.
If you’re using weak login details, your site could be an easy target for hacking attempts.
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.org)
”Botnets” are networks of private computers that have been infected with malicious software, which can then be controlled remotely as a group, typically without the computer owners’ knowledge.
Botnets are normally used used to blast out mass spam emails from the infected computers of unsuspecting users.
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 world since 2009 called “Zeus” …
(ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009. Image source: SecureList.com)
The ongoing botnet attacks on WordPress are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The attack continued after this, with over 30,000 WordPress sites and blogs being hacked every day.
News of this brute-force attack was reported by all of the major webhosting companies, as well as the leading technology media publications, such as TechNews Daily, Forbes, 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 used content management system making it a frequent target for malicious attacks by hackers)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are many very good reasons why you should use WordPress if you are concerned at all about the security of your web presence.
We explain what makes WordPress a very secure web platform in this article: Is WordPress Secure?
It’s important to understand that, in the case of April 2013 brute force attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using other platforms like Joomla).
Mike Little, the co-founder of WordPress with Matt Mullenweg, 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 Website From Being Brute Force Attacked – Ten Security Checks
Every web site with a vulnerability can be seen as a potential opportunity to hackers. Every website has value to hackers. Business web sites, personal blogs, government sites … even sites owned by online security experts can and have been targeted.
If hackers can find a flaw in your security system, that website can then be used as a “bot” to attack more valued web sites.
Additional undesirable impacts of having your site hacked include getting blacklisted by search engines, having stealthy spam links promoting things like gambling, porn, etc. in your content and meta data, redirecting visitors to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasties.
The reality is that software-driven bots are probably trying to hack into your website right now. Whether they will break in successfully or not, will depend on how difficult or easy you can make it for hackers to continue persisting until they can discover a way to break in, or give up and go look for an easier target.
How Much Information Are You Broadcasting To Hackers About Your Site?
If you visit a site like Hackertarget.com and run your website through their WordPress security scan …
(WordPress Security Scan Screenshot image: Hackertarget.com)
You will see that the test will return various results and details about your site …
(Hackertarget – WP security check results. Screenshot source: Hackertarget.com)
It should be obvious after using the above tool that if you can freely access all of this information, so can hackers.
(Product image source: Blog Defender)
Being able 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 are all valuable information to hackers, as this informs them about potentially exploitable vulnerabilities, especially where the owners haven’t updated their files.
If your website is driven by WordPress and you’re not proactive steps to harden 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 installations around the world!
Whenever a website or blog is broken into, site owners can find themselves “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. Often, most compromised sites will be infected with malicious software or viruses without the owner even being aware that this has happened.
To avoid the heartache and aggravation of having your web site being hacked into, we have listed below ten essential and effective security checks that will help to prevent your WordPress site from being attacked by brute-force hackers.
Note: A few of the measures below require some technical skills to modify core WordPress or server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.
***
Security Measure #1 – Contact Your Web Host
Get in touch with your web host and ask them exactly what security precautions are in place to help prevent your site from brute-force attacks, and what they do to ensure that your WordPress sites are being backed up.
Make sure that your host backs up your server files and that, if disaster strikes, you can easily get your files back.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Maintained
You should never rely on your webhosting company for site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and develop a habit of religiously performing a complete WordPress site maintenance routine on a regular basis (e.g. weekly, monthly, etc …)
A full WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All files and data are free of errors, optimized and backed up,
- All WordPress plugins, themes and software components are up-to-date,
- etc …
A full WordPress maintenance routine looks like this …
(Maintaining your WordPress installation fully backed up and updated is vitally important for WordPress security. Screenshot source: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WP website regularly backed up and up-to-date is. 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, pay a professional to do it but make sure this gets done. Backing up your website 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 files manually, there are a number of plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate & Keep Your WordPress Websites Protected With Backup Creator Plugin For WordPress
Security Measure #3 – Make Sure That Your Username Is Not “Admin”
The large scale brute-force attack on WordPress sites was mostly attempting to compromise site admin panels by exploiting WordPress installations with “admin” as the username.
For reasons of website security, avoid installing sites with the username admin. This is the first thing hackers will test. If your site’s user name is admin, then change it immediately.
We have created a tutorial for WordPress admin users on how to change your login username here: How To Change Your Admin User Name In WordPress To A Different User Name
Security Measure #4 – Avoid Weak Passwords
A “brute force” attack occurs when a malicious script continually tries to guess the right combination of characters in a password and username that will unlock your website.
Unless some measure is put into place to stop the brute-force attack from happening (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 works out the combination.
Passwords that are easy to guess, therefore, are very easy targets for bot attacks. Make sure that you change your password to a string that is at least eight characters long, with both upper and lowercase letters, and “special” characters (e.g. ^, #, *, etc).
If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all of your online logins, then use a password software tool like Roboform …
(Roboform is a password management tool that lets you generate very secure passwords)
We have created a simple tutorial that shows you how to change your admin password here: What To Do If You Need To Reset Passwords In WordPress
Security Measure #5 – Protect 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.php)
If a hacker breaks into your WordPress website, they will normally search for your wp-config.php file, because this file contains important information about your site’s database, security keys, etc. Getting access to this information would allow someone 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 being attacked and even being used as part of a bot net, therefore, you must prevent people viewing 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 Site Installation Files
Rename or delete the install.php, upgrade.php and readme.html files from your server.
These files can be deleted after installation. If you don’t want to delete these files, then just rename them.
Security Measure #7 – Upgrade Your WordPress Software, Plugins & Themes To Their Latest Version
Hackers are always on the lookout for vulnerabilities in older versions of WordPress that they can exploit, including out-of-date versions of plugins and themes.
Make sure to keep your WordPress installation files, plugins, themes, etc. up-to-date.
Security Measure #8 – Disable Your WordPress Theme Editor
WordPress installations come with a built-in editor feature that lets the administrator edit plugin and theme code from the dashboard area.
You can access your WordPress Theme Editor by selecting Appearance > Editor in the main menu …
(The WordPress theme editor is accessible via the admin menu)
This means that anyone logging into your site’s admin area can see and make changes to your WP theme template files, and create havoc on your site.
To prevent unauthorized people from being able to access the 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 Site’s Uploads Folder
The WordPress “uploads” directory contains all the media that gets uploaded to your site.
Normally, this folder is visible to anyone online. All someone has to do to view the contents stored in the “uploads” folder is visit your directory using their web browser …
(WordPress has an uploads directory where your media files are stored)
If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, anyone could upload unauthorized file types to your site.
Protecting your directories will prevent unauthorized people from accessing 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 seek professional help if you are not sure about what to do.
Security Measure #10 – WordPress Security Plugins
A number of great WordPress security plugins are available that will address most common security issues WordPress website owners face, such as preventing hackers from gaining access to vital information about your site, protecting your website from malicious scripts, preventing injections of code into files, etc.
Most WordPress plugins address some but not all areas of WordPress security. One 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 damage to your site is SecureScanPro.
(SecureScanPro – WP 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
(Blog Defender Security Solution)
This product is a suite of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender shows you where the security weaknesses in your WordPress installation are …
And lets you quickly fix these …
If you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, you can use various free plugins, such as Limit Login Attempts …
WordPress is a very secure platform, but neglecting simple maintenance tasks like updating your WordPress software, plugins and WordPress themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.
Regardless of the type of business you run or plan to run online and how small you think your web presence is, securing your site is something you simply cannot ignore.
As a final reminder of the importance of website security, below is the advice given by an expert on website security to all WordPress users after 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article will help prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.
Also, please remember to subscribe to WPCompendium.org to be notified whenever we publish new articles and tutorials on WordPress security and tutorials about WordPress security plugins.
***
"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org
***