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 SecurityBeing the world’s most popular CMS makes WordPress an obvious target for attempted attacks by malicious users.

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

These attacks were caused by botnets (computer networks 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)

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 tools that automatically tries to guess hundreds of login combinations in minutes.

If you’re using obvious usernames and passwords that are easy to guess, your site can be an easy target for hackers.

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 computers that have been infected with malicious software, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is taking place.

Botnets are regularly used to blast out mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …

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

(ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009. Screenshot image: SecureList.com)

These were highly distributed and well organized botnet attacks on WordPress. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The mass brute force attacks then continued, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress powers millions of websites and blogs around the world, which makes it a natural target for hacking attempts

(Being the world’s most popular content management system makes WordPress a target for hacking attempts)

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

No. In fact, there are many great reasons why you should choose WordPress if you are concerned at all about the security of your online business.

To understand why WordPress is a secure platform for websites, see this article: Why WordPress Is A Secure Platform For Websites –

Info

It’s important to note that, in the case of April 2013 worldwide brute force botnet attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using 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)

How To Protect Your WordPress Website From Being Brute Force Attacked – Ten Security Points

You may think that your website or blog is of no interest to hackers, but the reality is that to a hacker, every website provides an opportunity to profit or benefit at your expense.

If a hacker can find a way to break in and control your web site, the website can then be used to target larger and more valued web sites.

Additional undesirable results of having your site hacked and your site security compromised include being blacklisted by Google, having stealthy spam links promoting things like viagra, cheap offers on brand names, etc. in your content, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.

The reality is that hackers are probably trying to break into your blog at this very moment. Whether they can hack into your site depends on how hard or easy you can make it for them to continue persisting until they find how to get in, or are forced to give up and go look for a less protected target.

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

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

Hackertarget - WordPress Security Check(Hackertarget – Website Security Scan Source: https://hackertarget.com/wordpress-security-scan)

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

WordPress Security Check

(WP security scan results. Product image source: Hackertarget.com)

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

Hackertarget - Website Security Scan(Source: BlogDefender.com)

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

If your website is driven by WordPress and you are not preventive steps to harden 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 sites all the world!

When a website gets broken into, blog owners will find themselves “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 compromised sites will become infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation (and significant loss of valuable business data) that comes with 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 being brute-force attacked.

Warning

Note: A few of the measures listed below require some technical understanding of how to modify core WordPress and/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 WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Webhosting Service Provider

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

It is important to make sure that your webhosting provider backs up your server files and that, if anything should happen, you can quickly and easily get your files back.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Frequently Up-To-Date

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

A full 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 WP software, plugins and themes are up-to-date,
  • etc …

A complete WP maintenance routine looks like this …

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

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

If you don’t want to perform manual backups, there are a number of plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Duplicate & Protect Your WP Websites With Backup Creator WordPress Plugin

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

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

For reasons of website security, avoid setting 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, you will should change this immediately.

For a detailed step-by-step tutorial for WordPress admin users on how to change your WordPress admin username, go here: Changing Your Admin User Name In WordPress To A More Secure User Name

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when malicious software persistently tries to guess the right username and password character string that will unlock your website.

Unless you put some measure in place to block the brute force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just continue attacking your site until it eventually gets access.

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

Useful Tip

Roboform is a password management software you can use to help you generate strong login passwords …

You can use a password management program like Roboform to generate strong passwords(You can use a password management software tool like Roboform to create strong passwords)

We have created a simple tutorial on how to change your login password here: How To Change Passwords

Security Measure #5 – Prevent Access To Your wp-config.php File

The wp-config.php file contains important information about your website’s database and is used to define advanced WordPress options.

wp-config.php

(wp-config.php file)

If a hacker breaks into your site, they will typically try to access the wp-config.php file, because this file contains your WordPress database details, 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 being attacked and even being used as part of a bot net, therefore, prevent your wp-config.php file from being accessible. 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 WordPress Installation Files

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

These files are completely unnecessary after installation and can be deleted. If you don’t want to remove these files, then just rename them.

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

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

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

Security Measure #8 – Disable The Theme Editor

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

You can access your WordPress Theme Editor by selecting Appearance > Editor in your dashboard menu …

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the main menu)

This allows anyone accessing your blog’s admin to view and modify your theme template files, or create mayhem on your site.

To prevent people from accessing 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 The WordPress Uploads Folder

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

By default, this folder is visible to anyone online. All a person needs to do to view the contents in the “uploads” folder is navigate to your 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 or malicious users, someone 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, adding a blank index.php file (this is literally an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

There are some great security plugins for WordPress available that will address most common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your website from malicious scripts, preventing injections of code into files, etc.

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

SecureScanPro - WP complete security plugin

(SecureScanPro – WP complete security software solution)

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 security plugin you may want to consider using is BlogDefender.

Blog Defender Security Suite

Blog Defender(Blog Defender WordPress Security Product Suite)

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

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

Blog Defender WordPress Security PluginAnd lets you fix these quickly, easily and inexpensively …

Blog Defender 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 essential maintenance tasks like updating your WordPress software, WP plugins and themes, tightening file and data security and taking other necessary precautions can expose your website to malicious by hackers and bots.

Regardless of the 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 web security.

As one last reminder of the importance of website security, below is the advice given by an expert on website security to all WordPress users following the worldwide 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, website security is very important if you run a WordPress site. Hopefully, the information in this article has given you the initial guidelines and direction you need to prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

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

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***