11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 19: Securing Your ASP.NET <strong>Application</strong> <strong>and</strong> <strong>Web</strong> Services 583COM/DCOM ResourcesYour application uses the process or impersonation identity when it calls COM-basedresources, such as serviced components. Client-side authentication <strong>and</strong>impersonation levels are configured using the comAuthenticationLevel <strong>and</strong>comImpersonation level attributes on the element inMachine.config.For more information <strong>and</strong> recommendations, see “Enterprise ServicesConsiderations” in Chapter 17, “Securing Your <strong>Application</strong> Server.”Denial of Service ConsiderationsASP.NET has the following features to help counteract denial of service attacks aimedat your ASP.NET applications:● POST requests are constrained by default to 4 megabytes (MB).● Clients are checked to ensure that they are still connected before requests arequeued for work. This is done in case an attacker sends multiple requests <strong>and</strong> thendisconnects them.● Request execution times out after a configurable limit.Configuration values are maintained on the element inMachine.config. The following code sample shows default settings from a version 1.1Machine.config:You might want to reduce the maxRequestLength attribute to prevent users fromuploading very large files. The maximum allowed value is 4 MB. In the Open Hackcompetition, the maxRequestLength was constrained to 1/2 MB as shown in thefollowing example:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!