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 SecurityPowering millions of websites worldwide makes WordPress a natural target for malicious attacks by hackers.

In April 2013, WordPress installations around the world were subjected to mass brute-force attacks.

These attacks were caused by infected computer networks programmed to attack other vulnerable computers (called “botnets”).

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

What Is A Brute Force Attack?

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 use to try and break into a WordPress site is by trying to guess the site admin’s login username and password. This is done using software programs that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using easy-to-guess login details, your site could be an easy target for hackers.

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

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

Botnets are typically used to blast out mass spam emails from the infected computers of compromised user accounts.

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” …

The Zeus botnet has been actively infecting computer networks all around the world since 2009.

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

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

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

Powering millions of websites worldwide makes WordPress an obvious target for hacking

(WordPress is often the target of malicious attacks by hackers)

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

No. In fact, there are many good reasons why you should choose WordPress if you are concerned about the security of your web presence.

We explain what makes WordPress a very secure platform for websites in this article: Are Open Source Platforms Like WordPress Secure?

Important

It’s important to note that, in the case of April 2013 mass brute force botnet attack described above, there was actually no WordPress vulnerability being exploited (the same script was also attacking sites built using other CMS platforms 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)

How To Prevent Your WordPress Website From Being Brute Force Attacked – 10 Security Checks

Every blog with a security vulnerability can be seen as a potential opportunity to hackers. Every website has some value to hackers. Corporate websites, personal blogs, government websites … even websites owned by web security and anti-hacking experts can and have been targeted.

If hackers can find a way to access and control your website, the web site can then be used as a “bot” in a planned cyberattack against larger and more valued sites.

Additional undesirable consequences of having your website hacked and your site security compromised include being blacklisted by Google, having spammy links advertising things like viagra, discounted fashion, etc. in your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasty things.

The reality is that malicious bots are trying to hack into your website at this very moment. Whether they will successfully get in or not, depends on how difficult you have made things for hackers to keep trying until they either find how to break in, or give up and go look for a more vulnerable target.

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

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

Website Security Check(Hackertarget – Website Security Scan Screenshot image: Hackertarget.com)

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

WordPress Security Check

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

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

Hackertarget - WP Security Check(Image source: BlogDefender site)

Being able to see what 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 this can inform them about exploitable security weaknesses, especially in older versions.

If your site or blog is powered by WordPress and you’re not preventive steps to bolster the security of your site, it’s practically guaranteed that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress sites all the world!

Whenever a site gets hacked, site owners will find themselves completely “locked out” of their own site, or notice that their files have been modified or even entirely wiped out. Often, most compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and frustration of discovering that your website or blog has been hacked into, we have listed below ten essential and effective security checks that will help to protect your WordPress site from being attacked by brute-force botnets.

Disclaimer

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

***

Security Measure #1 – Contact Your Web Host

Contact your hosting service and ask them exactly what systems are in place to help prevent your site from being attacked, and what is done to make sure that your files and data get backed up.

Make sure that your hosting service regularly backs up your server files and that, if anything goes wrong, you can easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Up-To-Date

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

A proper WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

Maintaining your WordPress site frequently backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website regularly backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress web site fully backed up and updated 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 WP maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site is the next most important thing you should do after making sure that your heart is still beating!

If you don’t want to back up your files manually, there are a number of free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate & Protect Your WordPress Website With Backup Creator WP Plugin

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

The mass brute-force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels and gain access to the site by exploiting WordPress sites using “admin” as their username.

For website security reasons, avoid installing WordPress sites with the username “admin”. This is the first thing hackers will test. If your blog’s user name is admin, change this immediately.

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

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when a malicious script continually and persistently hits a login or password field with different character strings in an attempt to guess the right combination that will give the hacker access to your site.

Unless you put some measure in place to prevent the brute force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, become really easy targets for attacks. Make sure that you change your password to a string that contains at least 8 characters long, and that includes upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Tip

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

You can use a password software tool like Roboform to create difficult passwords(You can use a password tool like Roboform to create secure login passwords)

For a simple tutorial on how to change your password, go here: Changing WordPress Passwords

Security Measure #5 – Secure Your wp-config.php 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.

wp-config.php file

(wp-config.php)

If a hacker breaks into your WordPress website, they will normally search for 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 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 being attacked and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being easily accessed. 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 remove these files, then just rename them.

Security Measure #7 – Update Your WordPress Software, Themes And Plugins

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

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor feature that lets site administrators edit plugin and theme code inside the dashboard.

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 dashboard menu)

The WordPress theme feature lets anyone accessing your site see and modify your WordPress theme template files, or cause mayhem on your site.

To prevent people from accessing 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 WordPress Uploads Folder

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

Normally, this folder is visible to online users. All someone has to do to see all of the contents stored in your site’s “uploads” directory is navigate to your directory using a web browser …

(WordPress uploads directory)

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers or 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 file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are unsure about what to do.

Security Measure #10 – Use Security Plugins

Some great security plugins for WordPress are available that will address many common security issues faced by WordPress website owners, such as preventing unauthorized users from accessing 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 plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.

SecureScanPro - WP complete security software solution

(SecureScanPro – WP complete security software)

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

Another great plugin you may want to look at using is BlogDefender.

Blog Defender

Blog Defender(Blog Defender Security Product Suite)

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

Blog Defender Security Plugin For WordPressAnd lets you fix these quickly and easily …

Blog Defender WordPress Security SuiteIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, then use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting basic maintenance tasks like keeping your WordPress installation, plugins and WP themes updated to their latest versions, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what kind 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 web site.

As a final reminder, below is the advice given by a security expert to all WordPress users after the global 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, this article has provided you with the initial guidelines and direction you need to 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.

Also, do yourself a favor and subscribe to WPCompendium.org to receive notifications via email when we publish new tutorials on WordPress security and reviews of WordPress security plugins.

***

"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

***