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 making it a frequent target for malicious attacks by hackers.

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

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

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 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. This can be done with scripts and software tools that can work through hundreds of possible login combinations in minutes.

If you’re using obvious user names and passwords that are easy to guess, your website could be easily hacked by persistent attempts to work out your site’s login details.

This is called a “brute force” attack.

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)

”Botnets” are networks of private computers that have been compromised and infected with malicious code or software, which are then controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is going on.

Botnets are often used to blast mass spam emails.

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

ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009.

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

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

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

Powering millions of sites worldwide makes WordPress a target for attacks by malicious users

(WordPress is the world’s most used content management system making it a natural target for hacking)

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

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

To learn why WordPress is a secure platform for websites, read this article: Can You Build A Secure Business Online Using WordPress?

Important

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

Mike Little, the co-founder of WordPress with Matt Mullenweg, 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 Brute Force Attacks – Ten Security Checks

Every blog with a vulnerability offers some value to hackers. A compromised blog not only presents wannabe hackers opportunities to improve their skills and claim “bragging rights” among their peers, but it can also acts as a valuable platform for launching stealth attacks, distributing malware and engaging in information theft.

If someone can break in and gain complete control of your website, that site can then be used as a “bot” in a planned cyber-attack against other valuable websites.

Additional undesirable results of having your website hacked include getting blacklisted by Google, having stealthy spam links advertising things like casinos, porn, etc. in your content and meta data, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasty things.

The harsh reality is that software-driven bots are very likely trying to hack into your web site while you are reading this right now. Whether they can break into your site or not, will depend on how difficult or easy you can make things for hackers and bots to continue trying until they find 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 WordPress Site Are You Broadcasting To Hackers?

Does your website run on WordPress? If so visit a site like Hackertarget.com and run your website through their WordPress security scan …

Hackertarget - Website Security Check(WordPress Security Scan Image source: Hackertarget.com)

You will see that the test will yield a number of results and information about your site setup …

Hackertarget - WordPress Security Check

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

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

Website Security Scan(Product image: Blog Defender)

The ability 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 are all useful information to hackers, as this informs them about exploitable security weaknesses, especially where site owners haven’t updated their software versions.

If your site or blog is driven by WordPress and you are not taking steps to bullet-proof your site, we can practically guarantee that, at some point in time, someone will attempt to hack your site, because these brute force attacks are systematically targeting WordPress sites worldwide!

When a website or blog is compromised, website owners can find themselves completely “locked out” of their own site, or notice that their files have been altered or even entirely wiped out. Often, most compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To avoid the heartache of discovering that your website or blog has been hacked into, we have listed below 10 essential and effective security measures that will help to protect your WordPress site from being brute-force attacked.

Note

Note: Some of the recommended measures listed below require some technical understanding of how to modify core WordPress and server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for help.

***

Security Measure #1 – Contact Your Host

Contact your webhosting company and ask them what security measures have been put into place to protect your site from botnet attacks, and what is done to make sure that your server files get regularly backed up.

It’s important to check that your hosting service provider backs up your server files and that, if anything happens, you can quickly and easily recover your files and data.

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

Never rely on your hosting company for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this 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 full WordPress maintenance routine ensures that:

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

A proper WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP site regularly backed up and updated. WP site 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 WP maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the next most important thing you should do after making sure that you are still breathing!

If you don’t want to perform manual backups, there are a number of free and paid plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Copy & Keep Your WordPress Websites Protected With Backup Creator WordPress Plugin

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

The brute force botnet attack on WordPress sites was mostly an attempt to compromise website admin panels by exploiting WordPress installations that used “admin” as their username.

For security reasons, don’t install WordPress sites with the username admin. This is the first area hackers will test. If your blog’s username is “admin”, change it immediately.

We have created a tutorial created especially for non-technical WordPress admin users that shows you how to change your login username here: Changing Your WP Admin User Name To A More Secure User Name

Security Measure #4 – Choose A Strong Password

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

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

Passwords that are easy to guess, therefore, make really easy targets for hacking attacks. Make sure that you change your password to a string that contains at least 8 or 9 characters long, with upper and lowercase letters, and “special” characters (%^#$@&*).

Practical Tip

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

Roboform is a password program that lets you easily create secure login passwords(You can use a password tool like Roboform to help you generate secure passwords)

For a detailed tutorial created especially for non-technical WordPress admin users that shows you how to change your login password, go here: How To Change Passwords

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

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

WordPress WP Config file

(wp-config.php)

If a hacker breaks into your website, they will try to access your wp-config.php file, because this file contains important information about your site’s database, 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 being attacked and even being used as part of a bot net, therefore, you must prevent people getting to 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 Website 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, just rename them.

Security Measure #7 – Upgrade Your WordPress Blog, Themes And Plugins To Their Latest Version

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

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the WordPress dashboard menu)

The WordPress theme editor feature allows anyone accessing your site to view and edit your WP theme template files, or cause mayhem on your site.

To prevent unauthorized people from accessing 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 – Prevent Access To The WordPress Uploads Directory

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

By default, this folder is visible to all users online. All a person needs to do to see the contents stored in your site’s “uploads” directory is visit your directory using their browser …

(WordPress uploads folder)

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, someone can upload unauthorized file types or compromise the security of 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, uploading a blank index.php file (this is literally an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are unsure about what to do.

Security Measure #10 – Use WordPress Security Plugins

There are some great WordPress security plugins available that specifically address most common security issues WordPress website owners face, such as preventing hackers from gaining access to vital areas of your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.

Most WordPress plugins address some but not all areas of WordPress security. One WordPress plugin that does 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 software for WordPress

(SecureScanPro – security software solution for WordPress)

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 WordPress Security Product Suite

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

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

BlogDefender shows you where the security holes in your web site are …

Blog Defender Security Solution For WordPress Web SitesAnd lets you quickly fix these …

Blog DefenderIf you don’t want to purchase a premium security plugin like SecureScanPro or BlogDefender, then use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting essential maintenance tasks like keeping your WordPress software, WP plugins and themes updated to their latest versions, 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 simply cannot ignore the importance of securing your site.

As one last reminder, 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, website security is very important if you run a WordPress site. Hopefully, the information in this article has provided you with the initial steps you need to take 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 professional WordPress service provider in our WordPress Services Directory.

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

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com

***