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 around the world, which makes it a natural target for hacking attempts.

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

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

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

What Is A Brute Force Attack?

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 use to try and break into a WordPress site is by trying to guess the site admin’s login username and password. This is done with scripts and tools that can guess hundreds of possible logins in minutes.

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

This is called a “brute-force” attack.

Botnets

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)

A “Botnet” is a network of private computers that have been compromised and infected with malicious code, which are then controlled remotely as a group, often without the computer owners even being aware that this is happening.

Botnets are typically used to blast mass spam emails from computers of unsuspecting users.

Below is a screenshot 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 …

The Zeus botnet 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. Image source: SecureList.com)

These ongoing botnet attacks on WordPress sites are well organized and highly distributed. Over 90,000 IP addresses were identified by several webhosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The brute force attacks continued after this, with over 30,000 WordPress sites being hacked per day.

News of the April 2013 mass brute-force attack was widely reported in all of the major webhosting companies, as well as the 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 attacks by hackers, due to its popularity

(Being the world’s most used content management system makes WordPress a target for hackers)

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

No. In fact, there are many good reasons why you should continue using WordPress if you are concerned at all about the security of your web presence.

We explain what makes WordPress a very secure platform for websites in this article: Are Open Source Platforms Like WordPress Secure?

Info

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

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

Protecting Your WordPress Blog From Being Brute-Force Attacked – Ten Security Measures

Every website or blog with a vulnerability can present an opportunity to hackers. No website Large, medium and small business web sites, personal blogs, government websites … even sites owned by web security experts can and have been targeted.

If a hacker can exploit a vulnerability, the site can then be employed as a “bot” in a planned cyber-attack against larger and more valued websites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by search engines, having spammy links advertising things like gambling, discounted fashion, etc. inserted into your content and meta data, malicious redirects to phishing sites or other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The harsh reality is that software-driven bots are most likely trying to break into your blog while you are reading this right now. Whether they can do this successfully or not, will depend on how difficult or easy you will make things for them to keep persisting until they work out how to break in, or are forced to give up and go look for a less protected 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 website through their WordPress security check …

WordPress Security Scan(WordPress Security Check Source: https://hackertarget.com/wordpress-security-scan)

You will see that the check will return various results and details about your site …

WordPress Security Check

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

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

Hackertarget - WP Security Scan(Screenshot source: BlogDefender.com)

The ability to see what version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories can be potentially valuable information to hackers, as this informs them about any potential security vulnerabilities, especially in older versions.

If your site or blog is powered by WordPress and you are not taking steps to bullet-proof your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress installations worldwide!

When a website or blog is hacked, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been interfered with or that everything has been entirely wiped out. Typically, compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To avoid the heartache (and significant loss of valuable business data) of having your website or blog being hacked into, we have listed below 10 essential and effective security measures that will help to prevent your WordPress site from botnet attacks.

Important Info

Note: Some of the measures shown below require some technical understanding of how to modify core WordPress or server files. If you are not technical, or don’t want to mess around with file code, then ask your web host or search for a professional WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Hosting Company

Contact your host and ask them exactly what systems are in place to help prevent your site from brute force attacks, and what is done to ensure that your site files are being regularly backed up.

Check that your webhosting service regularly backs up your server files and that, if anything goes wrong, you can easily get your site back.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Site Regularly Maintained

Never rely on your hosting company for site backups. Instead, learn how to manage your WordPress site or get this service done for you and maintain a habit of performing a complete WordPress site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WordPress site completely backed up and updated is vitally important for WordPress security.(Maintaining your WP website or blog fully backed up and up-to-date is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WP website or blog regularly 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. If you don’t want to learn how to do WordPress site 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 should do after making sure that you are still breathing!

If you don’t want to back up your files manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Copy & Protect Your WP Web Sites With Backup Creator WordPress Plugin

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

The large scale brute-force botnet attack on WordPress sites was mostly attempting to compromise site administrator panels by exploiting sites with “admin” as their user name.

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

We have created a simple tutorial for WordPress users on how to change your username here: Changing Your WP Admin Username

Security Measure #4 – Avoid Weak Passwords

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

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

Passwords that are easy to guess, therefore, make really easy targets for brute-force attacks. Make sure that you change your password to a string that contains at least 8 or 9 characters long, with both upper and lowercase letters, and add a few “special” characters (^%$#&@*).

Tip

Roboform is a password management software that lets you generate really secure passwords …

You can use a password tool like Roboform to help you generate secure login passwords(Roboform is a password management program that lets you generate different strong login passwords)

We have created a simple step-by-step tutorial for WordPress admin users that shows you how to change your admin password here: What To Do If You Need To Reset Your Password In WordPress

Security Measure #5 – Prevent 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 WordPress options.

wp-config.php file

(wp-config.php)

If hackers break into your WordPress website, they will normally 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 someone 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 your wp-config.php file from being easily accessible. 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 your install.php, upgrade.php and readme.html files.

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

Hackers are always on the lookout for vulnerabilities they can exploit in older WordPress versions, including out-of-date versions of themes and plugins.

Ensure that all of your WordPress application 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 feature that allows site administrators to edit plugin and theme files inside the dashboard area.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

This means that anyone logging into your blog can view and make changes to your WP theme templates, or create havoc on your site.

To prevent 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 – Protect The Site’s Uploads Directory

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

Normally, this folder is visible to online users. 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 folder)

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this can threaten the security of your site.

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

Security Measure #10 – WordPress Security Plugins

There are a number of great WordPress security plugins available that specifically address many common security issues faced by WordPress website owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your files from malicious scripts, 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 potential issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - complete security software for WordPress

(SecureScanPro – WP total security plugin)

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

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

Blog Defender Security Suite

Blog Defender Security Solution For WordPress(Blog Defender Security Solution For WordPress)

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

BlogDefender scans you WordPress installation for potential security weaknesses …

Blog Defender Security Suite For WordPress Websites & BlogsAnd lets you fix these quickly and easily …

Blog Defender Security SuiteIf 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 installation, WordPress plugins and WP themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

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 securing your website.

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 very important if you run a WordPress site. Hopefully, the above information 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 professional WordPress service provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to be notified via email when we publish new information on WordPress security and tutorials about new WordPress security plugins.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

***