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 April 2013, WordPress installations around the world were subjected to large-scale brute-force attacks.

These attacks were caused by infected computer networks programmed to attack other vulnerable sites, also commonly known as “botnets”.

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

What Are 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 a WordPress site is by trying to guess the site’s administration login username and password. This can be done with scripts and software that can guess hundreds of possible login combinations in minutes.

If you’re using obvious usernames and predictable passwords, your website could be easily hacked by repeated attempts to guess your site’s login details.

This is called a “brute force” login attack.

Botnet Definition

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)

A “Botnet” is a network of private computers that have been infected with malicious code, which are then controlled remotely as a group, often without the computer owners’ knowledge.

Botnets are often used to blast mass spam emails.

Below is a screenshot 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 infecting computer networks all around the world since 2009. Image source: SecureList.com)

These botnet attacks on WordPress sites are well organized and highly distributed. 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 users administration areas. The attack continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

Being the world's most popular CMS makes WordPress a target for hacking

(WordPress is often the target of large-scale malicious attacks by hackers, due to its popularity)

Does This Mean WordPress Is Not Secure And We Should Stop Using It?

No. In fact, there are many good reasons why you should choose WordPress if you are concerned at all about the security of your web presence.

We explain why WordPress is a secure web platform in this article: Concerned About WordPress Security? What Every Website Owner Needs To Know About WordPress

Useful Info

It’s important to understand that, in the case of April 2013 brute force botnet 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 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.

(MikeLittle.org)

Protecting Your WordPress Site From Brute-Force Attacks – 10 Security Checks

Every web site with a vulnerability offers some value to hackers. 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 web security. Business sites, personal blogs, government sites … even web sites owned by web security and anti-hacking experts can and have been targeted.

If a hacker can discover a way to gain access and control of your blog, your web site can then be used to target more valuable web sites.

Additional undesirable consequences of having your website hacked include getting blacklisted by search engines, having stealthy spam links promoting things like casinos, discounted fashion, etc. inserted into your content, redirecting visitors to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasty things.

The reality is that hackers are probably searching for security exploits and trying to hack into your website or blog as you are reading this page. Whether they can successfully break into your site will depend on how difficult you will make things for hackers or botnets to keep persisting until they either can find a way to get access, or are forced to decide to look for a less secure target.

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

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

WordPress Security Check(Hackertarget – WP Security Check Product image source: Hackertarget.com)

You will see that the test returns a number of results and information about your site …

WordPress Security Scan

(Hackertarget – WP security scan results. Screenshot image: Hackertarget.com)

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

WP Security Scan(Product image: 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 on your server are all valuable information to hackers, as this informs them about any exploitable vulnerabilities, especially where the owners haven’t updated their files.

If your site or blog runs on WordPress and you’re not preventive steps to bolster the security of your site, then it’s practically guaranteed that, at some point in time, someone will attempt to hack your website, because these brute force attacks are systematically targeting WordPress sites around the world!

Typically, when a site is compromised, website owners will find themselves “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Often, sites will become infected with malicious scripts without the owner even being aware that a security breach has taken place.

To avoid the heartache (and significant loss of valuable business data) that comes with having your website being hacked into, below are 10 essential and effective security measures that will help to protect your WordPress site from brute force attacks.

Info

Note: A few of the measures listed below need some technical skills to modify core WordPress and/or server files. If you have no web 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 Webhosting Service Provider

Contact your webhosting provider and ask them what precautions they offer to protect your site from brute force attacks, and what they do to ensure that your files and data get regularly backed up.

It is important to make sure that your webhosting service is backing up your sites and that, if anything goes wrong, you can easily get your site back.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Frequently Updated

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

A proper WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress site backed up and up-to-date is. WordPress site maintenance is not hard 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 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 you still have a pulse!

If you don’t want to back up your data manually, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Duplicate And Protect Your WP Web Sites With Backup Creator WordPress Plugin

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

The brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels by exploiting WordPress sites using “admin” as the account name.

For website security purposes, avoid installing WordPress sites with the username admin. This is the first area hackers will test. If your blog’s user name is “admin”, you will need to change it immediately.

For a simple tutorial that shows you how to change your WordPress admin username, go here: How To Change Your WP Admin User Name To Another Username

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when a malicious script persistently tries to guess the right username and password characters that will unlock 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 attacking your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, make very easy targets for botnets. Make sure that you change your password combination to something containing at least eight or nine characters long, with both upper and lowercase letters, and “special” characters (^%$#&@*).

Practical Tip

You can use a password management software tool like Roboform to create strong login passwords …

Roboform is a password management tool you can use to generate strong login passwords(Roboform is a password management software that lets you easily generate strong login passwords)

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

Security Measure #5 – Prevent Access To Your wp-config.php File

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

WordPress WP Config file

(wp-config.php file)

If hackers break into your site, they will normally search for your wp-config.php file, because this file contains your database information, 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 people from being able to easily access 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 Installation Files

Delete or rename 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 – Keep Your WordPress Files, Plugins And Themes Up-To-Date

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

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress comes with a built-in editor feature that allows site administrators to edit plugin and theme code inside the dashboard.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

This means that anyone logging into your blog can view and modify your theme template files, and cause havoc on your site.

To prevent people from accessing 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 – Remove Access To Your WordPress Uploads Directory

The WordPress “uploads” directory 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 view the contents stored in your site’s “uploads” directory is navigate to your directory using their browser …

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

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

If any directories in your website have vulnerabilities that can be exploited by malicious users, this could compromise the security of your website.

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 with experience if you are unsure about what to do.

Security Measure #10 – Use WordPress Security Plugins

A number of great 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 website from malicious software, preventing unauthorized file uploads, 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 potential issues that could lead to hackers accessing your website files and causing damage to your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – WP security software solution)

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 plugin you may want to look at using is BlogDefender.

Blog Defender Security Suite For WordPress

Blog Defender Security Plugin For WordPress Websites(Blog Defender Security Product Suite For WordPress Web Sites)

Blog Defender is a suite of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where the security weaknesses in your WordPress installation are …

Blog DefenderAnd then shows you how to easily fix these …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting basic maintenance tasks like updating your WordPress installation, WordPress plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what type of business you run or plan to run online and how small you think your web presence is, you simply cannot afford to ignore the importance of web security.

As one last reminder of the importance of website security, below is the advice given by a website security expert to all WordPress users after the global 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article has given you 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 seek help from a professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications via email whenever we publish new articles and tutorials on WordPress security and reviews of new security plugins and solutions.

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***