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 18: Securing Your Database Server 503SQLInjectionPasswordCrackingPerimeterFirewall<strong>Web</strong> App VulnerabilitiesOver privileged accountsWeak input validationInternalFirewallNetworkEavesdroppingBrowser<strong>Web</strong> AppSQLServerUnauthorizedExternal AccessNetwork VulnerabilitiesFailure to block SQL portsConfiguration VulnerabilitiesOver privileged service accountWeak permissionsNo certificateFigure 18.1Top database server threats <strong>and</strong> vulnerabilitiesThe next sections describe each of these threats <strong>and</strong> vulnerabilities.SQL InjectionWith a SQL injection attack, the attacker exploits vulnerabilities in your application’sinput validation <strong>and</strong> data access code to run arbitrary comm<strong>and</strong>s in the databaseusing the security context of the <strong>Web</strong> application.VulnerabilitiesVulnerabilities exploited by SQL injection include:● Poor input validation in your <strong>Web</strong> applications● Unsafe, dynamically constructed SQL comm<strong>and</strong>s● Over-privileged application logins to the database● Weak permissions that fail to restrict the application’s login to the databaseCountermeasuresTo counter SQL injection attacks:● Your application should constrain <strong>and</strong> sanitize input data before using it in SQLqueries.● Use type safe SQL parameters for data access. These can be used with storedprocedures or dynamically constructed SQL comm<strong>and</strong> strings. Using SQLparameters ensures that input data is subject to type <strong>and</strong> length checks <strong>and</strong> alsothat injected code is treated as literal data, not as executable statements in thedatabase.

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

Saved successfully!

Ooh no, something went wrong!