This an example

I sent an attack from my PC to my apache server in another machine. And without the protection i sent in the same time using ab ligit connections:

Concurrency Level:      100
Time taken for tests:   32.842 seconds
Complete requests:      500

As you can see it spent too much time to answer my connections

Now i did the same test, but turn on the defense:

Concurrency Level:      100
Time taken for tests:   0.122 seconds
Complete requests:      500

As you can see the legit connections was accepted normally during the attack from the same ip address.


On Wed, Nov 24, 2010 at 7:10 AM, Breno Silva <> wrote:
Hi Christian,

Internally into the modsec you are checking how many threads are in SERVER_BUSY_STATE and limiting the number of this threads per ip address using the SecReadStateLimit. The large part of the proxied connections will leave this state very quickly and the connection will be not counted to be rejected. So a few number of threads should be enough to handle your legit SERVER_BUSY_STATE connections.



On Wed, Nov 24, 2010 at 6:31 AM, <> wrote:

Hi Breno,


Could explain the term „bad connection“ a bit? Ryan’s blog post implies a client IP is considered bad

when it has too many connections in read state. Your entry in the CHANGES document reads,

“Add SecReadStateLimit to limit the number of BUSY connections”.


I can’t see why a proxy can’t have a lot of legitimate connections

in read state. AFAIK Request Body reading is also considered “read”.

So uploads can remain in READ for a certain time – depending on service.


I do not want to pester you too much, but I just want to make sure I

get this correctly – and people are aware that telling good from bad

connections is very tricky. Especially when it comes to request delaying and

you want to make sure you are not locking legitimate users.


Best Regs,







Von: Breno Silva []
Gesendet: Mittwoch, 24. November 2010 13:20
An: Folini Christian, IT222 extern
Betreff: Re: [mod-security-users] [Owasp-modsecurity-core-rule-set] Advanced Topic of the Week: Mitigating Slow HTTP DoS Attacks


Hi Christian,

The SecReadStateLimit is not only a threshold for ip address. It is looking for an "anomaly" in connection process. So if you are behind a proxy or a NAT only the bad connections will be dropped. The good ones will pass normally. So legit connections behind the proxy will works fine.



On Wed, Nov 24, 2010 at 1:17 AM, <> wrote:

Hi Ryan,

Nice post. Thanks. Especially the combination of mod_reqtimeout and ModS
is very elegant in my eyes.

I am not so happy with SecReadStateLimit looking only at the IP address.
How do protect proxies from your countermeasures? A proxy might share multiple
hundred legitimate connections with your server for multiple hundred legitimate
clients, all appearing to come from the same IP address.



-----Ursprüngliche Nachricht-----
Von: [] Im Auftrag von Ryan Barnett
Gesendet: Mittwoch, 24. November 2010 02:45
Betreff: [Owasp-modsecurity-core-rule-set] Advanced Topic of the Week: Mitigating Slow HTTP DoS Attacks

This week's blog post -

Ryan Barnett
Senior Security Researcher
Trustwave - SpiderLabs

Owasp-modsecurity-core-rule-set mailing list

Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
mod-security-users mailing list
Commercial ModSecurity Appliances, Rule Sets and Support: