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.

WordPress SecurityWordPress is the world’s most used CMS which makes it a target for attempted attacks by hackers.

In early 2013 a global brute force attack hit WordPress installations across almost every WP host server in existence.

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

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)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site’s administration login username and password. To achieve this, hackers use software tools and scripts that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using easy-to-guess login details, your website can be easily hacked by repeated attempts to work out your site’s login details.

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

Botnet Definition

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)

”Botnets” are networks of private computers that have been infected with malicious software, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are normally used used to send mass spam emails.

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of ZeuS – 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.

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

These were well organized and highly distributed attacks. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when millions of attempts to force their way into WordPress user admin areas took place. The attacks continued after this, with over 30,000 WordPress sites being hacked every day.

News of the April 2013 worldwide brute force botnet attack was widely reported in all the major webhosting companies, as well as the leading technology media publications, such as Forbes, TechNews Daily, PC Magazine, Tech Crunch, BBC News, and even on the official US Department of Homeland Security website …

WordPress is frequently the target of attacks by hackers, due to its global popularity

(WordPress is often the target of attacks by hackers)

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

No. In fact, there are many great reasons why you should continue using WordPress if you are concerned at all about website security.

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

Important

It’s important to note that, in the case of the worldwide brute force 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, made this 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)

Protecting Your WordPress Blog From Being Brute Force Attacked – Ten Security Measures

Every blog with a security vulnerability has value to hackers. A vulnerable blog offers hackers with a valuable resource for distributed denial of service attacks, spreading malware and to engage in information theft.

If a malicious user can discover a security vulnerability in your system that allows them to gain remote access and control of your website or blog, the web site can then be used as a “bot” in a planned cyber-attack against other valuable websites.

Additional undesirable results of being hacked include being blacklisted by Google, having stealthy spam links advertising things like gambling, discounted fashion, etc. in your content and meta data, malicious redirects to phishing sites and other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that malicious bots are trying to hack into your blog right now. Whether they can break into your site or not, will depend on how hard you will make it for hackers or botnets to keep persisting until they find 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?

Do you own a WordPress site? If so, visit a site like Hackertarget.com and run your site through their WordPress security check …

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

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

Hackertarget - WP Security Scan

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

It should be obvious after using the above tool that if you can see all of this information, then hackers can too.

WordPress Security Scan(Screenshot: Blog Defender)

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

If your site or blog runs on WordPress and you are not proactive steps to bullet-proof your site, we can practically guarantee that, at some point, someone will attempt to hack your website, because these brute force attacks are systematically targeting WordPress sites all the world!

When a website or blog gets hacked, website owners can find themselves “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Typically, most compromised sites will become infected with malicious software or viruses without the owner even being aware that a security breach has occurred.

To help avoid the heartache and frustration (and potential loss of valuable business data) that comes with discovering that your website has been hacked into, below are 10 simple, yet essential and effective security checks that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Useful Information

Note: Some of the measures shown below require some technical understanding of how to modify core WordPress or server files. If you have no web editing skills, or don’t want to mess around with code on your site, then ask your web host or search for a professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Get in touch with your webhosting provider and ask them exactly what security precautions they have put in place to help prevent your site from being attacked, and what they do to ensure that your site files are regularly being backed up.

It is important to make sure that your webhosting provider backs up your sites 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 Website Frequently Up-To-Date

Never rely just on your host for site backups. Instead, learn how to manage your WordPress site or get this service done for you and maintain a habit of religiously performing a complete site maintenance routine on a frequent basis (e.g. daily, weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

  • All unnecessary data and files 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 complete WordPress maintenance routine looks like this …

Maintaining your WordPress installation regularly backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website regularly backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WordPress website or blog fully backed up and up-to-date is. WordPress 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 maintenance yourself, get someone else to do it but make sure this gets done. Backing up your site is the next most important thing you must do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Copy And Keep Your WordPress Websites Protected With Backup Creator WordPress Plugin

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

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

For security purposes, avoid setting up a WordPress site with the username “admin”. This is the first area hackers will test. If your blog’s username is “admin”, then change this immediately.

We have created a detailed tutorial that shows you how to change your username here: Changing Your Admin User Name In WordPress

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different strings of characters trying to guess the right combination that will give them entry to your site.

Unless you put some measure in 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 continue attacking your site until it eventually breaks into your admin area.

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

Tip

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

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

We have created a simple tutorial for non-technical admin users that shows you how to change your admin password here: Changing Passwords

Security Measure #5 – Deny Access To Your 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.

WordPress WP Config file

(WordPress WP Config file)

If a hacker breaks into your WordPress site, they will typically look for your wp-config.php file, because this file 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, you must 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 – Delete Or Rename Unnecessary WordPress Installation Files

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

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

Security Measure #7 – Upgrade Your WordPress Installation, Plugins And Themes

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

Ensure that all of your WordPress software files, themes, plugins, etc. are always up to date.

Security Measure #8 – Disable Your Theme Editor

WordPress installations come with a built-in editor that lets the site administrator edit plugin and theme code from the dashboard area.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the main menu)

This allows anyone accessing your blog’s admin to view and edit your WordPress files, or create mayhem on your site.

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

Security Measure #9 – Protect Your WordPress Uploads Directory

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

Normally, this folder is visible to anyone online. All a person needs to do to see the contents stored in your site’s “uploads” folder is navigate to your directory using a web browser …

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

(WordPress uploads folder)

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

Protecting your directories will prevent online users 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 file with nothing in it called “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 – Install Security Plugins

There are a number of great security plugins for WordPress available that will address many common security issues WordPress site owners face, such as preventing hackers from gaining access to vital information about your site, protecting your files from botnets, preventing unauthorized file uploads, etc.

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

SecureScanPro - security software for WordPress

(SecureScanPro – WP complete security software)

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

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

Blog Defender Security Product Suite

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

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

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

Blog Defender WordPress Security SuiteAnd lets you fix these quickly and easily …

Blog Defender WordPress Security SuiteIf you don’t want to buy a security plugin like SecureScanPro or BlogDefender, then use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting essential maintenance tasks like updating your WordPress installation, WordPress plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you cannot afford to ignore the importance of securing your web sites.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a web security expert to all WordPress users following 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article will help keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

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

***

"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

***