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 attacks by hackers.

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

These attacks were caused by networks of infected computers programmed to attack other vulnerable installations (called “botnets”).

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

Brute Force Attacks – Definition

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 will attempt to break into a WordPress site is by trying to guess the site’s administration login username and password. This can be achieved with software tools that can work through hundreds of possible logins in minutes.

If you’re using obvious user names and passwords that are easy to guess, your website can be easily hacked by the malicious script’s repeated attempts to guess your site’s login details.

This is called a “brute-force” attack.

Botnets – What Are They?

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 computers that have been compromised and infected with malicious code, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is taking place in their machine.

Botnets are regularly used to send mass spam emails from computers of compromised user accounts.

Below is a screenshot 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 compromising computer networks all around the globe since 2009.

(ZeuS is a botnet that has been actively compromising 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 users administration areas. The mass attacks then continued, with over 30,000 WordPress sites being hacked per day.

Coverage of this large-scale brute-force attack was widely reported in all the major webhosting companies, as well as the 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 …

Being the world's most popular CMS makes WordPress an obvious target for hacking attempts

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

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of good reasons why you should continue using WordPress if you are concerned about the security of your website.

We explain what makes WordPress a very secure web platform in this article: Is WordPress Secure? What Every Business Owner Needs To Know About WordPress Security

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 attacking sites built using other web 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 Brute Force Attacks – Ten Security Points

You may think that your website or blog has nothing to offer to hackers, but the reality is that to a hacker, all websites are an opportunity to gain some benefit at your expense.

If a hacker can discover a security vulnerability that lets them control your web site, that website or blog can then be employed as a “bot” to attack more valued web sites.

Additional undesirable results of being hacked and your site security compromised include getting blacklisted by search engines, having spammy links promoting things like viagra, cheap offers on brand names, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites or other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasty things.

The harsh reality is that hackers are trying to break into your site at this very moment. Whether they can do this successfully or not, depends on how hard you have made things for hackers or botnets to keep trying until they discover a way to get access, or decide to look for a less secure target.

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

Does your website run on WordPress? If so visit a site like Hackertarget.com and run your site through their WordPress security scan …

Hackertarget - Website Security Check(Hackertarget – WP Security Scan Screenshot image: Hackertarget.com)

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

WordPress Security Scan

(WP security check results. Product image: Hackertarget.com)

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

Hackertarget - Website Security Scan(Screenshot: BlogDefender.com)

The ability 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 are all useful information to hackers, as this can inform them about any exploitable security weaknesses, especially in older versions.

If your site or blog runs on WordPress and you’re not taking appropriate steps to toughen up your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress installations worldwide!

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

To avoid the heartache (and potential financial loss) that comes with having your web site being hacked into, we have listed below ten simple, yet essential and effective security checks that will help to protect your WordPress site from brute-force attacks.

Important Info

Note: Some of the steps below need some technical skills to modify core WordPress and/or server files. If you have no web coding skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Web Host

Contact your hosting provider and ask them what systems have been put into place to protect your site from brute-force attacks, and what they are doing to ensure that your site files get backed up.

Check that your hosting service backs up your server files and that, if anything happens, you can quickly and easily get your site back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Maintained

You should never rely only on your host 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 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 data and files are free of errors, optimized and backed up,
  • All WordPress software, themes and plugins are up-to-date,
  • etc …

A full WP site maintenance routine looks like this …

Maintaining your WordPress installation backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website or blog regularly backed up and up-to-date is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP web site frequently backed up and updated. 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 don’t want to learn how to do WordPress maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site is the second most important thing you should do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Duplicate And Protect Your WP Websites And Blogs With Backup Creator Plugin For WordPress

Security Measure #3 – Do Not Use “Admin” As The Admin Username

The mass brute force attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting sites that used “admin” as the username.

For reasons of website security, never install a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s username is admin, then change this immediately.

For a simple tutorial that shows you how to change your admin username, go here: Changing Your WordPress Username From Admin To A Different User Name

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when malicious software persistently hits a login or password field with different character strings in an attempt to guess the right combination that will unlock your website.

Unless you put some measure in place to stop the brute-force attack (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.

Weak passwords, therefore, are really easy targets for botnets. Make sure that you change your password to a string that contains at least eight characters long, with both upper and lowercase letters, combined with “special” characters (%^#$@&*).

Tip

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

You can use a password management software tool like Roboform to help you generate unguessable passwords(Roboform is a password management software you can use to generate very secure passwords)

For a simple tutorial created especially for WordPress admin users on how to change your admin password, go here: What To Do If You Need To Reset Passwords In WordPress

Security Measure #5 – Deny Access To Your WP Config File

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

wp-config.php

(wp-config.php file)

If a hacker breaks into your site, they will normally try to access the wp-config.php file, because this file contains your WordPress 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being easily accessible. 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

Rename or delete the install.php, upgrade.php and readme.html files from your server.

You can remove these files after installation. If you don’t want to remove these files, then just rename them.

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

Hackers search for vulnerabilities they can exploit in previous versions of WordPress, including outdated versions of WordPress plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

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

You can access the WordPress Theme Editor by selecting Appearance > Editor from the admin menu …

WP Theme Editor Menu

(Accessing the WordPress theme editor via the WordPress dashboard menu)

This allows anyone accessing your blog to view and modify your WP theme files, and create mayhem on your site.

If you want to prevent unauthorized people from being able to access your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Remove Access To The Site’s Uploads Directory

The “uploads” directory contains all the media files that get uploaded to your website.

Normally, this folder is visible to anyone online. All someone has to do to view the contents in the “uploads” directory is navigate to your directory using their web browser …

(WordPress has an uploads folder where all of your media files are stored)

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types or compromise the security of your website.

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 an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

A number of security plugins for WordPress are available that will address many common security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site 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 issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - security software solution for WordPress

(SecureScanPro – complete security software for WordPress)

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

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

Blog Defender Security Suite For WordPress Websites & Blogs

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

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

BlogDefender shows you where potential security weaknesses in your website are …

Blog Defender Security Product Suite For WordPress Web SitesAnd then shows you how to easily fix these …

Blog DefenderIf you don’t want to purchase a premium security plugin like SecureScanPro or BlogDefender, then use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting basic maintenance tasks like keeping your WordPress core files, plugins and themes updated to their latest versions, 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 cannot afford to ignore the importance of web security.

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 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, this information 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 seek help from a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to be notified when we publish new articles on WordPress security and reviews of WordPress security plugins.

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***