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.

Solutions at a Glance lxvii●●●How to perform security reviews of managed codeUse analysis tools such as FxCop to analyze binary assemblies <strong>and</strong> to ensurethat they conform to the .NET Framework design guidelines. Fix any securityvulnerabilities identified by your analysis tools. Use a text search facility to scanyour source code base for hard-coded secrets such as passwords. Then, reviewspecific elements of your application including <strong>Web</strong> pages <strong>and</strong> controls, dataaccess code, <strong>Web</strong> services, serviced components, <strong>and</strong> so on. Pay particularattention to SQL injection <strong>and</strong> cross-site scripting vulnerabilities.Also review the use of sensitive code access security techniques such as linkdem<strong>and</strong>s <strong>and</strong> asserts. For more information, see Chapter 21, “Code Review.”How to secure a developer workstationYou can apply a methodology when securing your workstation. Secure youraccounts, protocols, ports, services, shares, files <strong>and</strong> directories, <strong>and</strong> registry.Most importantly, keep your workstation current with the latest patches <strong>and</strong>updates. If you run Internet Information Services (IIS) on Microsoft Windows ® XPor Windows 2000, then run IISLockdown. IISLockdown applies secures IISconfigurations <strong>and</strong> installs the URLScan Internet <strong>Security</strong> <strong>Application</strong>Programming Interface (ISAPI) filter, which detects <strong>and</strong> rejects potentiallymalicious HTTP requests. You may need to modify the default URLScanconfiguration, for example, so you can debug <strong>Web</strong> applications duringdevelopment <strong>and</strong> testing.For more information, see “How To: Secure Your Developer Workstation,” in the“How To” section of this guide.How to use code access security with ASP.NETWith.NET Framework version 1.1, you can set ASP.NET trust levels either inMachine.config or <strong>Web</strong>.config. These trust levels use code access security torestrict the resources that ASP.NET applications can access, such as the file system,registry, network, databases, <strong>and</strong> so on. In addition, they provide applicationisolation.For more information about using code access security from ASP.NET, developingpartial trust <strong>Web</strong> applications, <strong>and</strong> s<strong>and</strong>boxing privileged code, see Chapter 9,“Using Code Access <strong>Security</strong> with ASP.NET.”For more information about code access security fundamentals, see Chapter 8,“Code Access <strong>Security</strong> in Practice.”For more information about the code access security issues that you need toconsider when developing managed code, see the “Code Access <strong>Security</strong>Considerations” sections in Chapter 11, “Building Secure Serviced Components,”Chapter 12, “Building Secure <strong>Web</strong> Services,” “Building Secure RemotedComponents,” <strong>and</strong> Chapter 14, “Building Secure Data Access.”

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

Saved successfully!

Ooh no, something went wrong!