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 SecurityWhen you are the world’s most popular content management system and the preferred online publishing platform for millions of businesses and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers.

In April 2013, WordPress installations around the world were subjected to a worldwide brute force attack.

These attacks were caused by botnets (infected computer networks programmed to attack other installations with security vulnerabilities).

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’s administration login username and password. To attempt this, hackers use software tools that automatically tries to guess hundreds of login combinations in minutes.

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

This is called a “brute force” 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/botnet)

A “Botnet” is a network of computers that have been infected with malicious software, which are then controlled remotely as a group, often without the computer owners’ knowledge or awareness.

Botnets are often used to send out mass spam emails from computers of unsuspecting users.

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe since 2009 called “Zeus” …

The Zeus botnet has been actively compromising computer networks all around the globe since 2009.

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

These were highly distributed and well organized attacks on WordPress. Over 90,000 IP addresses were identified by several hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The attack continued after this, with over 30,000 WordPress sites being hacked per day.

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

WordPress is often the target of malicious attacks by hackers

(WordPress is often the target of large-scale malicious attacks by hackers, due to its global popularity)

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

No. In fact, there are lots of very good reasons why you should choose WordPress if you are concerned about the security of your online presence.

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

Important

It’s important to note that, in the case of the brute force botnet attack described above, there was no WordPress vulnerability 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, made this comment 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)

Protecting Your WordPress Site From Being Brute Force Attacked – 10 Security Points

You may think that your site provides no value to hackers, but the reality is that all websites have value to a malicious user.

If hackers can find a way to compromise the control of your web site, your blog can then be employed as a “bot” in a planned cyber attack against larger and more valuable web sites.

Additional undesirable consequences of having your website hacked include getting blacklisted by Google, having stealthy spam links advertising things like casinos, discounted fashion, etc. inserted into your content, malicious redirects to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The reality is that hackers are probably searching for vulnerabilities and trying to hack into your website or blog at this very moment. Whether they will successfully break in will depend on how difficult you can make it for hackers to keep trying until they discover a way to break in, or are forced to give up and go look for a less protected 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 Scan(Website Security Scan Screenshot image: Hackertarget.com)

You will see that the check will return various results and information about your site …

Hackertarget - WP Security Scan

(Hackertarget – WordPress security check results. Product image: Hackertarget.com)

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

WP Security Scan(Product image source: Blog Defender)

The ability 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 in your site can be potentially useful information to hackers, as this informs them about potentially exploitable security weaknesses, especially in older versions.

If your site or blog is driven by WordPress and you’re not taking appropriate steps to bullet-proof your site, then we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically hitting WordPress installations worldwide!

Whenever a website is hacked, site owners can find themselves “locked out” of their own site, or notice that their content has been vandalized or even entirely wiped out. Typically, most compromised sites will be infected with malicious scripts or viruses without the owner even being aware that a security breach has taken place.

To help avoid the heartache (and potential loss of valuable business data) of discovering that your website has been hacked into, we have listed below 10 essential and effective security measures that will help to protect your WordPress site from brute-force attacks.

Note

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

***

Security Measure #1 – Contact Your Hosting Company

Get in touch with your web host and ask them exactly what measures have been put into place to help prevent your site from being attacked, and what they are doing to make sure that your server files and data are being backed up.

Make sure that your webhosting provider is regularly backing up your server files and that, if anything goes wrong, you can easily get back your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Up-To-Date

You should never rely on your webhosting provider for your site backups. Instead, learn how to maintain and manage your WordPress site or get this service done for you and develop a habit of religiously performing a complete site maintenance routine on a frequent basis (e.g. weekly, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WP site frequently backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP site regularly backed up and up-to-date is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP website completely backed up and up-to-date is. WordPress 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, pay someone to do it but make sure this gets done. Backing up your site is the next most important thing you should do after making sure that you are still breathing!

If you don’t want to back up your files manually, there are many free and paid plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone & Keep Your WordPress Sites Protected With Backup Creator WP Plugin

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

The large scale brute force botnet attack on WordPress is mostly an attempt to compromise site admin panels and gain access to the site by exploiting installations with “admin” as the user name.

For website security purposes, 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 this immediately.

We have created a simple step-by-step tutorial created especially for admin users on how to change your WordPress username here: Changing Your Admin Username In WordPress

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when malicious software persistently hits a login or password field with different character strings trying to guess the right combination that will unlock your website.

Unless some measure is put into place to prevent the brute force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually gets access.

Passwords that are easy to guess, therefore, become really easy targets for attacks. Make sure that you change your password to a string containing at least eight characters long, with upper and lowercase letters, and “special” characters (e.g. ^, $, @, etc).

Practical Tip

Roboform is a password management tool you can use to help you generate different unguessable passwords …

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

For a detailed step-by-step tutorial on how to change your password, go here: Changing WordPress Passwords

Security Measure #5 – Secure Your WP Config File

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.

wp-config.php file

(wp-config.php file)

If a hacker breaks into your website, they will normally search for the wp-config.php file, because this file contains your WordPress 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 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 – Rename Or Delete Unnecessary Site Installation Files

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

These files are not required after installation. If you don’t want to delete these files, then just rename them.

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

Hackers look for vulnerabilities they can exploit in older WordPress versions, including out-of-date versions of WP plugins and themes.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

The WordPress theme editor feature allows anyone accessing your blog’s admin area to view and change your WordPress theme files, or cause mayhem on your site.

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

Security Measure #9 – Secure Your WordPress Uploads Directory

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

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

(WordPress uploads folder)

(WordPress uploads folder)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this can threaten the security of your site.

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 get professional assistance if you are unsure about what to do.

Security Measure #10 – Security Plugins

There are a number of WordPress security plugins available that specifically address most security issues WordPress website 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 WordPress security plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - security software solution for WordPress

(SecureScanPro – WordPress total 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 great security plugin you may want to look at using is BlogDefender.

Blog Defender

Blog Defender Security Suite(Blog Defender Security Plugin)

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

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

Blog DefenderAnd lets you fix these quickly …

Blog DefenderIf you don’t want to invest in a premium 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 basic maintenance tasks like updating your WordPress software, WP plugins and WordPress themes, tightening file and data security and taking other necessary precautions can expose your website to attacks 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 simply cannot ignore the importance of website security.

As a final reminder, below is the advice given by a website security expert to all WordPress users after the worldwide brute-force attacks by botnets 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the above 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 professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, please remember to subscribe to WPCompendium.org to receive notifications via email when we publish new information on WordPress security and tutorials about new WordPress security plugins.

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

***