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

In 2013 a large-scale brute force attack struck WordPress installations on virtually every WP host server in existence.

These attacks were caused by botnets (infected computer networks programmed to attack other sites).

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 a WordPress site. One of these is by trying to guess the site’s administration login username and password. This is done with scripts and software that automatically tries to guess hundreds of login permutations in minutes.

If you’re not using strong usernames or unguessable passwords, your site can be easily hacked by a malicious software’s persistent attempts to guess your site’s login details.

This is called a “brute-force” login attack.

Botnet – What Is This?

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 infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is going on in their machine.

Botnets are regularly used to send out mass spam emails.

The screenshot below was taken from an online security monitoring site 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 compromising 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)

These were well organized and highly distributed attacks on WordPress. 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 user admin areas took place. The worldwide brute force attacks continued after this, with over 30,000 WordPress blogs being hacked each day.

Coverage of this brute-force botnet attack was reported by all the major webhosting companiesand leading technology media 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 …

Being the world's most used CMS makes WordPress a target for hacking attacks

(WordPress is frequently the target of worldwide malicious attacks by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain why WordPress is a secure platform for websites in this article: Are Open Source Web Platforms Like WordPress Secure?

Useful Info

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

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

Every website with a security vulnerability offers some value to hackers. A compromised site provides malicious users with a platform to launch DDoS attacks, spread malware and use your site to defraud online users.

If a hacker can break in and compromise the control of your blog, your web site can then be used as part of a larger network of “bots” to target larger and more valuable websites.

Additional undesirable impacts of having your website hacked include getting blacklisted by search engines, having spammy links advertising things like gambling, porn, etc. inserted into your content, malicious redirects to phishing sites or other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasty things.

The harsh reality is that software-driven bots are probably trying to break into your site right now. Whether they will do this successfully or not, depends on how hard or easy you can make it for hackers and bots to continue persisting until they work out how to get access, or decide to look for a less secure target.

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

Does your website run on WordPress? If so visit Hackertarget.com and run your site through their WordPress security scan …

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

You will see that the test returns a number of results and details about your website setup …

WordPress Security Scan

(Hackertarget – website security scan results. Product image source: Hackertarget.com)

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

Website Security Check(Product image: BlogDefender.com)

The ability to see which 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 useful information to hackers, as these can inform them about any vulnerabilities, especially in older versions.

If your website is powered by WordPress and you’re not precautionary steps to bullet-proof your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your website, because these attacks are systematically targeting WordPress installations worldwide!

Typically, when a site gets compromised, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been interfered with or that everything has been entirely wiped out. Often, compromised sites will be infected with malicious software without the owner even being aware of it.

To avoid the heartache and aggravation (and significant loss of valuable business data) of discovering that your site has been hacked into, we have listed below 10 simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute force hackers.

Info

Note: A few of the measures below require some technical skills to modify core WordPress and/or 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 service provider for assistance.

***

Security Measure #1 – Contact Your Hosting Service Provider

Contact your webhosting provider and ask them what security precautions have been put into place to help prevent your site from being attacked, and what is done to ensure that your files and data get backed up.

Make sure that your webhosting service regularly backs up your server files and that, if anything happens, you can easily get your site back.

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

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

A full WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WP installation regularly backed up and up-to-date is. WP 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 WP site 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 should do after making sure that you still have a pulse!

If you don’t want to back up your site 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: Backup, Clone And Keep Your WP Websites Protected With Backup Creator WP Plugin

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

the worldwide brute force botnet attack on WordPress sites was mostly an attempt to compromise website admin panels and gain access to the site by exploiting WordPress sites with “admin” as their username.

For security reasons, don’t set up sites with the username admin. This is the first area hackers will test. If your blog’s username is admin, then change it immediately.

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

Security Measure #4 – Choose Strong Passwords

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

Unless some measure is put into 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 persist in attacking your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, make really easy targets for hackers. Make sure that you change your password combination to something that is at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with “special” characters (%^#$@&*).

Practical Tip

Roboform is a password software that lets you create really secure passwords …

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

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

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

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

WP Config file

(wp-config.php file)

If a hacker breaks into your website, they will look for the wp-config.php file, because this is the file that contains your database details, security keys, etc. Getting access to this information would allow a hacker to change anything in your database, create a user account, upload files and take control of your site.

To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being easily accessible. 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 your install.php, upgrade.php and readme.html files.

You can remove these files after installation. If you don’t want to delete these files, just rename them.

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

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

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

This means that anyone logging into your blog can see and make changes to your 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 – Remove Access To The WordPress Uploads Folder

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

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

(WordPress uploads folder)

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers, this can 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 file with nothing in it called “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 great WordPress security plugins available that will address most security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital areas of your site, protecting your site from brute-force attacks, preventing injections of code into files, etc.

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

SecureScanPro - security software solution for WordPress

(SecureScanPro – complete security plugin for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of addressing 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(Blog Defender Security Product Suite For WordPress)

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

BlogDefender scans you WordPress installation for security holes …

Blog DefenderAnd then shows you how to fix these quickly …

Blog DefenderIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free WP 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 WP installation, plugins and WP themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can expose your site to attacks by hackers and bots.

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

As a final reminder, below is the advice given by a web security expert to all WordPress users after the large-scale 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the above 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 WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications whenever we publish new information on WordPress security and tutorials about new 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

***