• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

{IIS} Protect Against DoS (Slow Loris) Attacks

Newbie Spellweaver
Joined
Jun 30, 2019
Messages
7
Reaction score
3
Hellos RZ,

First things first, I am not an expert at these things and this is not a "this will 100% guarantee to block all DoS attacks" this is just a few things I use to protect my IIS install from them. There are probably much better ways of doing this, and I probably have things that are messed up.. if you know of a better way than please let me know.

This tutorial also presumes you already have IIS installed and configured for your retro.

First thing you want to do is go into your IIS manager, go to your site, and go into Request Filtering.

Hit "Edit Feature Settings" on the right hand side, see screenshot below for my settings.

69Jf1HW - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Click ok then go to the headers tab in request filtering, and add a new header with these entries

nwun2H - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Then, go back to your website settings and right click and select "advanced settings" shown below. Then expand the limits tab and set connection timeout to 30. Once done click ok.

ZGn3k6C - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Next go up to "Application Pools" and right click the one that shares the name with the website name you have setup. For me, this is default, and select advanced settings. Scroll down until you see "generate process model...." and set "Idle Time-Out (Minutes)" to "1" and "maximum Worker Processes" to 0 as shown

Ofykj44 - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums




That should be it! hopefully I havn't missed anything!
 

Attachments

You must be registered for see attachments list
Rogu3
Joined
May 11, 2012
Messages
933
Reaction score
508
Hellos RZ,

First things first, I am not an expert at these things and this is not a "this will 100% guarantee to block all DoS attacks" this is just a few things I use to protect my IIS install from them. There are probably much better ways of doing this, and I probably have things that are messed up.. if you know of a better way than please let me know.

This tutorial also presumes you already have IIS installed and configured for your retro.

First thing you want to do is go into your IIS manager, go to your site, and go into Request Filtering.

Hit "Edit Feature Settings" on the right hand side, see screenshot below for my settings.

69Jf1HW - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Click ok then go to the headers tab in request filtering, and add a new header with these entries

nwun2H - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Then, go back to your website settings and right click and select "advanced settings" shown below. Then expand the limits tab and set connection timeout to 30. Once done click ok.

ZGn3k6C - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Next go up to "Application Pools" and right click the one that shares the name with the website name you have setup. For me, this is default, and select advanced settings. Scroll down until you see "generate process model...." and set "Idle Time-Out (Minutes)" to "1" and "maximum Worker Processes" to 0 as shown

Ofykj44 - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums




That should be it! hopefully I havn't missed anything!

To be clear, this isn't necessarily DDoS protection, but you're right it can help protect your server. You're essentially limiting the size of requests and setting a timeout on them so they don't queue up.

A better solution is full on mitigation to another server, and there are actually a lot of hosting companies that provide the service. You can also set it up yourself on AWS, if you know how.

Thanks for sharing.
 

Attachments

You must be registered for see attachments list
Shh, quiet, you might piss somebody off
Developer
Joined
Dec 23, 2011
Messages
1,797
Reaction score
2,169
To be clear, this isn't necessarily DDoS protection, but you're right it can help protect your server. You're essentially limiting the size of requests and setting a timeout on them so they don't queue up.

A better solution is full on mitigation to another server, and there are actually a lot of hosting companies that provide the service. You can also set it up yourself on AWS, if you know how.

Thanks for sharing.

slow loris is a software based attack(layer 7), not a spam or brute force
 
Newbie Spellweaver
Joined
Jun 30, 2019
Messages
7
Reaction score
3
Most datacenter these days do mitigation which is nice so solong as your server is hosted by a datacenter that has it the only real threat then is slowloris attacks...and probably many many other things my tired brain can't think of...but hey atleast we somewhat have a way of holding against them!
 
Newbie Spellweaver
Joined
Mar 5, 2019
Messages
14
Reaction score
3
if money isn't an issue, CloudFlare's business plan will block all types of OWASP attacks.
 
Joined
Feb 22, 2012
Messages
2,103
Reaction score
1,271
This helps in case of Slowloris attacks. Cloudflare doesn't for some reason.

The problem is that you can send very slow header requests, and Microsoft's own documentation says something that won't work on IIS 7.5+ for header timeout.

The best way is to create a load balancing with HAProxy then limit Header/Body timeout.

Header is usually pretty small, so I'd say the timeout should be 5 seconds.

Edit: by the way, 30.000.000 max content length a bit too high?

It would probably be ineffective against slowloris.

It means that you can send 1 byte every 29 seconds, up until 30.000.000 bytes, and still be connected.
 
Last edited:
Back
Top