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 SecurityBeing the world’s most used content management system makes WordPress an obvious target for hacking attempts.

In early 2013 a mass brute-force attack began hitting WordPress installations across almost every web host in existence around the world.

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

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

Brute-Force Attacks – Definition

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 methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site admin’s login username and password. This is done with scripts and software tools that can work through hundreds of login permutations in minutes.

If you’re using obvious usernames and passwords that are easy to guess, your website could be easily hacked by repeated 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.org)

”Botnets” are networks of private computers that have been compromised and infected with malicious scripts or code, which are then controlled remotely as a group, often without the unsuspecting computer owners even being aware of this.

Botnets are normally used used to blast mass spam emails.

Below is a screenshot 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 globe since 2009 called “Zeus” …

ZeuS is a botnet that 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 globe since 2009. Source: SecureList.com)

These ongoing botnet attacks on WordPress were well organized and highly distributed. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when millions of attempts to force their way into WordPress site administration areas took place. The large-scale attack continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress often comes under attack by hackers

(WordPress powers millions of sites around the world, making it a natural target for malicious attempts by hackers)

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 continue using WordPress if you are concerned about the security of your online presence.

We explain why WordPress is a secure platform for websites in this article: Is WordPress Secure?

Important

It’s important to understand that, in the case of the mass brute-force botnet attack described above, was no specific vulnerability in WordPress 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 Protect Your WordPress Blog From Brute-Force Attacks – 10 Security Points

Every site with a security vulnerability provides some type of opportunity to hackers. Every website is valuable to hackers. Corporate web sites, personal blogs, government websites … even websites owned by web security experts can and have been targeted.

If a hacker can find a vulnerability, that site can then be employed to target other highly-valued web sites.

Additional undesirable results of having your website hacked and your site security compromised include getting blacklisted by search engines, having spammy links advertising things like casinos, porn, etc. inserted in your content, malicious redirects to phishing sites or other websites, drive-by downloads (adding malware on your visitors’ computers), and many other nasties.

The reality is that brute-force software bots are probably looking for vulnerabilities and trying to hack into your website while you are reading this page. Whether they will hack into your site successfully will depend on how hard or easy you can make it for them to keep trying until they can discover a way to break in, or decide to look for a less secure target.

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

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

WordPress Security Scan(WP Security Scan Source: Hackertarget.com)

You will see that the check returns various results and information about your site …

Hackertarget - Website Security Check

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

It should be obvious after using the above tool that if you are able to freely access all of this information, then hackers can too.

WP Security Check(Product image source: BlogDefender.com)

The ability to see which 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 informs them about any security weaknesses, especially where the owners haven’t updated their sites.

If your site or blog runs on WordPress and you are not precautionary steps to bullet-proof your site, then it’s practically guaranteed that, at some point, your site will be hacked, or at least targeted by bots, because these attacks are systematically hitting WordPress installations worldwide!

Typically, when a website or blog is broken into, site owners can find themselves “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Often, most sites will be infected with malicious scripts or viruses without the owner even being aware that this has occurred.

To help avoid the heartache of discovering that your website has been hacked into, we have listed below 10 simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute-force botnet hacking attempts.

Note

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

***

Security Measure #1 – Contact Your Hosting Service Provider

Contact your hosting service provider and ask them exactly what security systems they offer to help prevent your site from being attacked, and what is done to ensure that your WordPress sites get backed up.

It’s important to check that your webhosting service regularly backs up your sites and that, if anything happens, you can quickly and easily recover your files and data.

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

