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.

Chapter 2: <strong>Threats</strong> <strong>and</strong> Countermeasures 41Attacker Reveals Implementation DetailsOne of the important features of the .NET Framework is that it provides richexception details that are invaluable to developers. If the same information is allowedto fall into the h<strong>and</strong>s of an attacker, it can greatly help the attacker exploit potentialvulnerabilities <strong>and</strong> plan future attacks. The type of information that could bereturned includes platform versions, server names, SQL comm<strong>and</strong> strings, <strong>and</strong>database connection strings.Countermeasures to help prevent internal implementation details from beingrevealed to the client include:● Use exception h<strong>and</strong>ling throughout your application’s code base.●●H<strong>and</strong>le <strong>and</strong> log exceptions that are allowed to propagate to the applicationboundary.Return generic, harmless error messages to the client.Denial of ServiceAttackers will probe a <strong>Web</strong> application, usually by passing deliberately malformedinput. They often have two goals in mind. The first is to cause exceptions that revealuseful information <strong>and</strong> the second is to crash the <strong>Web</strong> application process. This canoccur if exceptions are not properly caught <strong>and</strong> h<strong>and</strong>led.Countermeasures to help prevent application-level denial of service include:● Thoroughly validate all input data at the server.● Use exception h<strong>and</strong>ling throughout your application’s code base.Auditing <strong>and</strong> LoggingAuditing <strong>and</strong> logging should be used to help detect suspicious activity such asfootprinting or possible password cracking attempts before an exploit actually occurs.It can also help deal with the threat of repudiation. It is much harder for a user todeny performing an operation if a series of synchronized log entries on multipleservers indicate that the user performed that transaction.Top auditing <strong>and</strong> logging related threats include:● User denies performing an operation● Attackers exploit an application without leaving a trace● Attackers cover their tracks

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

Saved successfully!

Ooh no, something went wrong!