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

In 2013 a worldwide brute-force attack began hitting WordPress installations across virtually every web host in existence.

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

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

What Are 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’s administration login username and password. This is done using scripts and tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re not using strong usernames or unguessable passwords, your site could be an easy target for hackers.

This is called a “brute force” login attack.

Botnets – What Are They?

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

Botnets are regularly used to blast mass spam emails.

Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe since 2009 called “Zeus” …

ZeuS is a botnet that has been actively compromising 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 were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress users administration areas took place. The attacks continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress powers millions of sites worldwide, making it a frequent target for hacking

(Being the world’s most popular CMS makes WordPress an obvious target for hacker attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain why WordPress is a secure web platform in this article: Is WordPress A Secure Website Platform?

Info

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

Preventing Your WordPress Blog From Being Brute-Force Attacked – 10 Security Checks

You may think that your site has nothing to offer to hackers, but the reality is that every website is valuable to a malicious user.

If a hacker can discover a software flaw in your security that allows them to gain stealth control of your website or blog, the website can then be used as a “bot” to attack larger and more valued websites.

Additional undesirable effects of being hacked and your site security compromised include being blacklisted by Google, having stealthy spam links advertising things like viagra, cheap offers on brand names, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that hackers are probably trying to hack into your site at this very moment. Whether they will be successful will depend on how challenging you will make it for hackers to keep trying until they either can work out how to get access, or decide to look for a less protected target.

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

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

Hackertarget - WP Security Check(WordPress Security Check Screenshot source: Hackertarget.com)

You will see that the check will return a number of results and details about your website …

WP Security Scan

(Hackertarget – WP security scan results. Screenshot image: Hackertarget.com)

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

Hackertarget - Website Security Check(Screenshot source: Blog Defender)

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 in your site can be useful information to hackers, as this informs them about any exploitable security weaknesses, especially in older versions.

If your website is driven by WordPress and you’re not proactive steps to toughen up 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 sites worldwide!

When a site is compromised, webmasters will discover much to their dismay that they have been “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, most sites will be infected with malicious software or viruses without the owner even being aware that this has taken place.

To avoid the heartache and frustration (and potential financial loss) that comes with having your site being hacked into, we have listed below ten simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force botnet hacking attempts.

Note

Note: Some of the measures listed below need some technical skills to modify core WordPress and/or server files. If you are not technical, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Contact Your Host

Get in touch with your host and ask them exactly what measures are in place to help prevent your site from botnet attacks, and what is done to ensure that your WordPress sites are being regularly backed up.

Check that your hosting service provider regularly backs up your sites and that, if anything happens, you can easily get your site back.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Regularly Maintained

Never rely only on your web host for 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 performing a full site maintenance routine on a regular basis (e.g. daily, weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WordPress installation backed up and up-to-date. WordPress maintenance is not hard 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 WP site maintenance yourself, pay someone to do it but make sure this 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 back up your site manually, there are a number of plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Duplicate And Keep Your WordPress Websites Protected With Backup Creator WordPress Plugin

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

the worldwide brute force attack on WordPress is mostly an attempt to compromise website admin panels and gain access to sites by exploiting installations that used “admin” as their user name.

For reasons of website security, never install sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your blog’s username is admin, you should change it immediately.

We have created a detailed step-by-step tutorial that shows you how to change your admin username here: Changing Your Admin User Name In WordPress To A More Secure User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually and persistently hits a login or password field with different strings of characters in an attempt to guess the right combination that will give them access to your site.

Unless you put some measure in 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 keep attacking your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, are very easy targets for brute-force attacks. Make sure that you change your password combination to something that is at least eight or nine characters long, and that includes upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Practical Tip

If you have trouble coming up with strong passwords or feel reluctant to set up different passwords for all of your online logins, then use a password management tool like Roboform …

You can use a password tool like Roboform to generate hard-to-guess passwords(Roboform is a password management tool you can use to generate very secure passwords)

We have created a simple step-by-step tutorial on how to change your WordPress password here: What To Do If You Need To Change Passwords

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

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

wp-config.php file

(wp-config.php file)

If a hacker breaks into your WordPress site, they will search for the wp-config.php file, because this file contains your WordPress 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 from accessing 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 the install.php, upgrade.php and readme.html files from your server.

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

Security Measure #7 – Keep Your WordPress Site, Themes And Plugins Up-To-Date

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

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WP 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 files, or create mayhem on your site.

If you want to prevent people from accessing your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Protect Your WordPress Uploads Directory

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

By default, this folder is visible to all users online. All someone has to do to view the contents stored in your site’s “uploads” folder is navigate to your directory using a web browser …

(WordPress uploads directory)

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

If any files stored in his folder 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 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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to get professional help if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

There are a number of 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 information about your site, protecting your files from botnets, preventing injections of code into files, 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 issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - WordPress total security software

(SecureScanPro – WP total security software)

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

Blog Defender WordPress Security Solution

Blog Defender(Blog Defender Security Plugin For WordPress Websites)

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

BlogDefender scans you WordPress site for potential security weaknesses …

Blog DefenderAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security Plugin For WordPress WebsitesIf 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 secure web platform, but neglecting essential maintenance tasks like ensuring that your WordPress software, plugins and themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your site 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 securing your website or blog.

As one last reminder, below is the advice given by an expert on website security to all WordPress users after the large-scale 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 of the utmost importance if you run a WordPress site. Hopefully, the above article will help prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications via email whenever we publish new information on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

***