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.

122 Part II:Designing Secure <strong>Web</strong> <strong>Application</strong>sException ManagementExamine the way that your application h<strong>and</strong>les error conditions. It is recommendedthat you consistently use structured exception h<strong>and</strong>ling. Also, check that yourapplication does not reveal too much information when an exception occurs.Table 5.9 shows the two major exception management vulnerabilities.Table 5.9 Common Exception Management VulnerabilitiesVulnerabilityFailing to use structuredexception h<strong>and</strong>lingImplicationsYour application is more susceptible to denial of service attacks<strong>and</strong> logic flaws, which can expose security vulnerabilities.Revealing too much informationto the clientAn attacker can use this information to help plan <strong>and</strong> tunesubsequent attacks.Review the following questions to help ensure that your design is not susceptible toexception management security vulnerabilities:● Do you use structured exception h<strong>and</strong>ling?● Do you reveal too much information to the client?Do You Use Structured Exception H<strong>and</strong>ling?Examine how your application uses structured exception h<strong>and</strong>ling. Your designshould m<strong>and</strong>ate that structured exception h<strong>and</strong>ling be used consistently throughoutthe entire application. This creates more robust applications <strong>and</strong> your application isless likely to be left in inconsistent states that can reveal security vulnerabilities.Do You Reveal Too Much Information to the Client?Make sure that a malicious user cannot exploit the overly detailed information thatan error message contains. Review the following points:● Do you catch, h<strong>and</strong>le, <strong>and</strong> log exceptions on the server?Make sure that the application does not let internal exception conditionspropagate beyond the application boundary. Exceptions should be caught <strong>and</strong>logged on the server <strong>and</strong>, if necessary, generic error messages should be returnedto the client.● Do you use a centralized exception management system?The best way to h<strong>and</strong>le <strong>and</strong> log exceptions consistently throughout yourapplication is to use a formalized exception management system. You can also tiethis system into monitoring systems that can be used by the operations team forhealth <strong>and</strong> performance monitoring.

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

Saved successfully!

Ooh no, something went wrong!