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 is frequently the target of malicious attempts by hackers.

In early 2013 a large-scale brute-force attack hit WordPress installations across virtually every web host in existence around the world.

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

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)

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. To achieve this, hackers use scripts and tools that can guess hundreds of login combinations in minutes.

If you’re using predictable user names and predictable passwords, your website can be an easy target for hacking attempts.

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.org)

”Botnets” are networks of private computers that have been compromised and infected with malicious code or scripts, which are then controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is going on.

Botnets are typically used to blast mass spam emails.

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

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

These were highly distributed and well organized attacks. 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 admin areas occurred. The large-scale brute force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

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

Powering millions of sites worldwide makes WordPress a target for hacker attacks

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

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

No. In fact, there are many very good reasons why you should continue using WordPress if you are concerned about the security of your online business.

To understand why WordPress is a secure web platform, read this article: Can You Build A Secure Business Online Using WordPress? What Every Business Owner Needs To Know

Useful Information

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

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

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

Every website or blog with a vulnerability provides an opportunity to hackers. A vulnerable web site presents malicious users with a valuable resource for stealth attacks, spreading malware and as a source of information theft.

If someone can exploit a software flaw in your security and compromise the control of your site, your web site can then be employed as part of a larger network of “bots” to target more highly-valued sites.

Additional undesirable effects of having your site hacked and your site security compromised include being blacklisted by Google, having stealthy spam links promoting things like gambling, cheap offers on brand names, etc. inserted into your content and meta data, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasty things.

The reality is that brute-force software bots are very likely trying to hack into your website or blog as you are reading this at this very moment. Whether they can hack in successfully depends on how challenging you will make things for hackers to continue trying until they either can find how to break in, or give up and decide to 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 …

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

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

Hackertarget - Website Security Check

(WordPress security check results. Screenshot source: Hackertarget.com)

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

WP Security Check(Screenshot: Blog Defender)

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 on your server are all potentially useful information to hackers, as these can inform them about exploitable security weaknesses, especially where the owners haven’t updated their files.

If your site or blog is powered by WordPress and you are not preventive steps to bolster the security of your site, then it’s practically guaranteed that, at some point in time, someone will attempt to hack your installation, because these brute-force attacks are systematically hitting WordPress installations around the world!

Whenever a site gets compromised, website owners will find themselves “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Typically, most compromised sites will become infected with malicious scripts without the owner even being aware that this has occurred.

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

Info

Note: Some of the recommended measures below require some technical understanding of how to modify core WordPress and server files. If you are not technical, 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 Host

Get in touch with your webhosting provider and ask them what security measures they offer to help prevent your site from brute force attacks, and what they do to ensure that your server files and data get backed up.

Check that your web host is backing up your server files and that, if disaster strikes, you can easily get your site back.

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

You should never rely just on your hosting provider for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this service done for you and maintain a habit of performing a full site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

Maintaining your WP website regularly 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. Image source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP website or blog backed up and up-to-date is. WordPress site 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 WordPress site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the second 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 a number of plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate & Keep Your WordPress Site Protected With Backup Creator Plugin For WP

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

The brute-force attack on WordPress is mostly attempting to compromise website admin panels and gain access to sites by exploiting sites using “admin” as their account name.

For reasons of website security, avoid installing 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 it immediately.

We have created a step-by-step tutorial that shows you how to change your username here: Changing Your WordPress Admin User Name

Security Measure #4 – Use A Strong Password

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

Unless you put some measure in place to stop the brute-force attack from happening (see further below for a couple of effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, are very easy targets for botnets. Make sure that you change your password combination to a string that is at least eight or nine characters long, and that includes upper and lowercase letters, and add a few “special” characters (^%$#&@*).

Tip

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

You can use a password management tool like Roboform to create strong login passwords(Roboform is a password management software you can use to help you generate different strong passwords)

For a step-by-step tutorial for WP admin users on how to change your password, go here: How To Change WordPress Passwords

Security Measure #5 – Secure Your 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.

wp-config.php file

(wp-config.php file)

If hackers break into your WordPress site, they will search for 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 them 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, prevent people finding 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 Installation Files

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

These files are not required after installation. If you don’t want to delete these files, just rename them.

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

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your site’s admin area view and change your WP theme files, and cause havoc on your site.

If you want 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 – Remove Access To Your Site’s Uploads Folder

The “uploads” directory 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 view the contents in the “uploads” folder is visit the directory using a web browser …

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

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

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this can become a serious threat to the security of your site.

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 named “index.php”) to your uploads directory, and so on. Again, it’s best to get professional assistance if you are unsure about what to do.

Security Measure #10 – Security Plugins

A number of great WordPress security plugins are available that specifically address common security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about 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 plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.

SecureScanPro - WordPress total security software solution

(SecureScanPro – WP security software)

SecureScanPro is easy to install and easy to use, and does a great job of addressing 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

Blog Defender Security Plugin For WordPress(Blog Defender)

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

BlogDefender scans you WordPress site for security holes …

Blog DefenderAnd lets you easily fix these …

Blog Defender WordPress Security SolutionIf you don’t want to buy 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 web platform, but neglecting simple maintenance tasks like keeping your WordPress software, plugins and WordPress themes updated to their latest versions, tightening file and data protection 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 afford to ignore the importance of securing your site.

As one last reminder, below is the advice given by a security expert to all WordPress users after 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article will help prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please seek help from 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 and tutorials on WordPress security and tutorials about new security plugins and solutions.

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum

***

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