Blog

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 often is targeted by hackers, due to its popularity.

In 2013, WordPress installations around the world were subjected to mass brute force attacks.

These attacks were caused by botnets (computer networks 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)

There are many ways hackers try to break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This is done with scripts and software tools that can guess hundreds of possible login combinations in minutes.

If you’re using weak usernames and weak passwords that are easy to guess, your site can be easily hacked by the software’s persistent attempts to work out your site’s login details.

This is called a “brute-force” login attack.

Botnet Definition

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)

”Botnets” are networks 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 or awareness.

Botnets are typically used to blast mass spam emails.

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the world since 2009 called “Zeus” …

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)

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

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

WordPress is often the target of malicious attacks by hackers

(Being the world’s most popular CMS makes WordPress a target for hacker attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of great reasons why you should continue using WordPress if you are concerned about the security of your website.

We explain what makes WordPress a very secure web platform in this article: How Secure Is WordPress?

Important

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

Mike Little, the co-founder 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 Brute Force Attacks – Ten Security Measures

Every website with a security vulnerability presents an opportunity to hackers. A vulnerable website or blog not only provides wannabe hackers opportunities to improve their skills and win “respect” from their peers, but it can also serve as a valuable resource for stealth attacks, spreading malware and defrauding online users through information theft.

If someone can find a flaw in the security, the blog can then be used as part of a larger network of “bots” to target larger and more valuable websites.

Additional undesirable consequences of having your website hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like casinos, porn, etc. in your content and meta data, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasty things.

The reality is that malicious bots are most likely scouring for security exploits and trying to hack into your website right now. Whether they can successfully break into your site depends on how difficult or easy you have made things for hackers and bots to keep trying until they either can discover a way to get in, or give up and decide to look for a more vulnerable target.

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

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

Website Security Scan(Hackertarget – WP Security Scan Source: Hackertarget.com)

You will see that the check returns various results and details about your website setup …

Website Security Scan

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

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

Hackertarget - Website Security Check(Screenshot image: BlogDefender site)

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

If your site or blog is driven by WordPress and you are not preventive steps to toughen up your site, it’s practically guaranteed that, at some point, someone will attempt to hack your site, because these brute-force attacks are systematically targeting WordPress installations all the world!

Whenever a site gets hacked, blog owners can find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Typically, compromised sites will become infected with malicious software without the owner even being aware that a security breach has occurred.

To avoid the heartache of having your website or blog being hacked into, below are 10 essential and effective security measures that will help to protect your WordPress site from brute-force attacks.

Disclaimer

Note: Some of the recommended measures shown below require some technical skills to modify core WordPress and/or server files. If you are not technical, 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 – Get In Touch With Your Webhosting Service

Get in touch with your host and ask them what systems they offer to help prevent your site from being attacked, and what is done to ensure that your server files get backed up.

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

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Maintained

You should never rely on your hosting service provider for site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and maintain a habit of performing a complete site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A full 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 plugins, themes and software components are up-to-date,
  • etc …

A complete WordPress maintenance routine looks like this …

Maintaining your WP site frequently backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site regularly backed up and updated is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP installation regularly backed up and updated is. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WordPress site maintenance yourself, pay someone to do it but make sure it gets done. Backing up your website is the next most important thing you must do after making sure that you are still breathing!

If you don’t want to perform manual backups, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy & Keep Your WP Websites And Blogs Protected With Backup Creator WP Plugin

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

The mass brute-force botnet attack on WordPress is mostly attempting to compromise website admin panels and gain access to sites by exploiting WP installations that used “admin” as their account name.

For reasons of website security, don’t install WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s user name is admin, then change this immediately.

For a simple tutorial that shows you how to change your admin username, go here: Changing Your WordPress Admin Username To Another User Name

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different character strings in an attempt to guess the right combination that will unlock your site.

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

Passwords that are easy to guess, therefore, become very easy targets for bot attacks. Make sure that you change your password to a string containing at least 8 characters long, with upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Practical Tip

Roboform is a password program you can use to create different strong passwords …

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

We have created a step-by-step tutorial that shows you how to change your password here: Changing WordPress Passwords

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

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.

wp-config.php

(wp-config.php)

If hackers break into your WordPress website, they will typically search for 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent people from accessing 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 – Delete Or Rename Unnecessary WP 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, then just rename them.

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your site’s admin area see and modify all of your WP theme templates, and create havoc on your site.

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

The “uploads” folder contains all the media that gets uploaded to your website.

Normally, this folder is visible to online users. All a person needs to do to view all of the contents in your “uploads” folder is visit your directory using their browser …

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

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

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

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, uploading a blank index.php file (this is literally a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are not sure about what to do.

Security Measure #10 – Install Security Plugins

Some great security plugins for WordPress are available that specifically address most security issues faced by WordPress site owners, such as preventing hackers 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 security plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - WP complete security software

(SecureScanPro – WordPress security software solution)

SecureScanPro is easy to install and easy to use, and fixes 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 Security Plugin

Blog Defender WordPress Security Plugin(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 SolutionAnd then shows you how to quickly fix these …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting simple maintenance tasks like updating your WordPress installation, plugins and themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you cannot afford to ignore the importance of website security.

As a final reminder of the importance of website security, below is the advice given by a security expert to all WordPress users after the worldwide 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 consult a professional 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 via email when we publish new articles and tutorials on WordPress security and tutorials about new security plugins.

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

***