Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


POST attack Flood
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

POST attack Flood

jkayjkay Member

Hello everyone!

Recently I have been undergoing POST attacks directed at actually existing url on our site.

Using Wordpress, Nginx, Varnish,

Some useragent:
"Mozilla / 5.0 (Windows NT 6.1; WOW64) AppleWebKit / 537.36 (KHTML, like Gecko) Chrome / 43.0.2357.81 Safari / 537.36"

  "Mozilla / 4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident / 4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4 .0E; Media Center PC 6.0) "

We are behind Cloudflare, nevertheless 90% of ip in the attack are Cloudflare.

http://grabilla.com/0650e-36ebb0f9-5887-4772-a22e-f4c28ea8009d.png

Someone can help me? Do you know a good way to mitigate these attacks?

Sorry for my English

Comments

  • tommytommy Member

    Post flood attack? Increase your website protection to medium.

    How about create rule matching POST data using mod security?

  • jkayjkay Member

    Hello, also in High does not block Cloudflare.
    the posts are addressed to existing and legitimate articles on our blog.

  • xrzxrz Member

    what about get those ips and block em?

    Thanked by 1yomero
  • NixtrenNixtren Member

    Switch to "I'm under attack" mode on CloudFlare, should stop them for the time being. And then try to find a more permanent solution :)

  • @jkay said:
    Nginx
    We are behind Cloudflare, nevertheless 90% of ip in the attack are Cloudflare.

    @xrz said:
    what about get those ips and block em?

    OP, add this into your server {} blocks:

    https://support.cloudflare.com/hc/en-us/articles/200170706-How-do-I-restore-original-visitor-IP-with-Nginx-

    Reload nginx, and any attacks will appear with real IP so you can block :)

    One thing is, if your website isn't possibly of any interest to the Chinese, just block whole China IP ranges (available online) - I got a Chargen DDoS attack on my server before, when I asked my hosting provider to provide logs, most IPs are from China ISPs, probably a botnet.

    @Nixtren said:
    Switch to "I'm under attack" mode on CloudFlare, should stop them for the time being. And then try to find a more permanent solution :)

    I don't think it helps? I might be wrong. Just captchas for weird User-Agents.

  • jarjar Patron Provider, Top Host, Veteran

    Make a custom fail2ban filter like this:

    http://xplus3.net/2013/05/09/securing-xmlrpc-wordpress/

    Adjust pattern as needed.

  • WHTWHT Member

    Disable the comments till the attack is over?

  • NixtrenNixtren Member
    edited May 2016

    @theroyalstudent said:

    @Nixtren said:
    Switch to "I'm under attack" mode on CloudFlare, should stop them for the time being. And then try to find a more permanent solution :)

    I don't think it helps? I might be wrong. Just captchas for weird User-Agents.

    "I'm under attack" mode forces every visitor's browser to solve a JavaScript puzzle, so it should stop most skid attacks :)

    Thanked by 1ricardo
  • ricardoricardo Member

    Yeah, the 'checking your browser' splashscreen is a hashcash style implementation, forcing the client to 'do work'.

    It's easier to scale thousands of requests using a plain HTTP request than it is to have a JS enabled most-likely headless browser, the former failing the test.

    Thanked by 1Nixtren
  • doghouchdoghouch Member
    edited May 2016

    @Nixtren said:
    Switch to "I'm under attack" mode on CloudFlare, should stop them for the time being. And then try to find a more permanent solution :)

    I have nginx-testcookie installed to prevent layer7 + floods from browsers without JavaScript or cookies
    enabled.

    Basically, I modified it so it performs a few cookie checks, some calculations with JS and a user-agent check. It adds up the score in the browser and decides whether the proof cookie should be set. (proof being an encrypted hash with the time + IP + challenge time + request ID)

    Thanked by 1Nixtren
  • SplitIceSplitIce Member, Host Rep
    edited May 2016

    We have seen something like this this a few times (I am guessing its the same script or similar). Theres a quite a few ways we mitigate it. Heres some simple ways:

    1. Check the IP networks, last time we saw it it came from a bunch of annon proxies many of which we already had blacklisted for IP Validation (JS).
    2. Check the header for certain headers that are uncommon for your application / in general. Also take notice of the POST value and content-length.

    In our case this attack was JS aware using PhantomJS/V8.

    Sorry I cant go into more details, we dont usually share our mitigation techniques. Cant have the bad actors adapting.

  • ricardoricardo Member
    edited May 2016

    PhantomJS

    That's an easy one to mitigate I think, as it has variables in the document scope that can easily be detected. Bit harder with the likes of mozrepl. Browser uniqueness would be worth looking at if you were to go down that rabbit hole. I'd sooner analyse what they are POSTing and to where wrt the application layer.

Sign In or Register to comment.