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 SecurityBeing the world’s most popular content management system makes WordPress a natural target for hackers.

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

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

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

Brute-Force Attacks – An Overview

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 using software tools that can guess hundreds of login permutations in minutes.

If you’re using obvious login details, your website could be an easy target for hacking attempts.

This is called a “brute force” attack.

What Are 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 infected with malicious scripts or software, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are often used to blast mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …

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

(The Zeus botnet has been actively infecting computer networks all around the world since 2009. Image source: SecureList.com)

The ongoing botnet attacks are highly distributed and well organized. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The large-scale attack continued after this, with over 30,000 WordPress blogs being hacked per day.

News of the April 2013 mass brute force attack was reported by all of the major webhosting companies, as well as the leading technology publications, such as Forbes, TechNews Daily, PC Magazine, BBC News, Tech Crunch, and even on the official website of the US Department of Homeland Security …

WordPress powers millions of websites around the world, which makes it a frequent target for attempted hacking attacks

(WordPress powers millions of sites worldwide, making it a frequent target for attacks by hackers)

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 at all about the security of your online business.

We explain why WordPress is a secure platform for websites in this article: Is WordPress Secure?

Important

It’s important to understand that, in the case of the large-scale brute force 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 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)

How To Prevent Your WordPress Blog From Being Brute Force Attacked – 10 Security Measures

Every website or blog with a security vulnerability presents an opportunity to hackers. A vulnerable website or blog not only provides hackers opportunities to improve their hacking skills and claim “bragging rights” among their peers, but it can also serve as a platform for launching distributed attacks, spreading malware and information theft.

If a hacker can exploit a vulnerability and compromise the control of your site, the web site can then be used to attack other highly-valued websites.

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

The truth is that software-driven bots are most likely searching for vulnerabilities and trying to hack into your blog at this very moment. Whether they will break in depends on how difficult you can make it for hackers and bots to continue trying until they either find a way to get in, or are forced to decide to look for a more vulnerable target.

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

Do you own a WordPress site? If so, visit Hackertarget.com and run your website through their WordPress security check …

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

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

WP Security Scan

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

It should be obvious after using the tool shown above that if you can see all of this information about your WordPress site, then so can hackers.

Hackertarget - Website Security Check(Image source: BlogDefender.com)

Being able 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 are all potentially valuable information to hackers, as this informs them about any exploitable security vulnerabilities, especially where the owners haven’t updated their software versions.

If your website runs on WordPress and you are not taking appropriate steps to toughen up your site, then it’s practically guaranteed that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically hitting WordPress sites worldwide!

Whenever a website gets broken into, webmasters can find themselves “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Typically, sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

To avoid the heartache and frustration of discovering that your web site 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 botnet hacking attempts.

Useful Information

Note: Some of the measures shown 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 professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Contact your hosting company and ask them exactly what security systems are in place to protect your site from being attacked, and what they do to ensure that your server files and data are regularly being backed up.

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

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Frequently Up-To-Date

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

A full 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 WP software, plugins and themes are up-to-date,
  • etc …

A proper WordPress maintenance routine looks like this …

Maintaining your WordPress site frequently backed up and updated is vitally important for WordPress security.(Maintaining your WP installation completely backed up and updated is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WP site regularly backed up and updated. WordPress 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 WordPress site maintenance yourself, pay someone to do it but make sure it gets done. Backing up your website is the next most important thing you should do after making sure that you are still breathing!

If you don’t want to back up your data manually, there are many free and paid plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate And Protect Your WP Website With Backup Creator WP Plugin

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

the worldwide brute-force attack on WordPress sites was mostly an attempt to compromise website admin panels and gain access to the site by exploiting WordPress sites that used “admin” as their username.

For reasons of website security, avoid installing WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s username is “admin”, you need to change it immediately.

We have created a tutorial for non-technical admin users on how to change your login username here: Changing Your WP Username From Admin To Another User Name

Security Measure #4 – Your Password

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right combination of password and username characters that will give them access to your website.

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

Passwords that are easy to guess, therefore, make really easy targets for hacking attacks. Make sure that you change your password to a string containing at least 8 or 9 characters long, with both upper and lowercase letters, and “special” characters (e.g. ^, $, @, etc).

Useful Tip

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

Roboform is a password software that lets you create different  passwords(Roboform is a password management software you can use to create different strong passwords)

For a detailed tutorial that shows you how to change your password, go here: Changing Your Password In WordPress

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

The wp-config.php file contains important information about your website’s database and is used to define advanced options for WordPress.

wp-config.php file

(wp-config.php file)

If hackers break into your website, they will normally try to access the wp-config.php file, because this file contains your database details, security keys, etc. Getting access to this information would allow someone 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, prevent people viewing 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 – Delete Or Rename Unnecessary Installation Files

Delete or rename 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, just rename them.

Security Measure #7 – Update Your WordPress Installation, Themes & Plugins

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

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor feature that allows the administrator to edit theme and plugin files from the dashboard.

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

WordPress Theme Editor Menu

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

This allows anyone accessing your blog’s admin to view and edit all of your WordPress theme files, or create mayhem on your site.

To prevent 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 – Prevent Access To The WordPress Uploads Folder

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

Normally, this folder is visible to anyone online. All someone has to do to view all of the contents in the “uploads” folder is navigate to your directory using a web browser …

(WordPress uploads folder)

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

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

Security Measure #10 – Use Security Plugins

A number of great security plugins for WordPress are available that will address most security issues WordPress website owners face, such as preventing hackers from accessing 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 security plugin that seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - complete security software solution for WordPress

(SecureScanPro – total security plugin for WordPress)

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 great security plugin you may want to look at using is BlogDefender.

Blog Defender Security Product Suite For WordPress

Blog Defender(Blog Defender Security Suite For WordPress)

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 Defender Security Suite For WordPress Web SitesAnd then shows you how to fix these quickly …

Blog Defender Security Plugin For WordPress Websites & BlogsIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, you can 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 ensuring that your WP installation, WP plugins and WP themes are kept updated to their latest versions, 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, you cannot ignore the importance of website security.

As one last reminder, below is the advice given by a web security expert to all WordPress users following 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 information in this article has shown you what to do to prevent brute force attacks on your WordPress site. 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 subscribe to WPCompendium.org to be notified via email when we publish new tutorials on WordPress security and reviews of WordPress security plugins.

***

"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

***