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 leading content management system in the world and the preferred online publishing platform used by millions of businesses and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will become a prime target for attacks by hackers.

In early 2013, WordPress installations around the world were subjected to a global-scale brute force attack.

These attacks were caused by infected computer networks programmed to attack other vulnerable sites, also commonly known as “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)

There are many ways hackers try to break into WordPress sites. One of these is by trying to guess the site admin’s login username and password. This can be done with software tools that can guess hundreds of possible login combinations in minutes.

If you’re using weak user names and passwords that are easy to guess, your website could be an easy target for hacking attempts.

This is called a “brute-force” attack.

What Is A Botnet?

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 infected with malicious code, which can then be controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

Botnets are often used to send mass spam emails from the infected computers of unsuspecting users.

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the globe since 2009 …

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

(The Zeus botnet has been actively infecting computer networks all around the globe since 2009. Source: SecureList.com)

These ongoing botnet attacks were highly distributed and well organized. 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 site administration areas. The worldwide brute-force attacks then continued, with over 30,000 WordPress sites being hacked every day.

Coverage of this brute force attack was widely reported in all of the major webhosting companiesand leading technology 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 popularity

(WordPress often is targeted by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of good reasons why you should use WordPress if you are concerned at all about the security of your online business.

To learn what makes WordPress a very secure web platform, read this article: Why WordPress Is A Secure Platform For Websites –

Important Info

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

How To Protect Your WordPress Blog From Being Brute Force Attacked – 10 Security Measures

Every website with a security vulnerability offers some value to hackers. Every website is valuable to hackers. Large, medium and small websites, personal blogs, government web sites … even web sites owned by online security and anti-hacking experts can and have been targeted.

If someone can find a vulnerability in the web software, the web site can then be employed as a “bot” in a planned cyber attack against other valued web sites.

Additional undesirable impacts of having your site hacked and your site security compromised include getting blacklisted by search engines, having spammy links advertising things like online meds, discounted fashion, etc. inserted in 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 hackers are very likely trying to hack into your site at this very moment. Whether they can break into your site successfully will depend on how hard you will make it for them to continue persisting until they work out a way to break in, or are forced to give up and decide to look for an easier target.

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

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

Hackertarget - WP Security Scan(WP Security Check Source: Hackertarget.com)

You will see that the check returns a number of results and details about your site setup …

Hackertarget - WordPress Security Check

(Hackertarget – WP security check results. Source: Hackertarget.com)

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

WP Security Scan(Product image source: Blog Defender)

Being able to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories can be potentially useful information to hackers, as these can inform them about any exploitable vulnerabilities, especially where the owners haven’t updated their software versions.

If your site or blog runs on WordPress and you’re not taking appropriate steps to harden your site, then it’s practically guaranteed that, at some point, someone will attempt to hack your installation, because these attacks are systematically targeting WordPress installations worldwide!

Typically, whenever a website is broken into, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even that their content has been completely wiped out. Often, compromised sites will be infected with malicious scripts without the owner even being aware that this has occurred.

To help avoid the heartache and frustration (and potential loss of valuable business data) of discovering that your site has been hacked into, we have listed below ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being brute-force attacked.

Useful Info

Note: A few of the recommended steps shown below require some technical understanding of how to modify core WordPress 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 a professional WordPress service provider for assistance.

***

Security Measure #1 – Contact Your Host

Get in touch with your host and ask them what security precautions have been put into place to protect your site from brute-force attacks, and what they do to make sure that your server files and data get regularly backed up.

Check that your web host regularly backs up your server files and that, if disaster strikes, you can quickly and easily get back your files.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Site Frequently Up-To-Date

Never rely only on your web host for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and develop a habit of performing a complete WordPress site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WP web site fully backed up and updated. WordPress maintenance is not hard 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 WordPress site maintenance yourself, pay a professional to do it but make sure it 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 back up your files manually, there are many plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Clone And Protect Your WordPress Site With Backup Creator WordPress Plugin

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

The mass brute-force attack on WordPress sites was mostly an attempt to compromise website admin panels by exploiting WP installations that used “admin” as the account name.

For security purposes, avoid setting up sites with the username “admin”. This is the first area hackers will test. If your blog’s username is “admin”, then make sure you change this immediately.

For a tutorial created especially for admin users that shows you how to change your admin username, go here: How To Change Your WP Admin User Name

Security Measure #4 – Use A Strong Password

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

Unless some measure is put into place to prevent 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 “cracks” the code.

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

Practical Tip

You can use a password management program like Roboform to create strong login passwords …

Roboform is a password management program that lets you create really secure passwords(Roboform is a password tool you can use to generate secure login passwords)

For a simple step-by-step tutorial that shows you how to change your password, go here: What To Do If You Need To Change WordPress Passwords

Security Measure #5 – Prevent Access To 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 hackers break into your site, 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 someone 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 people from being able to easily view 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 your install.php, upgrade.php and readme.html files.

These files are not required after installation. If you don’t want to delete these files, just rename them.

Security Measure #7 – Keep Your WordPress Files, Plugins & Themes Up-To-Date

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

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

Security Measure #8 – Disable Your 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 the admin menu …

WP Theme Editor Menu

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

This allows anyone accessing your site’s admin area to view and modify your files, and cause havoc on your site.

If you want to prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

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

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

By default, this folder is visible to all users online. All a person needs to do to view all of the contents stored in your site’s “uploads” folder is visit the directory using a web browser …

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

(WordPress uploads folder)

If any directories in your website have vulnerabilities that can be exploited by hackers, anyone could upload unauthorized file types to your site.

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, uploading 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 seek professional help if you are unsure about what to do.

Security Measure #10 – Use WordPress Security Plugins

Several security plugins for WordPress are available that specifically address most security issues WordPress site owners face, such as preventing hackers from accessing your site, protecting your files from malicious software, preventing injections of code into files, etc.

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

SecureScanPro - WordPress security plugin

(SecureScanPro – WP total security plugin)

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 security plugin you may want to consider using is BlogDefender.

Blog Defender Security Suite For WordPress

Blog Defender(Blog Defender)

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

BlogDefender shows you where the security weaknesses in your web site are …

Blog Defender Security Product Suite For WordPress BlogsAnd then shows you how to fix these quickly …

Blog Defender WordPress Security SuiteIf 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 very secure web platform, but neglecting simple maintenance tasks like making sure that your WP installation, WP plugins and themes are kept up-to-date, tightening file and data security and taking other necessary precautions can expose your site to attacks by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, securing your sites is something you simply cannot afford to ignore.

As one last reminder, below is the advice given by a website security expert to all WordPress users following the mass brute force attacks 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, the above information has given you the initial steps you need to take to 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 professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified when we publish new articles and tutorials on WordPress security and reviews of WordPress 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

***