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 SecurityWordPress is the world’s most popular CMS which makes it an easy target for hacking attempts.

In early 2013 a global brute-force attack struck WordPress installations across virtually every host server in existence.

These attacks were caused by botnets (networks of infected computers programmed to attack other computers with security vulnerabilities).

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 admin’s login username and password. This is done using scripts and software that can work through hundreds of possible login combinations in minutes.

If you’re using obvious user names and passwords, your site can be an easy target for hacking attempts.

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)

”Botnets” are networks of private computers that have been compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the computer owners even being aware that this is going on.

Botnets are typically used to blast out mass spam emails.

Below is a screenshot taken from an internet security monitoring site 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 compromising computer networks all around the globe since 2009.

(The Zeus botnet has been actively compromising computer networks all around the globe since 2009. Image: SecureList.com)

These were well organized and highly distributed attacks. 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 administration areas took place. The large-scale attacks then continued, with over 30,000 WordPress sites being hacked every day.

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

Being the world's most popular content management system makes WordPress an obvious target for hackers

(WordPress is the world’s most used content management system which makes it a frequent target for malicious attempts by hackers)

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

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 online presence.

To understand why WordPress is a secure platform for websites, read this article: How Secure Is WordPress?

Useful Info

It’s important to note that, in the case of the large-scale brute force 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, the co-founder of WordPress, made this comment 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 Blog From Being Brute-Force Attacked – Ten Security Checks

Every website with a security vulnerability provides an opportunity to hackers. A vulnerable website or blog not only offers new hackers opportunities to improve their hacking skills and claim “bragging rights” among their peers, but it can also acts as a valuable resource for launching distributed attacks, distributing malware and engaging in information theft.

If a malicious user can discover a flaw in the security setup that allows them to take over and control your web site, your site can then be employed to target larger and more highly-valued web sites.

Additional undesirable effects of having your site hacked include getting blacklisted by Google, having stealthy spam links advertising things like gambling, discounted fashion, etc. inserted in your content and meta data, malicious redirects to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The truth is that malicious bots are probably trying to hack into your website right now. Whether they can get in depends on how challenging you can make it for hackers and botnets to continue trying until they discover a way to get in, or give up and go look for a less protected target.

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

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

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

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

WordPress Security Check

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

It should be obvious after using this scanning tool that if you can freely access all of this information about your blog, then so can hackers.

WP Security Scan(Product image source: BlogDefender site)

The ability to see what 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 these can inform them about potentially exploitable vulnerabilities, especially where site owners haven’t updated their sites.

If your website runs on WordPress and you’re not precautionary steps to bolster the security of your site, it’s practically guaranteed 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 installations worldwide!

Typically, whenever a site gets broken into, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Typically, sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation (and significant financial loss) of having your web site being hacked into, below are ten essential and effective security checks that will help to prevent your WordPress site from being brute force attacked.

Disclaimer

Note: Some of the measures below need some technical understanding of how to modify core WordPress or server files. If you are not technical, 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 – Contact Your Hosting Service

Get in touch with your hosting provider and ask them exactly what systems they offer to help prevent your site from being attacked, and what is done to make sure that your site files are being backed up.

It’s important to check that your webhosting service provider backs up your sites and that, if anything goes wrong, you can quickly and easily get your files and data back.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Site Regularly Updated

Never rely just on your hosting provider for site backups. Instead, learn how to maintain and manage your WordPress site or get this done for you and maintain a habit of religiously performing a complete site maintenance routine frequently (e.g. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A proper WP maintenance routine looks like this …

Maintaining your WP web site fully backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website or blog completely backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WordPress site backed up and updated. WordPress maintenance is not hard to do 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, pay a professional to do it but make sure this gets done. Backing up your website is the second most important thing you must 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. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy And Protect Your WordPress Websites With Backup Creator WP Plugin

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

The mass brute force attack on WordPress is mostly an attempt to compromise site admin panels by exploiting WordPress installations that used “admin” as their username.

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

We have created a step-by-step tutorial for WordPress users on how to change your WordPress admin username here: Changing Your WordPress User Name From Admin To A Different User Name

Security Measure #4 – Make Sure Your Password Is Secure

A “brute force” attack occurs when malicious software persistently tries to guess the right combination of characters in a password and username that will give them entry to your site.

Unless you put some measure in place to block 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 breaks into your admin area.

Weak passwords, therefore, become really easy targets for hackers. Make sure that you change your password to something that is at least 8 characters long, and that includes upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Tip

Roboform is a password management tool that lets you create different secure login passwords …

Roboform is a password management software that lets you create different secure passwords(Roboform is a password software that lets you easily create really secure passwords)

We have created a detailed step-by-step tutorial created especially for WP admin users on how to change your password here: What To Do If You Need To Reset Your Login Password

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 options for WordPress.

wp-config.php file

(wp-config.php)

If hackers break into your WordPress website, they will normally try to access your wp-config.php file, because this file contains your WordPress database information, 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 attacks and even being used as part of a bot net, therefore, prevent people viewing 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 – Rename Or Delete Unnecessary Installation Files

Delete or rename your install.php, upgrade.php and readme.html files.

You can remove these files after installation, as they are unnecessary. If you don’t want to delete these files, just rename them.

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

The WordPress theme editor allows anyone accessing your site to view and edit your theme templates, or cause mayhem on your site.

To prevent unauthorized people from being able to access 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 Your Site’s Uploads Folder

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

By default, this folder is visible to all users online. 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 files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this could seriously threaten the security of your website.

Protecting your directories will prevent online users 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 an empty file named “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 security plugins for WordPress are available that will address most security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from malicious scripts, preventing injections of code into files, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security plugin that does 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 - WordPress security plugin

(SecureScanPro – security plugin for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of addressing most of the security areas that WordPress users need to address.

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

Blog Defender WordPress Security Solution

Blog Defender Security Product Suite For WordPress(Blog Defender Security Solution For WordPress)

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 the security weaknesses in your WordPress site are …

Blog DefenderAnd lets you fix these quickly …

Blog Defender Security Solution For WordPressIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting basic maintenance tasks like keeping your WP installation, plugins and WordPress themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your website to malicious by hackers and bots.

Regardless of the 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, below is the advice given by a web security expert to all WordPress users following the large-scale brute force attacks 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, WordPress security is very important if you run a WordPress site. Hopefully, the information in 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 professional WordPress security specialist, or search for a 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 WordPress security plugins and solutions.

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya

***