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 leading CMS platform in the world and the online publishing platform of choice for millions of businesses and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers.

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

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

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

Brute-Force Attacks

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 WordPress sites. One of these is by trying to guess the site admin’s login username and password. This can be achieved using scripts and software that can guess hundreds of login permutations in minutes.

If you’re using weak usernames and passwords, your site can be an easy target for hackers.

This is called a “brute force” attack.

What Are Botnets

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 computers that have been infected with malicious code or software, which can then be controlled remotely as a group, often without the computer owners’ knowledge or awareness.

Botnets are often used to blast out mass spam emails from the infected computers of unsuspecting users.

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

ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009.

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

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

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

WordPress often is targeted by hackers, due to its global popularity

(WordPress is often the target of attacks by hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of very good reasons why you should continue using WordPress if you are concerned at all about the security of your web presence.

We explain what makes WordPress a very secure web platform in this article: Are Open Source Platforms Like WordPress Secure?

Important Info

It’s important to understand that, in the case of the worldwide brute-force 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, 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 Checks

Every blog with a vulnerability provides some degree of opportunity to hackers. A compromised website or blog not only presents hackers opportunities to improve their hacking skills and claim “bragging rights” from their peers, but it can also be a resource for launching denial of service attacks, distributing malware and information theft.

If someone can break in and take over your site, the website can then be employed as a “bot” in a planned cyberattack against other valuable web sites.

Additional undesirable effects of having your site hacked include getting blacklisted by Google, having stealthy spam links advertising things like viagra, cheap offers on brand names, etc. in your content and page title and descriptions, 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 nasties.

The truth is that brute-force software bots are scouring for exploits and trying to break into your website or blog while you are reading this page at this very moment. Whether they can be successful depends on how challenging you will make things for hackers to keep trying until they can either work out a way to get in, or are forced to give up and go look for a less secure target.

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

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

WordPress Security Scan(WordPress Security Check Product image: https://hackertarget.com/wordpress-security-scan)

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

WordPress Security Check

(Hackertarget – website security scan results. Image source: Hackertarget.com)

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

Hackertarget - WP Security Scan(Product image source: BlogDefender website)

The ability to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories on your server can all be useful information to hackers, as this can inform them about potential security vulnerabilities, especially in older versions.

If your website is powered by WordPress and you are not taking appropriate steps to bullet-proof your site, we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these brute-force attacks are systematically hitting WordPress sites all the world!

When a website or blog is compromised, 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, sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache that comes with having your website or blog being hacked into, we have listed below 10 simple, yet essential and effective security checks that will help to protect your WordPress site from being attacked by brute force botnets.

Useful Info

Note: A few of the recommended measures listed below need some technical skills to modify core WordPress or server files. If you lack these technical skills, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Contact your host and ask them exactly what measures are in place to help prevent your site from being attacked, and what they do to make sure that your WordPress sites get backed up.

It’s important to check that your hosting company backs up your sites and that, if disaster strikes, you can easily recover your files.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Site Frequently Up-To-Date

You should never rely just on your web host for your site backups. Instead, learn how to manage your WordPress site or get this service done for you and develop a habit of performing a full site maintenance routine on a frequent basis (e.g. weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A proper WP maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress website or blog fully backed up and up-to-date is. 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, pay someone to do it but make sure this 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 plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Clone & Keep Your WordPress Sites Protected With Backup Creator WP Plugin

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

the worldwide brute force botnet attack on WordPress is mostly attempting to compromise website administrator panels and gain access to sites by exploiting WordPress sites using “admin” as the user name.

For reasons of website security, avoid setting up sites with the username admin. This is the first thing hackers will test. If your blog’s username is admin, change this immediately.

For a simple step-by-step tutorial on how to change your WordPress username, go here: Changing Your Admin Username In WordPress

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right combination of password and username characters that will unlock your site.

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

Weak passwords, therefore, become really easy targets for hacking attacks. Make sure that you change your password combination to something containing at least 8 characters long, with both upper and lowercase letters, and add a few “special” characters (e.g. %, $, &, etc).

Tip

You can use a password management software tool like Roboform to create very secure passwords …

You can use a password program like Roboform to generate secure passwords(Roboform is a password tool you can use to help you generate very secure passwords)

For a tutorial for WordPress users that shows you how to change your login password, go here: How To Reset Your Password

Security Measure #5 – Secure Your WP Config File

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

WordPress WP Config file

(wp-config.php file)

If a hacker breaks into your website, they will try to access the wp-config.php file, because this is the file that 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.

In order 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 easily 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

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

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

Security Measure #7 – Keep Your WordPress Blog, Plugins & Themes Up-To-Date

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

Make sure to always keep all of your software files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable Your Theme Editor

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

You can access the WordPress Theme Editor by selecting Appearance > Editor in the main menu …

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the admin menu)

The WordPress theme editor allows anyone accessing your site to see and edit your WordPress theme templates, and cause 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 adding code to your wp-config.php file.

Security Measure #9 – Protect The WordPress Uploads Directory

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

By default, this folder is visible to online users. All a person needs to do to see all of the contents in your “uploads” directory is navigate to your directory using their browser …

(WordPress uploads folder)

(WordPress uploads folder)

If any directories in your website have vulnerabilities that can be exploited by hackers, this can threaten the security of your site.

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 not sure about what to do.

Security Measure #10 – WordPress Security Plugins

There are some great security plugins for WordPress available that will address many common security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your files from brute-force attacks, preventing unauthorized file uploads, 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 potential issues that could lead to hackers accessing your website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – complete security plugin 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 great security plugin you may want to look at using is BlogDefender.

Blog Defender Security Solution For WordPress Sites

Blog Defender Security Plugin For WordPress(Blog Defender)

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 holes in your website are …

Blog Defender Security Suite For WordPress BlogsAnd then shows you how to fix these quickly, easily and inexpensively …

Blog Defender Security Suite For WordPress BlogsIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, then use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting simple maintenance tasks like keeping your WordPress software, WordPress plugins and themes up-to-date, tightening file and data security and taking other necessary precautions can expose your site to attacks by hackers and bots.

No matter what 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 website security.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a 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 very important if you run a WordPress site. Hopefully, the above information has provided you with the initial steps you need to take to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to be notified via email when we publish new tutorials on WordPress security and tutorials about WordPress security plugins.

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum

***