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 SecurityPowering millions of sites worldwide makes WordPress a target for hacking attempts.

In April 2013 a global brute-force attack struck WordPress installations across virtually every WP hosting server in existence around the world.

These attacks were caused by botnets (computer networks infected with malware and 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 use to try and break into WordPress sites is by trying to guess the site’s administration login username and password. This is done with scripts and software that can work through hundreds of login combinations in minutes.

If you’re using obvious usernames and passwords that are easy to guess, your website can be an easy target for hackers.

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

A “Botnet” is a network of computers that have been compromised and infected with malicious code, which are then controlled remotely as a group, often without the computer owners’ knowledge or awareness.

Botnets are normally used 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 a botnet that has been actively compromising computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet has been actively infecting computer networks all around the world since 2009.

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

These ongoing botnet attacks on WordPress are highly distributed and well organized. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users administration areas. The mass attack continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress powers millions of sites worldwide, making it a target for malicious attacks by hackers

(WordPress powers millions of sites around the world, which makes it a frequent target for hacker 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 use WordPress if you are concerned at all about the security of your online presence.

To learn why WordPress is a secure platform for websites, see this article: Is WordPress Secure?

Useful Information

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

Mike Little, one of the co-founders of WordPress, said this 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 Website From Being Brute-Force Attacked – Ten Security Measures

You may think that your website or blog has no value to hackers, but the reality is that to a hacker, all websites are an opportunity to benefit or profit at your expense.

If someone can hack and control your web site, your website or blog can then be employed as part of a larger network of “bots” to target larger and more highly-valued websites.

Additional undesirable consequences of being hacked include getting blacklisted by Google, having spammy links promoting things like online meds, discounted fashion, etc. inserted in your content and meta data, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The truth is that brute-force software bots are probably trying to hack into your website right now. Whether they can hack in successfully or not, depends on how hard or easy you can make things for them to keep trying until they work out how to get in, or are forced to decide to look for a less secure target.

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

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

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

You will see that the scan returns a number of results and information about your website setup …

Hackertarget - Website Security Check

(Hackertarget – WordPress security check results. Screenshot source: Hackertarget.com)

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

WordPress Security Scan(Image source: Blog Defender)

Being able 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 useful information to hackers, as this can inform them about exploitable security vulnerabilities, especially where site owners haven’t updated their software versions.

If your site or blog runs on WordPress and you’re not taking appropriate steps to toughen up your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these attacks are systematically targeting WordPress installations worldwide!

When a site 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 altered or even that their content has been completely wiped out. Typically, most compromised sites will become infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache (and potential loss of valuable business data) that comes with discovering that your site has been hacked into, below are ten essential and effective security checks that will help to prevent your WordPress site from being brute force attacked.

Warning

Note: A few of the recommended steps shown below require some technical understanding of how to modify core WordPress and/or server files. If you lack these technical skills, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Get In Touch With Your Web Host

Contact your hosting service provider and ask them exactly what security measures are in place to protect your site from being attacked, and what they do to make sure that your site files are being regularly backed up.

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

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

You should never rely only on your host for your site backups. Instead, learn how to maintain your WordPress site or get this done for you and maintain a habit of religiously performing a full 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 deleted,
  • 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 complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WP installation completely backed up and updated is. WP 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 WP maintenance yourself, pay a professional 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 are still breathing!

If you don’t want to perform manual backups, there are a number of plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate And Protect Your WordPress Websites And Blogs With Backup Creator WP Plugin

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

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

For security purposes, avoid installing sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s user name is admin, then change this immediately.

For a simple step-by-step tutorial that shows you how to change your WordPress admin username, go here: How To Change Your WP Username From Admin To Another Username

Security Measure #4 – Make Sure Your Password Is Secure

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

Unless some measure is put into place to prevent the brute-force attack from happening (see further below for a couple of simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually works out the combination.

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

Practical Tip

You can use a password management program like Roboform to generate unguessable passwords …

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

We have created a simple step-by-step tutorial for WordPress admin users that shows you how to change your password here: How To Reset The Login Password

Security Measure #5 – Protect Your WP Config 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 file

(wp-config.php file)

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

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 Website 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 – Upgrade Your WordPress CMS, Plugins And Themes

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

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

Security Measure #8 – Disable The Theme Editor

WordPress comes with a built-in editor that lets administrators edit plugin and theme files from the dashboard.

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

WP Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your blog to view and change your WordPress theme template files, and create mayhem on your site.

To prevent unauthorized people from accessing the 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 WordPress Uploads Folder

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

Normally, this folder is visible to all users online. All a person needs to do to see the contents in the “uploads” directory is visit your directory using their browser …

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

(WordPress uploads folder)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could become a serious threat to the security of your website.

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 a blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

There are some great WordPress security plugins available that specifically address most security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital information about your site, protecting your files from malicious exploits, preventing unauthorized file uploads, etc.

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

SecureScanPro - WordPress total security plugin

(SecureScanPro – WordPress total security plugin)

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 Security Product Suite

Blog Defender WordPress Security Solution(Blog Defender)

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

BlogDefender scans you WordPress installation for potential security holes …

Blog Defender Security Suite For WordPress Web SitesAnd lets you fix these quickly …

Blog Defender Security SolutionIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting essential maintenance tasks like keeping your WordPress software, WP plugins and WP themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your site to malicious 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 simply cannot ignore the importance of securing your websites.

As a final reminder, below is the advice given by an expert on web security to all WordPress users following the worldwide brute force attacks by botnets 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 information in this article 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 seek help from a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email whenever we publish new tutorials on WordPress security and tutorials about new security plugins.

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***