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 SecurityPowering millions of sites worldwide makes WordPress a target for malicious attempts by hackers.

In April 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 installations with security vulnerabilities).

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

What Is A Brute Force Attack?

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 is achieved using software tools that automatically tries to guess hundreds of possible login combinations in minutes.

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

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/botnet)

A “Botnet” is a network of private computers that have been compromised and infected with malicious software, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge.

Botnets are typically 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 ZeuS – a botnet that has been actively infecting computer networks all around the globe since 2009 …

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 sites are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress site admin areas occurred. The mass brute force attacks continued after this, with over 30,000 WordPress blogs being hacked per day.

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

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

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

Does This Mean We Shouldn’t Use WordPress Anymore?

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 web presence.

To understand what makes WordPress a very secure web platform, see this article: Is WordPress Secure?

Important Info

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, said this 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)

Preventing Your WordPress Site From Brute Force Attacks – Ten Security Measures

Every website with a vulnerability offers some value to hackers. A vulnerable website offers hackers with a platform for launching stealth attacks, spreading malware and engaging in information theft.

If hackers can find a security flaw that allows them to remotely control your website or blog, that website can then be employed as a “bot” to attack other highly-valued websites.

Additional undesirable consequences of being hacked include being blacklisted by search engines, having spammy links promoting things like gambling, cheap offers on brand names, etc. inserted into your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasty things.

The truth is that malicious bots are probably trying to hack into your site as you are reading this. Whether they will hack in successfully or not, depends on how challenging you will make it for hackers and bots to keep trying until they find how to get access, or are forced to decide to look for a less secure target.

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

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

Hackertarget - Website Security Scan(WordPress Security Scan Source: https://hackertarget.com/wordpress-security-scan)

You will see that the test will return various results and details about your WordPress installation …

Hackertarget - Website Security Scan

(website security check results. Screenshot image: Hackertarget.com)

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

Hackertarget - Website Security Scan(Screenshot source: BlogDefender.com)

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 useful information to hackers, as this informs them about any potential security vulnerabilities, especially in older versions.

If your website runs on WordPress and you’re not taking steps to bolster the security of your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these attacks are systematically targeting WordPress sites worldwide!

Whenever a site is broken into, site owners will find themselves completely “locked out” of their own site, or notice that their files have been vandalized or that everything has been entirely wiped out. Often, compromised sites will be infected with malicious software without the owner even being aware that this has occurred.

To help avoid the heartache and aggravation (and potential financial loss) that comes with discovering that your web site 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 hackers.

Note

Note: A few of the measures below need 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 file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Get In Touch With Your Host

Get in touch with your web host and ask them exactly what security measures are in place to help prevent your site from being attacked, and what they are doing to ensure that your server files and data get backed up.

Make sure that your webhosting company is regularly backing up your server files and that, if disaster strikes, you can easily get your files back.

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

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

A complete WordPress maintenance routine ensures that:

  • All unnecessary data and files are removed,
  • All 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 WP maintenance routine looks like this …

Maintaining your WordPress web site completely backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress installation regularly backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP website or blog frequently backed up and updated. WordPress maintenance is not hard to do 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 WordPress maintenance yourself, get someone else to do it but make sure this 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 WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy & Keep Your WordPress Websites And Blogs Protected With Backup Creator WP Plugin

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

The mass brute force botnet attack on WordPress is mostly an attempt to compromise website admin panels by exploiting WordPress sites that used “admin” as their user name.

For website security reasons, avoid setting up sites with the username “admin”. This is the first area hackers will test. If your site’s user name is “admin”, then change it immediately.

For a simple step-by-step tutorial on how to change your admin username, go here: Changing Your Admin User Name In WordPress

Security Measure #4 – Your Password

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

Unless you put some measure in place to stop the brute force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually “cracks” the code.

Weak passwords, therefore, make very easy targets for brute-force attacks. Make sure that you change your password combination to a string containing at least 8 characters long, with both upper and lowercase letters, and “special” characters (e.g. %, $, @, etc).

Tip

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

You can use a password management tool like Roboform to help you generate secure passwords(You can use a password software tool like Roboform to generate really secure passwords)

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

Security Measure #5 – Prevent The wp-config.php File From Being Easily Found

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

wp-config.php file

(wp-config.php file)

If a hacker breaks into your WordPress site, they will search for the wp-config.php file, because this is the file that contains your database details, 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.

To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent people finding 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 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 delete these files, just rename them.

Security Measure #7 – Upgrade Your WordPress Site, Plugins & Themes To Their Latest Version

Hackers look for vulnerabilities they can exploit in earlier WordPress versions, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that lets the site administrator edit theme and plugin code from 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 WordPress admin menu)

The WordPress theme editor feature allows anyone accessing your site to view and change your WP theme template files, or 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 – Prevent Access To The WordPress Uploads Folder

The “uploads” directory 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 see all of the contents stored in your “uploads” directory is visit the directory using their web browser …

(WordPress uploads directory)

(WordPress uploads folder)

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

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, 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 seek professional help if you are unsure about what to do.

Security Measure #10 – Use WordPress Security Plugins

There are a number of great security plugins for WordPress available that specifically address common security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your site from malicious software, preventing injections of code into files, etc.

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

SecureScanPro - WP complete security software

(SecureScanPro – total security plugin for WordPress)

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 great plugin you may want to look at using is BlogDefender.

Blog Defender

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

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

BlogDefender shows you where the security weaknesses in your website are …

Blog Defender WordPress Security PluginAnd lets you fix these quickly …

Blog DefenderIf you don’t want to purchase a 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 very secure web platform, but neglecting essential maintenance tasks like keeping your WP software, plugins and themes up-to-date, tightening file and data security and taking other necessary precautions can expose your site to attacks 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, you simply cannot afford to ignore the importance of securing your web sites.

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

Also, do yourself a favor and subscribe to WPCompendium.org to receive notifications when we publish new articles and tutorials on WordPress security and reviews of new security plugins.

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum

***