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 SecurityBeing the world’s most used CMS makes WordPress an easy target for malicious attacks by hackers.

In April 2013 a large-scale brute force attack hit WordPress installations on almost every host server in existence around the world.

These attacks were caused by botnets (computers infected with viruses and programmed to attack other computers with security vulnerabilities).

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. To do this, hackers use software tools that can work through hundreds of possible logins in minutes.

If you’re using obvious usernames and weak passwords that are easy to guess, your website can be an easy target for hacking attempts.

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

”Botnets” are networks of computers that have been compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is happening.

Botnets are normally used used to blast out mass spam emails from computers of compromised user accounts.

The screenshot below was taken from a site that monitors online security 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 infecting computer networks all around the world since 2009.

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

The botnet attacks on WordPress were well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack, when millions of attempts to force their way into WordPress users administration areas occurred. The worldwide attacks then continued, with over 30,000 WordPress sites and blogs being hacked every day.

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

Being the world's most popular CMS makes WordPress a target for hacker attacks

(Powering millions of sites worldwide makes WordPress a target for hacking attempts)

Does This Mean We Should Stop Using WordPress?

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

To learn why WordPress is a secure web platform, read this article: How Secure Is WordPress?

Useful Info

It’s important to understand that, in the case of the brute-force botnet attack described above, there was actually no WordPress vulnerability being exploited (the same script was also attacking sites built using platforms like Joomla).

Mike Little, one of the co-founders of WordPress, made the following 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)

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

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

If a malicious user can discover a security flaw in your system that lets them gain complete control of your website, that blog can then be used to target other highly-valued sites.

Additional undesirable effects of having your site hacked include getting blacklisted by Google, having stealthy spam links advertising things like viagra, discounted fashion, etc. inserted in your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasties.

The reality is that brute-force software bots are most likely searching for vulnerabilities and trying to break into your site while you are reading this page. Whether they will hack into your site successfully or not, depends on how difficult you will make things for them to continue trying until they discover a way to get access, or are forced to give up and decide to look for a more vulnerable target.

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

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

WordPress Security Check(WordPress Security Scan Screenshot image: Hackertarget.com)

You will see that the check returns various results and details about your WordPress site …

Hackertarget - Website Security Scan

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

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

Hackertarget - Website Security Check(Screenshot source: BlogDefender website)

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 can all be valuable information to hackers, as these can inform them about potential holes or weaknesses, especially where the owners haven’t updated their sites.

If your site or blog is powered by WordPress and you are not taking steps to bolster the security of your site, then we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically hitting WordPress installations worldwide!

Typically, whenever a website is broken into, site owners can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or that everything has been entirely wiped out. Often, most sites will become infected with malicious scripts without the owner even being aware that a breach has taken place.

To help avoid the heartache and aggravation (and potential financial loss) of discovering that your web site has been hacked into, we have listed below ten essential and effective security measures that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Note

Note: Some 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 WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your webhosting company and ask them exactly what security precautions are in place to protect your site from botnet attacks, and what they are doing to make sure that your server files and data are being backed up.

Check that your webhosting service provider is regularly backing up your sites and that, if anything should happen, you can quickly and easily recover your files and data.

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

Never rely just on your web host for 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 WordPress site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

Maintaining your WP website or blog regularly backed up and updated is vitally important for WordPress security.(Maintaining your WordPress site fully backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress website or blog fully backed up and updated is. WordPress maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WP 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 must do after making sure that you are still breathing!

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 automate your backup process here: Backup, Duplicate And Keep Your WP Sites Protected With Backup Creator WP Plugin

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

The large scale brute-force attack on WordPress is mostly an attempt to compromise site administrator panels and gain access to sites by exploiting sites that used “admin” as their username.

For website security purposes, avoid installing 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.

For a step-by-step tutorial that shows you how to change your WordPress username, go here: How To Change Your Admin User Name In WordPress

Security Measure #4 – Your Password

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right combination of username and password characters that will give them entry to your website.

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

Weak passwords, therefore, are very easy targets for hacking attacks. Make sure that you change your password to something that is at least eight or nine characters long, with both upper and lowercase letters, and “special” characters (%^#$@&*).

Practical Tip

You can use a password software tool like Roboform to create unbreakable passwords …

You can use a password management program like Roboform to help you generate strong passwords(Roboform is a password management program that lets you generate different secure passwords)

For a tutorial created especially for WordPress admin users on how to change your WordPress admin password, go here: What To Do If You Need To Change WordPress Passwords

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

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

wp-config.php

(WordPress WP Config file)

If hackers break into your website, they will look for the wp-config.php file, because this is the file that contains important information about your site’s database, 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.

To protect your WordPress site from attacks 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 – Delete Or Rename Unnecessary Blog Installation Files

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

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

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

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

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that allows the site administrator to edit theme and plugin code inside the dashboard.

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

WordPress Theme Editor Menu

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

This allows anyone accessing your site to see and modify your WP theme template files, and create havoc on your site.

To prevent unauthorized 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 – Remove Access To The Site’s Uploads Folder

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

Normally, this folder is visible to all users online. All someone has to do to view all of the contents in your “uploads” directory is navigate to your directory using their browser …

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

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

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers, someone can upload unauthorized file types to your site.

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, 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 not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

A number of great WordPress security plugins are available that will address most common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your website from malicious scripts, preventing injections of code into files, 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 - WP complete security plugin

(SecureScanPro – complete security software for WordPress)

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

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

Blog Defender WordPress Security Solution

Blog Defender(Blog Defender Security Suite)

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

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

Blog Defender Security Plugin For WordPressAnd lets you fix these quickly …

Blog DefenderIf you don’t want to buy 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 updating your WordPress software, WP plugins and WP themes, tightening file and data protection 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 web security.

As a final reminder, below is the advice given by an expert on website security to all WordPress users following the mass 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 has provided you with the initial guidelines and help you need to keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to be notified when we publish new articles and tutorials on WordPress security and tutorials about new security plugins and solutions.

***

"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

***