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 frequently the target of malicious attacks by hackers, due to its popularity.

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

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

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 methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site admin’s login username and password. To attempt this, hackers use scripts and tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re using predictable usernames and passwords, your website can be an easy target for hacking attempts.

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)

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

Botnets are typically used to blast mass spam emails.

The screenshot below was taken from an internet 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 …

The Zeus botnet 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. Source: SecureList.com)

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

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

WordPress is the world's most used content management system which makes it a natural target for attempted attacks by hackers

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

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain what makes WordPress a very secure platform for websites in this article: Can You Build A Secure Business Online Using WordPress?

Important

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made the following 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 Website From Being Brute-Force Attacked – Ten Security Points

Every site with a vulnerability can can provide an opportunity to hackers. An unsecured website or blog presents hackers with a valuable resource for denial of service attacks, spreading malware and as a source of information theft.

If someone can discover a software weakness in your security that allows them to gain remote access and control of your site, that blog can then be used as a “bot” to attack other valued web sites.

Additional undesirable effects of being hacked include being blacklisted by Google, having spammy links advertising things like viagra, discounted fashion, etc. in your content and page title and descriptions, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasty things.

The truth is that brute-force software bots are probably scouring for exploits and trying to hack into your website or blog at this very moment. Whether they can be successful will depend on how hard or easy you can make things for them to keep trying until they work out how to get in, or give up and decide to look for a less secure target.

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

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

Website Security Scan(WordPress Security Check Screenshot source: Hackertarget.com)

You will see that the test returns various results and information about your website …

Hackertarget - Website Security Scan

(Hackertarget – WordPress security scan results. Product image: Hackertarget.com)

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

Hackertarget - WP Security Scan(Image source: BlogDefender.com)

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 are all useful information to hackers, as this informs them about any vulnerabilities, especially in older versions.

If your website is driven by WordPress and you are not taking appropriate steps to bolster the security of your site, then we can practically guarantee that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these attacks are systematically hitting WordPress installations around the world!

Typically, whenever a website is hacked, blog owners will find themselves “locked out” of their own site, or notice that their content has been vandalized or that everything has been entirely wiped out. Typically, compromised sites will become infected with malicious software without the owner even being aware that a security breach has happened.

To avoid the heartache and frustration of having your web site being hacked into, below are ten essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.

Important Info

Note: Some of the steps below require some technical skills to modify core WordPress and/or server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or search for a professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Get in touch with your hosting service provider and ask them what security systems are in place to help prevent your site from being attacked, and what is done to ensure that your files and data get regularly backed up.

Check that your webhosting provider is regularly backing up your server files and that, if disaster strikes, you can easily get back your files.

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

Never rely on your hosting 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 performing a complete WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress web site regularly backed up and updated is. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WordPress site maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your website is the second most important thing you must do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are a number of plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate And Keep Your WP Sites Protected With Backup Creator WP Plugin

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

The large scale brute-force botnet attack on WordPress is mostly an attempt to compromise website administrator panels and gain access to the site by exploiting WP sites using “admin” as their account name.

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

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

Security Measure #4 – Your Password

A “brute force” attack occurs when a malicious script persistently tries to guess the right combination of characters in a username and password 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 suggestions for doing this), the “bot” will just persist in attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, are very easy targets for bot attacks. Make sure that you change your password to something that contains at least 8 or 9 characters long, with both upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Tip

You can use a password tool like Roboform to help you generate difficult passwords …

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

We have created a simple step-by-step tutorial created especially for WordPress users that shows you how to change your password here: What To Do If You Need To Reset Your Password

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

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

wp-config.php file

(WordPress WP Config file)

If a hacker breaks into your WordPress website, they will search for your wp-config.php file, because this is the file that contains your WordPress database details, security keys, etc. Getting access to this information would allow a hacker 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 your wp-config.php file from being accessed. 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.

These files are not required after installation. If you don’t want to delete these files, then just rename them.

Security Measure #7 – Update Your WordPress Blog, Plugins & Themes To Their Latest Version

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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 using the WP main menu)

This means that anyone logging into your blog’s admin can view and modify your theme templates, and cause havoc on your site.

If you want 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 The WordPress Uploads Directory

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

By default, this folder is visible to anyone online. All a person needs to do to view the contents stored in your “uploads” folder is visit your directory using their browser …

(WordPress has an uploads directory where media content is stored)

(WordPress has an uploads folder where media content is stored)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could become a serious threat to the security of your site.

Protecting your directories will prevent online users from accessing 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 ask help from someone with experience if you are unsure about what to do.

Security Measure #10 – Security Plugins

There are a number of WordPress security plugins available that will address most security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your files from botnets, preventing unauthorized file uploads, etc.

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

SecureScanPro - total security plugin for WordPress

(SecureScanPro – WP total security plugin)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender Security Plugin

Blog Defender(Blog Defender Security Solution For WordPress Sites)

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 the security holes in your WordPress installation are …

Blog Defender Security SuiteAnd lets you easily fix these …

Blog Defender WordPress Security PluginIf you don’t want to purchase a 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 very secure platform, but neglecting simple maintenance tasks like updating your WordPress installation, plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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 a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users after the mass 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 of the utmost importance if you run a WordPress site. Hopefully, the information in this article has provided you with the initial guidelines and direction you need 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 WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

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

***

"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

***