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 SecurityWhen you are the most popular content management system in the world and the preferred online publishing platform for millions of websites and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will become a prime target for attacks by hackers wanting to score a “big win”.

In 2013 a global brute force attack hit WordPress installations on almost every web host in existence.

These attacks were caused by infected computer networks programmed to attack other vulnerable sites (called “botnets”).

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

What Are 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 ways hackers try to break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This can be achieved using scripts and software tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re using obvious usernames and passwords that are easy to guess, your site could be easily hacked by a malicious software’s persistent attempts to guess your site’s login details.

This is called a “brute force” attack.

Botnets – What Are They?

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 compromised and infected with malicious code or scripts, which are then controlled remotely as a group, often without the computer owners even being aware that this is happening.

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

Below is a screenshot taken from an online 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.

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

These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The mass brute-force attacks then continued, with over 30,000 WordPress blogs being hacked each day.

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

Being the world's most popular content management system makes WordPress a target for malicious attacks by hackers

(WordPress powers millions of sites around the world, which makes it a natural target for hacking)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain why WordPress is a secure web platform in this article: Why WordPress Is A Secure Platform For Websites –

Useful Information

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

Mike Little, the co-founder 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 Protect Your WordPress Site From Being Brute-Force Attacked – 10 Security Measures

Every blog with a security vulnerability can be seen as a potential opportunity to hackers. A compromised website or blog not only presents new hackers opportunities to improve their hacking skills and claim “bragging rights” among their peers, but it can also serve as a platform for launching distributed attacks, spreading malware and defrauding online users through information theft.

If hackers can find a vulnerability that allows them to gain remote control of your blog, the site can then be used as a “bot” to attack larger and more valued sites.

Additional undesirable results of having your website hacked include getting blacklisted by search engines, having spammy links promoting things like gambling, porn, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasty things.

The truth is that hackers are probably trying to hack into your web site right now. Whether they can achieve this depends on how hard you can make things for hackers and bots to keep trying until they work out a way to get access, or give up and decide to look for a less protected target.

How Much Information About Your WordPress 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 scan …

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

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

Hackertarget - Website Security Check

(website security check results. Product image source: Hackertarget.com)

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

Hackertarget - WP Security Scan(Screenshot: BlogDefender website)

Being able 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 can be valuable information to hackers, as this informs them about potentially exploitable security vulnerabilities, especially in older versions.

If your website is driven by WordPress and you’re not taking steps to harden your site, we can practically guarantee that, at some point in time, someone will attempt to hack your installation, because these attacks are systematically targeting WordPress sites worldwide!

Whenever a website is broken into, blog owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Often, most sites will become infected with malicious software or viruses without the owner even being aware that this has occurred.

To avoid the heartache (and potential financial loss) that comes with having your website being hacked into, we have listed below 10 essential and effective security checks that will help to prevent your WordPress site from being brute-force attacked.

Important

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

***

Security Measure #1 – Contact Your Web Host

Get in touch with your webhosting company and ask them what security measures they have put in place to help prevent your site from being attacked, and what is done to ensure that your server files and data are being backed up.

Make sure that your webhosting provider is regularly backing up your sites and that, if disaster strikes, you can easily get back your site.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Frequently Updated

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

A full WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WP website or blog frequently backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress installation fully backed up and up-to-date is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WordPress website frequently backed up and up-to-date. 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 this gets done. Backing up your website is the second 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 free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Copy & Protect Your WP Site With Backup Creator WordPress Plugin

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

The mass brute-force botnet attack on WordPress is mostly attempting to compromise site administrator panels by exploiting WP installations that used “admin” as the account name.

For security reasons, avoid installing a WordPress site with the username admin. This is the first thing hackers will test. If your site’s user name is “admin”, change it immediately.

For a simple tutorial for WordPress users on how to change your admin username, go here: Changing Your WP User Name From Admin To A Different User Name

Security Measure #4 – Choose Strong Passwords

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

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

Weak passwords, therefore, become really easy targets for hackers. Make sure that you change your password to something that contains at least 8 or 9 characters long, with upper and lowercase letters, combined with a few “special” characters (e.g. %, #, &, etc).

Tip

If you have trouble coming up with strong passwords or are reluctant to set up different passwords for all of your online logins, then use a password program like Roboform …

You can use a password management software tool like Roboform to create  passwords(You can use a password program like Roboform to create secure login passwords)

For a tutorial created especially for WordPress users that shows you how to change your admin password, go here: Changing WordPress Passwords

Security Measure #5 – Secure Your wp-config.php File

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

WP Config file

(WP Config file)

If hackers break into your website, they will typically look for your wp-config.php file, because this file contains your WordPress database information, 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.

In order 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 accessed. 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 can be removed after installation. If you don’t want to delete these files, then just rename them.

Security Measure #7 – Upgrade Your WordPress Files, Plugins & Themes

Hackers look for vulnerabilities in older versions of WordPress that can be exploited, including out-of-date versions of themes and plugins.

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

Security Measure #8 – Disable Your Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor can be accessed via the WordPress main menu)

This allows anyone accessing your blog’s admin area to see and edit all of your WordPress theme template files, or create havoc on your site.

If you want to prevent unauthorized people from accessing your 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 – Secure Your WordPress Uploads Folder

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

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

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

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by hackers, this could 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, adding a blank index.php file (this is literally a blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone with experience if you are not sure about what to do.

Security Measure #10 – Security Plugins

Several security plugins for WordPress are available that specifically address many common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – WP complete security software solution)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security areas that WordPress users need to address.

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

Blog Defender

Blog Defender WordPress Security Product Suite(Blog Defender Security Plugin For WordPress)

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

BlogDefender scans you WordPress installation for security vulnerabilities …

Blog Defender Security PluginAnd then shows you how to easily fix these …

Blog Defender WordPress Security PluginIf you don’t want to purchase a 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 very secure web platform, but neglecting basic maintenance tasks like making sure that your WP installation, WordPress plugins and themes are kept updated to their latest versions, tightening file and data protection 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, web security is something you cannot ignore.

As a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users after the large-scale 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, website security is very important if you run a WordPress site. Hopefully, the above information will help keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new articles on WordPress security and reviews of WordPress 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

***