Protecting Against WordPress Brute-Force Attacks

It was not long ago that I was sitting on a call with other members of the WordPress community in which we were talking abou brute-force. When asked why WordPress core didn’t offer more out of the box features to address the issue, the response was it’s just not a relavent issue.

As interesting a response as that was, the latest trends seem to contradict that statement head on. It goes to show us that with the technological improvements things like latency and other network considerations are becoming less of a barrier to entry for attackers.

Web Based Brute Force Attacks Are Here

As if we really needed any tangible evidence of such a prominent issue, the first large-scale issue of such attacks first presented itself in October of 2012 when WordPress.com disclosed that some 50,000 sites were compromised using a similar attack:

Per their incident handling process they identified a brute force like attack which made use of a list of compromised email / password combinations derived from a third-party application[s].


Now it appears that there is a more mature botnet actively attacking websites across all hosts. Two hosts have actively come out and expressed their concerns:

LiquidWeb – 20130411

This went out via email to its users and posted on their KB:


In an ongoing effort to make you aware of security and performance concerns, we wanted to inform you of an ongoing event.

There is a brute-force login attack targeted at websites with WordPress. Due to the nature of the attack, memory consumption on
targeted servers has increased. In some cases this has resulted in degradation of performance, and unresponsive servers. This is due to a high volume of http requests which can cause some servers to start swapping memory to disk, and possibly run out of memory. The most impacted servers tend to be those with limited memory resources, especially those with 1GB of RAM or less.

HostGator – 20130411

This was just released via their blog:

As I type these words, there is an on-going and highly-distributed, global attack on WordPress installations across virtually every web host in existence. This attack is well organized and again very, very distributed; we have seen over 90,000 IP addresses involved in this attack.

What Can You Do?

While we can’t validate these accounts, we can talk to how help protect yourself from this type of attack.

So the response to this can be handled multiple ways. If you managed your own servers you could try leveraging the DOSEvasive module,ModSecurity WAF, or you can also try the various WordPress plugins out there, your host might also provide you with some solutions. The downside is that most will sit on your server and leverage all your system resources, but when tuned correctly it should be able to adequately defend against most Brute Force attempts.

So where does this leave you?

Fortunately, what a coincidence, we just released our latest product – Sucuri CloudProxy. Of it’s various features, is the ability to detect and repel brute force attacks. What’s great about that is that it does it without impacting your traffic load or your servers performance. If you’re currently a client you can also read more details on the product by visiting our internal pages.

This does bring to mind concerns and awareness around the importance of strong, unique, passwords. It also places additional emphasis on the importance of some type of Two-Factor / Multi-Factor configuration into your respective dashboards. It’s good to also understand that while WordPress appears to be the target, all platforms are targets at some point.

While we haven’t confirmed this yet, we plan to compile some data and see what we can’t find. Hopefully we’ll have it out in the morning.

Scan your website for free:
About Tony Perez

