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 16: Securing Your <strong>Web</strong> Server 463In this case, the .vbproj file extension is mapped toSystem.<strong>Web</strong>.HttpForbiddenH<strong>and</strong>ler. If a client requests a path that ends with.vbproj, then ASP.NET returns a message that states “This type of page is not served.”● The following guidelines apply to h<strong>and</strong>ling .NET Framework file extensions:●●Map extensions you do not use to HttpForbiddenH<strong>and</strong>ler. If you do not serveASP.NET pages, then map .aspx to HttpForbiddenH<strong>and</strong>ler. If you do not use <strong>Web</strong>Services, then map .asmx to HttpForbiddenH<strong>and</strong>ler.Disable Remoting on Internet-facing <strong>Web</strong> servers. Map remoting extensions(.soap <strong>and</strong> .rem) on Internet-facing <strong>Web</strong> servers to HttpForbiddenH<strong>and</strong>ler.Disable .NET RemotingTo disable .NET Remoting disable requests for .rem <strong>and</strong> .soap extensions, use thefollowing elements beneath :Note This does not prevent a <strong>Web</strong> application on the <strong>Web</strong> server from connecting to a downstreamobject by using the Remoting infrastructure. However, it prevents clients from connecting to objectson the <strong>Web</strong> server.Verify That Tracing Is DisabledYou configure tracing in Machine.config by using the element. While it isuseful on development <strong>and</strong> test servers, do not enable tracing on production servers,because system-level trace information can greatly assist an attacker to profile anapplication <strong>and</strong> probe for weak spots.Use the following configuration on production servers:Set enabled=“false” on production servers. If you do need to trace problems withlive applications, simulate the problem in a test environment, or if necessary, enabletracing <strong>and</strong> set localOnly=“true” to prevent trace details from being returned toremote clients.Verify That Debug Compiles Are DisabledYou can control whether or not the compiler produces debug builds that includedebug symbols by using the element. To turn off debug compiles, setdebug=“false” as shown below:

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

Saved successfully!

Ooh no, something went wrong!