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 often comes under attack by hackers, due to its global popularity.

In 2013 a large-scale brute force attack began hitting WordPress installations across virtually every WP hosting server in existence around the world.

These attacks were caused by infected computer networks programmed to attack other computers (called “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)

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. To do this, hackers use scripts and software tools that automatically tries to guess hundreds of possible logins in minutes.

If you’re not using strong usernames or unguessable passwords, your website could be an easy target for hackers.

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

”Botnets” are networks of computers that have been infected with malicious software, which can then be controlled remotely as a group, often without the computer owners’ knowledge.

Botnets are normally used used to send 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 infecting computer networks all around the globe since 2009.

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

These botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when millions of attempts to force their way into WordPress users admin areas occurred. The attacks then continued, with over 30,000 WordPress sites being hacked every day.

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

Powering millions of websites worldwide makes WordPress a target for hacker attacks

(WordPress powers millions of websites worldwide, making it a natural target for hackers)

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

No. In fact, there are many very good reasons why you should use WordPress if you are concerned at all about website security.

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

Important

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

Mike Little, one of the co-founders 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 Site From Brute Force Attacks – 10 Security Checks

Every website with a security vulnerability offers some value to hackers. A vulnerable site not only provides newbie hackers opportunities to improve their skills and claim “bragging rights” from their peers, but it can also be a resource for launching distributed denial of service attacks, spreading malware and defrauding users through information theft.

If someone can exploit a security vulnerability that lets them compromise the control of your blog, that website or blog can then be used as a “bot” to attack other valued web sites.

Additional undesirable results of having your site hacked include being blacklisted by Google, having stealthy spam links advertising things like viagra, porn, etc. inserted into your content and meta data, redirecting visitors to phishing sites or other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The reality is that hackers are very likely trying to hack into your blog while you are reading this at this very moment. Whether they will get into your site successfully will depend on how difficult or easy you have made things for hackers and bots to keep persisting until they can either discover how to break in, or give up and decide to look for a less protected target.

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

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

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

You will see that the test returns a number of results and information about your site …

Hackertarget - WP Security Check

(website security scan results. Product image: Hackertarget.com)

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

Hackertarget - WordPress Security Scan(Screenshot: Blog Defender)

The ability 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 are all useful information to hackers, as this informs them about potential security weaknesses, especially in older versions.

If your website is powered by WordPress and you’re not proactive steps to harden your site, we can practically guarantee that, at some time in the near future, someone will attempt to hack your website, because these brute-force attacks are systematically targeting WordPress sites all the world!

When a website gets broken into, webmasters can find themselves “locked out” of their own site, or notice that their files have been altered or even that their content has been completely wiped out. Often, most sites will be infected with malicious software or viruses without the owner even being aware that a security breach has happened.

To avoid the heartache and aggravation of discovering that your website has been hacked into, we have listed below ten simple, yet essential and effective security measures that will help to protect your WordPress site from being brute-force attacked.

Info

Note: Some of the recommended steps below need some technical understanding of how to modify core WordPress or server files. If you have no web editing skills, 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 Webhosting Provider

Contact your web host and ask them what security systems have been put in place to protect your site from brute force attacks, and what they are doing to make sure that your WordPress sites are regularly being backed up.

Check that your webhosting company is backing up your server files and that, if anything should happen, you can quickly and easily get back your files.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Maintained

Never rely on your hosting company for site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and develop a habit of religiously performing a full WordPress site maintenance routine on a frequent basis (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

  • All unnecessary data and files are removed,
  • All WP files and data 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 backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP installation fully backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WordPress installation frequently backed up and updated. WordPress site 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 WordPress 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 must do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Clone And Keep Your WP Sites Protected With Backup Creator Plugin For WordPress

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

The large scale brute force botnet attack on WordPress is mostly an attempt to compromise site administrator panels and gain access to the site by exploiting WP sites with “admin” as the username.

For reasons of website security, avoid installing sites with the username “admin”. This is the first thing hackers will test. If your site’s user name is “admin”, then make sure you change it immediately.

For a simple step-by-step tutorial for WordPress users that shows you how to change your admin username, go here: Changing Your Admin User Name In WordPress

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when a malicious script persistently hits a login or password field with different strings of characters in an attempt to guess the right combination that will unlock your website.

Unless some measure is put into place to block the brute force attack (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, become really easy targets for bot attacks. Make sure that you change your password combination to a string containing at least eight characters long, with upper and lowercase letters, combined with “special” characters (e.g. %, #, *, etc).

Useful Tip

If you have trouble coming up with strong passwords or feel reluctant to set up different passwords for all of your online logins, then use a password management software tool like Roboform …

Roboform is a password tool you can use to generate very secure passwords(You can use a password program like Roboform to generate really secure 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 Login Passwords In WordPress

Security Measure #5 – Prevent Access To The wp-config.php File

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

wp-config.php file

(wp-config.php file)

If a hacker breaks into your website, they will search 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 someone 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 viewing 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 Software, Plugins And Themes Up-To-Date

Hackers are always on the lookout for vulnerabilities they can exploit in older WordPress versions, including outdated versions of WordPress themes and plugins.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed via the dashboard menu)

The WordPress theme feature lets anyone accessing your site’s admin view and modify your WP theme files, or create mayhem on your site.

To prevent 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 WordPress Uploads Directory

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

By default, this folder is visible to online users. All someone has to do to see the contents in your “uploads” directory is visit your directory using their 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 hackers, anyone 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 blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are not sure about what to do.

Security Measure #10 – Use WordPress Security Plugins

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

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

SecureScanPro - complete security software solution for WordPress

(SecureScanPro – security software solution for WordPress)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender

Blog Defender Security Solution For WordPress Sites(Blog Defender Security Product Suite)

This product is a package of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where potential security holes in your WordPress installation are …

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

Blog Defender Security Plugin For WordPress SitesIf you don’t want to invest in 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 secure web platform, but neglecting simple maintenance tasks like keeping your WP software, plugins and WP themes up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the 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 website security.

As one last reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users after 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the above information has shown you what to do to prevent brute-force attacks on your WordPress site. 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.

We also recommend subscribing to WPCompendium.org to receive notifications when we publish new articles and tutorials 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

***