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.

Chapter 4: Design Guidelines for Secure <strong>Web</strong> <strong>Application</strong>s 95Log Detailed Error MessagesSend detailed error messages to the error log. Send minimal information to theconsumer of your service or application, such as a generic error message <strong>and</strong> customerror log ID that can subsequently be mapped to detailed message in the event logs.Make sure that you do not log passwords or other sensitive data.Catch ExceptionsUse structured exception h<strong>and</strong>ling <strong>and</strong> catch exception conditions. Doing so avoidsleaving your application in an inconsistent state that may lead to informationdisclosure. It also helps protect your application from denial of service attacks.Decide how to propagate exceptions internally in your application <strong>and</strong> give specialconsideration to what occurs at the application boundary.For more information about designing <strong>and</strong> implementing an exception managementframework for .NET applications, see the MSDN article “Exception Management in.NET,” at http://msdn.microsoft.com/library/en-us/dnbda/html/exceptdotnet.aspAuditing <strong>and</strong> LoggingYou should audit <strong>and</strong> log activity across the tiers of your application. Using logs, youcan detect suspicious-looking activity. This frequently provides early indications of afull-blown attack <strong>and</strong> the logs help address the repudiation threat where users denytheir actions. Log files may be required in legal proceedings to prove the wrongdoingof individuals. Generally, auditing is considered most authoritative if the audits aregenerated at the precise time of resource access <strong>and</strong> by the same routines that accessthe resource.The following practices improve your <strong>Web</strong> application’s security:● Audit <strong>and</strong> log access across application tiers.●●●●Consider identity flow.Log key events.Secure log files.Back up <strong>and</strong> analyze log files regularly.Audit <strong>and</strong> Log Access Across <strong>Application</strong> TiersAudit <strong>and</strong> log access across the tiers of your application for non-repudiation. Use acombination of application-level logging <strong>and</strong> platform auditing features, such asWindows, IIS, <strong>and</strong> SQL Server auditing.

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

Saved successfully!

Ooh no, something went wrong!