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 often is targeted by hackers.

In early 2013, WordPress installations around the world were subjected to mass brute force attacks.

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

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

Brute-Force Attacks – Definition

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 WordPress sites. One of these is by trying to guess the site’s administration login username and password. This can be done with software programs that can guess hundreds of possible login combinations in minutes.

If you’re using weak user names and predictable passwords, your website can be easily hacked by repeated attempts to work out your site’s login details.

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

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

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

The screenshot below was 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” …

The Zeus botnet has been actively infecting 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)

The ongoing botnet attacks on WordPress were well organized and highly distributed. Over 90,000 IP addresses were identified by several hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The worldwide brute-force attacks then continued, with over 30,000 WordPress blogs being hacked every day.

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

Powering millions of sites around the world makes WordPress a target for attempted attacks by malicious users

(WordPress often is targeted by hackers, due to its popularity)

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

No. In fact, there are lots of very good reasons why you should continue using WordPress if you are concerned about website security.

To learn what makes WordPress a very secure web platform, see this article: Is WordPress A Secure Website Platform?

Info

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

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

Protecting Your WordPress Blog From Brute-Force Attacks – Ten Security Points

Every website with a security vulnerability can be an opportunity to hackers. An unsecured website not only provides hackers opportunities to improve their hacking skills and claim “bragging rights” among their peers, but it can also serve as a resource for denial of service attacks, distributing malware and participating in information theft.

If a hacker can find a way to gain access and control of your web site, your site can then be employed to attack other valued sites.

Additional undesirable impacts of being hacked include getting blacklisted by Google, having stealthy spam links promoting things like casinos, cheap offers on brand names, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The harsh reality is that software-driven bots are trying to break into your site at this very moment. Whether they can hack into your site or not, will depend on how challenging you can make things for hackers to keep trying until they discover how to get in, or give up and go look for a less secure target.

How Much Information About Your 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 - Website Security Check(WP Security Check Screenshot source: Hackertarget.com)

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

Hackertarget - WordPress Security Scan

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

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

WordPress Security Scan(Screenshot: BlogDefender website)

The ability 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 on your server can all be valuable information to hackers, as this informs them about potential security vulnerabilities, especially in older versions.

If your site or blog is driven by WordPress and you are not taking steps to bolster the security of your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your website, because these brute-force attacks are systematically hitting WordPress sites around the world!

Typically, whenever a site gets compromised, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been vandalized or even that their content has been entirely wiped out. Often, compromised sites will become infected with malicious scripts or viruses without the owner even being aware that a security breach has occurred.

To help avoid the heartache and frustration of having your website being hacked into, we have listed below ten essential and effective security measures that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Warning

Note: A few of the recommended steps listed below need some technical skills to modify core WordPress and/or server files. If you have no web 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

Get in touch with your host and ask them what systems they have put into place to help prevent your site from brute force attacks, and what is done to ensure that your files and data are being regularly backed up.

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

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Maintained

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

A full WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

Maintaining your WP website completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website or blog regularly backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WP website or blog frequently backed up and up-to-date. WordPress site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. 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 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 WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Copy & Protect Your WP Websites And Blogs With Backup Creator WordPress Plugin

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

the worldwide brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels and gain access to the site by exploiting WordPress installations that used “admin” as the user name.

For security reasons, avoid setting up 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 this immediately.

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

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software persistently hits a login or password field with different strings of characters 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 simple and effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, make really easy targets for hacking attacks. Make sure that you change your password to something that is at least 8 characters long, and that includes upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Practical Tip

You can use a password software tool like Roboform to help you generate passwords …

Roboform is a password software that lets you easily generate secure passwords(You can use a password program like Roboform to help you generate secure passwords)

For a simple step-by-step tutorial that shows you how to change your WordPress password, go here: Changing 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 WordPress options.

wp-config.php file

(wp-config.php)

If a hacker breaks into your site, they will typically search for your 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, prevent people 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 Installation Files

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

You can remove these files after installation, as they are unnecessary. If you don’t want to remove these files, then just rename them.

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

Hackers look for vulnerabilities in outdated versions of WordPress that can be exploited, including out-of-date versions of themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your site to see and make changes to your theme files, or create havoc on your site.

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 Your Site’s Uploads Directory

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

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

(WordPress uploads folder)

(WordPress has an uploads folder where media content is stored)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, this can seriously threaten 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 a blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are unsure about what to do.

Security Measure #10 – Install Security Plugins

There are several security plugins for WordPress available that specifically address most common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your website from malicious software, 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 website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – WP complete security plugin)

SecureScanPro is easy to install and easy to use, and takes care of 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

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

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 web site for potential security vulnerabilities …

Blog DefenderAnd lets you fix these quickly …

Blog Defender Security Suite For WordPress Websites & BlogsIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, then use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting basic maintenance tasks like updating your WordPress software, plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, securing your web sites is something you cannot afford to ignore.

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the large-scale brute-force attacks 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 provided you with the initial steps you need to take 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 technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified whenever we publish new articles on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***