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

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

These attacks were caused by networks of infected computers programmed to attack other vulnerable installations (called “botnets”).

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

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)

One of the many ways hackers will attempt to break into WordPress sites is by trying to guess the site admin’s login username and password. This is achieved using software tools and scripts that can work through hundreds of login possibilities in minutes.

If you’re using easy-to-guess login details, your site could be an easy target for hackers.

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.org)

”Botnets” are networks of private computers that have been infected with malicious code, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is taking place.

Botnets are typically used to send mass spam emails.

The screenshot below was 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 compromising computer networks all around the globe since 2009.

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

These were well organized and highly distributed attacks on WordPress. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress user administration areas took place. The mass attack continued after this, with over 30,000 WordPress sites and blogs being hacked each day.

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

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

(WordPress is frequently the target of mass malicious attempts by hackers, due to its global popularity)

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

No. In fact, there are many very good reasons why you should choose WordPress if you are concerned about the security of your web presence.

We explain what makes WordPress a very secure platform for websites in this article: Is WordPress A Secure Website Platform?

Info

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

Mike Little, one of the co-founders 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)

Protecting Your WordPress Site From Being Brute Force Attacked – Ten Security Checks

You may think that your website has no significant value to hackers, but the reality is that every website has value to a malicious user.

If hackers can find a web software weakness, your website or blog can then be employed to attack more highly-valued sites.

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

The reality is that software-driven bots are searching for security weaknesses and trying to hack into your web site right now. Whether they can break into your site will depend on how hard you can make things for hackers to keep persisting until they can discover how to get access, or are forced to give up and go 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 Hackertarget.com and run your site through their WordPress security check …

Hackertarget - WP Security Scan(WordPress Security Check Screenshot: Hackertarget.com)

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

WP Security Scan

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

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

WP Security Check(Image source: Blog Defender)

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 be useful information to hackers, as this informs them about any potential security weaknesses, especially where site owners haven’t updated their sites.

If your website runs on WordPress and you’re not preventive steps to bullet-proof your site, we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these attacks are systematically targeting WordPress installations all the world!

When a website or blog is hacked, blog owners can find themselves completely “locked out” of their own site, or notice that their files have been vandalized or even that their content has been completely wiped out. Often, sites will be infected with malicious software without the owner even being aware that a security breach has occurred.

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

Useful Information

Note: Some of the recommended measures below need some technical understanding of how to modify core WordPress or server files. If you have no 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 – Get In Touch With Your Web Host

Get in touch with your webhosting provider and ask them what security precautions have been put into place to protect your site from brute-force attacks, and what they do to ensure that your files and data get regularly backed up.

Make sure that your host regularly backs up your server files and that, if anything happens, you can easily get your files back.

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

You should never rely on your web host 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 regular basis (e.g. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

Maintaining your WordPress website or blog completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website or blog frequently 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 fully backed up and updated. WP 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, pay someone to do it but make sure this gets done. Backing up your site is the next most important thing you should 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. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate & Keep Your WordPress Site Protected With Backup Creator WordPress Plugin

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

The mass brute force attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting sites with “admin” as the user name.

For reasons of website security, avoid installing sites with the username admin. This is the first thing hackers will test. If your blog’s user name is “admin”, change this immediately.

For a detailed tutorial that shows you how to change your login username, go here: How To Change Your WP User Name From Admin To A Different Username

Security Measure #4 – Your Password

A “brute force” attack occurs when malicious software persistently tries to guess the right password and username characters that will give the hacker entry to your website.

Unless you put some measure in place to prevent the brute force attack (see further below for a couple of effective ways to do this), the “bot” will just continue to attack your site until it eventually “cracks” the code.

Weak passwords, therefore, become really easy targets for brute force attacks. Make sure that you change your password to something that contains at least eight characters long, and that includes upper and lowercase letters, and “special” characters (^%$#&@*).

Tip

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

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

For a detailed step-by-step tutorial on how to change your login password, go here: How To Reset Your Password In WordPress

Security Measure #5 – Deny Access To Your wp-config.php File

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

wp-config.php file

(wp-config.php file)

If hackers break into your website, they will look 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 being attacked and even being used as part of a bot net, therefore, you must 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 Website Installation Files

Delete or rename the install.php, upgrade.php and readme.html files from your server.

These files are not required after installation and can be deleted. If you don’t want to remove these files, just rename them.

Security Measure #7 – Update Your WordPress Installation, Themes And Plugins

Hackers are always on the lookout for vulnerabilities in earlier versions of WordPress that they can exploit, including outdated versions of themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor allows anyone accessing your site’s admin area to see and make changes to your theme files, or create mayhem on your site.

To prevent people from being able to access 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 Your Site’s Uploads Directory

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

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

(WordPress uploads directory)

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

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

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 a blank file named “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 – Install Security Plugins

Some great WordPress security plugins are available that specifically address many common security issues faced by WordPress website owners, such as preventing hackers from accessing vital areas of your site, protecting your website from malicious exploits, preventing unauthorized file uploads, 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 files and causing damage to your site is SecureScanPro.

SecureScanPro - complete security software solution for WordPress

(SecureScanPro – security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and addresses most of the security issues that WordPress users need to address.

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

Blog Defender Security Product Suite For WordPress Web Sites

Blog Defender(Blog Defender Security Solution For WordPress)

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

BlogDefender scans you website for potential security vulnerabilities …

Blog Defender Security SuiteAnd lets you quickly and easily fix these …

Blog DefenderIf you don’t want to purchase a premium 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 simple maintenance tasks like ensuring that your WP software, WordPress plugins and themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can expose your website to malicious by hackers and bots.

Regardless of the type of business you run or plan to run online and how small you think your web presence is, securing your web site is something you simply cannot afford to ignore.

As one last reminder, below is the advice given by a web security expert to all WordPress users after the global 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 of the utmost importance if you run a WordPress site. Hopefully, the information in this article 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 service provider in our WordPress Services Directory.

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

***

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

***