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 popular CMS makes WordPress an easy target for hackers.

In April 2013 a mass brute force attack hit WordPress installations on virtually every WP hosting server in existence around the world.

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

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)

There are many ways hackers try to break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. To do this, hackers use scripts and software that can guess 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.

Botnet Definition

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)

A “Botnet” is a network of private computers that have been compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is taking place.

Botnets are typically 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 infecting 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.

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

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

News of this mass brute-force attack was reported by all of the major webhosting companiesand leading technology 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 …

Powering millions of websites worldwide makes WordPress an obvious target for hacking

(WordPress often is targeted 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 many very good reasons why you should use WordPress if you are concerned at all about the security of your web presence.

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

Info

It’s important to note that, in the case of April 2013 worldwide brute force attack described above, there was actually no WordPress vulnerability being exploited (the same script was also targeting sites built using other web platforms 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 – 10 Security Points

Every site with a vulnerability provides some type of opportunity to hackers. An unsecured website or blog not only offers hackers opportunities to improve their skills and win “respect” among their peers, but it can also acts as a platform for launching distributed attacks, distributing malware and defrauding site visitors through information theft.

If someone can exploit a security flaw, the site can then be used to target other valuable websites.

Additional undesirable results of being hacked and your site security compromised include being blacklisted by Google, having stealthy spam links promoting things like viagra, porn, etc. inserted in your content and meta data, redirecting visitors to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasty things.

The reality is that hackers are scouring for security exploits and trying to break into your blog while you are reading this article. Whether they will get in will depend on how difficult you have made it for them to continue trying until they can discover how to get access, or give up and go 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 site through their WordPress security check …

Website Security Check(WordPress Security Scan Product image source: Hackertarget.com)

You will see that the scan will return various results and details about your website …

WP Security Scan

(website security check results. Image source: Hackertarget.com)

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

Hackertarget - Website Security Scan(Screenshot source: BlogDefender.com)

Being able 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 on your server are all valuable information to hackers, as these can inform them about potentially exploitable holes or weaknesses, especially where site owners haven’t updated their software versions.

If your website is driven by WordPress and you’re not taking steps to bolster the security of your site, we can practically guarantee that, at some point, someone will attempt to hack your site, because these attacks are systematically targeting WordPress installations around the world!

Typically, whenever a site gets hacked, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even that their content has been completely wiped out. Often, compromised sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache (and significant financial loss) of having your website being hacked into, below are ten essential and effective security checks that will help to protect your WordPress site from brute-force attacks.

Important

Note: Some of the recommended steps 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 file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Contact Your Host

Get in touch with your webhosting provider and ask them what security systems have been put in place to help prevent your site from being attacked, and what they are doing to ensure that your server files and data get backed up.

Make sure that your webhosting provider regularly backs up your sites and that, if anything happens, you can easily get your files back.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Site Regularly Maintained

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

A proper WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress site regularly backed up and updated is. 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 don’t want to learn how to do WP 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 back up your data manually, there are a number of plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Clone And Protect Your WP Website With Backup Creator Plugin For WP

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

The mass brute-force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels by exploiting sites that used “admin” as the user name.

For security purposes, don’t set up WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, you will need to change this immediately.

For a tutorial that shows you how to change your login username, go here: How To Change Your Admin User Name In WordPress To A Different User Name

Security Measure #4 – Change Your Password

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

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

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

Tip

Roboform is a password tool that lets you generate different unguessable passwords …

You can use a password tool like Roboform to generate unguessable passwords(Roboform is a password management software you can use to help you generate different secure passwords)

For a simple tutorial for non-technical WordPress users that shows you how to change your password, go here: How To Reset Login 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.

WordPress WP Config file

(wp-config.php)

If hackers break into your WordPress website, they will typically look for your wp-config.php file, because this file contains your WordPress 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, prevent people from accessing 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 Site Installation Files

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

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

Security Measure #7 – Update Your WordPress Site, Plugins & Themes To Their Latest Version

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

Make sure to always keep your software 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 allows administrators to edit plugin and theme code inside the dashboard.

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

WP Theme Editor Menu

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

The WordPress theme editor allows anyone accessing your site to view and edit your theme templates, or create havoc on your site.

If you want to prevent unauthorized 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 Folder

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

By default, this folder is visible to online users. All someone has to do to view the contents stored in the “uploads” directory is visit the directory using their browser …

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

(WordPress uploads directory)

If any directories in your website have vulnerabilities that can be exploited by malicious users, this can threaten the security of your site.

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, uploading 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 seek professional help if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are several security plugins for WordPress available that specifically address many common security issues WordPress website owners face, such as preventing unauthorized users from accessing your site, protecting your files 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 seems to do a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - security software for WordPress

(SecureScanPro – complete 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 consider using is BlogDefender.

Blog Defender

Blog Defender(Blog Defender Security Suite For WordPress)

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

BlogDefender shows you where potential security holes in your website are …

Blog Defender Security Suite For WordPressAnd lets you easily fix these …

Blog Defender WordPress Security SuiteIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, then use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting basic maintenance tasks like keeping your WordPress software, WordPress plugins and WP themes updated to their latest versions, tightening file and data protection 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, you cannot ignore the importance of securing your web sites.

As a final reminder of the importance of website security, below is the advice given by a security expert to all WordPress users after the worldwide 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, website security is very important if you run a WordPress site. Hopefully, the information in this article will help keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a 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 when we publish new tutorials on WordPress security and reviews of new WordPress security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***