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 leading CMS platform in the world and the preferred online publishing platform for 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 early 2013 a worldwide brute force attack hit WordPress installations on almost every web host in existence around the world.

These attacks were caused by networks of infected computers programmed to attack other vulnerable computers, also commonly known as “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)

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 with software tools and scripts that can guess hundreds of possible logins in minutes.

If you’re using predictable usernames and predictable passwords, your site can be easily hacked by persistent attempts to work out your site’s login details.

This is called a “brute force” login attack.

Botnet – What Is This?

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 software, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is going on.

Botnets are normally used used to blast mass spam emails.

The screenshot below was taken from an online security monitoring site 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 globe since 2009.

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

The botnet attacks on WordPress sites were highly distributed and well organized. Over 90,000 IP addresses were identified by a number of webhosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The large-scale attacks then continued, with over 30,000 WordPress sites being hacked each day.

Coverage of this worldwide brute force botnet attack was widely reported in all of 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 website of the US Department of Homeland Security …

WordPress powers millions of websites and blogs around the world, which makes it a frequent target for hacker attacks

(WordPress is often the target of malicious attacks by hackers, due to its global popularity)

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

We explain why WordPress is a secure web platform in this article: How Secure Is WordPress?

Useful Info

It’s important to understand that, in the case of April 2013 brute-force botnet attack described above, there was no WordPress vulnerability 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, said this about the botnet 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 Website From Being Brute Force Attacked – 10 Security Checks

Every web site with a security vulnerability presents an opportunity to hackers. A compromised website or blog not only offers wannabe hackers opportunities to improve their skills and claim “bragging rights” from their peers, but it can also acts as a resource for denial of service attacks, distributing malware and information theft.

If a hacker can find a way to access and take over your website or blog, your web site can then be used to target more valued web sites.

Additional undesirable effects of being hacked include being blacklisted by Google, having stealthy spam links promoting things like gambling, cheap offers on brand names, etc. in your content, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The harsh reality is that brute-force software bots are very likely trying to hack into your website or blog as you are reading this page. Whether they can break into your site successfully or not, depends on how hard or easy you have made it for hackers to continue persisting until they discover 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 a site like Hackertarget.com and run your site through their WordPress security scan …

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

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

WordPress Security Scan

(Hackertarget – WP security scan results. Screenshot source: Hackertarget.com)

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

Hackertarget - WP Security Scan(Source: BlogDefender.com)

The ability 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 on your server are all potentially valuable information to hackers, as this informs them about potentially exploitable security vulnerabilities, especially where site owners haven’t updated their files.

If your website is driven by WordPress and you are not proactive steps to harden your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these brute force attacks are systematically targeting WordPress installations worldwide!

Typically, whenever a website is compromised, site owners can find themselves “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Often, most sites will be infected with malicious software without the owner even being aware that this has taken place.

To help avoid the heartache and frustration that comes with having your website being hacked into, below are 10 simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force botnets.

Useful Info

Note: A few of the steps below require some technical understanding of how to modify core WordPress and/or server files. If you have no web editing skills, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Hosting Service

Contact your webhosting company and ask them exactly what systems have been put into place to help prevent your site from botnet attacks, and what they are doing to ensure that your server files and data are being regularly backed up.

Make sure that your web host backs up your sites and that, if disaster strikes, you can easily recover your files.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Frequently Updated

You should never rely just on your webhosting provider for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and develop a habit of performing a complete site maintenance routine frequently (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WP site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress site backed up and up-to-date is. WordPress 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 maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your site is the second most important thing you must do after making sure that you still have a pulse!

If you don’t want to back up your data manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone And Protect Your WP Web Site With Backup Creator WordPress Plugin

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

The mass brute force attack on WordPress is mostly an attempt to compromise site admin panels and gain access to sites by exploiting sites that used “admin” as the account name.

For reasons of website security, never set up WordPress sites with the username admin. This is the first thing hackers will test. If your site’s username is admin, you need to change this immediately.

We have created a simple step-by-step tutorial for non-technical admin users that shows you how to change your WordPress admin username here: Changing Your WP User Name From Admin To A Different Username

Security Measure #4 – Use Strong Passwords

A “brute force” attack occurs when malicious software persistently tries to guess the right username and password character string that will give them access to your site.

Unless you put some measure in place to prevent 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 works out the combination.

Passwords that are easy to guess, therefore, become very easy targets for bot attacks. Make sure that you change your password to a string that contains at least eight characters long, and that includes upper and lowercase letters, combined with “special” characters (^%$#&@*).

Useful Tip

Roboform is a password management tool you can use to generate different hard-to-guess passwords …

You can use a password program like Roboform to generate strong login passwords(Roboform is a password management program you can use to create different secure passwords)

For a step-by-step tutorial on how to change your password, go here: What To Do If You Need To Reset Your WordPress Password

Security Measure #5 – Protect 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 file)

If hackers break into your WordPress website, they will normally try to access 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 someone 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, you must prevent people from 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.

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

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

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

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

Security Measure #8 – Disable Your Theme Editor

WordPress installations come with a built-in editor that lets you edit theme and plugin files inside the dashboard.

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor from the admin menu …

WordPress Theme Editor Menu

(The WordPress theme editor is accessible using the WP dashboard menu)

The WordPress theme editor lets anyone accessing your blog see and modify your WordPress files, or create havoc on your site.

If you want to prevent unauthorized people from being able to access your 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 – Remove Access To Your Site’s Uploads Folder

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

By default, this folder is visible to online users. All a person needs to do to see the contents in the “uploads” directory is visit the directory using their browser …

(WordPress uploads directory)

(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, anyone can upload unauthorized file types or compromise the security of your website.

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, 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 ask for assistance from someone who knows what they are doing if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are a number of great security plugins for WordPress available that will address common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your files from botnets, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One security 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 - WP security plugin

(SecureScanPro – WP complete security software)

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

Blog Defender WordPress Security Plugin

Blog Defender(Blog Defender Security Plugin For WordPress)

Blog Defender is a package of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.

BlogDefender scans you WordPress site for potential security holes …

Blog DefenderAnd then shows you how to quickly fix these …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting essential maintenance tasks like updating your WordPress installation, plugins and WP themes, 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, securing your site is something you simply cannot ignore.

As one last reminder, below is the advice given by a security expert to all WordPress users following the mass brute-force attacks by botnets 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 very important 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 consult a WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to WPCompendium.org to be notified when we publish new articles on WordPress security and tutorials about WordPress security plugins and solutions.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***