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 used by millions of websites and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers wanting to score a “big win”.

In April 2013 a worldwide brute-force attack began hitting WordPress installations across virtually every WP host server in existence around the world.

These attacks were caused by botnets (networks of infected computers programmed to attack other sites with security vulnerabilities).

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

What Are 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 is done using software tools that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using predictable login details, your website could be easily hacked by the malicious software’s repeated attempts to guess your site’s login details.

This is called a “brute-force” login attack.

Botnets – What Are They?

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)

A “Botnet” is a network of computers that have been compromised and infected with malicious code or scripts, which are then controlled remotely as a group, typically without the computer owners even being aware that this is happening in their machine.

Botnets are typically used to send out mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of ZeuS – 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 globe since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009. 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 alone, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.

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

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

(Powering millions of websites and blogs worldwide makes WordPress an obvious target for attempted hacking attacks)

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

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

To learn what makes WordPress a very secure platform for websites, read this article: Is WordPress Secure? What Every Business Owner Needs To Know

Useful Information

It’s important to understand that, in the case of April 2013 large-scale brute-force attack described above, no specific WordPress vulnerability was being exploited (the same script was also targeting sites built using other 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)

Protecting Your WordPress Site From Being Brute-Force Attacked – 10 Security Checks

Every website with a security vulnerability offers some degree of potential value to hackers. An unsecured website or blog presents hackers with a valuable resource for DDoS attacks, spreading malware and as a source of information theft.

If a hacker can find a way to break in and gain complete control of your web site, that website or blog can then be used to attack larger and more valued sites.

Additional undesirable impacts of being hacked and your site security compromised include getting blacklisted by Google, having spammy links advertising things like online meds, porn, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasty things.

The harsh reality is that brute-force software bots are most likely searching for security weaknesses and trying to break into your blog as you are reading these very words. Whether they can get into your site depends on how hard you have made things for them to keep persisting until they work out how to get in, or give up and go look for a less secure target.

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

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

Hackertarget - WP Security Check(Hackertarget – Website Security Check Screenshot: Hackertarget.com)

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

Website Security Check

(website security check results. Screenshot: Hackertarget.com)

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

WP Security Check(Source: BlogDefender site)

The ability 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 are all potentially useful information to hackers, as these can inform them about potentially exploitable vulnerabilities, especially where the owners haven’t updated their files.

If your site or blog is powered by WordPress and you’re not taking appropriate steps to bullet-proof your site, then it’s practically guaranteed that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress installations worldwide!

When a website gets broken into, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been vandalized or even that their content has been entirely wiped out. Often, compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To avoid the heartache (and potential loss of valuable business data) of discovering that your website has been hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from brute-force botnet attacks.

Info

Note: A few of the measures below require some technical understanding of how to modify core WordPress and/or server files. If you are not technical-minded, 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 – Contact Your Web Host

Get in touch with your web host and ask them exactly what precautions have been put into place to help prevent your site from being attacked, and what is done to ensure that your server files and data get regularly backed up.

It’s important to make sure that your webhosting provider backs up your sites and that, if disaster strikes, you can quickly and easily get back your files.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Maintained

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

A complete WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WordPress website fully backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website backed up and updated is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP website frequently backed up and up-to-date is. WP maintenance is not hard to do 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 WP maintenance yourself, pay someone 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 still have a pulse!

If you don’t want to perform manual backups, 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 Keep Your WordPress Web Site Protected With Backup Creator WordPress Plugin

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

The mass brute force botnet attack on WordPress sites was mostly an attempt to compromise website administrator panels and gain access to sites by exploiting WordPress sites that used “admin” as their account name.

For reasons of website security, avoid installing sites with the username admin. This is the first area hackers will test. If your site’s username is admin, you should change this immediately.

For a tutorial created especially for non-technical WP admin users on how to change your admin username, go here: How To Change Your Admin Username In WordPress

Security Measure #4 – Your Password

A “brute force” attack occurs when malicious software continually tries to guess the right username and password characters that will give the hacker access to 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 suggestions for doing this), the “bot” will just continue to attack your site until it eventually breaks into your admin area.

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

Tip

Roboform is a password software you can use to help you generate different unguessable passwords …

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

For a simple tutorial on how to change your admin password, go here: Changing Your Password

Security Measure #5 – Deny Access To Your WP Config File

The wp-config.php file contains information about your site’s database and is used to define advanced options for WordPress.

wp-config.php file

(wp-config.php file)

If hackers break into your site, they will typically look for 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 them to change anything in your database, create a user account, upload files and take control of your site.

In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, 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 – Delete Or Rename 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, just rename them.

Security Measure #7 – Upgrade Your WordPress CMS, Themes & Plugins

Hackers search for vulnerabilities in older versions of WordPress that can be exploited, including outdated versions of WordPress plugins and themes.

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor that allows the site administrator to edit plugin and theme code from the dashboard.

You can access your WordPress Theme Editor by selecting Appearance > Editor in the dashboard menu …

WP Theme Editor Menu

(Accessing the WordPress theme editor via the admin menu)

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

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

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

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

(WordPress uploads directory)

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, anyone could 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, 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 for assistance from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

A number of WordPress security plugins are available that will address common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your site from malicious exploits, preventing injections of code into files, etc.

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

SecureScanPro - WP security software solution

(SecureScanPro – WP security plugin)

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 Security Solution For WordPress Websites(Blog Defender)

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

BlogDefender scans you web site for potential security vulnerabilities …

Blog Defender WordPress Security Product SuiteAnd lets you quickly fix these …

Blog DefenderIf you don’t want to purchase 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 essential maintenance tasks like ensuring 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 expose your site to attacks by hackers and bots.

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

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after 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 has given you the initial guidelines and direction you need to prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please seek help from a professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications whenever we publish new tutorials on WordPress security and tutorials about new 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

***