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 SecurityWordPress is the world’s most used content management system which makes it an obvious target for malicious attacks by hackers.

In early 2013 a worldwide brute force attack began hitting WordPress installations across virtually every web host in existence around the world.

These attacks were caused by computer networks infected with viruses and programmed to attack other vulnerable installations (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)

There are many methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. To attempt this, hackers use software programs that automatically tries to guess hundreds of login possibilities in minutes.

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

This is called a “brute force” login attack.

What Are 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.org)

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

Botnets are normally used used to send out mass spam emails from computers of compromised user accounts.

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” …

ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009.

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

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

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

Being the world's most popular CMS makes WordPress an obvious target for hackers

(WordPress often is targeted by hackers)

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 presence.

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

Important Info

It’s important to note that, in the case of the brute force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also attacking sites built using other 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 Blog From Being Brute-Force Attacked – 10 Security Checks

Every web site with a vulnerability presents an opportunity to hackers. Every website is valuable to hackers. Corporate sites, personal blogs, government websites … even web sites owned by online security and anti-hacking experts can and have been targeted.

If a hacker can discover a way to gain remote access of your website, the website can then be used to attack other valued websites.

Additional undesirable effects of having your website hacked include getting blacklisted by search engines, having stealthy spam links advertising things like gambling, porn, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites or other websites, drive-by downloads (adding malware on your visitors’ computers), and many other nasties.

The reality is that brute-force software bots are most likely trying to hack into your web site as you are reading this article at this very moment. Whether they will get into your site successfully will depend on how challenging you will make it for hackers or bots to keep trying until they work out a way to get in, or decide to look for a more vulnerable target.

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

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

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

You will see that the scan will display a number of results and information about your site …

Hackertarget - WP Security Scan

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

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

Hackertarget - WordPress Security Check(Image source: BlogDefender website)

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

If your site or blog is powered by WordPress and you’re not proactive steps to toughen up your site, we can practically guarantee that, at some point in time, someone will attempt to hack your website, because these brute-force attacks are systematically hitting WordPress installations worldwide!

Whenever a website or blog gets broken into, blog owners 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 that everything has been entirely wiped out. Typically, compromised sites will become infected with malicious scripts or viruses without the owner even being aware of it.

To help avoid the heartache and frustration of 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 botnet attacks.

Info

Note: A few of the recommended measures listed below require some technical understanding of how to modify core WordPress and server files. If you have no web skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Get in touch with your hosting provider and ask them exactly what systems are in place to protect your site from botnet attacks, and what they are doing to ensure that your files and data get regularly backed up.

Make sure that your hosting service provider regularly backs up your server files and that, if anything should happen, you can quickly and easily get your site back.

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

Never rely only on your webhosting service provider for your 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 complete WordPress site maintenance routine on a regular basis (e.g. weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

Maintaining your WordPress installation completely backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website regularly backed up and up-to-date is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP web site fully backed up and updated. WordPress 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 this gets done. Backing up your website is the next most important thing you should do after making sure that you still have a pulse!

If you don’t want to back up your site manually, there are many free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Back Up, Clone And Keep Your WordPress Web Site Protected With Backup Creator WordPress Plugin

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

The brute force attack on WordPress is mostly attempting to compromise site administrator panels by exploiting installations with “admin” as the account name.

For website security reasons, never set up WordPress 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 make sure you change it immediately.

For a detailed step-by-step tutorial for non-technical WordPress users on how to change your username, go here: How To Change Your WP Username From Admin To A Different Username

Security Measure #4 – Your Password

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

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 persist in attacking your site until it eventually breaks into your admin area.

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

Tip

Roboform is a password management tool that lets you generate secure passwords …

You can use a password management program like Roboform to generate really secure passwords(Roboform is a password software that lets you generate strong login passwords)

We have created a step-by-step tutorial on how to change your admin password here: Changing Your WordPress Password

Security Measure #5 – Prevent Access To The 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 options for WordPress.

WordPress WP Config file

(wp-config.php file)

If a hacker breaks into your site, they will typically search for your wp-config.php file, because this file contains your database information, 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 your wp-config.php file from being easily accessible. 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.

You can remove these files after installation. If you don’t want to remove these files, just rename them.

Security Measure #7 – Update Your WordPress CMS, Themes & Plugins

Hackers look for vulnerabilities in previous versions of WordPress that they can exploit, including outdated versions of WP plugins and themes.

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress comes with a built-in editor feature that lets you edit theme and plugin files inside the dashboard area.

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

WP Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your site see and modify all of your WordPress theme files, and create havoc on your site.

To prevent unauthorized 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 The Site’s Uploads Folder

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

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

(WordPress uploads folder)

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

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 online users from accessing 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 – Install Security Plugins

There are a number of great security plugins for WordPress available that will address many common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your site from malicious exploits, preventing unauthorized file uploads, etc.

Most 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 potential issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - WordPress complete security software solution

(SecureScanPro – WP security plugin)

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

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

Blog Defender Security Plugin For WordPress Blogs

Blog Defender WordPress Security Plugin(Blog Defender)

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

BlogDefender scans you web site for potential security holes …

Blog Defender Security SuiteAnd lets you easily fix these …

Blog DefenderIf you don’t want to buy 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 essential maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data security 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, securing your website or blog is something you simply cannot ignore.

As one last reminder, below is the advice given by an expert on website security to all WordPress users after 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, WordPress security is very important if you run a WordPress site. Hopefully, the above 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 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 via email whenever we publish new tips on WordPress security and tutorials about new security plugins and solutions.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

***