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.

296 Part III: Building Secure <strong>Web</strong> <strong>Application</strong>s6. To confirm the successful generation of the event source, use a registry editor <strong>and</strong>navigate to:HKLM\System\CurrentControlSet\Services\EventLog\<strong>Application</strong>\{source name}Confirm that the key exists <strong>and</strong> that it contains an EventMessageFile string valuethat points to the default .NET Framework event message file:\Windows\Microsoft.NET\Framework\{version}\EventLogMessages.dllSummaryIf you have an existing application <strong>and</strong> do not want to create an installer class, youmust grant the ASP.NET process identity the correct access rights on the event logregistry key. For registry key details <strong>and</strong> the precise access rights that are required,see “Event Log” in Chapter 19, “Securing Your ASP.NET <strong>Application</strong> <strong>and</strong> <strong>Web</strong>Services.”EventLogPermissionCode that writes to the event log must be granted the EventLogPermission by codeaccess security policy. This becomes an issue if your <strong>Web</strong> application is configured torun at a partial-trust level. For information about how to write to the event log from apartial trust <strong>Web</strong> application, see Chapter 9, “Using Code Access <strong>Security</strong> withASP.NET.”This chapter started by showing you the main threats that you need to address whenyou build <strong>Web</strong> pages <strong>and</strong> controls. Many application-level attacks rely onvulnerabilities in input validation. Take special care in this area to make sure thatyour validation strategy is sound <strong>and</strong> that all data that is processed from a nontrustedsource is properly validated. Another common vulnerability is the failure toprotect authentication cookies. The “Forms Authentication” section of this chaptershowed you effective countermeasures to apply to prevent unauthorized access,session hijacking, <strong>and</strong> cookie replay attacks.

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

Saved successfully!

Ooh no, something went wrong!