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 is frequently the target of attacks by hackers, due to its global popularity.

In 2013 a large-scale brute force attack began hitting WordPress installations across almost every WP host server in existence.

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

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

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 methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This is done with scripts and tools that automatically tries to guess hundreds of possible logins in minutes.

If you’re using weak user names and passwords that are easy to guess, your website could be easily hacked by repeated attempts to guess your site’s login details.

This is called a “brute force” login 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 computers that have been compromised and infected with malicious software, which are then controlled remotely as a group, often without the unsuspecting computer owners’ knowledge or awareness.

Botnets are normally used used to send mass spam emails.

Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet 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 globe since 2009. Image source: SecureList.com)

These were highly distributed and well organized attacks on WordPress sites. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress site administration areas occurred. The brute-force attacks continued after this, with over 30,000 WordPress blogs being hacked every day.

News of the April 2013 large-scale brute force botnet attack was widely reported in all of the major webhosting companiesand leading technology media 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 comes under attack by hackers

(Being the world’s most used CMS makes WordPress a target for hacking attempts)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of great reasons why you should continue using WordPress if you are concerned about the security of your web presence.

We explain what makes WordPress a very secure web platform in this article: Is WordPress A Secure Platform For Websites?

Useful Info

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 targeting sites built using applications like Joomla).

Mike Little, one of the co-founders of WordPress, said this about the botnet 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 Protect Your WordPress Website From Being Brute-Force Attacked – 10 Security Points

Every web site with a vulnerability can present an opportunity to hackers. No website Large, medium and small websites, personal blogs, government websites … even sites owned by web security and anti-hacking experts can and have been targeted.

If a malicious user can find a web software weakness, that site can then be used as part of a larger network of “bots” to target other highly-valued web sites.

Additional undesirable impacts of having your website hacked and your site security compromised include being blacklisted by search engines, having stealthy spam links advertising things like gambling, discounted fashion, etc. inserted in your content and meta data, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasties.

The harsh reality is that hackers are trying to hack into your website while you are reading this article. Whether they can be successful will depend on how hard you have made things for hackers or botnets to keep trying until they can work out how to get in, or are forced to give up and go look for an easier target.

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

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

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

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

Hackertarget - WP Security Check

(Hackertarget – website security check results. Image source: Hackertarget.com)

It should be obvious after using the scanning tool that if you are able to access all of this information about your WordPress website, so can hackers.

Website Security Check(Image source: BlogDefender site)

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 on your server can be valuable information to hackers, as these can inform them about potentially exploitable security vulnerabilities, especially where the owners haven’t updated their sites.

If your website runs on WordPress and you are not preventive steps to toughen up your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your website, because these brute-force attacks are systematically hitting WordPress sites around the world!

Typically, whenever a site is hacked, webmasters will discover much to their dismay that they have been “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. Often, sites will become infected with malicious software or viruses 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 measures that will help to prevent your WordPress site from being brute-force attacked.

Note

Note: A few of the steps below need some technical skills to modify core WordPress and/or server files. If you are not technical, or don’t want to mess around with file code, then ask your web host or search for a professional WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Host

Contact your hosting service and ask them exactly what security measures have been put into place to help prevent your site from being attacked, and what they are doing to ensure that your server files and data are regularly being backed up.

Check that your web host backs up your sites and that, if disaster strikes, you can quickly and easily get your files back.

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

You should never rely only on your hosting service provider for your 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 religiously performing a full site maintenance routine frequently (e.g. weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

Maintaining your WP website or blog backed up and up-to-date 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 maintaining your WordPress website frequently backed up and up-to-date is. 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 second most important thing you should do after making sure that your heart is still beating!

If you don’t want to back up your data manually, there are a number of free and paid plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Copy & Protect Your WP Websites With Backup Creator Plugin For WP

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

the worldwide brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels by exploiting WordPress sites that used “admin” as their user name.

For reasons of website security, never install a WordPress site with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s user name is admin, then change this immediately.

We have created a detailed step-by-step tutorial that shows you how to change your username here: How To Change Your WordPress Admin Username To A More Secure Username

Security Measure #4 – Change Your Password

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

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

Weak passwords, therefore, are really easy targets for botnets. Make sure that you change your password combination to something that contains at least eight or nine characters long, with upper and lowercase letters, combined with a few “special” characters (e.g. ^, #, &, etc).

Practical Tip

You can use a password tool like Roboform to help you generate strong login passwords …

Roboform is a password tool that lets you generate different secure login passwords(You can use a password tool like Roboform to generate difficult passwords)

We have created a step-by-step tutorial created especially for WP admin users that shows you how to change your WordPress password here: What To Do If You Need To Change Your Password

Security Measure #5 – Prevent Access To The wp-config.php 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)

If hackers break into your WordPress site, they will normally try to access your wp-config.php file, because this file 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 attacks and even being used as part of a bot net, therefore, 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 WordPress Installation Files

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

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

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

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

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

Security Measure #8 – Disable The Theme Editor

WordPress comes with a built-in editor that lets the site administrator edit theme and plugin files inside the dashboard.

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the main menu)

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

If you want to prevent unauthorized people from being able to access the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Prevent Access To Your Site’s Uploads Directory

The WordPress “uploads” directory 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 see all of the contents in the “uploads” folder is navigate to your directory using a web browser …

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

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, this could 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 a blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are not sure about what to do.

Security Measure #10 – Use WordPress Security Plugins

There are a number of security plugins for WordPress available that specifically address most security issues faced by WordPress site owners, such as preventing hackers from accessing vital areas of your site, protecting your website from botnets, 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 issues that could lead to hackers accessing your website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP total security software

(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 issues that WordPress users need to address.

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

Blog Defender Security Solution For WordPress Blogs

Blog Defender(Blog Defender Security Plugin For WordPress Blogs)

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

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

Blog Defender Security Product Suite For WordPress Web SitesAnd lets you easily fix these …

Blog Defender Security SuiteIf you don’t want to buy a 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 secure platform, but neglecting basic maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data security and taking other necessary precautions can expose your website to malicious 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, you cannot ignore the importance of securing your site.

As one last reminder, below is the advice given by a web security expert to all WordPress users following the global brute-force attacks on WordPress in April 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, the information in this article will help prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a 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 on WordPress security and tutorials about WordPress security plugins.

***

"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

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.