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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 19: Securing Your ASP.NET <strong>Application</strong> <strong>and</strong> <strong>Web</strong> Services 571If you set validation=“3DES” on the , then page-level view state isencrypted (which also provides integrity checking) using the 3DES algorithm, even ifthe element is configured for view state MACs.Generate Keys Manually For <strong>Web</strong> FarmsIn <strong>Web</strong> farms, you must set explicit key values <strong>and</strong> use the same ones across allmachines in the <strong>Web</strong> farm. See “<strong>Web</strong> Farm Considerations” later in this chapter.DebuggingThe element controls compiler settings that are used for dynamicpage compilation, which is initiated when a client requests a <strong>Web</strong> page (.aspx file) or<strong>Web</strong> service (.asmx file). It is important that debug builds are not used on theproduction server because debug information is valuable to attackers <strong>and</strong> can revealsource code details.This element controls the compilation process. Make sure that debug compiles aredisabled on production servers. Set debug=“false” as follows:By default, temporary files are created <strong>and</strong> compiled in the following directory:%winnt%\Microsoft.NET\Framework\{version}\Temporary ASP.NET FilesYou can specify the location on a per application basis using the tempDirectoryattribute, although this provides no security benefit.Note The ASP.NET process identity specified on the element requires Full Controlaccess rights on the temporary compilation directory.TracingMake sure you do not store debug files (with .pdb extensions) on a production serverwith your assemblies.Tracing should not be enabled on production servers because system-level traceinformation can greatly help an attacker profile an application <strong>and</strong> probe for weakspots.

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

Saved successfully!

Ooh no, something went wrong!