How To Protect Your WordPress Site From A Brute-Force Attack

Learn how to protect your WordPress site from being brute-force attacked, or having its security compromised by hackers or bots.

WordPress SecurityWhen you are the most popular CMS platform in the world and the preferred online publishing platform for millions of websites and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers wanting to score a “big win”.

In April 2013, WordPress installations around the world were subjected to global-scale brute force attacks.

These attacks were caused by botnets (computers infected with malware and programmed to attack other sites with security vulnerabilities).

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 achieved using software tools that can guess hundreds of possible login combinations in minutes.

If you’re using weak user names and predictable passwords, your site could be easily hacked by persistent attempts to work out your site’s login details.

This is called a “brute-force” login attack.

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.

(Source: Wikipedia/botnet)

”Botnets” are networks of private computers that have been compromised and infected with malicious code, which are then controlled remotely as a group, typically without the computer owners even being aware that this is happening in their device.

Botnets are typically used to blast mass spam emails from computers of unsuspecting users.

The screenshot below was taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …

The Zeus botnet has been actively infecting computer networks all around the globe since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009. Source: SecureList.com)

The botnet attacks on WordPress were highly distributed and well organized. 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 users administration areas occurred. The worldwide brute-force attacks then continued, with over 30,000 WordPress blogs being hacked each day.

News of the April 2013 brute force botnet attack was reported by all the major webhosting companiesand leading technology media publications, such as Forbes, TechNews Daily, Tech Crunch, BBC News, PC Magazine, and even on the official website of the US Department of Homeland Security …

Powering millions of sites around the world makes WordPress a target for attempted hacker attacks

(WordPress is the world’s most popular content management system which makes it a natural target for hacking)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many very good reasons why you should choose WordPress if you are concerned about website security.

To learn what makes WordPress a very secure platform for websites, see this article: How Secure Is WordPress?

Info

It’s important to understand that, in the case of the mass brute-force botnet attack described above, there was actually no WordPress vulnerability 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.

(MikeLittle.org)

Protecting Your WordPress Website From Being Brute-Force Attacked – 10 Security Points

You may think that your site has no significant value to hackers, but the reality is that every website has value to a malicious user.

If a malicious user can discover a flaw in your security, the web site can then be employed as a “bot” in a planned cyber attack against other valued websites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by search engines, having spammy links advertising things like gambling, cheap offers on brand names, etc. in your content and meta data, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasties.

The truth is that malicious bots are most likely trying to break into your website at this very moment. Whether they will achieve this depends on how hard or easy you will make things for hackers to continue persisting until they discover how to break in, or are forced to decide to look for a less secure target.

How Much Information About Your Site Are You Broadcasting To Hackers?

If you visit Hackertarget.com and run your site through their WordPress security check …

