Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev
Mitigating the Slowloris DoS attack
 

Index | Next | Previous | View Flat


ak at synflood

Jun 21, 2009, 4:10 AM


Views: 1368
Permalink
Mitigating the Slowloris DoS attack

Hello everyone,

Previously, I had contacted the Apache Security Team about a possible
mitigation of the Slowloris DoS attack. I was referred to this mailing list to
discuss non-private security issues.

For those who are still unaware of the Slowloris attack, it's a
denial-of-service attack that consumes Apache's resources by opening up a
great number of parallel connections and slowly sending partial requests,
never completing them. Since Apache limits the number of parallel clients it
serves (the MaxClients setting), this blocks further requests from being
completed. Unlike other "traditional" TCP DoS attacks, this HTTP-based DoS
attack requires only very little network traffic in order to be effective.
Information about the Slowloris attack including a PoC tool was published
here: http://ha.ckers.org/slowloris/

I thought for some time about the whole issue, and then I developed a
proof-of-concept patch for Apache 2.2.11 (currently only touches the prefork
MPM), which you can download here: http://synflood.at/tmp/anti-slowloris.diff

The basic principle is that the timeout for new connections is adjusted
according to the current load on the Apache instance: a load percentage is
computed in the perform_idle_server_maintenance() routine and made available
through the global scoreboard. Whenever the timeout is set, the current load
percentage is taken into account. The result is that slowly sending
connections are dropped due to a timeout, while legitimate, fast-sending
connections are still being served. While this approach doesn't completely fix
the issue, it mitigates the negative impact of the Slowloris attack. Even
under heavy load, legitimate requests are still being served, even though it -
in my tests - in took a bit longer than usual. And the kind of heavy load that
I needed to slow down Apache was already quite traffic-intensive, i.e. it
defeated one of Slowloris' goals, namely having a low "traffic footprint" that
would make the attack hard to detect.

Please be aware that the patch mentioned above is of proof-of-concept quality:
the numbers in the adjust_timeout() function were chosen more or less
arbitrarily, just tuned well enough to successfully mitigate the impact of a
Slowloris attack in my testing environment.

Regards,
Andreas

Subject User Time
Mitigating the Slowloris DoS attack ak at synflood Jun 21, 2009, 4:10 AM
    Re: Mitigating the Slowloris DoS attack fuankg at apache Jun 21, 2009, 7:27 PM
        Re: Mitigating the Slowloris DoS attack graham.dumpleton at gmail Jun 21, 2009, 8:54 PM
        Re: Mitigating the Slowloris DoS attack ak at synflood Jun 21, 2009, 11:36 PM
            Re: Mitigating the Slowloris DoS attack wrowe at rowe-clan Jun 22, 2009, 11:00 AM
                Re: Mitigating the Slowloris DoS attack mestrade at apache Jun 22, 2009, 2:46 PM
                Re: Mitigating the Slowloris DoS attack nbubingo at gmail Jun 22, 2009, 7:40 PM
                    Re: Mitigating the Slowloris DoS attack graham.dumpleton at gmail Jun 22, 2009, 9:07 PM
                    Re: Mitigating the Slowloris DoS attack Brian.Akins at turner Jun 23, 2009, 5:26 PM
                        Re: Mitigating the Slowloris DoS attack dirkx at webweaving Jun 24, 2009, 12:54 AM
                            Re: Mitigating the Slowloris DoS attack minfrin at sharp Jun 24, 2009, 1:05 AM
                                Re: Mitigating the Slowloris DoS attack ruediger.pluem at vodafone Jun 24, 2009, 1:29 AM
                                Re: Mitigating the Slowloris DoS attack mestrade at apache Jun 24, 2009, 2:23 AM
        Re: Mitigating the Slowloris DoS attack dirkx at webweaving Jun 22, 2009, 1:06 AM
    Re: Mitigating the Slowloris DoS attack paul at querna Jun 22, 2009, 9:48 PM
    Re: Mitigating the Slowloris DoS attack paul at querna Jun 22, 2009, 9:51 PM
    Re: Mitigating the Slowloris DoS attack jorton at redhat Jun 24, 2009, 2:18 AM
        Re: Mitigating the Slowloris DoS attack mestrade at apache Jun 24, 2009, 2:32 AM
            Re: Mitigating the Slowloris DoS attack Kevin.Walters at morganstanley Jun 24, 2009, 2:40 AM
                Re: Mitigating the Slowloris DoS attack graham.dumpleton at gmail Jun 24, 2009, 2:57 AM
        Re: Mitigating the Slowloris DoS attack ak at synflood Jun 24, 2009, 2:36 AM
        Re: Mitigating the Slowloris DoS attack jim at jaguNET Jun 29, 2009, 10:08 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.