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.

WP SecurityWordPress is often the target of attacks by hackers, due to its popularity.

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

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

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)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site’s administration login username and password. To attempt this, hackers use software programs that automatically tries to guess hundreds of login combinations in minutes.

If you’re using easy-to-guess user names and passwords, your site can be easily hacked by repeated attempts to work out your site’s login details.

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.org)

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

Botnets are regularly used to send out mass spam emails.

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

ZeuS is 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. Image: SecureList.com)

These were highly distributed and well organized attacks on WordPress sites. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress user admin areas occurred. The worldwide attack then continued, with over 30,000 WordPress sites being hacked each day.

Coverage of the large-scale brute-force botnet attack was widely reported in all 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 website of the US Department of Homeland Security …

WordPress powers millions of websites around the world, making it a natural target for hacker attacks

(WordPress is often the target of attacks by hackers, due to its global popularity)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of good reasons why you should use WordPress if you are concerned at all about the security of your website.

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

Info

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

How To Prevent Your WordPress Website From Brute Force Attacks – 10 Security Checks

You may think that the information in your website or blog has nothing to offer to hackers, but the reality is that all websites are valuable to a malicious user.

If a malicious user can discover a security flaw that allows them to gain remote control of your web site, that blog can then be employed as part of a larger network of “bots” to target other valued sites.

Additional undesirable impacts of having your website hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links promoting things like viagra, porn, etc. inserted into your content and meta data, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasties.

The truth is that malicious bots are probably trying to break into your website right now. Whether they will be successful will depend on how hard or easy you can make it for hackers or botnets to continue trying until they discover how to break in, or decide to look for an easier target.

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

Does your website run on WordPress? If so visit a site like Hackertarget.com and run your site through their WordPress security check …

Hackertarget - WordPress Security Check(Hackertarget – Website Security Check Product image source: https://hackertarget.com/wordpress-security-scan)

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

WP Security Scan

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

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

Website Security Scan(Screenshot: BlogDefender.com)

Being able 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 can be potentially useful information to hackers, as these can inform them about potential security vulnerabilities, especially where the owners haven’t updated their sites.

If your website is powered by WordPress and you are not taking steps to harden your site, then we can practically guarantee that, at some point in time, someone will attempt to hack your website, because these brute-force attacks are systematically targeting WordPress installations worldwide!

Whenever a website or blog gets hacked, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been entirely wiped out. Typically, compromised sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and frustration that comes with discovering that your site has been hacked into, below are 10 simple, yet essential and effective security checks that will help to prevent your WordPress site from being brute force attacked.

Useful Info

Note: A few of the measures shown below require some technical skills 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 help.

***

Security Measure #1 – Contact Your Host

Contact your hosting provider and ask them what security systems are in place to protect your site from being attacked, and what is done to make sure that your files and data get backed up.

Make sure that your web host regularly backs up your sites and that, if anything happens, you can quickly and easily get your files and data back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Frequently Up-To-Date

You should never rely just on your webhosting service provider for your 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 complete WordPress site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

Maintaining your WordPress web site fully backed up and updated is vitally important for WordPress security.(Maintaining your WordPress site regularly backed up and updated is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress site regularly backed up and updated is. 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 don’t 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 second most important thing you should do after making sure that you still have a pulse!

If you don’t want to back up your files manually, there are many free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone And Keep Your WP Sites Protected 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 sites was mostly attempting to compromise site administrator panels and gain access to the site by exploiting installations that used “admin” as the user name.

For security purposes, avoid installing WordPress sites with the username admin. This is the first thing hackers will test. If your site’s user name is “admin”, then change this immediately.

We have created a detailed tutorial created especially for WordPress users on how to change your WordPress username here: How To Change Your Admin Username In WordPress To A Different Username

Security Measure #4 – Make Sure Your Password Is Secure

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

Unless some measure is put into place to prevent the brute-force attack from happening (see further below for a couple of effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually gets access.

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

Practical Tip

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

You can use a password management software tool like Roboform to generate very secure passwords(You can use a password management tool like Roboform to generate secure login passwords)

For a tutorial for non-technical WordPress users on how to change your WordPress password, go here: What To Do If You Need To Change Passwords In WordPress

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

wp-config.php

(wp-config.php file)

If hackers break into your WordPress site, they will search for the wp-config.php file, because this is the file that contains important information about your site’s database, 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, you must prevent people getting to 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 your install.php, upgrade.php and readme.html files.

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 – Keep Your WordPress CMS, Themes & Plugins Up-To-Date

Hackers are always on the lookout for vulnerabilities they can exploit in earlier versions of WordPress, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor is accessible via the WP main menu)

The WordPress theme editor lets anyone accessing your site’s admin area view and make changes to all of your WP theme templates, or create havoc 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 – Prevent Access To Your Site’s Uploads Folder

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

Normally, 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 visit 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, this could become a serious threat to the security of your website.

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 a blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are unsure about what to do.

Security Measure #10 – Use Security Plugins

There are a number of security plugins for WordPress available that specifically address most 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 botnets, preventing injections of code into files, etc.

Many 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 irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress total security plugin

(SecureScanPro – WP security software)

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

Blog Defender Security Suite For WordPress Websites(Blog Defender)

Blog Defender is a suite 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 web site are …

Blog Defender WordPress Security PluginAnd lets you easily fix these …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting simple maintenance tasks like ensuring that your WP installation, WordPress plugins and themes are kept 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 kind 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 securing your sites.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a web security expert to all WordPress users after the global 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, 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 WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email whenever we publish new information on WordPress security and reviews of new WordPress security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***