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 SecurityPowering millions of websites and blogs around the world makes WordPress a natural target for malicious attempts by hackers.

In 2013 a worldwide brute force attack began hitting WordPress installations across almost every WP hosting server in existence.

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

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)

There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be done with scripts and tools that can work through hundreds of possible login combinations in minutes.

If you’re using predictable usernames and predictable passwords, your website can be easily hacked by persistent attempts to work out 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)

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

Botnets are often used to blast out mass spam emails from the infected computers of compromised user accounts.

The screenshot below was taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet has been actively infecting computer networks all around the world since 2009.

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

The ongoing botnet attacks are highly distributed and well organized. 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 worldwide brute-force attacks continued after this, with over 30,000 WordPress blogs being hacked every day.

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

WordPress is frequently the target of attacks by hackers, due to its popularity

(WordPress powers millions of sites worldwide, making it a natural target for hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain what makes WordPress a very secure web platform in this article: How Secure Is WordPress?

Info

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

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

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

Every website with a vulnerability presents an opportunity to hackers. An unsecured site not only offers hackers opportunities to improve their hacking skills and win “respect” from their peers, but it can also serve as a valuable platform for launching DDoS attacks, distributing malware and as a source for creating information theft.

If hackers can find a way to break in and control your blog, your web site can then be employed as part of a larger network of “bots” to target other valued web sites.

Additional undesirable impacts of having your site hacked include getting blacklisted by search engines, having spammy links advertising things like gambling, porn, etc. in your content, redirecting visitors to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasty things.

The harsh reality is that hackers are probably looking for exploits and trying to hack into your blog as you are reading these very words. Whether they can do this successfully or not, will depend on how hard you have made it for hackers to continue trying until they work out a way to get in, or are forced to decide to look for a less secure target.

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

Does your website run on WordPress? If so visit Hackertarget.com and run your website through their WordPress security check …

WordPress Security Check(Website Security Check Screenshot image: https://hackertarget.com/wordpress-security-scan)

You will see that the check will return a number of results and information about your website …

WP Security Check

(Hackertarget – website security check results. Source: Hackertarget.com)

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

Hackertarget - WordPress Security Scan(Screenshot image: Blog Defender)

The ability 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 are all potentially useful information to hackers, as this can inform them about potentially exploitable holes or weaknesses, especially where the owners haven’t updated their sites.

If your site or blog runs on WordPress and you’re not proactive steps to bullet-proof your site, we can practically guarantee that, at some point, someone will attempt to hack your website, because these brute force attacks are systematically hitting WordPress installations worldwide!

Whenever a website or blog is broken into, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been modified or that everything has been entirely wiped out. Typically, most compromised sites will be infected with malicious software without the owner’s knowledge or awareness.

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

Warning

Note: A few of the measures below require some technical skills to modify core WordPress and/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 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 and ask them what systems they offer to help prevent your site from being attacked, and what is done to ensure that your WordPress sites are being backed up.

It is important to check that your webhosting provider regularly backs up your sites and that, if anything should happen, 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 site backups. Instead, learn how to manage your WordPress site or pay someone to get this done for you and develop a habit of religiously performing a full site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A proper WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP web site completely backed up and updated is. WordPress maintenance is not hard 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 WordPress maintenance yourself, get someone else 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 free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone & Protect Your WordPress Sites With Backup Creator WordPress Plugin

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

The mass brute force botnet attack on WordPress is mostly an attempt to compromise site admin panels by exploiting installations that used “admin” as their username.

For website security reasons, never install WordPress sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s username is admin, then change this immediately.

For a simple step-by-step tutorial that shows you how to change your WordPress admin username, go here: Changing Your WordPress Admin Username

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when a malicious script persistently hits a login or password field with different strings of characters in an attempt to guess the right login combination that will give the hacker access to your site.

Unless some measure is put into place to block the brute force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just continue attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, make very easy targets for hacking attacks. Make sure that you change your password to a string that contains at least 8 or 9 characters long, with upper and lowercase letters, and “special” characters (e.g. %, #, &, etc).

Practical Tip

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

You can use a password management software tool like Roboform to help you generate unbreakable passwords(You can use a password management tool like Roboform to help you generate strong passwords)

For a step-by-step tutorial that shows you how to change your WordPress password, go here: Changing Login Passwords In WordPress

Security Measure #5 – Prevent Your wp-config.php File From Being Easily Found

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced WordPress options.

WP Config file

(wp-config.php)

If hackers break into your WordPress site, they will normally search for the wp-config.php file, because this is the file that 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 attacks and even being used as part of a bot net, therefore, you must prevent people from 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 WP 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 – Keep Your WordPress Software, Themes & Plugins Up-To-Date

Hackers look for vulnerabilities in earlier versions of WordPress that they can exploit, including outdated versions of WordPress themes and plugins.

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

Security Measure #8 – Disable Your Theme Editor

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

In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor from your admin menu …

WordPress Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your blog view and change your WP theme template files, or create 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 – Secure The Site’s Uploads Directory

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

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

(WordPress uploads directory)

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

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers, anyone can upload unauthorized file types or compromise the security of your website.

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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Security Plugins

There are a number of great security plugins for WordPress available that will address many common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your site from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - WordPress complete security software solution

(SecureScanPro – complete security software solution for WordPress)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Product Suite

Blog Defender Security Plugin For WordPress(Blog Defender WordPress Security Plugin)

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

BlogDefender scans you web site for potential security holes …

Blog DefenderAnd lets you fix these quickly …

Blog DefenderIf you don’t want to buy 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 platform, but neglecting essential 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.

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 afford to ignore.

As a final reminder of the importance of website security, below is the advice given by a security expert to all WordPress users after the large-scale brute-force attacks 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, 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 consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

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

Get Thrive Leads for WordPress

***

"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

***