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 leading content management system and the online publishing platform of choice used by millions of businesses 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 wanting to score a “big win”.

In 2013 a mass brute force attack began hitting WordPress installations on virtually every web host in existence.

These attacks were caused by networks of infected computers programmed to attack other vulnerable installations (called “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 will attempt to break into a WordPress site is by trying to guess the site’s administration login username and password. This can be done using scripts and software tools that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using predictable user names and weak passwords that are easy to guess, your site could be easily hacked by the software’s repeated attempts to work out your site’s login details.

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

”Botnets” are networks of computers that have been infected with malicious software, which are then controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is taking place.

Botnets are often used to blast mass spam emails.

The screenshot below was 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 globe 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 globe since 2009. Screenshot: SecureList.com)

These ongoing botnet attacks were well organized and highly distributed. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress user admin areas occurred. The brute-force attacks then continued, with over 30,000 WordPress blogs being hacked each day.

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

WordPress is frequently the target of malicious attempts by hackers

(WordPress is the world’s most used CMS 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 many great reasons why you should use WordPress if you are concerned about website security.

We explain why WordPress is a secure web platform in this article: Can You Build A Secure Business Online Using WordPress?

Important

It’s important to note that, in the case of the mass brute-force attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other web 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 Site From Being Brute Force Attacked – 10 Security Points

You may think that your site is of little value to hackers, but the reality is that all websites have value to a malicious user.

If hackers can discover a web security flaw that allows them to take over your blog, that blog can then be employed to attack other highly-valued sites.

Additional undesirable impacts of being hacked include being blacklisted by search engines, having spammy links promoting things like casinos, cheap offers on brand names, etc. inserted into your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasties.

The reality is that malicious bots are probably trying to hack into your web site at this very moment. Whether they will get in successfully will depend on how hard or easy you will make it for hackers or botnets to keep persisting until they discover how to get access, or decide to look for a less secure target.

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

If you visit a site like Hackertarget.com and run your site through their WordPress security scan …

Website Security Scan(WP Security Scan Image source: https://hackertarget.com/wordpress-security-scan)

You will see that the check will yield various results and information about your WordPress setup …

Hackertarget - Website Security Scan

(WordPress security check results. Product image source: Hackertarget.com)

It should be obvious after using the tool shown above that if you are able to see all of this information about your website, so can hackers.

Hackertarget - WordPress Security Check(Image source: Blog Defender)

The ability to see what 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 potential vulnerabilities, especially in older versions.

If your website is driven by WordPress and you are not preventive steps to bullet-proof your site, then we can practically guarantee that, at some point in time, someone will attempt to hack your site, because these attacks are systematically targeting WordPress sites worldwide!

When a website or blog gets broken into, blog owners will find themselves completely “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. Typically, most compromised sites will be infected with malicious scripts without the owner even being aware that this has taken place.

To help avoid the heartache and frustration (and significant financial loss) that comes with discovering that your website has been hacked into, below are ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being brute-force attacked.

Important

Note: Some of the measures below need some technical skills to modify core WordPress 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 a professional WordPress technical provider for help.

***

Security Measure #1 – Get In Touch With Your Webhosting Provider

Get in touch with your hosting service and ask them exactly what precautions they offer to help prevent your site from being attacked, and what they do to ensure that your server files and data get regularly backed up.

It’s important to check that your hosting provider backs up your sites and that, if anything should happen, you can quickly and easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Updated

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

A full WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress website or blog fully backed up and up-to-date is. WordPress maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WordPress maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website 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 many free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Clone & Keep Your WordPress Web Sites Protected With Backup Creator Plugin For WP

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

the worldwide brute force botnet attack on WordPress is mostly attempting to compromise website admin panels and gain access to the site by exploiting sites with “admin” as their username.

For reasons of website security, avoid setting up WordPress sites with the username “admin”. This is the first thing hackers will test. If your site’s username is admin, then make sure you change it immediately.

We have created a simple tutorial for admin users on how to change your WordPress username here: How To Change Your WordPress User Name From Admin To A Different Username

Security Measure #4 – Your Password

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

Unless some measure is put into place to prevent the brute force attack from happening (see further below for a couple of simple and 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, are very easy targets for brute force attacks. Make sure that you change your password to something that contains at least 8 characters long, and that includes upper and lowercase letters, and “special” characters (e.g. ^, #, &, etc).

Useful Tip

You can use a password management software tool like Roboform to create hard-to-guess passwords …

Roboform is a password tool that lets you create different strong login passwords(You can use a password management program like Roboform to generate hard-to-crack passwords)

For a simple step-by-step tutorial on how to change your admin password, go here: How To Reset Your Password

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

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.

WordPress WP Config file

(wp-config.php)

If hackers break into your WordPress site, they will typically try to access your wp-config.php file, because this is the file that contains your WordPress 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent people from being able to easily find 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 WP Installation Files

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

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

Security Measure #7 – Update Your WordPress Files, Plugins & Themes To Their Latest Version

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

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor feature that lets site administrators edit plugin and theme files from the dashboard area.

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

WP Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your blog to view and make changes to all of your theme template files, and cause mayhem on your site.

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 WordPress Uploads Folder

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

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

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

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, someone can upload unauthorized file types to your site.

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, adding a blank index.php file (this is literally a file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

Several WordPress security plugins are available that will address most security issues faced by WordPress website owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your site from brute-force attacks, preventing injections of code into files, etc.

Many 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 issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - security software solution for WordPress

(SecureScanPro – WordPress total security plugin)

SecureScanPro is easy to install and easy to use, and addresses most of the security issues that WordPress users need to address.

Another security plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Plugin

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

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

BlogDefender shows you where the security holes in your WordPress site are …

Blog DefenderAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security Plugin For WordPress Websites & BlogsIf you don’t want to buy a 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 basic maintenance tasks like making sure that your WordPress installation, plugins and themes are kept updated to their latest versions, tightening file and data security and taking other necessary precautions can have disastrous consequences.

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

As one last reminder of the importance of keeping your websites protected, below is the advice given by a website security expert to all WordPress users after 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, website security is very important if you run a WordPress site. Hopefully, the above information has given you 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 seek help from a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

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

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***