I'm a technologist with a passion for the Information Security domain. I am especially interested in malware reverse engineering, incident handling and response as well as offensive counter measures. Catch my personal rants on tonyonsecurity.com and follow on twitter at perezbox.

  • http://adammclane.com/ Adam McLane

    Thanks Tony. I’ve got a lot of clients on Hostgator. Though haven’t heard any reports yet, I’ll definitely be keeping an eye out.

  • http://ipstenu.org Mika “Ipstenu” Epstein

    LiquidWeb also posted on their kb: http://kb.liquidweb.com/wordpress-modsecurity-rules/

    If you’re using ModSecurity 2.7.3, they restored the .htaccess overrides (YAYYYYY!!) so you should be able to use that.

    • http://twitter.com/perezbox Tony Perez

      Ah good call on the KB, let me add that.

  • http://www.InspiredWebWorks.com Patty Gale

    I am a Liquid Web client and they have taken the appropriate measures.

  • http://twitter.com/boogah Jason Cosper

    This is *exactly* why we install Limit Login Attempts across the board on all of our customer sites over at WP Engine. It barely adds any overhead to the login process and tends to slow down brute force attacks to the point where our customers don’t see very many repeat offenders.

    • http://twitter.com/perezbox Tony Perez

      Sweet.

    • Scott Neader

      Overall a great idea, however this would not help much if your site(s) were targeted by this particular brute force tool. It does not care if you are blocking or not, it blindly posts to wp-login.php at a rate of up to 30 per second, using a different source IP address on EACH post.

      • http://twitter.com/BenOnBiz Ben Welch-bolen

        Bump to this point, this is really something that needs to be at the host level as the problem is the scale/scope of the attack. (Ben @ Site5.com)

        • frydmancom

          We’re using Lockdown WP for this – implemented it yesterday after our server went down with attacks. http://wordpress.org/extend/plugins/lockdown-wp-admin/

          We’d been using fail2ban in the last week but the distributed nature of the attack wasn’t being dealt with.

          Server load has been down at normal level since it all went on.

          We’re looking at cloudproxy when we know how much it’s going to cost across all our sites!

      • http://www.facebook.com/casey.govero Casey Govero

        I use a plugin to block access to wp-login.php page and change your url so attackers aren’t able to get to it’s location. I also limit login attempts and have an IP blacklist.

      • http://twitter.com/perezbox Tony Perez

        This is correct, this is why the CloudProxy is so powerful. Never even reaches the host, it funnels through our proxies instead and we block it there.

      • http://twitter.com/RyanMastr Ryan Masterson

        Scott (or others) – I use Better WP Security plugin to hide wp-login.php. It creates a RewriteRule in .htaccess, and redirects away request for wp-login.php. However if someone enters the new/correct login URL, then it redirects back to wp-login but with a key suffixed. Does the work? I don’t know what you mean by “blindly” posting to wp-login.php, and curious to know if this would bypass this rule in .htaccess.

        • MattGarrettFitness.com

          Ryan…these cats should be hung or sentenced on the amount of damage they do to the public…10-15 yrs…I’d be comfortable with. I lost my 110 page fitness site 3 months ago and had to start from scratch. How does one protect their word press site???

          • caseyctg

            You should be regularly scheduling backups. Ryan mentioned Better WP Security. I love that plugin and use it as well. It has an automatic database backup feature. That way if your site ever does go down, all you have to do is reload the database and recopy the site files.

          • caseyctg

            it’s also worth mentioning the database backup is regularly scheduled according to what time frame you setup and it’s emailed to you weekly, monthly, etc.

  • http://www.facebook.com/bill.greganti Bill Greganti

    I am currently seeing this attack on my small CenOS box hosting roughly 10 WP sites. The logs confirm I’ve been hit by well over 14,000 IP addresses since midnight last night. I have various security measures in place but the shear volume of attacks doesn’t stop even if the firewall just discards the traffic.

    • http://twitter.com/perezbox Tony Perez

      You using something like ModSec?

      • http://www.facebook.com/bill.greganti Bill Greganti

        I was using a combination of Limit Logon Attempts and fail2ban to block IPs in IPTables. Unfortunately fail2ban was too resource intensive scanning the logs today and I has to disable the WordPress/Apache jail. I tried rate limiting HTTP/HTTPS connections also, but that wasn’t as effective as I thought it would be.

        • MalcolmR

          WP Fail2Ban has worked well on my self hosted CentOS server. I have it set to trigger on 1 (ONE) failure which quickly minimizes the load as IPTables can handle a lot more DROP than syslog/fail2ban can process. I’ve only seen 7,000 unique IP addresses so far.

      • tcbarrett

        There are several snippets relating to Apache. Any out there for those that have abandoned it for nginx?

  • harishchouhan

    Wordfence plugin & Cloudflare are 2 of the things I have been using on my websites to control this issue. But as most of the sites on my server are WordPress I hope the attacks stop.

    I really wish you guys reduce the price of CloudProxy or like give 5 site license for $25. :)

    • http://twitter.com/perezbox Tony Perez

      Good feedback, we’ll see what we can do.. :)

      • Toni

        Or even more less :D or maybe a limited free version :D

  • dualsun

    Tony can you contact me .. I have feedback about your site I do not want to put on here or on FB

    • http://sucuri.net Andres Armeda

      You can email us at info@sucuri.net. Thanks!

    • http://twitter.com/perezbox Tony Perez

      My personal sites or company sites? I’ll be happy to contact, but don’t see any contact info.

  • http://www.facebook.com/vviet93 Viet Vu

    Our site also just got attacked by a brute-force. (global-issues-network(dot)org) it’s freaking annoying…

  • dream

    i just got hit and i dont know what to do

  • http://twitter.com/twfriendfinder TaiwanFriendFinder

    just wondering if cloudflare can help prevent DDoS attack ?

  • Sam

    Im using a Apache directive on .htaccess to allow only my IP or IP range to access wp-login.php

    Order Deny,Allow
    Deny from all
    Allow from xxx.xxx.xxx.xxx

    • Sam

      Order Deny,Allow
      Deny from all
      Allow from 111.222.333.444

    • CLG

      Order Deny,Allow
      Deny from all
      Allow from xxx.xxx.xxx.xxx
      ErrorDocument 403 “”

      This is probably the best advice I’ve seen in the replies. The only thing I would add is the ErrorDocument directive to send a simple 403 header to the hackers. No sense in delivering a full blown 403 response.

  • http://www.facebook.com/richard.spees Richard Spees

    I long ago started setting up WP and Joomla sites with usernames that look like a strong, alpha numeric password. Default admin usernames, and normal names are out the window (no Toms, no Larrys) on the sites I set up and manage. I also limit failed log in attempts and present a captcha after one failed login attempt (which also catches me at times).

    On cracked sites I’ve been hired to clean up, I many/most times find the default admin username and a reasonably simply password, although this isn’t always the way the cracking was accomplished.

    Strong, non-standard usernames and strong passwords go quite a ways in thwarting brute force login attempts. Not the only answer though, and that is not the only way “they” get in.

  • gzizzle

    Password protect your wp-admin directory with a difficult username/password combination. That stops most of the brute force attacks right in their tracks and mitigates the load of attack attempts.

  • WowThemes.net

    very informative and helpful, ty

  • AZ

    Easy way to do that keep away bots from wp-login and wp-register. I use my plugin Securitron to do that. Just in case if you want to give it a try: http://www.b2beservices.com/files/Securitron_v1_0.zip

  • pesapower

    In alternative you can use a my solution for protect the web sites against the brute-force attacks, it is a simple PHP library that uses a series of API of Colobe.net for protect every login pages, if you want to try my solution go to colobe.net :)

  • http://www.incloudibly.com/ Allan Burst

    I used plugin Limit Login Attempts and it looks it works! I understand that it is good option also if I have dynamic IP addresses.

  • Pingback: How to protect your WordPress site from potential security threats - Script Box

  • Emenike Christian

    At the rate at which sites are been attacked, one will come to see a pattern that a lot of hackers are quite interested in WordPress sites for the reason they feel that its core implement weak or probably “easy of use” is dangerous. Since most users who install WordPress themes or plugins are bloggers and majority of them only concentrate on writing articles, the probability of compromising their sites is on the high side. But since CloudProxy provides a way for controlling, monitoring and filtering traffics, this should be a head start in making sure sites stays secured. Good article by the way