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 SecurityWhen you are the leading content management system in the world and the online publishing platform of choice for millions of websites and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will become an easy target for attacks from hackers.

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

These attacks were caused by botnets (computer networks infected with malware and programmed to attack other vulnerable installations).

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

Brute-Force Attacks – Definition

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 a WordPress site is by trying to guess the site admin’s login username and password. This can be achieved with software programs that can guess hundreds of possible logins in minutes.

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

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

”Botnets” are networks of computers that have been compromised and infected with malicious code, 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 from computers of compromised user accounts.

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 infecting computer networks all around the globe since 2009 called “Zeus” …

ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009.

(ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009. Source: SecureList.com)

These ongoing 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 user administration areas. The large-scale attacks continued after this, with over 30,000 WordPress blogs being hacked every day.

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

WordPress often is targeted by hackers, due to its global popularity

(Powering millions of sites around the world makes WordPress a target for hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are many great reasons why you should choose WordPress if you are concerned about website security.

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

Important Info

It’s important to understand that, in the case of the brute-force botnet attack described above, there was no WordPress vulnerability 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)

How To Prevent Your WordPress Site From Being Brute-Force Attacked – 10 Security Measures

Every site with a security vulnerability can be seen as a potential opportunity to hackers. A vulnerable website offers malicious users with a resource for launching DDoS attacks, spreading malware and as a source of information theft.

If hackers can exploit a weakness in your web security and gain remote control of your blog, your website can then be used as a “bot” in a planned cyber attack against larger and more highly-valued websites.

Additional undesirable effects of having your website hacked include getting blacklisted by Google, having stealthy spam links advertising things like viagra, cheap offers on brand names, etc. in your content, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The truth is that malicious bots are probably trying to hack into your website or blog right now. Whether they will be successful depends on how difficult or easy you can make things for hackers to continue persisting until they can discover a way to break in, or are forced to decide to look for an easier target.

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

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

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

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

Hackertarget - WP Security Scan

(WP security scan results. Source: Hackertarget.com)

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

Hackertarget - WP Security Scan(Source: 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 can all be potentially useful information to hackers, as these can inform them about any holes or weaknesses, especially where the owners haven’t updated their sites.

If your website is powered by WordPress and you’re not proactive 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 installations around the world!

When a website or blog is hacked, site 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 entirely wiped out. Typically, most compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation (and potential financial loss) of having your website being hacked into, we have listed below 10 essential and effective security checks that will help to prevent your WordPress site from being brute force attacked.

Disclaimer

Note: Some of the measures listed below need some technical understanding of how to modify core WordPress or server files. If you have no technical skills, 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 – Get In Touch With Your Hosting Company

Get in touch with your web host and ask them exactly what measures they have put into place to protect your site from being attacked, and what is done to ensure that your site files get regularly backed up.

It’s important to make sure that your hosting service backs up your sites and that, if anything happens, you can easily get back your site.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Or Blog Frequently Up-To-Date

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

A proper WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WP installation fully backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site fully backed up and up-to-date is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP website or blog regularly backed up and updated. WordPress site maintenance is not hard to do 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 someone to do it but make sure this gets done. Backing up your site 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 automate your backup process here: Back Up, Clone And Keep Your WordPress Sites Protected With Backup Creator Plugin For WP

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

The mass brute-force botnet attack on WordPress is mostly an attempt to compromise site admin panels by exploiting WP installations with “admin” as the username.

For reasons of website security, never install a WordPress site with the username admin. This is the first area hackers will test. If your blog’s username is admin, change it immediately.

For a simple tutorial created especially for admin users on how to change your admin username, go here: Changing Your WordPress Username From Admin To Another User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right username and password character string that will give them entry to your website.

Unless some measure is put into place to block the brute force attack (see further below for a couple of effective ways to do this), the “bot” will just keep attacking your site until it eventually “cracks” the code.

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

Practical Tip

You can use a password management program like Roboform to generate hard-to-guess passwords …

You can use a password management tool like Roboform to create difficult passwords(Roboform is a password software that lets you create different strong login passwords)

We have created a detailed step-by-step tutorial on how to change your admin password here: How To Reset The Login Password

Security Measure #5 – Secure Your WP Config 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 a hacker breaks into your website, they will normally try to access 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 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, prevent people from being able to easily get 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 Website Installation Files

Delete or rename the install.php, upgrade.php and readme.html files from your server.

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

Security Measure #7 – Upgrade Your WordPress Files, Plugins & Themes To Their Latest Version

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

Ensure that all of your software 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 allows administrators to edit plugin and theme files inside the dashboard.

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

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed using the WP admin menu)

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

To prevent people from accessing your 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 – Protect The WordPress Uploads Folder

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

Normally, this folder is visible to all users online. All a person needs to do to view all of the contents in your site’s “uploads” folder is visit 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 weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could seriously threaten the security of 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 get professional assistance if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

There are a number of great security plugins for WordPress available that specifically address most common security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from brute-force attacks, 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 irreparable damage to your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – total security software for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of addressing most of the security issues that WordPress users need to address.

Another great security plugin you may want to look at using is BlogDefender.

Blog Defender Security Plugin For WordPress

Blog Defender(Blog Defender WordPress Security Solution)

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

BlogDefender shows you where the security holes in your WordPress site are …

Blog Defender Security Solution For WordPress SitesAnd then shows you how to easily fix these …

Blog Defender Security SuiteIf you don’t want to buy a premium 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 making sure that your WP installation, plugins and WP themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

No matter what kind 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 afford to ignore.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users after the worldwide 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 of the utmost importance if you run a WordPress site. Hopefully, the above article has given you 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 consult a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified whenever we publish new articles and tutorials on WordPress security and reviews of new WordPress security plugins and solutions.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***