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 SecurityWordPress frequently comes under attack by hackers.

In 2013 a global brute force attack began hitting WordPress installations across virtually every WP hosting server in existence.

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

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. To attempt this, hackers use scripts and tools that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using weak login details, your website could be an easy target for hacking attempts.

This is called a “brute-force” attack.

Botnet – What Is This?

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)

A “Botnet” is a network of computers that have been infected with malicious code, which can then be controlled remotely as a group, typically without the computer owners’ knowledge.

Botnets are regularly used to send 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 ZeuS – a botnet that has been actively compromising computer networks all around the globe since 2009 …

ZeuS is 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 globe since 2009. Screenshot image: SecureList.com)

These botnet attacks on WordPress were highly distributed and well organized. 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 site administration areas. The worldwide brute force attacks then continued, with over 30,000 WordPress blogs being hacked per day.

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

Being the world's most used content management system makes WordPress a target for hackers

(WordPress often comes under attack by hackers)

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

No. In fact, there are lots of great reasons why you should use WordPress if you are concerned about the security of your online presence.

To learn what makes WordPress a very secure web platform, see this article: Is WordPress A Secure Platform For Websites?

Info

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

Mike Little, the co-founder of WordPress with Matt Mullenweg, made the following comment 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)

Protecting Your WordPress Site From Being Brute Force Attacked – 10 Security Measures

Every blog with a vulnerability offers some value to hackers. A compromised website presents hackers with a valuable resource for DDoS attacks, spreading malware and as a source of information theft.

If a hacker can exploit a way to gain remote access and control of your website, your blog can then be employed as a “bot” to attack other highly-valued websites.

Additional undesirable consequences of having your website hacked include getting blacklisted by Google, having stealthy spam links promoting things like casinos, porn, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that brute-force software bots are most likely looking for weaknesses and trying to break into your site at this very moment. Whether they can hack into your site successfully or not, will depend on how hard you will make things for hackers to keep trying until they either can find a way to get in, or give up and go look for an easier target.

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

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

WP Security Check(Hackertarget – WordPress Security Check Image source: Hackertarget.com)

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

Hackertarget - Website Security Scan

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

It should be obvious after using the tool shown above that if you can freely access all of this information about your WordPress website, then so can hackers.

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

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

If your site or blog is powered by WordPress and you’re not taking steps to toughen up your site, it’s practically guaranteed 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 all the world!

Whenever a website is hacked, webmasters will 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 completely wiped out. Typically, most sites will be infected with malicious scripts without the owner even being aware that this has taken place.

To avoid the heartache of discovering that your site 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.

Useful Information

Note: A few of the recommended steps below need some technical skills to modify core WordPress and 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 a professional WordPress technical provider for assistance.

***

Security Measure #1 – Contact Your Hosting Service

Get in touch with your web host and ask them exactly what security precautions they have put into place to protect your site from being attacked, and what they are doing to ensure that your WordPress sites get regularly backed up.

Make sure that your webhosting service backs up your server files and that, if anything should happen, you can quickly and easily get back your site.

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

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

A full WordPress maintenance routine ensures that:

  • All unnecessary files and data are deleted,
  • All WP files and data are free of errors, optimized and backed up,
  • All WP 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 WordPress site 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 up-to-date is. WordPress maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WordPress maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your site is the second most important thing you should 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. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Duplicate And Keep Your WP Web Site Protected With Backup Creator WordPress Plugin

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

the worldwide brute-force botnet attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting sites with “admin” as their username.

For reasons of website security, never install WordPress sites 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 that shows you how to change your admin username, go here: How To Change Your WordPress User Name From Admin To Another Username

Security Measure #4 – Choose Strong Passwords

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

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

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 eight or nine characters long, with upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Practical Tip

You can use a password management tool like Roboform to help you generate hard-to-crack passwords …

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

We have created a detailed tutorial for non-technical WordPress admin users that shows you how to change your admin password here: Changing Passwords

Security Measure #5 – Secure Your WP Config File

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

wp-config.php

(wp-config.php file)

If a hacker breaks into your WordPress website, they will normally look for the wp-config.php file, because this file contains your WordPress 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, prevent people 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 – Rename Or Delete Unnecessary Installation Files

Rename or delete 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 – Keep Your WordPress Installation, Plugins And Themes Up-To-Date

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

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress installations come with a built-in editor that lets you edit theme and plugin files inside the dashboard area.

You can access the WordPress Theme Editor by selecting Appearance > Editor in the admin menu …

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the WP admin menu)

This allows anyone accessing your blog’s admin area to see and make changes to all of your WP theme files, and create mayhem on your site.

To prevent unauthorized people from being able to access your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Secure Your Site’s Uploads Folder

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

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

(WordPress uploads folder)

(WordPress uploads folder)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, anyone could upload unauthorized file types or compromise the security of your site.

Protecting your directories will prevent unauthorized people 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 an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to get professional assistance if you are unsure about what to do.

Security Measure #10 – Security Plugins

There are a number of great security plugins for WordPress available that specifically address most security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your files from botnets, preventing injections of code into files, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security 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 causing damage to your site is SecureScanPro.

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – WordPress security software)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Product Suite

Blog Defender WordPress Security Product Suite(Blog Defender)

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

BlogDefender scans you WordPress site for security weaknesses …

Blog Defender Security SolutionAnd then shows you how to quickly fix these …

Blog DefenderIf you don’t want to invest in 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 very secure platform, but neglecting basic maintenance tasks like updating your WordPress installation, WordPress plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.

No matter what kind of business you run or plan to run online and how small you think your web presence is, website security is something you simply cannot afford to ignore.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users following the global 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, website security is of the utmost importance if you run a WordPress site. Hopefully, this information will help 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 WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new tips on WordPress security and reviews of new security plugins.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***