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 most popular content management system in the world and the preferred online publishing platform for millions of websites and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers wanting to score a “big win”.

In early 2013 a global brute force attack struck WordPress installations on virtually every web host in existence around the world.

These attacks were caused by botnets (networks of infected computers programmed to attack other computers).

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 will attempt to break into WordPress sites is by trying to guess the site’s administration login username and password. This is achieved with scripts and 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 site can be an easy target for hackers.

This is called a “brute-force” login attack.

Botnets – What Are They?

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 computers that have been compromised and infected with malicious software, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware of this.

Botnets are regularly used to send out 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 globe since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009. Screenshot image: SecureList.com)

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

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

WordPress powers millions of websites around the world, which makes it a frequent target for hacking attempts

(WordPress is frequently the target of malicious attacks by hackers, due to its global popularity)

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 choose 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 A Secure Platform For Websites?

Important

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, said this about the botnet 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 – 10 Security Points

Every website or blog with a vulnerability offers some value to hackers. Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you cannot afford to ignore the importance of website security. Large, medium and small websites, personal blogs, government web sites … even websites owned by web security and anti-hacking experts can and have been targeted.

If a malicious user can discover a security weakness that allows them to remotely take control of your website, the blog can then be employed as a “bot” to attack more valued sites.

Additional undesirable results of having your site hacked include getting blacklisted by Google, having stealthy spam links promoting things like online meds, cheap offers on brand names, etc. inserted into your content and meta data, malicious redirects to phishing sites or other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The reality is that hackers are very likely trying to break into your blog as you are reading this page right now. Whether they will successfully break into your site depends on how difficult or easy you have made things for them to keep persisting until they discover a way to break in, or are forced to give up and decide to look for a less secure target.

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

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

WP Security Scan(Website Security Check Screenshot: https://hackertarget.com/wordpress-security-scan)

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

Hackertarget - WP Security Check

(website security check results. Product image source: Hackertarget.com)

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

Website Security Scan(Screenshot: BlogDefender.com)

The ability 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 useful information to hackers, as this can inform them about any potential holes or weaknesses, especially where the owners haven’t updated their sites.

If your website is powered by WordPress and you’re not proactive steps to bolster the security of your site, then we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress installations all the world!

When a website gets broken into, site owners will find themselves “locked out” of their own site, or notice that their files have been vandalized or that everything has been entirely wiped out. Typically, most sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.

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

Important Info

Note: Some of the recommended steps listed below need some technical skills to modify core WordPress or server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Webhosting Service

Get in touch with your webhosting provider and ask them exactly what measures they have put into place to help prevent your site from brute-force attacks, and what they do to ensure that your WordPress sites get regularly backed up.

Make sure that your web host is regularly backing up your server files and that, if disaster strikes, you can quickly and easily recover your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Up-To-Date

Never rely only on your webhosting provider for site backups. Instead, learn how to maintain and manage your WordPress site or get this service done for you and develop a habit of performing a full WordPress site maintenance routine frequently (e.g. weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP website regularly backed up and up-to-date. WP site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WP 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 perform manual backups, there are a number of plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone & Keep Your WP Websites And Blogs Protected With Backup Creator WordPress Plugin

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

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

For website security reasons, never set 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.

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

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when a malicious script persistently tries to guess the right username and password character string that will give them entry to your site.

Unless some measure is put into place to prevent the brute-force attack (see further below for a couple of effective ways to do this), the “bot” will just keep attacking your site until it eventually gets access.

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

Useful Tip

You can use a password tool like Roboform to help you generate passwords …

You can use a password management software tool like Roboform to generate really secure passwords(You can use a password management software tool like Roboform to generate passwords)

We have created a tutorial on how to change your login password here: What To Do If You Need To Change Your WordPress Password

Security Measure #5 – Protect Your wp-config.php File

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

WordPress WP Config file

(WP Config file)

If a hacker breaks into your website, they will normally look for your 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 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 being attacked 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 – Rename Or Delete 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 – Update Your WordPress Software, Themes And Plugins To Their Latest Version

Hackers are always on the lookout for vulnerabilities they can exploit in previous WordPress versions, including out-of-date versions of plugins and themes.

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress installations come with a built-in editor feature that lets the administrator edit theme and plugin files from the dashboard.

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

WP Theme Editor Menu

(The WordPress theme editor is accessible using the WordPress admin menu)

This allows anyone accessing your site to view and modify all of your WordPress theme template files, and cause mayhem on your site.

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

Security Measure #9 – Prevent Access To Your WordPress Uploads Directory

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

By default, this folder is visible to online users. All a person needs to do to see the contents in the “uploads” directory is navigate to your 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 malicious users, this could seriously threaten the security of your website.

Protecting your directories will prevent unauthorized people 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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are unsure about what to do.

Security Measure #10 – Install Security Plugins

Some great WordPress security plugins are available that will address common security issues WordPress site owners face, such as preventing hackers from gaining access to vital information about your site, protecting your files from botnets, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress security 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 - total security software for WordPress

(SecureScanPro – security software for WordPress)

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

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

Blog Defender Security Plugin

Blog Defender Security Suite For WordPress Websites(Blog Defender Security Solution For WordPress Web Sites)

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 website for security vulnerabilities …

Blog DefenderAnd lets you fix these quickly, easily and inexpensively …

Blog DefenderIf you don’t want to buy 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 essential maintenance tasks like updating your WordPress software, plugins and WP themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what kind of business you run or plan to run online and how small you think your web presence is, web security is something you cannot ignore.

As one last reminder, below is the advice given by a security expert to all WordPress users following the large-scale brute-force attacks by botnets 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 information in this article 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 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 receive notifications when we publish new information on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya

***