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 SecurityWhen you are the world’s leading content management system and the online publishing platform of choice for millions of businesses and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers.

In April 2013 a large-scale brute force attack hit WordPress installations across virtually every WP hosting server in existence around the world.

These attacks were caused by infected computer networks programmed to attack other sites, also commonly known as “botnets”.

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)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site admin’s login username and password. This is done using software tools that can guess hundreds of possible logins in minutes.

If you’re using obvious usernames and predictable passwords, your site can be an easy target for hackers.

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 computers that have been infected with malicious code, which are then controlled remotely as a group, typically without the computer owners even being aware of this.

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

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe 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. Source: SecureList.com)

These were well organized and highly distributed botnet attacks. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when millions of attempts to force their way into WordPress site administration areas occurred. The large-scale brute force attacks continued after this, with over 30,000 WordPress blogs being hacked each day.

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

Powering millions of websites and blogs worldwide makes WordPress a target for malicious attempts by hackers

(WordPress powers millions of websites around the world, making it a target for malicious attacks by 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 choose WordPress if you are concerned at all about the security of your website.

To understand what makes WordPress a very secure platform for websites, read this article: Can You Build A Secure Business Online Using WordPress?

Important Info

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

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

Protecting Your WordPress Site From Being Brute-Force Attacked – 10 Security Points

Every web site with a vulnerability offers some value to hackers. An unsecured website offers malicious users with a valuable resource for DDoS attacks, spreading malware and as a source of information theft.

If hackers can hack into and gain remote access and control of your site, that web site can then be employed as a “bot” in a planned cyber-attack against other highly-valued websites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by search engines, having stealthy spam links advertising things like online meds, cheap offers on brand names, etc. inserted in your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasties.

The reality is that malicious bots are trying to hack into your website as you are reading these very words. Whether they will break into your site successfully or not, depends on how difficult or easy you will make it for hackers or botnets to continue trying until they either discover a way to get access, or are forced to decide to look for a less protected 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 check …

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

You will see that the scan returns a number of results and details about your site setup …

Website Security Check

(WordPress security scan results. Product image: Hackertarget.com)

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

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, and which files have been uploaded to certain directories are all valuable information to hackers, as this can inform them about exploitable security weaknesses, especially in older versions.

If your website is powered by WordPress and you’re not taking appropriate steps to harden your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your website, because these brute-force attacks are systematically targeting WordPress installations all the world!

When a website or blog gets broken into, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Typically, most compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and frustration that comes with discovering that your website or blog has been hacked into, below are ten simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute force hackers.

Info

Note: A few of the recommended steps below require some technical understanding of how to modify core WordPress and/or server files. If you lack these technical skills, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your host and ask them what measures they have put into place to protect your site from being attacked, and what they are doing to ensure that your server files and data are regularly being backed up.

It is important to check that your webhosting provider is backing up your server files and that, if disaster strikes, you can quickly and easily recover your files and data.

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

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

A full WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP website completely backed up and updated. WP maintenance is not hard 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 WP site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your site is the second most important thing you must do after making sure that you are still breathing!

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

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

The large scale brute force attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting WP sites that used “admin” as the user name.

For reasons of website security, don’t set up WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is admin, change this immediately.

We have created a tutorial created especially for non-technical WordPress admin users on how to change your login username here: Changing Your WP Admin Username

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when a malicious script continually hits a username and password field with different character strings in an attempt to guess the right login combination that will unlock your website.

Unless you put some measure in 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 “cracks” the code.

Weak passwords, therefore, are very easy targets for botnets. 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

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

You can use a password management software tool like Roboform to generate very secure passwords(Roboform is a password program you can use to help you generate very secure passwords)

We have created a detailed step-by-step tutorial on how to change your admin password here: What To Do If You Need To Change WordPress Passwords

Security Measure #5 – Secure Your WP Config 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 file)

If a hacker breaks into your site, they will try to access the wp-config.php file, because this file contains your WordPress database details, 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 being attacked and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being 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 Blog Installation Files

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

These files are completely unnecessary after installation and can be deleted. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Keep Your WordPress Blog, Themes And Plugins Up-To-Date

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the WordPress main menu)

This means that anyone logging into your blog’s admin area can view and modify your theme templates, and create 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 editing your wp-config.php file.

Security Measure #9 – Remove Access To The WordPress Uploads Folder

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

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

(WordPress uploads folder)

(WordPress uploads directory)

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

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

Security Measure #10 – Security Plugins

Some great security plugins for WordPress are available that specifically address many common security issues faced by WordPress website owners, such as preventing hackers from accessing your site, protecting your website from botnets, preventing injections of code into files, etc.

Most 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 potential issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - security software for WordPress

(SecureScanPro – WP total security plugin)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security issues that WordPress users need to address.

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

Blog Defender Security Suite For WordPress Web Sites

Blog Defender Security Plugin For WordPress Websites & Blogs(Blog Defender)

Blog Defender is a suite of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender scans you WordPress site for potential security holes …

Blog Defender Security Product Suite For WordPress SitesAnd lets you fix these quickly and easily …

Blog DefenderIf you don’t want to invest in a premium 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 secure platform, but neglecting basic maintenance tasks like keeping your WP core files, plugins and themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

No matter what kind of business you run or plan to run online and how small you think your web presence is, securing your website or blog is something you cannot afford to ignore.

As one last reminder, below is the advice given by an expert on website security to all WordPress users after the worldwide 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, 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 WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified when we publish new articles on WordPress security and tutorials about 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

***