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.

740 <strong>Improving</strong> <strong>Web</strong> <strong>Application</strong> <strong>Security</strong>: <strong>Threats</strong> <strong>and</strong> CountermeasuresEnvironment VariablesCheck DescriptionCode that accesses environment variables is restricted with EnvironmentPermission. Thisapplies especially if your code can be called by untrusted code.Environment permission requirements are declared by using declarative security attributeswith <strong>Security</strong>Action.RequestMinimum.Code Access <strong>Security</strong> ConsiderationsIf an entry is preceded by a star (*), it indicates that the checks are performed bythe FXCop analysis tool. For more information about FXCop security checks, seehttp://www.gotdotnet.com/team/libraries/FxCopRules/<strong>Security</strong>Rules.aspx.Check DescriptionAssemblies marked with AllowPartiallyTrustedCallersAttribute (APTCA) do not expose objectsfrom non-APTCA assemblies.Code that only supports full-trust callers is strong named or explicitly dem<strong>and</strong>s the full-trustpermission set.All uses of Assert are thoroughly reviewed.All calls to Assert are matched with a corresponding call to RevertAssert.*The Assert window is as small as possible.*Asserts are proceeded with a full permission dem<strong>and</strong>.*Use of Deny or PermitOnly is thoroughly reviewed.All uses of LinkDem<strong>and</strong> are thoroughly reviewed. (Why is a LinkDem<strong>and</strong> <strong>and</strong> not a fullDem<strong>and</strong> used?)LinkDem<strong>and</strong>s within Interface declarations are matched by LinkDem<strong>and</strong>s on the methodimplementation.*Unsecured members do not call members protected by a LinkDem<strong>and</strong>.Permissions are not dem<strong>and</strong>ed for resources accessed through the .NET Frameworkclasses.Access to custom resources (through unmanaged code) is protected with custom codeaccess permissions.Access to cached data is protected with appropriate permission dem<strong>and</strong>s.If LinkDem<strong>and</strong>s are used on structures, the structures contain explicitly definedconstructors.

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

Saved successfully!

Ooh no, something went wrong!