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.

Get Thrive Leads for WordPress

WP SecurityWhen you are the world’s most popular content management system and the preferred online publishing platform used by millions of businesses and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers wanting to score a “big win”.

In early 2013 a worldwide brute force attack hit WordPress installations on almost every WP hosting server in existence.

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

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

What Is A Brute-Force Attack?

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 ways hackers try to break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. To attempt this, hackers use scripts and software tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re using easy-to-guess login details, 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)

”Botnets” are networks of private computers that have been infected with malicious software, which are then controlled remotely as a group, often without the unsuspecting computer owners’ knowledge or awareness.

Botnets are often 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 compromising computer networks all around the world since 2009 called “Zeus” …

ZeuS is a botnet that 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 world since 2009. Image: SecureList.com)

These were well organized and highly distributed attacks on WordPress sites. Over 90,000 IP addresses were identified by a number of 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 brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked each day.

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

Powering millions of websites around the world makes WordPress a target for attempted hacking attacks

(WordPress often is targeted by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

To learn why WordPress is a secure platform for websites, see this article: Can You Build A Secure Business Online Using WordPress?

Important Info

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 platforms 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)

Preventing Your WordPress Website From Brute Force Attacks – Ten Security Points

Every website with a vulnerability can can provide an opportunity to hackers. A compromised website or blog not only presents newbie hackers opportunities to improve their hacking skills and win “respect” amongst their peers, but it can also be a valuable platform for distributed attacks, spreading malware and participating in information theft.

If a malicious user can find a way to break in and gain remote access of your site, the website or blog can then be used as a “bot” to attack other valued web sites.

Additional undesirable effects of having your site hacked include being blacklisted by search engines, having stealthy spam links advertising things like casinos, discounted fashion, etc. inserted into your content, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The harsh reality is that brute-force software bots are very likely scouring for vulnerabilities and trying to hack into your website right now. Whether they can achieve this or not, depends on how difficult or easy you have made it for hackers or bots to keep trying until they find how to get access, or are forced to give up and decide to look for an easier target.

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

If you visit Hackertarget.com and run your website through their WordPress security scan …

WordPress Security Scan(Hackertarget – WP Security Scan Screenshot source: Hackertarget.com)

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

WordPress Security Scan

(Hackertarget – WP security scan results. Screenshot: 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 website, then hackers can too.

WordPress Security Scan(Product image source: BlogDefender.com)

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 are all valuable information to hackers, as these can inform them about potentially exploitable security weaknesses, especially in older versions.

If your site or blog is powered by WordPress and you’re not taking appropriate steps to toughen up 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 hitting WordPress installations worldwide!

When a site gets broken into, site owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been interfered with or even that their content has been entirely wiped out. Often, compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache (and potential loss of valuable business data) of discovering that your website or blog has been hacked into, below are ten essential and effective security checks that will help to protect your WordPress site from brute-force attacks.

Info

Note: Some of the recommended measures below require some technical understanding of how to modify core WordPress and server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for assistance.

***

Security Measure #1 – Contact Your Host

Get in touch with your hosting provider and ask them exactly what measures are in place to protect your site from being attacked, and what they are doing to make sure that your server files are being backed up.

It is important to make sure that your webhosting provider regularly backs up your sites and that, if disaster strikes, you can easily recover your files.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Maintained

Never rely on your host 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 performing a complete WordPress site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

Maintaining your WordPress website or blog frequently backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress installation backed up and up-to-date is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WordPress installation backed up and up-to-date. WP site 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 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 are still breathing!

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

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

The mass brute-force botnet attack on WordPress is mostly attempting to compromise site admin panels and gain access to sites by exploiting WP sites with “admin” as the user name.

For security purposes, never set up WordPress sites with the username “admin”. This is the first area hackers will test. If your blog’s username is “admin”, you will should change this immediately.

For a simple tutorial for non-technical WordPress users on how to change your WordPress username, go here: How To Change Your WordPress Admin Username

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right password and username characters that will give the hacker access to your website.

Unless you put some measure in place to prevent the brute-force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just continue to attack your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, become really easy targets for bot attacks. Make sure that you change your password combination to something containing at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with “special” characters (^%$#&@*).

Practical Tip

Roboform is a password software you can use to help you generate very secure passwords …

You can use a password management software tool like Roboform to help you generate difficult passwords(You can use a password tool like Roboform to create really secure passwords)

We have created a detailed tutorial for admin users that shows you how to change your login password here: How To Change A Password In WordPress

Security Measure #5 – Deny Access To Your WP Config 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 site, they will look for the wp-config.php file, because this file contains your database information, security keys, etc. Getting access to this information would allow someone 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, prevent people accessing 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 removed after installation. If you don’t want to remove these files, just rename them.

Security Measure #7 – Update Your WordPress Site, Plugins And Themes To Their Latest Version

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor feature that allows the site administrator to edit theme and plugin files from the dashboard.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor via the WP main menu)

This allows anyone accessing your blog’s admin area to view and modify your WP theme template files, and cause havoc on your site.

If you want to prevent unauthorized people from being able to access 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 Site’s Uploads Directory

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

Normally, this folder is visible to all users online. All a person needs to do to view the contents stored in your site’s “uploads” directory is visit the directory using a web browser …

(WordPress uploads directory)

(WordPress uploads directory)

If any directories in your website have vulnerabilities that can be exploited by malicious users, this can become a serious threat to 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 blank file 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

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

Most WordPress plugins address some but not all areas of WordPress security. One security plugin that seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - WP complete security plugin

(SecureScanPro – total security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of fixing 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 Sites

Blog Defender Security Solution(Blog Defender Security Plugin For WordPress)

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

BlogDefender scans you web site for security weaknesses …

Blog Defender Security Suite For WordPress Websites & BlogsAnd lets you fix these quickly, easily and inexpensively …

Blog Defender WordPress Security Product SuiteIf you don’t want to purchase 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 web platform, but neglecting simple maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data protection and taking other necessary precautions can expose your site to malicious by hackers and bots.

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

As one last reminder, below is the advice given by a website security expert to all WordPress users after the large-scale 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 very important if you run a WordPress site. Hopefully, the information in this article will help 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.

We also recommend subscribing to WPCompendium.org to be notified whenever we publish new articles on WordPress security and tutorials about 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

***