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 SecurityBeing the world’s most used content management system makes WordPress an easy target for hacking attacks.

In 2013 a worldwide brute force attack began hitting WordPress installations on virtually every web host in existence around the world.

These attacks were caused by computers infected with malware and programmed to attack other vulnerable installations (called “botnets”).

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

About 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. This is done using software programs and scripts that automatically tries to guess hundreds of possible login combinations in minutes.

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

This is called a “brute-force” login 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.org)

”Botnets” are networks of computers that have been infected with malicious code or software, which are then controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

Botnets are often used to send out mass spam emails from the infected computers of compromised user accounts.

Below is a screenshot 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 world since 2009 called “Zeus” …

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 globe since 2009. Screenshot: SecureList.com)

These ongoing botnet attacks on WordPress were highly distributed and well organized. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when millions of attempts to force their way into WordPress users admin areas took place. The attacks then continued, with over 30,000 WordPress blogs being hacked per day.

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

WordPress powers millions of sites around the world, making it a frequent target for attempted attacks by hackers

(WordPress often is targeted 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 use WordPress if you are concerned about website security.

To understand what makes WordPress a very secure platform for websites, read this article: How Secure Is WordPress?

Important Info

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

Mike Little, one of the co-founders 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)

Protecting Your WordPress Site From Brute Force Attacks – 10 Security Points

Every web site with a security vulnerability offers some value to hackers. A compromised website presents malicious users with a platform for denial of service attacks, spreading malware and as a source of information theft.

If someone can discover a flaw in your security, the website or blog can then be employed as a “bot” in a planned cyberattack against other valuable websites.

Additional undesirable consequences of having your website hacked include getting blacklisted by search engines, having stealthy spam links advertising things like viagra, cheap offers on brand names, etc. inserted in your content and meta data, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasties.

The truth is that software-driven bots are most likely scouring for security exploits and trying to break into your site as you are reading this at this very moment. Whether they can get into your site successfully depends on how challenging you can make things for them to keep trying until they discover how to get in, or are forced to decide to look for a more vulnerable target.

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

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

WordPress Security Scan(Website Security Scan Product image source: Hackertarget.com)

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

Hackertarget - WordPress Security Scan

(website security check 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 about your WordPress site, then so can hackers.

Hackertarget - WordPress Security Scan(Screenshot image: BlogDefender.com)

Being able to see which 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 in your site are all potentially useful information to hackers, as this informs them about any potential holes or weaknesses, especially in older versions.

If your site or blog runs on WordPress and you are not precautionary steps to bullet-proof your site, then we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress sites worldwide!

Typically, whenever a site gets broken into, website owners will find themselves “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Often, compromised sites will become infected with malicious scripts without the owner even being aware of it.

To avoid the heartache and aggravation (and significant loss of valuable business data) of having your web site being hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute force botnets.

Disclaimer

Note: A few of the steps below need some technical understanding of how to modify core WordPress and server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or search for a professional WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Webhosting Provider

Get in touch with your hosting provider and ask them what security measures have been put into place to help prevent your site from being attacked, and what is done to make sure that your server files are being backed up.

It’s important to check that your host is backing up your server files and that, if anything goes wrong, you can 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 on your host for your site backups. Instead, learn how to maintain and manage your WordPress site or get this done for you and maintain a habit of performing a complete site maintenance routine frequently (e.g. weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

Maintaining your WordPress installation regularly backed up and updated is vitally important for WordPress security.(Maintaining your WordPress site frequently backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP web site frequently backed up and up-to-date 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 do not want to learn how to do WP maintenance yourself, pay a professional 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 are still breathing!

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: Back Up, Copy & Keep Your WP Web 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 sites was mostly an attempt to compromise website administrator panels by exploiting installations using “admin” as the username.

For reasons of website security, avoid installing sites with the username “admin”. This is the first area hackers will test. If your blog’s user name is “admin”, you will should change this immediately.

For a simple tutorial on how to change your WordPress username, go here: Changing Your WordPress User Name From Admin To A Different User Name

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when a malicious script continually and persistently hits a login or password field with different character strings trying to guess the right login combination that will unlock your site.

Unless you put some measure in place to block the brute-force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, make very easy targets for hacking attacks. Make sure that you change your password combination to something containing at least eight or nine characters long, with both upper and lowercase letters, and “special” characters (^%$#&@*).

Tip

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

Roboform is a password management software that lets you generate really secure passwords(Roboform is a password tool that lets you generate different strong passwords)

For a simple tutorial created especially for WP admin users that shows you how to change your login password, go here: What To Do If You Need To Change Passwords In WordPress

Security Measure #5 – Protect Your 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 file

(wp-config.php file)

If a hacker breaks into your website, they will search for your wp-config.php file, because this file contains your database information, 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.

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 – Rename Or Delete Unnecessary Site Installation Files

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

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

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

Hackers look for vulnerabilities they can exploit in previous versions of WordPress, including out-of-date versions of plugins and themes.

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor via the WordPress main menu)

The WordPress theme editor allows anyone accessing your blog’s admin area to view and edit your files, and cause havoc on your site.

To prevent unauthorized 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 – Secure The Site’s Uploads Directory

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

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

(WordPress uploads directory)

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, anyone can upload unauthorized file types to 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, 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 seek professional help if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

A number of WordPress security plugins are available that will address common security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your website from malicious scripts, 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 files and causing damage to your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – complete security software for WordPress)

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

Another security plugin you may want to consider using is BlogDefender.

Blog Defender

Blog Defender(Blog Defender WordPress Security Plugin)

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

BlogDefender scans you web site for security weaknesses …

Blog Defender Security Product Suite For WordPress BlogsAnd lets you quickly and easily fix these …

Blog DefenderIf you don’t want to buy a 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 software, plugins and WordPress themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can expose your website 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, website security is something you simply cannot ignore.

As a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on website security to all WordPress users after the global brute-force attacks by botnets 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 very important if you run a WordPress site. Hopefully, this article has shown you what to do to 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 professional WordPress technical provider in our WordPress Services Directory.

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

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***