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.

WordPress SecurityWordPress is frequently the target of malicious attempts by hackers.

In April 2013 a global brute force attack hit WordPress installations on almost every WP hosting server in existence.

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

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)

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. This is achieved with scripts and software tools that automatically tries to guess hundreds of possible logins in minutes.

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

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)

A “Botnet” is a network of computers that have been infected with malicious scripts or software code, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are normally used used to send out mass spam emails from the infected computers of unsuspecting users.

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” …

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 source: SecureList.com)

These botnet attacks are highly distributed and well organized. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when millions of attempts to force their way into WordPress users admin areas occurred. The large-scale attacks then continued, with over 30,000 WordPress sites being hacked each 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 Forbes, TechNews Daily, Tech Crunch, PC Magazine, BBC News, and even on the official US Department of Homeland Security website …

WordPress powers millions of websites and blogs worldwide, which makes it a target for hacking attempts

(Being the world’s most popular content management system makes WordPress an obvious target for hacking attempts)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

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

Important

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

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

Preventing Your WordPress Blog From Being Brute Force Attacked – 10 Security Points

Every website with a vulnerability presents an opportunity to hackers. No website or blog is immune from cyber-attacks. Business web sites, personal blogs, government sites … even web sites owned by web security and anti-hacking experts can and have been targeted.

If a hacker can discover a way to gain complete control of your website or blog, that web site can then be employed as part of a larger network of “bots” to target more valuable web sites.

Additional undesirable impacts of having your website hacked include getting blacklisted by search engines, having stealthy spam links advertising things like gambling, cheap offers on brand names, etc. inserted in your content, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The truth is that software-driven bots are trying to break into your site while you are reading this article right now. Whether they will do this successfully will depend on how hard or easy you will make things for hackers to keep trying until they can discover how to get access, or are forced to decide to look for a more vulnerable target.

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

If you visit a site like Hackertarget.com and run your site through their WordPress security scan …

Hackertarget - WP Security Check(Website Security Check Source: Hackertarget.com)

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

Hackertarget - Website Security Scan

(WordPress security scan results. Source: Hackertarget.com)

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

Website Security Scan(Product image source: BlogDefender.com)

The ability 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 potentially useful information to hackers, as this informs them about any exploitable security weaknesses, especially where site owners haven’t updated their software versions.

If your site or blog is powered by WordPress and you’re not taking appropriate steps to harden your site, then it’s practically guaranteed that, at some point in time, your site will be hacked, or at least targeted by bots, because these attacks are systematically hitting WordPress installations all the world!

Typically, whenever a site gets hacked, webmasters will find themselves completely “locked out” of their own site, or notice that their content has been vandalized or even entirely wiped out. Often, most sites will become infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache (and significant loss of valuable business data) that comes with discovering that your website or blog has been hacked into, below are ten essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.

Useful Info

Note: A few of the recommended measures listed below need some technical understanding of how to modify core WordPress and server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

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

Contact your hosting service provider and ask them what security measures have been put in place to help prevent your site from being attacked, and what is done to ensure that your files and data get backed up.

Make sure that your webhosting provider regularly backs up your sites and that, if disaster strikes, you can quickly and easily get your site back.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Regularly Maintained

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

A proper WordPress maintenance routine ensures that:

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

A full WP site maintenance routine looks like this …

Maintaining your WordPress web site backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website backed up and updated is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress website or blog completely backed up and up-to-date is. WP 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 maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your website is the next most important thing you should do after making sure that your heart is still beating!

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

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

The large scale brute-force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels by exploiting installations that used “admin” as their username.

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 user name is admin, then make sure you change it immediately.

We have created a step-by-step tutorial on how to change your WordPress username here: How To Change Your Admin Username In WordPress To A Different Username

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when malicious software continually tries to guess the right password and username character string 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 ways to do this), the “bot” will just continue attacking your site until it eventually gets access.

Weak passwords, therefore, make very easy targets for bot attacks. Make sure that you change your password to something that contains at least eight or nine characters long, with both upper and lowercase letters, and add a few “special” characters (e.g. %, #, *, etc).

Practical Tip

If you have trouble coming up with strong passwords or are reluctant to set up different passwords for all of your online logins, then use a password software tool like Roboform …

Roboform is a password management tool that lets you easily generate different strong passwords(Roboform is a password management software that lets you generate different strong login passwords)

We have created a simple tutorial for non-technical admin users on how to change your admin password here: Changing Your Login Password

Security Measure #5 – Prevent Access To The 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.

WordPress WP Config file

(wp-config.php file)

If a hacker breaks into your website, they will look for the wp-config.php file, because this is the file that contains your database information, security keys, etc. Getting access to this information would allow them 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 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 WP Installation Files

Rename or delete your install.php, upgrade.php and readme.html files.

These files can be deleted after installation. If you don’t want to delete these files, just rename them.

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

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

Make sure to keep all of your application files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable The Theme Editor

WordPress comes with a built-in editor feature that lets you edit plugin and theme files from the dashboard area.

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

WP Theme Editor Menu

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

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

If you want to prevent unauthorized 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 – Protect The WordPress Uploads Folder

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

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

(WordPress has an uploads folder where all of your media files are stored)

(WordPress has an uploads directory where all of your media files are stored)

If any directories in your website have vulnerabilities that can be exploited by hackers or malicious users, someone can upload unauthorized file types or compromise the security of 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, 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 ask for assistance from someone with experience if you are unsure about what to do.

Security Measure #10 – Install Security Plugins

A number of WordPress security plugins are available that will address most common security issues WordPress website owners face, such as preventing hackers from accessing vital areas of your site, protecting your site from botnets, preventing unauthorized file uploads, etc.

Many 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 issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.

SecureScanPro - complete security software for WordPress

(SecureScanPro – WordPress security software)

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 look at using is BlogDefender.

Blog Defender Security Plugin For WordPress

Blog Defender(Blog Defender)

This product is a package of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where the security weaknesses in your WordPress site are …

Blog Defender Security Suite For WordPressAnd lets you quickly and easily fix these …

Blog DefenderIf you don’t want to buy a 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 secure web platform, but neglecting simple maintenance tasks like keeping your WP software, WordPress plugins and themes up-to-date, tightening file and data protection 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, website security is something you simply cannot 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 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 seek help from a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to be notified via email when we publish new tips on WordPress security and reviews of new WordPress security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***