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 SecurityPowering millions of websites worldwide makes WordPress a natural target for attempted hacking attacks.

In April 2013 a worldwide brute-force attack hit WordPress installations across virtually every web host in existence around the world.

These attacks were caused by networks of infected computers programmed to attack other vulnerable computers, also commonly known as “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)

One of the many ways hackers use to try and break into a WordPress site is by trying to guess the site admin’s login username and password. This can be done using scripts and tools that automatically tries to guess hundreds of possible logins in minutes.

If you’re using predictable user names and passwords that are easy to guess, your website could be easily hacked by a malicious software’s persistent attempts to work out your site’s login details.

This is called a “brute force” login attack.

Botnet – What Is This?

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 infected with malicious scripts or code, which are then controlled remotely as a group, typically without the computer owners even being aware that this is happening in their machine.

Botnets are normally used used to blast out 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 world since 2009 called “Zeus” …

The Zeus botnet 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 botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The large-scale brute-force attacks then continued, with over 30,000 WordPress blogs being hacked each day.

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

Powering millions of websites and blogs worldwide makes WordPress a target for hacker attacks

(WordPress is often the target of large-scale malicious attacks by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

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

Info

It’s important to note that, in the case of the brute-force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also attacking sites built using other web applications like Joomla).

Mike Little, one of the co-founders 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)

Preventing Your WordPress Site From Brute-Force Attacks – Ten Security Points

Every website with a security vulnerability offers potential value to hackers. An unsecured website provides hackers with a resource to launch DDoS attacks, spread malware and use your website to steal information from innocent people.

If a hacker can break in and control your website, the site can then be used as a “bot” to attack larger and more valued sites.

Additional undesirable consequences of being hacked include getting blacklisted by search engines, having spammy links advertising things like gambling, cheap offers on brand names, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.

The harsh reality is that software-driven bots are looking for security exploits and trying to hack into your web site as you are reading this page right now. Whether they can achieve this or not, depends on how challenging you will make things for hackers or botnets to continue persisting until they either find a way to get in, or are forced to give up and go look for a more vulnerable target.

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

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

Hackertarget - WordPress Security Scan(Hackertarget – WordPress Security Scan Product image: Hackertarget.com)

You will see that the scan will yield a number of results and information about your WordPress installation …

Hackertarget - Website Security Check

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

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

WP Security Check(Screenshot source: BlogDefender.com)

Being able 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 can be potentially valuable information to hackers, as this informs them about any exploitable security vulnerabilities, especially where site owners haven’t updated their sites.

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

Typically, when a website or blog gets hacked, blog owners can find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been entirely wiped out. Often, most sites will be infected with malicious software or viruses without the owner even being aware that this has happened.

To help avoid the heartache and aggravation of discovering that your web site has been hacked into, below are 10 simple, yet essential and effective security checks that will help to prevent your WordPress site from brute force attacks.

Info

Note: A few of the recommended measures shown below require 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 a professional WordPress technical provider for help.

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your hosting service and ask them exactly what systems have been put into place to protect your site from being attacked, and what they are doing to ensure that your files and data get backed up.

It is important to check that your hosting provider backs up your sites and that, if anything should happen, you can quickly and easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Frequently Up-To-Date

You should never rely just on your hosting provider for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and maintain 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 files and data are removed,
  • All WP files and data are free of errors, optimized and backed up,
  • All WP themes, plugins and software components are up-to-date,
  • etc …

A proper WP maintenance routine looks like this …

Maintaining your WordPress website 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. Image source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress website or blog regularly backed up and updated is. WordPress maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WP site maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that your heart is still beating!

If you don’t want to back up your data manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Clone And Keep Your WordPress Site Protected With Backup Creator Plugin For WordPress

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

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

For reasons of website security, don’t set up WordPress sites with the username “admin”. This is the first thing hackers will test. If your site’s username is admin, you will should change this immediately.

We have created a detailed step-by-step tutorial created especially for non-technical WordPress users that shows you how to change your WordPress username here: How To Change Your Admin Username In WordPress To A Different User Name

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different character strings in an attempt to guess the right login combination 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 simple and effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, are really easy targets for brute-force attacks. Make sure that you change your password combination to something that is at least 8 characters long, and that includes upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Practical Tip

You can use a password management tool like Roboform to help you generate hard-to-guess passwords …

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

We have created a detailed tutorial created especially for WordPress admin users that shows you how to change your WordPress admin password here: Changing Passwords

Security Measure #5 – Prevent The wp-config.php File From Being Easily Accessed

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

(WordPress WP Config file)

If hackers break into your site, they will look for your 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.

In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, prevent people finding 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 Blog 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 remove these files, then just rename them.

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

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

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

Security Measure #8 – Disable Your Theme Editor

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

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor from the dashboard menu …

WordPress Theme Editor Menu

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

This means that anyone logging into your blog’s admin area can view and modify your WP theme templates, and create havoc on your site.

If you want to prevent unauthorized people from accessing the 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 WordPress Uploads Directory

The WordPress “uploads” directory contains all the media that gets uploaded to your website.

By default, this folder is visible to all users online. All someone has to do to view all of the contents in the “uploads” folder is navigate to your directory using a web browser …

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

(WordPress uploads directory)

If any directories in your website have vulnerabilities that can be exploited by malicious users, this can threaten 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, adding a blank index.php file (this is literally a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are some great WordPress security plugins available that specifically address many common security issues WordPress website owners face, such as preventing unauthorized users from accessing vital areas of your site, protecting your website from malicious scripts, preventing unauthorized file uploads, 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 - WordPress complete security plugin

(SecureScanPro – WP security software solution)

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 Security Product Suite For WordPress

Blog Defender Security Solution For WordPress Web Sites(Blog Defender)

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

BlogDefender scans you web site for potential security weaknesses …

Blog DefenderAnd then shows you how to fix these quickly and easily …

Blog Defender Security Plugin For WordPress BlogsIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, then use various free WordPress 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, plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

No matter what kind of business you run or plan to run online and how small you think your web presence is, you cannot ignore the importance of securing your website or blog.

As a final reminder, below is the advice given by a web 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, WordPress security is very important if you run a WordPress site. Hopefully, this article has given you the initial steps you need to take 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 WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email when we publish new tips on WordPress security and reviews of WordPress security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***