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.

WP SecurityWordPress is frequently the target of malicious attacks by hackers.

In early 2013, WordPress installations around the world were subjected to worldwide brute-force attacks.

These attacks were caused by botnets (computer networks infected with malware and programmed to attack other vulnerable installations).

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 admin’s login username and password. This can be achieved using software tools and scripts that can work through hundreds of login combinations in minutes.

If you’re using predictable usernames and weak passwords that are easy to guess, your site can be easily hacked by persistent attempts to guess your site’s login details.

This is called a “brute force” 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)

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 or awareness.

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 ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …

ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009.

(The Zeus botnet has been actively compromising computer networks all around the world since 2009. Screenshot: SecureList.com)

These were highly distributed and well organized botnet attacks on WordPress sites. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, 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 each day.

News of this brute-force botnet attack was widely reported in all the major webhosting companiesand leading technology media 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 …

Powering millions of websites and blogs around the world makes WordPress an obvious target for hacking attempts

(WordPress powers millions of websites around the world, which makes it a frequent target for attempted 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 continue using WordPress if you are concerned about the security of your online business.

We explain what makes WordPress a very secure web platform in this article: How Secure Is WordPress?

Important

It’s important to note that, in the case of April 2013 brute-force attack described above, no specific WordPress vulnerability was 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, 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.

(MikeLittle.org)

Protecting Your WordPress Blog From Being Brute-Force Attacked – Ten Security Checks

You may think that your website or blog is of little value to hackers, but the reality is that every website has value to a malicious user.

If a hacker can find a software security flaw, your web site can then be employed as part of a larger network of “bots” to target more valued websites.

Additional undesirable impacts of being hacked include getting blacklisted by Google, having stealthy spam links promoting things like casinos, cheap offers on brand names, etc. inserted into your content and meta data, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasties.

The truth is that brute-force software bots are very likely scouring for security exploits and trying to break into your blog as you are reading this article at this very moment. Whether they will hack in or not, depends on how difficult or easy you will make it for them to continue trying until they work out how to get access, or are forced to give up and decide to look for a less secure target.

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

Do you own a WordPress site? If so, visit a site like Hackertarget.com and run your website through their WordPress security check …

WP Security Check(WP Security Check Product image source: https://hackertarget.com/wordpress-security-scan)

You will see that the test returns a number of results and details about your website setup …

WP Security Check

(Hackertarget – WordPress security check results. Image source: Hackertarget.com)

It should be obvious after using the tool shown above that if you are able to access all of this information, then so can hackers.

Hackertarget - Website Security Scan(Screenshot source: BlogDefender site)

Being able to see what version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories can be useful information to hackers, as this informs them about potentially exploitable holes or weaknesses, especially in older versions.

If your site or blog is powered by WordPress and you are not preventive steps to harden your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your site, because these brute-force attacks are systematically hitting WordPress sites around the world!

Whenever a website is broken into, webmasters can find themselves “locked out” of their own site, or notice that their content has been modified or that everything has been entirely wiped out. Typically, compromised sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

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

Disclaimer

Note: A few of the recommended steps listed below need some technical skills to modify core WordPress and server files. If you are not technical-minded, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Get In Touch With Your Hosting Provider

Get in touch with your host and ask them exactly what precautions have been put in place to protect your site from brute force attacks, and what is done to ensure that your server files get backed up.

Check that your webhosting service is regularly backing up your sites and that, if anything happens, you can quickly and easily recover your site.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Site Regularly Updated

Never rely only on your webhosting provider for site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and develop a habit of religiously performing a full WordPress site maintenance routine on a regular basis (e.g. daily, weekly, monthly, etc …)

A proper 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 software, plugins and themes are up-to-date,
  • etc …

A complete WordPress site maintenance routine looks like this …

Maintaining your WordPress installation fully backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP site backed up and up-to-date is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP web site fully backed up and updated is. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WordPress maintenance yourself, get someone else to do it but make sure this gets done. Backing up your site is the second most important thing you should do after making sure that you still have a pulse!

If you don’t want to back up your data manually, there are many plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone And Protect Your WordPress Site With Backup Creator WordPress Plugin

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

the worldwide brute force attack on WordPress is mostly an attempt to compromise site admin panels and gain access to sites by exploiting sites that used “admin” as the user name.

For reasons of website security, never install WordPress sites with the username “admin”. This is the first thing hackers will test. If your blog’s user name is “admin”, change this immediately.

We have created a tutorial created especially for WordPress users on how to change your login username here: How To Change Your WordPress User Name From Admin To A More Secure User Name

Security Measure #4 – Use Strong Passwords

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right combination of username and password characters that will give the hacker entry to your site.

Unless you put some measure in place to prevent the brute force attack from happening (see further below for a couple of effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually breaks into your admin area.

Weak passwords, therefore, become very easy targets for botnets. Make sure that you change your password combination to something that is at least 8 characters long, with both upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Useful Tip

You can use a password management program like Roboform to create strong passwords …

Roboform is a password software you can use to generate strong login passwords(You can use a password management tool like Roboform to generate difficult passwords)

For a simple tutorial on how to change your WordPress password, go here: What To Do If You Need To Reset Your WordPress Password

Security Measure #5 – Secure 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

(wp-config.php)

If a hacker breaks into your WordPress website, they will look 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 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 being attacked and even being used as part of a bot net, therefore, prevent your wp-config.php file from being 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

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 delete these files, just rename them.

Security Measure #7 – Keep Your WordPress Blog, Themes And Plugins Up-To-Date

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

Make sure to keep your application files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor that allows site administrators to edit theme and plugin code from the dashboard.

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

WP Theme Editor Menu

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

This means that anyone logging into your blog’s admin area can view and modify your theme files, or 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 – Secure The Site’s Uploads Directory

The “uploads” folder stores all the media that gets uploaded to your website.

Normally, this folder is visible to all users online. All someone has to do to view all of the contents in your “uploads” directory is visit your directory using their browser …

(WordPress uploads directory)

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this could seriously threaten 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 a file with nothing in it called “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 WordPress Security Plugins

There are some great security plugins for WordPress available that will address common security issues faced by WordPress site owners, such as preventing hackers from accessing vital areas of your site, protecting your site from malicious scripts, preventing injections of code into files, etc.

Many 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 issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.

SecureScanPro - WP total security software

(SecureScanPro – total security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and addresses most of the security issues that WordPress users need to address.

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

Blog Defender WordPress Security Suite

Blog Defender Security Solution For WordPress(Blog Defender)

This product is a package of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.

BlogDefender shows you where potential security holes in your WordPress installation are …

Blog DefenderAnd then shows you how to fix these quickly …

Blog Defender Security Suite For WordPress Websites & BlogsIf you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, you can use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting basic maintenance tasks like keeping your WordPress software, WordPress plugins and themes up-to-date, 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, web security is something you simply cannot afford to ignore.

As a final reminder, below is the advice given by a security expert to all WordPress users following the worldwide 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 above article has provided you with 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 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 receive notifications whenever we publish new articles on WordPress security and tutorials about new security plugins and solutions.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***