WordPress is often the target of malicious attacks by hackers.
In April 2013 a mass brute force attack struck WordPress installations on almost every WP host server in existence around the world.
These attacks were caused by botnets (infected computer networks 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)
There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be achieved using software tools and scripts that can work through hundreds of login combinations in minutes.
If you’re using obvious usernames and weak passwords that are easy to guess, your website could 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 private computers that have been infected with malicious code or software, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is happening.
Botnets are normally used used to send mass spam emails from computers of compromised user accounts.
The screenshot below was taken from an internet security monitoring site 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” …
(ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009. Image: SecureList.com)
These were well organized and highly distributed attacks on WordPress sites. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress site administration areas took place. The mass attack continued after this, with over 30,000 WordPress blogs being hacked each day.
News of this brute-force attack was widely reported in all of the major webhosting companies, as well as the leading technology media publications, such as Forbes, TechNews Daily, Tech Crunch, PC Magazine, BBC News, and even on the official website of the US Department of Homeland Security …
(WordPress often is targeted by hackers, due to its global popularity)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are many great reasons why you should continue using WordPress if you are concerned about the security of your website.
We explain what makes WordPress a very secure web platform in this article: Can You Build A Secure Business Online Using WordPress?
It’s important to understand that, in the case of April 2013 brute-force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also targeting sites built using other CMS applications like Joomla).
Mike Little, the co-founder of WordPress with Matt Mullenweg, 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.
How To Protect Your WordPress Site From Being Brute Force Attacked – 10 Security Checks
You may think that your website or blog provides little to 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 a malicious user can find a web security flaw and remotely take control of your site, your blog can then be used as a “bot” to attack other valued sites.
Additional undesirable effects of having your website hacked include being blacklisted by Google, having spammy links promoting things like casinos, porn, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasty things.
The reality is that malicious bots are trying to break into your website as you are reading this page. Whether they will do this successfully will depend on how hard you will make things for them to continue trying until they can either find a way to get access, or decide to look for a less secure target.
How Much Information Are You Broadcasting To Hackers About Your Site?
If you visit Hackertarget.com and run your site through their WordPress security scan …
(Hackertarget – WordPress Security Scan Product image source: Hackertarget.com)
You will see that the check will yield various results and details about your WordPress installation …
(Hackertarget – WP security scan results. Screenshot image: Hackertarget.com)
It should be obvious after using the tool shown above that if you are able to access all of this information about your WordPress website, then so can hackers.
(Product image: 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 can all be valuable information to hackers, as this can inform them about potential holes or weaknesses, especially in older versions.
If your website runs on WordPress and you’re not taking appropriate steps to bullet-proof your site, then we can practically guarantee 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!
When a website is broken into, webmasters will 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 entirely wiped out. Often, sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.
To help avoid the heartache and aggravation (and potential financial loss) that comes with discovering that your website or blog has been hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from brute force attacks.
Note: Some of the recommended measures shown below require some technical skills to modify core WordPress or server files. If you are not technical, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.
***
Security Measure #1 – Get In Touch With Your Hosting Provider
Contact your hosting service provider and ask them what measures are in place to help prevent your site from brute force attacks, and what they are doing to ensure that your files and data are regularly being backed up.
Check that your hosting provider is regularly backing up your sites and that, if anything goes wrong, you can easily get back your files.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Updated
Never rely on your host 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 religiously performing a full WordPress site maintenance routine on a regular basis (e.g. weekly, monthly, etc …)
A full WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All WordPress data and files are free of errors, optimized and backed up,
- All WordPress themes, plugins and software components are up-to-date,
- etc …
A complete WordPress maintenance routine looks like this …
(Maintaining your WordPress installation backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)
Again, we cannot stress enough how vitally important maintaining your WP site regularly backed up and up-to-date is. WordPress site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WordPress maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the next most important thing you should 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. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Clone And Protect Your WordPress Sites With Backup Creator WP Plugin
Security Measure #3 – Do Not Use “Admin” As The Admin Username
The large scale brute-force attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting WordPress installations that used “admin” as their username.
For reasons of website security, avoid setting up WordPress sites with the username “admin”. This is the first thing hackers will test. If your site’s username is “admin”, then change it immediately.
For a detailed step-by-step tutorial that shows you how to change your username, go here: How To Change Your Admin Username In WordPress
Security Measure #4 – Choose Strong Passwords
A “brute force” attack occurs when malicious software persistently tries to guess the right username and password character string that will give the hacker access to your site.
Unless you put some measure in place to block the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually works out the combination.
Weak passwords, therefore, are very easy targets for hacking attacks. Make sure that you change your password to something that is at least eight characters long, with upper and lowercase letters, and “special” characters (e.g. ^, #, @, etc).
You can use a password software tool like Roboform to create very secure passwords …
(You can use a password management tool like Roboform to generate unbreakable passwords)
For a simple tutorial for non-technical WordPress admin users that shows you how to change your login password, go here: How To Change Your Login Password
Security Measure #5 – Prevent Your wp-config.php File From Being Easily Accessible
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.php)
If a hacker breaks into your website, they will typically look for your wp-config.php file, because this is the file that 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.
In order 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 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 Site Installation Files
Delete or rename the install.php, upgrade.php and readme.html files from your server.
You can remove these files after installation, as they are unnecessary. If you don’t want to remove these files, then just rename them.
Security Measure #7 – Upgrade Your WordPress CMS, Plugins & Themes
Hackers search for vulnerabilities they can exploit in previous versions of WordPress, including out-of-date versions of WordPress plugins and themes.
Make sure to always keep all of your files, plugins, themes, etc. up-to-date.
Security Measure #8 – Disable The WordPress Theme Editor
WordPress installations come with a built-in editor that allows the administrator to edit theme and plugin files inside the dashboard area.
In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in the dashboard menu …
(Accessing the WordPress theme editor via the dashboard menu)
The WordPress theme editor feature allows anyone accessing your blog’s admin to view and change your WordPress files, or create havoc on your site.
If you want to prevent unauthorized people from accessing your 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 – Protect Your Site’s Uploads Directory
The “uploads” folder contains all the media that gets uploaded to your blog.
Normally, this folder is visible to all users online. All a person needs to do to view the contents stored in your site’s “uploads” directory is navigate to your directory using a web browser …
(WordPress has an uploads folder where media content is stored)
If any files stored in his folder have vulnerabilities that can be exploited by malicious users, someone could upload unauthorized file types or compromise the security of your website.
Protecting your directories will prevent online users 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 a blank 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 – Use WordPress Security Plugins
There are a number of great security plugins for WordPress available that will address most security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from malicious software, preventing unauthorized file uploads, etc.
Most WordPress plugins address some but not all areas of WordPress security. One plugin that does 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 – WordPress complete security plugin)
SecureScanPro is easy to install and easy to use, and fixes 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 Product Suite)
Blog Defender is a package of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender shows you where the security holes in your web site are …
And then shows you how to fix these quickly, easily and inexpensively …
If you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, then use various free WordPress plugins, such as Limit Login Attempts …
WordPress is a very secure web platform, but neglecting essential maintenance tasks like updating your WordPress installation, 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, you simply cannot afford to ignore the importance of website security.
As a final reminder, below is the advice given by a security expert 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 very important if you run a WordPress site. Hopefully, this article has given you the initial guidelines and help you need to 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 technical provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to receive notifications when we publish new articles on WordPress security and tutorials about WordPress security plugins and solutions.
***
"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie
***