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 content management system and the online publishing platform of choice used by millions of businesses and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will become a prime target for attacks from hackers wanting to score a “big win”.

In early 2013, WordPress installations around the world were subjected to a worldwide brute-force attack.

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

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)

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

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

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

What Is A Botnet?

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 can then be controlled remotely as a group, often without the computer owners’ knowledge.

Botnets are normally used used to blast mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet has been actively compromising 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. Screenshot source: SecureList.com)

These ongoing botnet attacks are highly distributed and well organized. 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 administration areas took place. The mass brute-force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress often comes under attack by hackers, due to its popularity

(WordPress often is targeted 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.

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

Useful Information

It’s important to note 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 targeting sites built using other CMS applications like Joomla).

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

Every web site with a security vulnerability has some degree of potential value to hackers. A compromised web site not only presents hackers opportunities to improve their skills and claim “bragging rights” amongst their peers, but it can also serve as a resource for launching stealth attacks, distributing malware and defrauding visitors through information theft.

If hackers can access and compromise the control of your website, the website can then be employed to target larger and more highly-valued web sites.

Additional undesirable results of having your site hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like casinos, porn, etc. inserted into your content and meta data, malicious redirects to phishing sites or other websites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasties.

The truth is that hackers are most likely trying to hack into your website while you are reading this article right now. Whether they can be successful depends on how challenging you have made things for hackers and botnets to keep trying until they either discover how to break in, or give up and go look for a less protected target.

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

Do you own a WordPress site? If so, visit Hackertarget.com and run your site through their WordPress security scan …

Hackertarget - WP Security Check(WordPress Security Scan Product image: https://hackertarget.com/wordpress-security-scan)

You will see that the check will yield a number of results and information about your site …

WP Security Check

(Hackertarget – WP security check results. Product image: Hackertarget.com)

It should be obvious after using the above tool that if you are able to see all of this information about your website, then hackers can too.

WordPress Security Scan(Screenshot image: Blog Defender)

Being able to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories can all be potentially useful information to hackers, as these can inform them about potentially exploitable holes or weaknesses, especially where site owners haven’t updated their files.

If your site or blog is driven by WordPress and you’re not precautionary steps to toughen up your site, we can practically guarantee that, at some point in time, someone will attempt to hack your installation, because these brute-force attacks are systematically targeting WordPress installations worldwide!

Typically, when a website or blog is compromised, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been completely wiped out. Often, sites will be infected with malicious scripts or viruses without the owner even being aware that a security breach has taken place.

To avoid the heartache (and potential financial loss) of having your web site being hacked into, we have listed below ten essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force hackers.

Useful Information

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

***

Security Measure #1 – Contact Your Web Host

Contact your web host and ask them what security systems have been put into place to protect your site from brute-force attacks, and what they do to make sure that your server files and data get backed up.

It is important to make sure that your webhosting provider is regularly backing up your sites 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 Website Or Blog Regularly Updated

Never rely just on your hosting service for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and develop a habit of religiously performing a complete site maintenance routine frequently (e.g. daily, weekly, fortnightly, etc …)

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

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WordPress website fully 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 or blog. If you do not want to learn how to do WP site maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the second most important thing you should do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are a number of plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy And Protect Your WP Site With Backup Creator Plugin For WordPress

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

The mass brute-force botnet attack on WordPress sites was mostly attempting to compromise website admin panels by exploiting installations with “admin” as the account name.

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

For a simple step-by-step tutorial that shows you how to change your login username, go here: Changing Your WP Admin Username To Another Username

Security Measure #4 – Use A Strong Password

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

Unless some measure is put into place to prevent 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, make really easy targets for hacking attacks. Make sure that you change your password to a string that contains at least eight characters long, with upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Tip

Roboform is a password software that lets you generate strong passwords …

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

For a detailed step-by-step tutorial on how to change your WordPress password, go here: What To Do If You Need To Change The Login Password

Security Measure #5 – Protect Your WP Config File

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

wp-config.php file

(WP Config file)

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

In order to protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must 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 – Rename Or Delete Unnecessary WordPress 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 delete these files, then just rename them.

Security Measure #7 – Keep Your WordPress CMS, Plugins & Themes Up-To-Date

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor is accessible using the WP admin menu)

The WordPress theme editor lets anyone accessing your blog view and edit your WP theme files, or cause havoc on your site.

If you want 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 – Secure The WordPress Uploads Folder

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

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

(WordPress uploads directory)

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers, this could threaten 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, uploading 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 ask help from someone who knows what they are doing if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

Several security plugins for WordPress are available that specifically address common security issues faced by WordPress site owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – security plugin for WordPress)

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

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

Blog Defender Security Plugin For WordPress

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 web site for potential security holes …

Blog DefenderAnd lets you quickly and easily fix these …

Blog Defender Security Suite For WordPressIf you don’t want to buy a security plugin like SecureScanPro or BlogDefender, you can use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data security and taking other necessary precautions can expose your website to attacks 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, you cannot ignore the importance of web security.

As one last reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users following 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 very important if you run a WordPress site. Hopefully, the information in this article has shown you what to do to 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 service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email when we publish new articles on WordPress security and reviews of WordPress security plugins and solutions.

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.