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 and blogs worldwide makes WordPress a frequent target for attempted attacks by hackers.

In early 2013 a global brute force attack hit WordPress installations across virtually every host server in existence around the world.

These attacks were caused by computer networks infected with viruses and programmed to attack other vulnerable computers, also commonly known as “botnets”.

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 will attempt to break into WordPress sites is by trying to guess the site admin’s login username and password. To achieve this, hackers use scripts and tools that can guess hundreds of login permutations in minutes.

If you’re using easy-to-guess login details, your site could be an easy target for hacking attempts.

This is called a “brute force” login attack.

What Are 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)

A “Botnet” is a network of private computers that have been compromised and infected with malicious scripts or code, which can then be controlled remotely as a group, often without the computer owners even being aware that this is happening in their machine.

Botnets are often used to send mass spam emails.

The screenshot below was taken from a site that monitors online security showing the locations of the command centers of ZeuS – 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.

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

These ongoing botnet attacks were highly distributed and well organized. Over 90,000 IP addresses were identified by a number of webhosting 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 the worldwide brute-force botnet attack was widely reported in all of the major webhosting companiesand leading technology media publications, such as TechNews Daily, Forbes, Tech Crunch, BBC News, PC Magazine, and even on the official US Department of Homeland Security website …

WordPress often comes under attack by hackers, due to its popularity

(WordPress powers millions of websites worldwide, making it a target for hacking)

Does This Mean WordPress Is Not Secure And We Should Stop Using It?

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

We explain what makes WordPress a very secure platform for websites in this article: How Secure Is WordPress? What Every Website Owner Needs To Know

Useful Info

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

How To Prevent Your WordPress Blog From Being Brute Force Attacked – Ten Security Measures

You may think that your website or blog offers no value to hackers, but the reality is that every website is valuable to a malicious user.

If hackers can discover a way to remotely control your web site, your web site can then be used to target more valuable websites.

Additional undesirable effects of having your website hacked include being blacklisted by Google, having spammy links promoting things like gambling, cheap offers on brand names, etc. in your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malware on your visitors’ computers), and many other nasties.

The reality is that hackers are very likely searching for exploits and trying to hack into your web site as you are reading this article. Whether they will hack into your site or not, depends on how challenging you have made things for hackers to keep persisting until they can discover how to get access, or are forced to give up and decide to look for a less secure target.

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

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

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

You will see that the test will return various results and information about your website …

WordPress Security Check

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

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

Website Security Check(Source: BlogDefender website)

Being able 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 be potentially useful information to hackers, as this informs them about potentially exploitable vulnerabilities, especially in older versions.

If your site or blog runs on WordPress and you’re not precautionary steps to bolster the security of 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 brute-force attacks are systematically targeting WordPress installations worldwide!

Typically, whenever a website gets broken into, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even that their content has been completely wiped out. Typically, compromised sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache (and significant financial loss) that comes with discovering that your website has been 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 botnets.

Info

Note: Some of the recommended steps shown below need some technical skills to modify core WordPress and/or server files. If you have no web coding skills, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Contact your webhosting provider and ask them exactly what security precautions they have put into place to protect your site from botnet attacks, and what is done to ensure that your files and data get backed up.

It is important to check that your hosting service provider regularly backs up your server files and that, if anything goes wrong, you can easily recover your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Updated

Never rely just on your hosting provider for your site backups. Instead, learn how to maintain and 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, monthly, etc …)

A proper 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 software, plugins and themes are up-to-date,
  • etc …

A proper WordPress site maintenance routine looks like this …

Maintaining your WP site backed up and updated is vitally important for WordPress security.(Maintaining your WP web site 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 WP site completely backed up and updated. WP 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 maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the second most important thing you must do after making sure that you are still breathing!

If you don’t want to perform manual backups, there are a number of WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Back Up, Duplicate And Keep Your WordPress Site Protected With Backup Creator Plugin For WP

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

The mass brute force attack on WordPress is mostly attempting to compromise website admin panels and gain access to sites by exploiting WP sites using “admin” as their account name.

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

We have created a simple tutorial that shows you how to change your admin username here: How To Change Your WordPress User Name From Admin To A Different Username

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually tries to guess the right combination of username and password characters that will give the hacker access to your site.

Unless some measure is put into place to stop the brute-force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just continue attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, make very easy targets for brute force attacks. Make sure that you change your password to a string that is at least 8 characters long, with upper and lowercase letters, combined with “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 tool like Roboform …

Roboform is a password management program you can use to generate secure login passwords(Roboform is a password management software that lets you easily generate really secure passwords)

For a simple tutorial that shows you how to change your WordPress admin password, go here: Changing Your Password

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

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

wp-config.php file

(WP Config file)

If hackers break into your website, they will normally look for the wp-config.php file, because this file contains your 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 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 – Delete Or Rename Unnecessary WP Installation Files

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

These files are completely unnecessary after installation and can be deleted. If you don’t want to remove these files, then just rename them.

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor feature that lets site administrators edit theme and plugin code from the dashboard area.

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor from the admin menu …

WP Theme Editor Menu

(The WordPress theme editor is accessible using the dashboard menu)

This means that anyone logging into your blog can see and make changes to all of your WordPress theme files, or create 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 – Secure Your Site’s Uploads Directory

The WordPress “uploads” folder stores all the media that gets uploaded to your blog.

Normally, this folder is visible to all users online. All someone has to do to see the contents stored in your site’s “uploads” directory is visit the directory using their browser …

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

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

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

Protecting your directories will prevent unauthorized people from accessing 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 called “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone with experience if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

A number of WordPress security plugins are available that will address common security issues faced by WordPress website owners, such as preventing hackers from accessing your site, protecting your site from malicious scripts, preventing injections of code into files, 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 potential issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.

SecureScanPro - WP security software solution

(SecureScanPro – WP total security plugin)

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

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

Blog Defender Security Plugin

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

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

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

Blog Defender Security Plugin For WordPress WebsitesAnd then shows you how to quickly and easily fix these …

Blog Defender Security Solution For WordPressIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting simple maintenance tasks like updating your WordPress installation, plugins and themes, tightening file and data protection and taking other necessary precautions can expose your website to attacks by hackers and bots.

No matter what 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 sites.

As a final reminder of the importance of website security, below is the advice given by a website 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, this information has provided you with the initial guidelines and direction you need 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 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 tips on WordPress security and reviews of new security plugins and solutions.

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya

***