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 content management system in the world and the online publishing platform of choice used by millions of businesses and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will become a target for attacks from hackers.

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

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

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 admin’s login username and password. This is achieved using scripts and software tools that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re not using strong usernames or unguessable passwords, your website can be easily hacked by the software’s persistent attempts to work out your site’s login details.

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

A “Botnet” is a network of private computers that have been compromised and infected with malicious software, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware of this.

Botnets are regularly used to send mass spam emails.

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 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: 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 alone, when millions of attempts to force their way into WordPress user admin areas took place. The attack continued after this, with over 30,000 WordPress sites being hacked every day.

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

Powering millions of sites worldwide makes WordPress a target for hacking attempts

(Being the world’s most used content management system makes WordPress an obvious target for hacking attacks)

Does This Mean We Should Stop Using WordPress?

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

We explain what makes WordPress a very secure web platform in this article: Is WordPress A Secure Platform For Websites?

Useful Info

It’s important to understand that, in the case of the worldwide brute force botnet attack described above, was no specific vulnerability in WordPress being exploited (the same script was also attacking sites built using platforms like Joomla).

Mike Little, the co-founder of WordPress with Matt Mullenweg, made the following comment about the botnet 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

Every web site with a vulnerability provides some type of opportunity to hackers. All websites have some value to hackers. Business websites, personal blogs, government sites … even web sites owned by web security experts can and have been targeted.

If someone can exploit a security flaw in your system that lets them take over your website or blog, your web site can then be employed as a “bot” in a planned cyberattack against more highly-valued sites.

Additional undesirable effects of having your site hacked and your site security compromised include getting blacklisted by search engines, having spammy links promoting things like gambling, discounted fashion, etc. inserted in your content and meta data, redirecting visitors to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasties.

The harsh reality is that software-driven bots are trying to break into your website as you are reading this at this very moment. Whether they will be successful or not, will depend on how difficult or easy you will make it for hackers to continue persisting until they find a way to get in, or decide to look for a less protected target.

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

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

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

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

Hackertarget - Website Security Scan

(website security check results. Product image source: Hackertarget.com)

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

WordPress Security Scan(Screenshot: Blog Defender)

Being able to see which 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 can be potentially useful information to hackers, as this informs them about exploitable vulnerabilities, especially in older versions.

If your site or blog is driven by WordPress and you’re not preventive steps to bolster the security of your site, we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically targeting WordPress sites worldwide!

When a website or blog is broken into, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been altered or that everything has been entirely wiped out. Often, sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To avoid the heartache and frustration (and significant financial loss) of having your website being hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from being attacked by brute force hackers.

Important Info

Note: Some of the measures shown below need some technical skills to modify core WordPress and 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 technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Webhosting Service

Contact your webhosting company and ask them what systems are in place to protect your site from being attacked, and what they do to make sure that your site files are regularly being backed up.

It’s important to make sure that your hosting service is regularly backing up your sites and that, if disaster strikes, you can quickly and easily recover your files.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Site Frequently Updated

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

A full WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WordPress installation completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site completely backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP installation completely backed up and updated is. WP 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 don’t want to learn how to do WordPress site 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 must do after making sure that you still have a pulse!

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

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

The mass brute-force attack on WordPress is mostly attempting to compromise website administrator panels by exploiting WordPress sites using “admin” as the username.

For website security reasons, don’t install WordPress sites with the username admin. This is the first area hackers will test. If your site’s username is “admin”, change this immediately.

For a tutorial for non-technical WordPress users that shows you how to change your login username, go here: Changing Your WordPress Admin Username

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when a malicious script continually and persistently hits a username and password field with different strings of characters trying to guess the right combination that will give the hacker access to your website.

Unless you put some measure in place to block 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 “cracks” the code.

Weak passwords, therefore, are really easy targets for hackers. Make sure that you change your password combination to something containing at least eight or nine characters long, with upper and lowercase letters, and “special” characters (e.g. %, $, @, etc).

Useful Tip

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

Roboform is a password management tool that lets you easily generate different strong passwords(You can use a password management program like Roboform to generate unbreakable passwords)

For a tutorial that shows you how to change your password, go here: What To Do If You Need To Change Passwords In WordPress

Security Measure #5 – Prevent Access To The 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 hackers break into your WordPress website, they will normally look for the 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, you must prevent your wp-config.php file from being accessed. 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

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

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

Security Measure #7 – Upgrade Your WordPress CMS, Plugins & Themes To Their Latest Version

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

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that lets you edit theme and plugin code from the dashboard.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

This allows anyone accessing your site’s admin to view and change your WP theme templates, and create mayhem on your site.

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 – Protect The Site’s Uploads Folder

The “uploads” folder contains all the media files that get uploaded to your blog.

Normally, this folder is visible to anyone online. All a person needs to do to see all of the contents in the “uploads” folder is visit the directory using their web browser …

(WordPress uploads folder)

(WordPress uploads directory)

If any directories in your website have vulnerabilities that can be exploited by hackers, anyone can upload unauthorized file types to 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, adding 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 – Install Security Plugins

A number of great WordPress security plugins are available that will address common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from malicious scripts, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress security 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 irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress security software solution

(SecureScanPro – WP total security software)

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

Another security plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Suite

Blog Defender(Blog Defender Security Plugin For WordPress Websites & Blogs)

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

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

Blog Defender Security SolutionAnd lets you fix these quickly and easily …

Blog DefenderIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, you can 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 making sure that your WP software, WP plugins and WP themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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

As a final reminder, 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 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, website security is of the utmost importance if you run a WordPress site. Hopefully, this article will help 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 WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to be notified via email whenever we publish new tips on WordPress security and reviews of new security plugins and solutions.

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***