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.

Checklist: <strong>Security</strong> Review for Managed Code 739Unmanaged Code Access (continued)Check DescriptionUnmanaged types or h<strong>and</strong>les are never exposed to partially trusted code.Pointers are private fields.Methods that use IntPtr fields in a type that has a finalizer call GC.KeepAlive(object).Resource Access ConsiderationsFile I/OCheck DescriptionNo security decisions are made based on filenames.Input file paths <strong>and</strong> file names are well formed.Environment variables are not used to construct file paths.File access is constrained to the context of the application (by using a restrictedFileIOPermission).Assembly file I/O requirements are specified using declarative security attributes (with<strong>Security</strong>Action.RequestMinimum).Event LogCheck DescriptionEvent log access code is constrained using EventLogPermission.This particularly applies if your event logging code could be called by untrusted callers.Event sources are created at installation time (or the account used to run the code thatwrites to the event log must be allowed to create event sources by configuring anappropriate ACL in the registry).<strong>Security</strong>-sensitive data, such as passwords, is not written to the event log.RegistryCheck DescriptionSensitive data, such as database connection strings or credentials, is encrypted prior tostorage in the registry.Keys are restricted. If a key beneath HKEY_CURRENT_MACHINE is used, the key isconfigured with a restricted ACL. Alternatively, HKEY_CURRENT_USER is used.Registry access is constrained by using RegistryPermission. This applies especially if yourregistry access code could be called by untrusted callers.

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

Saved successfully!

Ooh no, something went wrong!