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.

WP SecurityWhen you are the leading content management system in the world and the online publishing platform of choice for millions of websites and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will become a target for attacks from hackers wanting to score a “big win”.

In 2013 a worldwide brute-force attack hit WordPress installations across almost every WP host server in existence.

These attacks were caused by computers infected with viruses and programmed to attack other vulnerable sites (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 WordPress sites is by trying to guess the site’s administration login username and password. This can be done with software tools and scripts that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using predictable login details, your website can be easily hacked by the software’s persistent 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)

A “Botnet” is a network of private computers that have been infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is taking place.

Botnets are typically used to blast out mass spam emails.

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 compromising computer networks all around the world since 2009 called “Zeus” …

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

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

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

Coverage of this worldwide 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, PC Magazine, Tech Crunch, BBC News, and even on the official US Department of Homeland Security website …

WordPress is frequently the target of malicious attacks by hackers

(WordPress is the world’s most used content management system making it a natural target for attempted hacker attacks)

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

No. In fact, there are many great reasons why you should choose WordPress if you are concerned about the security of your online business.

We explain what makes WordPress a very secure platform for websites in this article: Is WordPress Secure?

Important 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 attacking sites built using platforms like Joomla).

Mike Little, one of the co-founders of WordPress, 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)

How To Prevent Your WordPress Blog From Being Brute-Force Attacked – Ten Security Checks

Every site with a vulnerability offers some value to hackers. A compromised website not only offers new hackers opportunities to improve their skills and claim “bragging rights” amongst their peers, but it can also be a valuable platform for launching stealth attacks, spreading malware and engaging in information theft.

If a malicious user can discover a security vulnerability in your system that allows them to gain remote access and control of your blog, your website can then be used as a “bot” in a planned cyber-attack against larger and more valued web sites.

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

The reality is that brute-force software bots are most likely searching for weaknesses and trying to break into your website right now. Whether they can hack into your site successfully or not, will depend on how difficult you can make it for them to continue trying until they discover how to get in, or give up and go look for a more vulnerable target.

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

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

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

You will see that the scan will return a number of results and details about your website …

WordPress Security Scan

(WP security check results. Screenshot source: Hackertarget.com)

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

Hackertarget - WP Security Check(Screenshot image: BlogDefender website)

Being able 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 useful information to hackers, as these can inform them about any exploitable security vulnerabilities, especially in older versions.

If your site or blog is driven by WordPress and you’re not proactive steps to toughen up your site, then we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically hitting WordPress sites around the world!

Typically, when a website gets broken into, website owners can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or that everything has been entirely wiped out. Often, most compromised sites will become infected with malicious software without the owner’s knowledge or awareness.

To avoid the heartache and aggravation of having your web site being hacked into, we have listed below ten essential and effective security measures that will help to prevent your WordPress site from being brute-force attacked.

Important Info

Note: A few of the measures shown below require some technical skills to modify core WordPress 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 Web Host

Contact your webhosting provider and ask them exactly what security measures have been put in place to help prevent your site from brute-force attacks, and what is done to ensure that your files and data get regularly backed up.

Check that your hosting provider is regularly backing up your sites and that, if disaster strikes, you can easily get back your site.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Site Frequently Updated

You should never rely only on your webhosting provider for site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this service done for you and maintain a habit of religiously performing a full WordPress site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, 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, themes and plugins are up-to-date,
  • etc …

A full WP maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP installation regularly backed up and updated. 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 WP site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your site is the second 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 plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Back Up, Clone & Keep Your WordPress Site Protected With Backup Creator WP Plugin

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

the worldwide brute force attack on WordPress sites was mostly an attempt to compromise website admin panels by exploiting WordPress sites with “admin” as their account name.

For reasons of website security, avoid setting up a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s username is “admin”, then make sure you change this immediately.

For a simple tutorial on how to change your WordPress admin username, go here: Changing Your WP Admin Username

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right password and username characters 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 ways to do this), the “bot” will just continue to attack your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, become really easy targets for bot attacks. Make sure that you change your password combination to something that contains at least 8 characters long, with upper and lowercase letters, combined with “special” characters (e.g. %, #, *, etc).

Tip

You can use a password management tool like Roboform to help you generate hard-to-crack passwords …

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

We have created a step-by-step tutorial on how to change your password here: What To Do If You Need To Reset Your Password In WordPress

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

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 file

(WP Config file)

If hackers break into your website, they will normally try to access the wp-config.php file, because this file contains your database information, 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.

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 remove these files, just rename them.

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

Hackers are always on the lookout for vulnerabilities they can exploit in older WordPress versions, including out-of-date versions of WordPress plugins and themes.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed via the WordPress admin menu)

The WordPress theme feature lets anyone accessing your site’s admin see and edit your WP theme files, and create mayhem on your site.

If you want to prevent 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 The Site’s Uploads Folder

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

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

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

(WordPress uploads folder)

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 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 blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Security Plugins

Several WordPress security plugins are available that specifically address most common security issues faced by WordPress website owners, such as preventing unauthorized users from accessing your site, protecting your files from brute-force attacks, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.

SecureScanPro - complete security software solution for WordPress

(SecureScanPro – security plugin for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security areas that WordPress users need to address.

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

Blog Defender Security Solution For WordPress Blogs

Blog Defender WordPress Security Plugin(Blog Defender)

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

BlogDefender shows you where potential security holes in your WordPress installation are …

Blog Defender Security Product SuiteAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security Solution For WordPress BlogsIf you don’t want to purchase a premium 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 very secure web platform, but neglecting simple maintenance tasks like keeping your WP installation, plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can expose your website to malicious 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, you simply cannot ignore the importance of web security.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users following the worldwide 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 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 professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to receive notifications via email whenever we publish new tutorials on WordPress security and tutorials about new WordPress security plugins.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

***