Website Security Scan(Website Security Scan Screenshot image: https://hackertarget.com/wordpress-security-scan)

You will see that the check returns various results and information about your site …

Hackertarget - Website Security Scan

(Hackertarget – website security check results. Source: Hackertarget.com)

It should be obvious after using the above tool that if you are able to freely access all of this information about your website, then hackers can too.

Website Security Scan(Product image source: BlogDefender site)

The ability 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 in your site can all be valuable information to hackers, as this can inform them about exploitable vulnerabilities, especially where site owners haven’t updated their files.

If your site or blog is driven by WordPress and you’re not taking steps to harden your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your site, because these attacks are systematically targeting WordPress sites all the world!

Whenever a website or blog gets hacked, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Typically, compromised sites will become infected with malicious scripts or viruses without the owner even being aware of it.

To avoid the heartache that comes with having your website being hacked into, below are 10 simple, yet essential and effective security checks that will help to protect your WordPress site from brute-force attacks.

Important

Note: A few of the measures below require some technical skills to modify core WordPress or server files. If you have no web editing skills, or don’t want to mess around with file code, then ask your web host or search for a professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Host

Contact your web host and ask them exactly what security precautions have been put into place to help prevent your site from brute-force attacks, and what is done to ensure that your WordPress sites get backed up.

Check that your webhosting provider regularly backs up your sites and that, if anything goes wrong, you can quickly and easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Updated

You should never rely on your webhosting provider for site backups. Instead, learn how to maintain your WordPress site or pay someone to get this done for you and develop a habit of religiously performing a full site maintenance routine frequently (e.g. weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

  • All unnecessary data and files are deleted,
  • All data and files are free of errors, optimized and backed up,
  • All software, plugins and themes are up-to-date,
  • etc …

A proper WP maintenance routine looks like this …

Maintaining your WordPress website or blog regularly backed up and updated is vitally important for WordPress security.(Maintaining your WP web site frequently backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WordPress web site regularly backed up and updated is. WP site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WordPress site maintenance yourself, get someone else 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 your heart is still beating!

If you don’t want to back up your files manually, there are many plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Duplicate & Keep Your WP Web Sites Protected With Backup Creator WordPress Plugin

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

The large scale brute-force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels and gain access to the site by exploiting WordPress sites using “admin” as the account name.

For reasons of website security, never install WordPress sites with the username admin. This is the first area hackers will test. If your blog’s username is “admin”, then make sure you change it immediately.

For a detailed tutorial on how to change your username, go here: Changing Your WordPress Admin User Name To A Different Username

Security Measure #4 – Your Password

A “brute force” attack occurs when malicious software persistently tries to guess the right username and password characters that will give them entry to your site.

Unless some measure is put into place to prevent 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 “cracks” the code.

Passwords that are easy to guess, therefore, become very easy targets for hackers. Make sure that you change your password combination to something containing at least eight characters long, and that includes upper and lowercase letters, combined with a few “special” characters (e.g. ^, $, &, etc).

Useful Tip

You can use a password management software tool like Roboform to help you generate secure login passwords …

You can use a password program like Roboform to help you generate really secure passwords(Roboform is a password management software you can use to generate really secure passwords)

For a tutorial for admin users on how to change your password, go here: Changing WordPress Passwords

Security Measure #5 – Protect Your wp-config.php File

The wp-config.php file contains important information about your website’s database and is used to define advanced options for WordPress.

wp-config.php

(wp-config.php file)

If a hacker breaks into your website, they will normally look for your wp-config.php file, because this file contains your WordPress database details, 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.

In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, prevent people from 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 – Rename Or Delete Unnecessary Installation Files

Delete or rename your install.php, upgrade.php and readme.html files.

These files are not required after installation. If you don’t want to delete these files, just rename them.

Security Measure #7 – Keep Your WordPress Software, Plugins & Themes Up-To-Date

Hackers search for vulnerabilities they can exploit in older versions of WordPress, including out-of-date versions of WordPress themes and plugins.

Ensure that all of your WordPress installation files, plugins, themes, etc. are always up to date.

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that lets the site administrator edit theme and plugin files from the dashboard area.

You can access your WordPress Theme Editor by selecting Appearance > Editor from your dashboard menu …

WP Theme Editor Menu

(The WordPress theme editor can be accessed via the WordPress admin menu)

This allows anyone accessing your blog’s admin area to view and make changes to all of your theme templates, or cause mayhem on your site.

If you want to prevent people from being able to access 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” directory stores all the media that gets uploaded to your site.

Normally, this folder is visible to online users. All a person needs to do to see the contents stored in your “uploads” directory is visit your directory using a web browser …

(WordPress has an uploads directory where media content is stored)

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by hackers, this could become a serious threat to 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, uploading 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 unsure 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 WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your files from botnets, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One security plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.

SecureScanPro - total security plugin for WordPress

(SecureScanPro – security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security areas that WordPress users need to address.

Another plugin you may want to look at using is BlogDefender.

Blog Defender

Blog Defender(Blog Defender WordPress Security Product Suite)

This product is a package of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where the security holes in your web site are …

Blog Defender Security SuiteAnd then shows you how to quickly fix these …

Blog Defender WordPress Security Product SuiteIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting simple maintenance tasks like keeping your WP core files, WP plugins and themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you cannot afford to ignore the importance of securing your websites.

As a final reminder, below is the advice given by an expert on web security to all WordPress users after the mass 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, WordPress security is very important 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 technical provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to be notified via email when we publish new articles on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya

***