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 SecurityBeing the world’s most popular CMS makes WordPress an obvious target for hackers.

In 2013, WordPress installations around the world were subjected to global-scale brute force attacks.

These attacks were caused by botnets (computers infected with viruses and programmed to attack other sites 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 use to try and break into WordPress sites is by trying to guess the site admin’s login username and password. This can be achieved with software programs and scripts that automatically tries to guess hundreds of possible logins in minutes.

If you’re using weak login details, your website could be an easy target for hackers.

This is called a “brute force” login attack.

What Is A Botnet?

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 private computers that have been compromised and infected with malicious code, which are then controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

Botnets are often used to send mass spam emails.

Below is a screenshot taken from a site that monitors online security 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 globe since 2009.

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

The botnet attacks were highly distributed and well organized. 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 site admin areas took place. The brute force attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress is the world's most popular content management system making it an obvious target for hacking

(Being the world’s most popular content management system makes WordPress an obvious target for hacking attempts)

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

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

To learn what makes WordPress a very secure platform for websites, see this article: Is WordPress A Secure Website Platform?

Important Info

It’s important to note that, in the case of April 2013 brute force attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using other CMS platforms like Joomla).

Mike Little, one of the co-founders of WordPress, said this 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 Site From Being Brute Force Attacked – Ten Security Measures

You may think that the information in your site has nothing to offer to hackers, but the reality is that to a hacker, all websites provide an opportunity to benefit at your expense.

If a malicious user can find a web software weakness and take over your web site, the site can then be used as part of a larger network of “bots” to target more valued websites.

Additional undesirable effects of having your website hacked include getting blacklisted by Google, having spammy links advertising things like gambling, discounted fashion, etc. inserted in your content, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasties.

The truth is that software-driven bots are probably looking for weaknesses and trying to break into your web site while you are reading this article at this very moment. Whether they can break into your site successfully will depend on how hard you will make it for them to continue persisting until they find how to get access, or are forced to give up and go look for a less protected target.

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

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

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

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

Website Security Check

(Hackertarget – WordPress security check results. Source: Hackertarget.com)

It should be obvious after using the tool shown above that if you can freely access all of this information about your website, then hackers can too.

Website Security Check(Screenshot source: BlogDefender.com)

Being able to see what 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 all be useful information to hackers, as these can inform them about any potential holes or weaknesses, especially where site owners haven’t updated their software versions.

If your site or blog is powered by WordPress and you are not taking appropriate steps to bullet-proof your site, 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 sites all the world!

Typically, whenever a website is broken into, webmasters can find themselves completely “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. Typically, compromised sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache of discovering that your website or blog has been hacked into, below are ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute-force botnets.

Warning

Note: A few of the steps listed below need some technical understanding of how to modify core WordPress and server files. If you have no web 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 Webhosting Provider

Contact your hosting provider and ask them what precautions have been put in place to help prevent your site from being attacked, and what they do to ensure that your server files and data get regularly backed up.

Make sure that your hosting company is regularly backing up your sites and that, if anything happens, you can quickly and easily get back your files and data.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Frequently Maintained

You should never rely only on your host for site backups. Instead, learn how to maintain and manage your WordPress site or get this done for you and maintain a habit of performing a full WordPress site maintenance routine frequently (e.g. weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A complete WordPress site maintenance routine looks like this …

Maintaining your WP site fully backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP site completely backed up and up-to-date is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WordPress web site completely backed up and up-to-date. WordPress site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WordPress maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that you still have a pulse!

If you don’t want to back up your data manually, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate And Keep Your WordPress Web Site Protected With Backup Creator WordPress Plugin

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

the worldwide brute-force attack on WordPress sites was mostly attempting to compromise website admin panels by exploiting WP sites with “admin” as their account name.

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

We have created a detailed step-by-step tutorial for WordPress admin users that shows you how to change your admin username here: Changing Your WordPress Admin User Name To Another Username

Security Measure #4 – Avoid Weak Passwords

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

Unless you put some measure in place to block the brute force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just persist in attacking your site until it eventually gets access.

Weak passwords, therefore, become very easy targets for brute force attacks. Make sure that you change your password to something containing at least 8 or 9 characters long, with both upper and lowercase letters, and add a few “special” characters (^%$#&@*).

Useful Tip

You can use a password program like Roboform to generate secure login passwords …

You can use a password software tool like Roboform to help you generate unbreakable passwords(You can use a password tool like Roboform to help you generate strong login passwords)

For a step-by-step tutorial for non-technical WordPress admin users that shows you how to change your password, go here: Changing Your Password

Security Measure #5 – Prevent Access To Your WP Config File

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

wp-config.php file

(WP Config file)

If hackers break into your WordPress site, they will search for the wp-config.php file, because this is the file that contains your WordPress database information, 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 attacks and even being used as part of a bot net, therefore, 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 – Rename Or Delete Unnecessary Site Installation Files

Delete or rename 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 – Upgrade Your WordPress CMS, Themes And Plugins

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

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress installations come with a built-in editor that allows site administrators to edit plugin and theme files inside the dashboard.

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible via the WordPress main menu)

The WordPress theme editor allows anyone accessing your site to view and modify your WP theme files, and create havoc on your site.

If you want to prevent unauthorized 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 – Protect The Site’s Uploads Directory

The “uploads” directory contains all the media files that get uploaded to your site.

By default, this folder is visible to anyone online. All someone has to do to see all of the contents in your “uploads” directory is visit the directory using their web browser …

(WordPress uploads folder)

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

If any directories in your website have vulnerabilities that can be exploited by hackers or malicious users, someone can upload unauthorized file types to 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, adding 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 ask help from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Use WordPress Security Plugins

A number of great security plugins for WordPress are available that specifically address most security issues faced by WordPress website owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your site from brute-force attacks, preventing unauthorized file uploads, etc.

Many 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 files and causing damage to your site is SecureScanPro.

SecureScanPro - security plugin for WordPress

(SecureScanPro – WP security plugin)

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 consider using is BlogDefender.

Blog Defender Security Plugin For WordPress Websites & Blogs

Blog Defender(Blog Defender)

Blog Defender 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 potential security holes in your WordPress installation are …

Blog Defender Security SuiteAnd lets you quickly fix these …

Blog Defender Security Solution For WordPressIf you don’t want to invest in a premium 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 keeping your WordPress software, plugins and WP themes updated to their latest versions, tightening file and data security and taking other necessary precautions can have disastrous consequences.

Regardless of the 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 website.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users after the global 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the information in this 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 WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified whenever we publish new information on WordPress security and reviews of new security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***