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 14: Building Secure Data Access 371CountermeasuresTo prevent disclosure of sensitive application data:● Use strong encryption to secure the data.● Authorize each caller prior to performing data access so that users are only able tosee their own data.Disclosure of Database Schema <strong>and</strong> Connection DetailsIf your code returns exception details to the client, a malicious user can use theinformation to attack the server. Exceptions in data access code can reveal sensitiveinformation, such as database schema details, the nature of the data store, <strong>and</strong> SQLcode fragments.VulnerabilitiesThe following vulnerabilities can result in information disclosure:● Inadequate exception h<strong>and</strong>ling● Weak ASP.NET configuration that allows unh<strong>and</strong>led exception details to bereturned to the clientCountermeasuresTo prevent such disclosure:● Catch, log, <strong>and</strong> h<strong>and</strong>le data access exceptions in your data access code.●Return generic error messages to the caller. This requires appropriateconfiguration of the element in the <strong>Web</strong>.config or Machine.configconfiguration file.Unauthorized AccessWith inadequate authorization, users may be able to see another user’s data <strong>and</strong> maybe able to access other restricted data.VulnerabilitiesPractices that can allow unauthorized access include:● Lack of authorization in data access code providing unrestricted access● Over-privileged database accounts

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

Saved successfully!

Ooh no, something went wrong!