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 powers millions of sites worldwide, making it a natural target for hacking.

In 2013, WordPress installations around the world were subjected to mass brute-force attacks.

These attacks were caused by infected computer networks programmed to attack other vulnerable sites (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)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site admin’s login username and password. This is done with software tools that can guess hundreds of login possibilities in minutes.

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

This is called a “brute force” attack.

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 private computers that have been infected with malicious code, which can then be controlled remotely as a group, often without the unsuspecting computer owners’ knowledge.

Botnets are often used to send 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 world since 2009.

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

The botnet attacks on WordPress were highly distributed and well organized. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users administration areas. The large-scale attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress powers millions of websites and blogs worldwide, making it a natural target for hacking attempts

(Powering millions of websites and blogs around the world makes WordPress an obvious target for malicious attacks by hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are many good reasons why you should continue using WordPress if you are concerned at all about the security of your online business.

We explain what makes WordPress a very secure platform for websites in this article: Are Open Source Platforms Like WordPress Secure?

Info

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

Mike Little, the co-founder of WordPress, 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 Measures

You may think that the information in your website offers no value to hackers, but the reality is that to a hacker, every website is an opportunity to gain some advantage at your expense.

If a malicious user can exploit a software flaw in your security, that blog can then be employed to attack larger and more valuable websites.

Additional undesirable consequences of having your site hacked include getting blacklisted by Google, having spammy links promoting things like online meds, porn, etc. inserted into your content, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that malicious bots are probably looking for security exploits and trying to break into your website or blog at this very moment. Whether they can hack into your site successfully will depend on how hard or easy you will make things for them to continue trying until they either can discover a way to get access, or give up and decide to look for a less protected target.

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

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

Hackertarget - Website Security Check(Website Security Check Product image source: https://hackertarget.com/wordpress-security-scan)

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

Hackertarget - WP Security Scan

(website security scan results. Screenshot source: 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.

WordPress Security Scan(Screenshot: BlogDefender website)

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

If your site or blog runs on WordPress and you are not taking appropriate steps to bolster the security of your site, then we can practically guarantee that, at some point in time, someone will attempt to hack your website, because these attacks are systematically hitting WordPress installations worldwide!

Typically, when a website or blog gets hacked, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Often, compromised sites will become infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation that comes with having your website being hacked into, we have listed below 10 simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute force hackers.

Disclaimer

Note: A few of the recommended measures below require some technical understanding of how to modify core WordPress and server files. If you have no technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Contact Your Webhosting Provider

Get in touch with your webhosting service and ask them what measures have been put into place to protect your site from being attacked, and what they do to make sure that your site files get backed up.

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

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

Never rely just on your host for site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and maintain a habit of religiously performing a full site maintenance routine frequently (e.g. daily, 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 WordPress software, themes and plugins are up-to-date,
  • etc …

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP installation completely backed up and up-to-date. WP 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 WordPress site maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site 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 data manually, there are a number of free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate And Protect Your WordPress Web Site With Backup Creator Plugin For WP

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

The mass brute-force attack on WordPress sites was mostly an attempt to compromise site admin panels by exploiting WordPress installations using “admin” as their account name.

For security reasons, avoid installing sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your blog’s username is “admin”, then make sure you change it immediately.

We have created a tutorial created especially for non-technical WordPress admin users on how to change your admin username here: Changing Your WordPress Admin Username To A More Secure User Name

Security Measure #4 – Avoid Weak Passwords

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

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

Weak passwords, therefore, become very easy targets for hacking attacks. Make sure that you change your password to a string containing at least eight characters long, and that includes upper and lowercase letters, and “special” characters (e.g. %, $, &, etc).

Practical Tip

Roboform is a password software you can use to help you generate really secure passwords …

You can use a password management tool like Roboform to help you generate difficult passwords(Roboform is a password tool that lets you create really secure passwords)

We have created a step-by-step tutorial that shows you how to change your WordPress password here: How To Reset The Login Password

Security Measure #5 – Prevent The wp-config.php File From Being Easily Accessed

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

WordPress WP Config file

(wp-config.php file)

If hackers break into your WordPress website, they will look for the wp-config.php file, because this is the file that contains important information about your site’s database, 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 your wp-config.php file from being easily 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 remove these files, just rename them.

Security Measure #7 – Keep Your WordPress Software, Plugins & Themes Up-To-Date

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

In WordPress, 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 via the admin menu)

The WordPress theme feature lets anyone accessing your site’s admin view and edit your WP theme template files, and cause havoc on your site.

If you want to prevent people from being able to access 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 – Prevent Access To The WordPress Uploads Directory

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

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

(WordPress uploads folder)

(WordPress has an uploads directory where your media files are stored)

If any directories in your website have vulnerabilities that can be exploited by hackers or malicious users, this could threaten the security of your website.

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 use a professional if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are several security plugins for WordPress available that will 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.

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

SecureScanPro - total security software for WordPress

(SecureScanPro – complete security software solution for WordPress)

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

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

Blog Defender

Blog Defender Security Plugin For WordPress(Blog Defender WordPress Security Solution)

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

BlogDefender shows you where potential security weaknesses in your website are …

Blog Defender Security Solution For WordPressAnd then shows you how to fix these quickly, easily and inexpensively …

Blog DefenderIf you don’t want to purchase 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 making sure that your WordPress software, WP plugins and themes are kept updated to their latest versions, 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, securing your web site 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 web security to all WordPress users after the global 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, WordPress security is very important if you run a WordPress site. Hopefully, this information 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 consult a professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to be notified via email when we publish new tutorials on WordPress security and reviews of new WordPress security plugins.

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***