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 most popular CMS platform and the online publishing platform of choice used by millions of websites 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 2013, WordPress installations around the world were subjected to global-scale brute force attacks.

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

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

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

If you’re using predictable usernames and weak passwords that are easy to guess, your site can be an easy target for hacking attempts.

This is called a “brute-force” login 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)

”Botnets” are networks of private computers that have been infected with malicious scripts or software code, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware of this.

Botnets are typically used to blast out 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 infecting computer networks all around the globe since 2009 called “Zeus” …

ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009.

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

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

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

WordPress powers millions of websites and blogs worldwide, which makes it an obvious target for hacking attacks

(WordPress is the world’s most popular CMS making it a frequent target for hackers)

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 use WordPress if you are concerned about website security.

To learn why WordPress is a 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, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other web applications like Joomla).

Mike Little, the co-founder 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)

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

You may think that your website is of little value to hackers, but the reality is that to a hacker, all websites provide an opportunity to gain some advantage at your expense.

If hackers can exploit a security weakness that allows them to remotely control your website, your site can then be used as part of a larger network of “bots” to target other highly-valued sites.

Additional undesirable consequences of having your website hacked and your site security compromised include being blacklisted by search engines, having stealthy spam links advertising things like casinos, porn, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasties.

The reality is that hackers are most likely trying to hack into your web site while you are reading this right now. Whether they can hack into your site or not, will depend on how hard you can make things for hackers to keep persisting until they can work out a way to get in, or give up and decide to look for a more vulnerable target.

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

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

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

You will see that the test will display various results and information about your site setup …

Hackertarget - WordPress Security Check

(Hackertarget – website security scan results. Product image: Hackertarget.com)

It should be obvious after using the above tool that if you are able to freely access all of this information about your blog, then so can hackers.

Hackertarget - WordPress Security Check(Product image: 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 in your site can all be potentially valuable information to hackers, as these can inform them about any potential security vulnerabilities, especially where the owners haven’t updated their files.

If your site or blog runs on WordPress and you are not taking steps to bullet-proof your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress sites around the world!

Whenever a website or blog gets compromised, webmasters can find themselves “locked out” of their own site, or notice that their files have been altered or that everything has been entirely wiped out. Often, most sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and frustration (and potential loss of valuable business data) of discovering that your website has been hacked into, below are ten essential and effective security measures that will help to protect your WordPress site from botnet attacks.

Note

Note: Some of the recommended steps shown below require some technical skills to modify core WordPress and/or server files. If you are not technical-minded, 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 – Contact Your Host

Get in touch with your hosting company and ask them exactly what precautions have been put into place to help prevent your site from being attacked, and what is done to ensure that your server files get backed up.

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

A proper WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress site frequently backed up and updated is. WP site maintenance is not hard to do 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 site maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your site is the next 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 free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Copy And Keep Your WP Site Protected With Backup Creator WP Plugin

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

The brute-force attack on WordPress is mostly an attempt to compromise site administrator panels and gain access to the site by exploiting WordPress installations with “admin” as the username.

For security purposes, avoid setting up sites with the username admin. This is the first area hackers will test. If your site’s user name is admin, you need to change it immediately.

For a simple step-by-step tutorial on how to change your login username, go here: How To Change Your WordPress Admin User Name

Security Measure #4 – Change Your Password

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

Unless some measure is put into place to block the brute-force attack (see further below for a couple of effective ways to do this), the “bot” will just keep attacking your site until it eventually gets access.

Weak passwords, therefore, are very easy targets for attacks. Make sure that you change your password to something that is at least eight or nine characters long, with upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Practical Tip

You can use a password management software tool like Roboform to create secure passwords …

You can use a password management program like Roboform to create unbreakable passwords(You can use a password management software tool like Roboform to help you generate really secure passwords)

We have created a detailed tutorial for WordPress admin users that shows you how to change your login password here: What To Do If You Need To Change The Login Password

Security Measure #5 – Prevent Access To Your wp-config.php File

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

WP Config file

(wp-config.php)

If a hacker breaks into your website, they will typically search for the 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.

In order to protect your WordPress site from attacks 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 – Delete Or Rename Unnecessary Installation Files

Delete or rename your install.php, upgrade.php and readme.html files.

These files can be removed after installation. If you don’t want to delete these files, then just rename them.

Security Measure #7 – Upgrade Your WordPress Installation, Plugins And Themes

Hackers search for vulnerabilities they can exploit in earlier WordPress versions, including out-of-date versions of plugins and themes.

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the WP admin menu)

The WordPress theme editor lets anyone accessing your site’s admin view and change your files, and create mayhem on your site.

To prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by adding code to your wp-config.php file.

Security Measure #9 – Secure Your WordPress Uploads Directory

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

Normally, this folder is visible to anyone online. All a person needs to do to see the contents stored in the “uploads” folder is visit your directory using their web browser …

(WordPress uploads directory)

(WordPress has an uploads directory 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 become a serious threat to the security of your website.

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 an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to get professional help if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

A number of security plugins for WordPress are available that will address many common security issues WordPress website owners face, such as preventing unauthorized users from accessing your site, protecting your website from malicious scripts, preventing injections of code into files, 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 files and causing damage to your site is SecureScanPro.

SecureScanPro - WP total security plugin

(SecureScanPro – WP total security plugin)

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 Security Product Suite For WordPress Blogs

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

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 website for security holes …

Blog Defender Security Suite For WordPressAnd lets you fix these quickly …

Blog Defender Security Solution For WordPressIf you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, you can use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting simple maintenance tasks like keeping your WordPress installation, plugins and WP themes up-to-date, tightening file and data security and taking other necessary precautions can expose your site to attacks by hackers and bots.

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

As a final reminder, below is the advice given by an expert on website security to all WordPress users following the mass 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, WordPress 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 WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications when we publish new articles on WordPress security and tutorials about new security plugins.

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum

***