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 SecurityPowering millions of websites worldwide makes WordPress an obvious target for hacking.

In early 2013 a mass brute-force attack hit WordPress installations on almost every host server in existence.

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

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)

One of the many ways hackers use to try and break into WordPress sites is by trying to guess the site admin’s login username and password. This is achieved with software programs and scripts that automatically tries to guess hundreds of login permutations in minutes.

If you’re not using strong usernames or unguessable passwords, your website can be an easy target for hacking attempts.

This is called a “brute-force” attack.

What Is A Botnet?

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 compromised and infected with malicious code or software, which are then controlled remotely as a group, typically without the computer owners’ knowledge.

Botnets are normally used used to blast out mass spam emails.

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

(The Zeus botnet has been actively compromising computer networks all around the world since 2009. Image source: SecureList.com)

The botnet attacks are 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 administration areas. The attack continued after this, with over 30,000 WordPress blogs being hacked per day.

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

WordPress is the world's most popular CMS making it a natural target for attempted hacking attacks

(Being the world’s most used content management system makes WordPress a target for hacking)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

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

Important

It’s important to note 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 attacking sites built using platforms 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)

Protecting Your WordPress Website From Brute-Force Attacks – 10 Security Measures

Every blog with a security vulnerability presents an opportunity to hackers. No web site Corporate sites, personal blogs, government websites … even web sites owned by online security and anti-hacking experts can and have been targeted.

If hackers can exploit a vulnerability, the site can then be used as a “bot” in a planned cyber attack against larger and more valuable web sites.

Additional undesirable consequences of being hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like online meds, cheap offers on brand names, etc. inserted in your content and page title and descriptions, malicious redirects to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasties.

The truth is that malicious bots are probably looking for exploits and trying to break into your blog at this very moment. Whether they will get into your site or not, will depend on how difficult or easy you can make it for hackers to continue persisting until they can discover a way to get access, or give up and decide to look for a less secure target.

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

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

Hackertarget - WordPress Security Scan(WordPress Security Scan Screenshot: https://hackertarget.com/wordpress-security-scan)

You will see that the scan returns a number of results and information about your website …

WP Security Check

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

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

Hackertarget - WP Security Check(Image source: Blog Defender)

The ability 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 can all be valuable information to hackers, as this can inform them about any vulnerabilities, especially in older versions.

If your site or blog is powered by WordPress and you’re not preventive steps to bullet-proof your site, we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress installations worldwide!

When a website or blog is broken into, webmasters 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, most compromised sites will be infected with malicious software without the owner’s knowledge or awareness.

To avoid the heartache of having your website being hacked into, below are ten essential and effective security measures that will help to prevent your WordPress site from brute force botnet attacks.

Note

Note: Some of the recommended measures listed below need some technical understanding of how to modify core WordPress or server files. If you have no web editing skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Host

Get in touch with your host and ask them exactly what measures they have put into place to help prevent your site from being attacked, and what they do to make sure that your files and data get backed up.

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

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

Never rely on your web host for your site backups. Instead, learn how to maintain your WordPress site or get this service done for you and maintain a habit of performing a full WordPress site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WordPress web site frequently backed up and up-to-date. 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 it gets done. Backing up your website is the next most important thing you must do after making sure that you are still breathing!

If you don’t want to back up your files manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate And Keep Your WordPress Websites And Blogs Protected With Backup Creator Plugin For WP

Security Measure #3 – Do Not Use “Admin” As The Admin Username

The brute force botnet attack on WordPress is mostly attempting to compromise site admin panels and gain access to the site by exploiting WP installations that used “admin” as the user name.

For security reasons, avoid setting up WordPress sites with the username admin. This is the first area hackers will test. If your site’s username is admin, then change this immediately.

We have created a detailed step-by-step tutorial created especially for non-technical WordPress users on how to change your username here: How To Change Your WP 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 tries to guess the right combination of password and username characters that will give the hacker entry to your website.

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

Passwords that are easy to guess, therefore, are really easy targets for botnets. Make sure that you change your password to a string that is at least eight characters long, with both upper and lowercase letters, combined with “special” characters (^%$#&@*).

Practical Tip

Roboform is a password program that lets you generate different unbreakable passwords …

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

We have created a simple tutorial on how to change your WordPress admin password here: What To Do If You Need To Change Your Password

Security Measure #5 – Prevent Your wp-config.php File From Being Easily Found

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.

WordPress WP Config file

(wp-config.php file)

If hackers break into your WordPress website, they will search for the wp-config.php file, because this is the file that contains your WordPress 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must prevent people from being able to easily find 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 Installation Files

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

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

Security Measure #7 – Upgrade Your WordPress Software, Plugins & Themes

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

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

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

The WordPress theme editor feature allows anyone accessing your blog’s admin area to view and modify all of your theme template files, and create mayhem on your site.

If you want to prevent people from accessing the 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 – Secure The Site’s Uploads Folder

The “uploads” directory contains 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 all of the contents in your “uploads” directory is visit the directory using their browser …

(WordPress uploads folder)

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, anyone can upload unauthorized file types to your site.

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 named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

Some great WordPress security plugins are available that specifically address most common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your website from botnets, preventing injections of code into files, etc.

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

SecureScanPro - security software solution for WordPress

(SecureScanPro – WordPress complete 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 Security Suite For WordPress

Blog Defender Security Suite For WordPress Blogs(Blog Defender Security Suite For WordPress Websites)

This product is a suite of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender scans you WordPress installation for security weaknesses …

Blog Defender Security Product Suite For WordPress BlogsAnd then shows you how to easily fix these …

Blog Defender WordPress Security Product SuiteIf you don’t want to buy 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 secure platform, but neglecting essential maintenance tasks like keeping your WP installation, 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.

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 web security.

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 mass brute-force attacks 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 has provided you with the initial steps you need to take to prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email whenever we publish new articles and tutorials on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"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

***