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 powers millions of websites and blogs around the world, making it a target for hacker attacks.

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

These attacks were caused by networks of infected computers programmed to attack other vulnerable sites (botnets).

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)

One of the many ways hackers will attempt to break into WordPress sites is by trying to guess the site’s administration login username and password. This is achieved with scripts and software tools that automatically tries to guess hundreds of possible logins in minutes.

If you’re not using strong usernames or unguessable passwords, your site can be easily hacked by repeated attempts to guess your site’s login details.

This is called a “brute-force” attack.

Botnets – What Are They?

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 computers that have been infected with malicious code, which are then controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is taking place inside their device.

Botnets are typically used to blast out mass spam emails.

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 world since 2009 …

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

(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Image: SecureList.com)

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The worldwide attack then continued, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress often is targeted by hackers

(WordPress often is targeted by hackers, due to its global popularity)

Does This Mean We Should Stop Using WordPress?

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

We explain why WordPress is a secure platform for websites in this article: Is WordPress Secure?

Important Info

It’s important to understand that, in the case of the brute-force botnet attack described above, no specific WordPress vulnerability was 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)

Preventing Your WordPress Site From Being Brute Force Attacked – Ten Security Measures

You may think that the information in your website or blog offers no value to hackers, but the reality is that every website is valuable to a malicious user.

If a malicious user can discover a flaw in your security system and remotely take control of your blog, the web site can then be employed to target more valuable web sites.

Additional undesirable results of being hacked include being blacklisted by Google, having stealthy spam links promoting things like viagra, cheap offers on brand names, etc. inserted into your content and meta data, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasties.

The truth is that malicious bots are most likely searching for weaknesses and trying to break into your website or blog as you are reading this article right now. Whether they can achieve this or not, depends on how hard or easy you will make it for hackers or botnets to keep persisting until they either can find how to get access, or give up and go look for a more vulnerable target.

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

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

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

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

Hackertarget - WordPress Security Scan

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

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

WP Security Check(Product image 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 in your site can all be potentially valuable information to hackers, as this informs them about potential vulnerabilities, especially where the owners haven’t updated their software versions.

If your site or blog is powered by WordPress and you are not taking appropriate steps to toughen up your site, then it’s practically guaranteed that, at some point, someone will attempt to hack your website, because these attacks are systematically targeting WordPress installations worldwide!

Whenever a site gets compromised, site owners can find themselves “locked out” of their own site, or notice that their content has been interfered with or that everything has been entirely wiped out. Often, most sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To help avoid the heartache that comes with having your web site being hacked into, below are ten essential and effective security checks that will help to protect your WordPress site from brute force attacks.

Warning

Note: Some of the measures listed below need some technical skills to modify core WordPress and server files. If you have no web editing skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Hosting Service Provider

Contact your host and ask them exactly what precautions they offer to protect your site from brute-force attacks, and what is done to ensure that your server files and data get regularly backed up.

It is important to make sure that your webhosting provider is regularly backing up your server files and that, if anything goes wrong, you can quickly and easily recover your files.

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

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

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

A complete WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP installation fully backed up and updated is. WP site 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 WP maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that your heart is still beating!

If you don’t want to back up your data manually, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Duplicate And Keep Your WordPress Web Sites Protected With Backup Creator WP Plugin

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

the worldwide brute force attack on WordPress is mostly attempting to compromise site administrator panels by exploiting installations using “admin” as their username.

For reasons of website security, avoid installing a WordPress site with the username admin. This is the first thing hackers will test. If your site’s username is admin, then change this immediately.

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

Security Measure #4 – Your Password

A “brute force” attack occurs when malicious software continually tries to guess the right username and password character string that will unlock your website.

Unless some measure is put into place to block the brute-force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just keep attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, are very easy targets for hackers. Make sure that you change your password combination to something that is at least 8 characters long, and that includes upper and lowercase letters, combined with a few “special” characters (e.g. ^, #, @, etc).

Tip

You can use a password management program like Roboform to generate difficult passwords …

You can use a password management tool like Roboform to create unbreakable passwords(You can use a password software tool like Roboform to create passwords)

We have created a tutorial on how to change your password here: What To Do If You Need To Change Your Password In WordPress

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

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 file

(WordPress WP Config file)

If hackers break into your website, they will typically look for your wp-config.php file, because this is the file that contains your WordPress database information, 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 attacks and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily accessed. 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 Installation Files

Rename or delete 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 – Upgrade Your WordPress CMS, Plugins And Themes To Their Latest Version

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible via the main menu)

This means that anyone logging into your blog’s admin area can view and edit all of your theme templates, and cause havoc on your site.

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 – Remove Access To Your Site’s Uploads Folder

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

By default, this folder is visible to anyone online. All someone has to do to see the contents in your site’s “uploads” folder is visit your directory using their web browser …

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

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, someone could 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 seek professional help if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

A number of great security plugins for WordPress are available that will address common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your website from malicious software, preventing injections of code into files, etc.

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

SecureScanPro - WordPress security plugin

(SecureScanPro – WordPress total security software solution)

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

Blog Defender Security Suite For WordPress Websites

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

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

BlogDefender shows you where potential security weaknesses in your WordPress installation are …

Blog Defender Security Plugin For WordPressAnd lets you easily fix these …

Blog Defender Security Product Suite For WordPressIf you don’t want to invest in 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 web platform, but neglecting simple maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what type of business you run or plan to run online and how small you think your web presence is, you cannot ignore the importance of website security.

As one last reminder, below is the advice given by a web security expert to all WordPress users after 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, WordPress security is very important if you run a WordPress site. Hopefully, this information has given you the initial guidelines and help you need 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 WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new tutorials on WordPress security and tutorials about WordPress security plugins and solutions.

***

"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

***