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 SecurityWordPress is frequently the target of malicious attacks by hackers, due to its popularity.

In April 2013 a mass brute-force attack struck WordPress installations on virtually every host server in existence around the world.

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

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 programs and scripts 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 a malicious software’s persistent attempts to guess your site’s login details.

This is called a “brute force” login attack.

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/botnet)

A “Botnet” is a network 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’ knowledge or awareness.

Botnets are normally used used to send out 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 world since 2009 …

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

(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Image source: SecureList.com)

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

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

WordPress is frequently the target of malicious attempts by hackers

(WordPress powers millions of sites worldwide, making it a natural target for attempted hacking attacks)

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

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

To understand what makes WordPress a very secure platform for websites, read this article: Are Open Source Platforms Like WordPress Secure? What Every Blog Owner Needs To Know About WordPress

Info

It’s important to note that, in the case of April 2013 worldwide brute force botnet attack described above, there was no WordPress vulnerability being exploited (the same script was also attacking sites built using other web applications like Joomla).

Mike Little, the co-founder of WordPress, made this 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)

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

You may think that your website or blog is of no interest to hackers, but the reality is that every website has some value to a malicious user.

If a malicious user can find a security flaw that allows them to gain complete control of your website or blog, your website can then be employed as a “bot” in a planned cyberattack against more highly-valued web sites.

Additional undesirable results of having your site hacked and your site security compromised include getting blacklisted by Google, having spammy links advertising things like casinos, cheap offers on brand names, etc. inserted into your content, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The truth is that software-driven bots are very likely searching for weaknesses and trying to break into your blog right now. Whether they will break in or not, will depend on how hard or easy you will make it for them to continue trying until they discover a way to get access, or give up and decide to look for an easier target.

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

Does your website run on WordPress? If so visit a site like Hackertarget.com and run your site through their WordPress security scan …

Hackertarget - Website Security Scan(Hackertarget – WordPress Security Scan Screenshot: Hackertarget.com)

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

Hackertarget - Website Security Scan

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

It should be obvious after using the above tool that if you can see all of this information about your blog, hackers can too.

WordPress Security Scan(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 can be valuable information to hackers, as this can inform them about exploitable holes or weaknesses, especially in older versions.

If your website is powered by WordPress and you’re not taking steps to bolster the security of your site, then we can practically guarantee that, at some point, someone will attempt to hack your site, because these brute-force attacks are systematically targeting WordPress installations worldwide!

When a site is broken into, webmasters will find themselves “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Often, most compromised sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation of discovering that your site has been hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.

Warning

Note: Some of the recommended steps below need some technical skills to modify core WordPress and server files. If you lack these 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 Service Provider

Contact your webhosting provider and ask them exactly what measures are in place to protect your site from brute force attacks, and what is done to ensure that your WordPress sites get backed up.

Check that your webhosting provider backs up your sites and that, if disaster strikes, you can easily get your site back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Up-To-Date

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

A full WordPress maintenance routine ensures that:

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

A proper WP maintenance routine looks like this …

Maintaining your WP web site regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website or blog regularly backed up and updated is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WordPress web site completely backed up and up-to-date. WordPress 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 don’t 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 website is the second most important thing you should do after making sure that you are still breathing!

If you don’t want to back up your files manually, there are a number of free and paid 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 WordPress Sites With Backup Creator Plugin For WP

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

the worldwide brute force botnet attack on WordPress is mostly an attempt to compromise site administrator panels by exploiting WordPress installations that used “admin” as their username.

For website security reasons, don’t install WordPress sites 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 it immediately.

We have created a tutorial that shows you how to change your WordPress username here: Changing Your Admin Username In WordPress

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when a malicious script continually and persistently 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 you put some measure in place to block the brute force attack from happening (see further below for a couple of simple and effective ways to do this), the “bot” will just persist in attacking your site until it eventually works out the combination.

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

Tip

Roboform is a password management software you can use to help you generate very secure passwords …

Roboform is a password tool that lets you easily create secure passwords(Roboform is a password program that lets you create different strong login passwords)

For a simple step-by-step tutorial created especially for non-technical WordPress users on how to change your login password, go here: What To Do If You Need To Reset Login Passwords In WordPress

Security Measure #5 – Secure 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 options for WordPress.

WordPress WP Config file

(wp-config.php)

If a hacker breaks into your WordPress website, they will try to access the 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 a hacker 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 getting to 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 the install.php, upgrade.php and readme.html files from your server.

You can remove these files after installation, as they are unnecessary. If you don’t want to delete these files, then just rename them.

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

Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that can be exploited, including outdated versions of themes and plugins.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor is accessible via the WP main menu)

This means that anyone logging into your site can see and make changes to all of your theme template files, and create havoc on your site.

To prevent people from being able to access the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Secure The Site’s Uploads Directory

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

By default, this folder is visible to all users online. All someone has to do to see the contents in your “uploads” directory is navigate to your directory using a web browser …

(WordPress uploads folder)

(WordPress has an uploads folder where media content is stored)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, anyone can upload unauthorized file types or compromise 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, adding a blank index.php file (this is literally a blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to get professional help if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are some great WordPress security plugins available that will address many common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your files from malicious scripts, preventing injections of code into files, 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 site files and damaging your site is SecureScanPro.

SecureScanPro - WordPress complete security software

(SecureScanPro – WP complete security software)

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

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

Blog Defender Security Suite For WordPress Websites & Blogs

Blog Defender(Blog Defender Security Solution For WordPress Blogs)

This product 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 website are …

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

Blog Defender Security Product Suite For WordPress BlogsIf you don’t want to invest in 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 keeping your WP core files, WordPress plugins and themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your website to malicious by hackers and bots.

Regardless of the type of business you run or plan to run online and how small you think your web presence is, website security is something you cannot afford to ignore.

As a final reminder, below is the advice given by a web security expert to all WordPress users following the worldwide brute-force attacks 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, the information in 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 professional WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications whenever 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

***