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 is often the target of attacks by hackers.

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

These attacks were caused by botnets (computers infected with malware and programmed to attack other installations with security vulnerabilities).

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

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

If you’re using predictable login details, your website could be easily hacked by repeated attempts to work out your site’s login details.

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/botnet)

”Botnets” are networks of private computers that have been infected with malicious code, which are then controlled remotely as a group, typically without the computer owners’ knowledge.

Botnets are often used to send mass spam emails.

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

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

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

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

WordPress powers millions of websites and blogs around the world, which makes it a target for attempted hacking attacks

(Powering millions of websites around the world makes WordPress a target for attempted hacker attacks)

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

No. In fact, there are lots of great reasons why you should continue using 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: Is WordPress Secure? What Every Website Owner Needs To Know About WordPress

Info

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, 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 Points

Every blog with a vulnerability has value to hackers. No site Business web sites, personal blogs, government web sites … even web sites owned by web security and anti-hacking experts can and have been targeted.

If a malicious user can discover a vulnerability, the site can then be used to attack other highly-valued websites.

Additional undesirable consequences of being hacked include getting blacklisted by Google, having stealthy spam links advertising things like online meds, porn, etc. in your content and meta data, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The reality is that hackers are probably scouring for security weaknesses and trying to break into your blog at this very moment. Whether they can be successful depends on how difficult you have made things for them to continue trying until they can discover a way to get in, or decide to look for a less secure target.

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

If you visit a site like Hackertarget.com and run your website through their WordPress security check …

Website Security Check(Hackertarget – Website Security Check Screenshot image: https://hackertarget.com/wordpress-security-scan)

You will see that the test will display various results and information about your website …

Hackertarget - Website Security Scan

(website security scan results. Source: Hackertarget.com)

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

WordPress Security Scan(Source: BlogDefender website)

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 are all potentially valuable information to hackers, as these can inform them about any exploitable vulnerabilities, especially in older versions.

If your site or blog is driven by WordPress and you are not taking steps to bolster the security of your site, then 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 targeting WordPress installations all the world!

Whenever a site gets hacked, webmasters can discover much to their dismay that they have been “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 that comes with discovering that your site has been hacked into, we have listed below 10 essential and effective security checks that will help to protect your WordPress site from brute-force botnet attacks.

Important

Note: Some of the steps shown below require some technical skills to modify core WordPress and server files. If you have no technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for help.

***

Security Measure #1 – Get In Touch With Your Hosting Service Provider

Get in touch with your webhosting service and ask them exactly what measures they offer to help prevent your site from botnet attacks, and what they do to ensure that your files and data are being backed up.

Make sure that your web host regularly backs up your server files 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 Frequently Maintained

You should never rely just on your hosting provider for site backups. Instead, learn how to maintain your WordPress site or get this service done for you and develop a habit of religiously performing a complete WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

Maintaining your WordPress web site completely backed up and updated is vitally important for WordPress security.(Maintaining your WP website backed up and updated is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP website 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 or blog. If you do not want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the next most important thing you must do after making sure that you are still breathing!

If you don’t want to perform manual backups, there are many plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Clone And Protect Your WordPress Web Sites With Backup Creator Plugin For WP

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

The brute force attack on WordPress is mostly attempting to compromise website admin panels by exploiting WP sites that used “admin” as the account name.

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

We have created a tutorial that shows you how to change your admin username here: How To Change Your WordPress Admin Username

Security Measure #4 – Use Strong Passwords

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 login combination that will unlock your website.

Unless some measure is put into place to stop 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 attacking your site until it eventually works out the combination.

Weak passwords, therefore, become really easy targets for brute force attacks. Make sure that you change your password combination to something that is at least eight characters long, with both upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Useful Tip

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

You can use a password management tool like Roboform to help you generate strong login passwords(Roboform is a password management program you can use to generate different secure passwords)

For a detailed tutorial that shows you how to change your WordPress admin password, go here: What To Do If You Need To Change Passwords In WordPress

Security Measure #5 – Protect 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 WordPress options.

wp-config.php file

(WordPress WP Config file)

If hackers break into your site, they will typically search for the wp-config.php file, because this is the file that contains your database information, 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.

In order to protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being 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 Installation Files

Delete or rename the install.php, upgrade.php and readme.html files from your server.

These files are completely unnecessary after installation and can be removed. If you don’t want to delete these files, then just rename them.

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

Hackers search for vulnerabilities in older versions of WordPress that can be exploited, including out-of-date versions of WP plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that lets the administrator edit theme and plugin code from 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)

This allows anyone accessing your site to view and change your WP theme files, or create havoc on your site.

To prevent unauthorized people from being able to access your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Remove Access To The Site’s Uploads Directory

The WordPress “uploads” directory contains all the media that gets uploaded to your blog.

Normally, this folder is visible to online users. All someone has to do to view the contents stored in the “uploads” directory is visit your directory using a web browser …

(WordPress uploads directory)

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, this can become a serious threat to the security of your site.

Protecting your directories will prevent unauthorized people 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 called “index.php”) to your uploads directory, and so on. Again, it’s best to get professional help if you are not sure about what to do.

Security Measure #10 – Use WordPress Security Plugins

There are some great WordPress security plugins available that will address most security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital information about your site, protecting your website 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 damaging your site is SecureScanPro.

SecureScanPro - WordPress total security software solution

(SecureScanPro – WordPress security plugin)

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

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

Blog Defender

Blog Defender Security Plugin For WordPress(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 scans you WordPress installation for potential security vulnerabilities …

Blog Defender Security SolutionAnd then shows you how to quickly and easily fix these …

Blog Defender Security Solution For WordPress SitesIf you don’t want to buy 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 web platform, but neglecting essential maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to malicious 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, website security is something you simply cannot afford to ignore.

As a final reminder of the importance of website security, below is the advice given by a website security expert to all WordPress users following 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 very important if you run a WordPress site. Hopefully, the information in this article will help 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 receive notifications whenever we publish new tips on WordPress security and reviews of new WordPress security plugins and solutions.

***

"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)

***

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