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 sites around the world makes WordPress an easy target for hackers.

In early 2013 a large-scale brute force attack struck WordPress installations on almost every web host in existence around the world.

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

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

Brute-Force Attacks – An Overview

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 methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. To achieve this, hackers use software programs and scripts that can guess hundreds of possible login combinations in minutes.

If you’re using predictable login details, your website could be an easy target for hackers.

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)

A “Botnet” is a network of private computers that have been infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge.

Botnets are typically used to send out mass spam emails.

The screenshot below was 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 globe since 2009 called “Zeus” …

The Zeus botnet has been actively infecting computer networks all around the world since 2009.

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

The botnet attacks were well organized and highly distributed. Over 90,000 IP addresses were identified by a number of 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 continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

Being the world's most popular CMS makes WordPress an obvious target for attacks by malicious users

(WordPress is the world’s most popular content management system which makes it a 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 great reasons why you should continue using WordPress if you are concerned at all about the security of your online business.

To understand what makes WordPress a very secure web platform, see this article: Is WordPress A Secure Website Platform?

Useful Information

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

Mike Little, the co-founder of WordPress with Matt Mullenweg, 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 or blog with a security vulnerability presents an opportunity to hackers. All websites have some value to hackers. Corporate sites, personal blogs, government websites … even websites owned by online security and anti-hacking experts can and have been targeted.

If a hacker can hack and gain complete control of your website or blog, your site can then be employed to attack larger and more valued websites.

Additional undesirable consequences of having your site hacked and your site security compromised include being blacklisted by Google, having stealthy spam links advertising things like online meds, porn, etc. in your content, malicious redirects to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and lots of other nasty things.

The harsh reality is that brute-force software bots are very likely trying to break into your website or blog at this very moment. Whether they can get in successfully or not, will depend on how difficult or easy you have made things for hackers and botnets to continue persisting until they either find how to get access, or are forced to give up and decide to look for a more vulnerable target.

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

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

Hackertarget - Website Security Scan(WordPress Security Scan Screenshot source: https://hackertarget.com/wordpress-security-scan)

You will see that the scan will yield various results and information about your website setup …

Hackertarget - WordPress Security Check

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

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

Hackertarget - Website Security Scan(Screenshot source: Blog Defender)

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 can all be useful information to hackers, as this informs them about exploitable holes or weaknesses, especially where site owners haven’t updated their files.

If your site or blog runs on WordPress and you are not preventive steps to toughen up your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these attacks are systematically hitting WordPress sites all the world!

Whenever a site gets hacked, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been altered or even that their content has been completely wiped out. Typically, most sites will become infected with malicious software or viruses without the owner even being aware that a breach has taken place.

To help avoid the heartache and aggravation (and potential loss of valuable business data) that comes with discovering that your website has been hacked into, below are ten essential and effective security checks that will help to prevent your WordPress site from being brute-force attacked.

Important

Note: Some of the measures listed below require some technical skills to modify core WordPress or server files. If you have no technical 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 Hosting Company

Contact your webhosting company and ask them exactly what precautions have been put in place to help prevent your site from brute force attacks, and what is done to make sure that your server files and data get backed up.

Make sure that your hosting service is backing up your sites and that, if anything happens, you can quickly and easily get back your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Maintained

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

A proper WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WordPress website completely backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP site backed up and up-to-date is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP site regularly backed up and up-to-date. 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 do not want to learn how to do WordPress maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the next most important thing you must do after making sure that you still have a pulse!

If you don’t want to back up your files manually, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate & Protect Your WordPress Web Sites With Backup Creator WP Plugin

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

The mass brute force attack on WordPress sites was mostly attempting to compromise site admin panels by exploiting WordPress sites with “admin” as the username.

For security purposes, never set up 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 it immediately.

For a simple step-by-step tutorial on how to change your username, go here: Changing Your WordPress User Name From Admin To A More Secure User Name

Security Measure #4 – Choose Strong 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 login combination that will unlock your website.

Unless some measure is put into place to prevent the brute force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually “cracks” the code.

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

Useful Tip

You can use a password program like Roboform to help you generate unbreakable passwords …

You can use a password management program like Roboform to create  passwords(Roboform is a password management tool you can use to help you generate different strong login passwords)

For a step-by-step tutorial for WordPress users on how to change your login password, go here: Changing Passwords

Security Measure #5 – Protect 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 options for WordPress.

WP Config file

(wp-config.php)

If a hacker breaks into your WordPress website, they will typically look for your 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.

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

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

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

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

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your site to view and change your WordPress theme template files, or create mayhem on your site.

To prevent 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 Your Site’s Uploads Directory

The “uploads” folder stores all the media that gets uploaded to your site.

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

(WordPress uploads directory)

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

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, anyone could 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, uploading 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 hire a professional if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are a number of WordPress security plugins available that specifically address common security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital information about your site, protecting your site from malicious software, preventing injections of code into files, 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 files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress complete security software solution

(SecureScanPro – total security software for WordPress)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Solution

Blog Defender(Blog Defender Security Plugin For WordPress Blogs)

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

BlogDefender shows you where potential security weaknesses in your WordPress site are …

Blog Defender WordPress Security SuiteAnd then shows you how to fix these quickly and easily …

Blog Defender Security Plugin For WordPress Web SitesIf you don’t want to purchase a premium 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 web platform, but neglecting basic maintenance tasks like ensuring that your WP software, WordPress plugins and WordPress themes are kept up-to-date, tightening file and data security and taking other necessary precautions can expose your site to attacks 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 cannot ignore the importance of web security.

As a final reminder of the importance of website security, below is the advice given by a web security expert to all WordPress users after the mass 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 of the utmost importance if you run a WordPress site. Hopefully, the information in this article 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 professional WordPress technical provider in our WordPress Services Directory.

Also, please remember to subscribe to WPCompendium.org to be notified whenever we publish new tutorials on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com

***