Never rely only on your hosting service for 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 religiously performing a complete WordPress site maintenance routine on a regular basis (e.g. daily, weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

  • All unnecessary files and data 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 site maintenance routine looks like this …

Maintaining your WP website or blog completely 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. Image: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WordPress web site frequently backed up and updated is. WordPress site maintenance is not hard 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 WordPress maintenance yourself, pay someone 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 your heart is still beating!

If you don’t want to back up your data manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate And Keep Your WP Site Protected With Backup Creator Plugin For WP

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 site admin panels and gain access to sites by exploiting installations with “admin” as their account name.

For website security reasons, don’t install a WordPress site with the username admin. This is the first area hackers will test. If your blog’s user name is admin, you will should change it immediately.

We have created a tutorial for WordPress admin users on how to change your admin username here: How To Change Your WordPress Admin User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when a malicious script persistently hits a username and password field with different character strings trying to guess the right combination that will unlock your website.

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 keep attacking your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, are really easy targets for botnets. Make sure that you change your password to something that contains at least 8 characters long, with upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Useful Tip

Roboform is a password management program you can use to create different secure login passwords …

You can use a password management program like Roboform to create unbreakable passwords(Roboform is a password management tool you can use to help you generate different passwords)

We have created a tutorial created especially for WordPress users that shows you how to change your admin password here: What To Do If You Need To Reset Your Login Password

Security Measure #5 – Protect Your WP Config File

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

wp-config.php file

(wp-config.php)

If hackers break into your WordPress site, they will look for the wp-config.php file, because this file 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must prevent people from being able to easily access 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 – Delete Or Rename Unnecessary Website Installation Files

Rename or delete your install.php, upgrade.php and readme.html files.

You can remove these files after installation. If you don’t want to remove these files, just rename them.

Security Measure #7 – Keep Your WordPress Site, Themes And Plugins Up-To-Date

Hackers look for vulnerabilities in previous versions of WordPress that they can exploit, including out-of-date versions of themes and plugins.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor allows anyone accessing your blog to view and modify your theme template files, or cause havoc on your site.

If you want to prevent unauthorized 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 – Secure Your Site’s Uploads Folder

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

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

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

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

If any directories in your website have vulnerabilities that can be exploited by malicious users, anyone can 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, adding a blank index.php file (this is literally an empty file named “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 not sure about what to do.

Security Measure #10 – Use Security Plugins

A number of great WordPress security plugins are available that specifically address most common security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital information about your site, protecting your site from brute-force attacks, preventing injections of code into files, etc.

Most 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 - WordPress total security software

(SecureScanPro – WordPress total 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 security plugin you may want to look at using is BlogDefender.

Blog Defender Security Solution For WordPress Websites

Blog Defender Security Solution For WordPress(Blog Defender)

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

BlogDefender scans you WordPress installation for potential security vulnerabilities …

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

Blog Defender Security Product Suite For WordPressIf you don’t want to purchase a premium 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 very secure web platform, but neglecting basic maintenance tasks like keeping your WP software, plugins and themes up-to-date, tightening file and data security and taking other necessary precautions can expose your website to attacks 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 cannot ignore the importance of securing your website or blog.

As one last reminder of the importance of website security, below is the advice given by a website security expert to all WordPress users following the mass 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 very important if you run a WordPress site. Hopefully, the above article has shown you what to do to keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please seek help from a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to be notified via email when we publish new tips on WordPress security and tutorials about new WordPress security plugins.

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***

Recommended Video Courses For WordPress Users

WordPress SecurityWordPress Security

Learn how to keep your WordPress site or blog secure and protected from malware, hackers and brute-force attacks.

More info: WordPress Security

Recommended Video Courses For WordPress Users

How To Use FTPHow To Use FTP

This video course shows you how to use FTP (File Transfer Protocol) to transfer and upload files between your hard drive and your server using a free FTP program called Filezilla.

More info: How To Use FTP

Recommended Video Courses For WordPress Users

How To Use Amazon S3How To Use Amazon S3

Learn how to set up and use Amazon S3 to upload, store, manage, and protect your site’s images, large media files, downloadable files, stream videos and more.

More info: How To Use Amazon S3

Recommended Video Courses For WordPress Users

Using Password ManagersUsing Password Managers

Password Managers provide an easy and secure way to keep track of all your passwords. This video course shows you how to use two FREE powerful password management tools.

More info: Using Password Managers

Recommended Video Courses For WordPress Users

How To Back Up & Restore WordPress SitesHow To Back Up & Restore WordPress Sites

Learn how to safely and automatically backup your WordPress files and database and how to easily restore your WordPress site if something were to happen.

More info: How To Back Up & Restore WordPress Sites

Recommended Video Courses For WordPress Users

How To Set Up WordPress On LocalhostHow To Set Up WordPress On Localhost

Learn how to install, set up, and locally host a fully functioning WordPress site on your computer.

More info: How To Set Up WordPress On Localhost

Recommended Video Courses For WordPress Users

How To Use cPanelHow To Use cPanel

cPanel is a powerful and simple-to-use web hosting management software application that gives website owners the ability to quickly and easily manage their servers and websites using a simple and intuitive dashboard.

This video course will teach you how to use the main features of cPanel to manage your web hosting.

More info: How To Use cPanel

Author: Martin Aranovitch

Martin Aranovitch is the founder of WPCompendium.org and the author of The Small Business Digital Manager. WPCompendium.org provides hundreds of FREE tutorials that show you how to use WordPress to grow your business online with no coding skills required! Get our FREE "101+ WordPress Tips, Tricks & Hacks For Non-Techies" e-course with loads of useful WordPress tips!

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.