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.

372 Part III: Building Secure <strong>Web</strong> <strong>Application</strong>sCountermeasuresTo prevent unauthorized access:● Use principal permission dem<strong>and</strong>s to authorize the calling user.● Use code access security permission dem<strong>and</strong>s to authorize the calling code.●Use limited permissions to restrict the application’s login to the database <strong>and</strong> toprevent direct table access.Network EavesdroppingThe deployment architecture of most applications includes a physical separation ofthe data access code from the database server. As a result, sensitive data such asapplication-specific data or database login credentials must be protected fromnetwork eavesdroppers.VulnerabilitiesThe following practices increase vulnerability to network eavesdropping:● Clear text credentials passed over the network during SQL authentication● Unencrypted sensitive application data sent to <strong>and</strong> from the database serverCountermeasuresTo limit vulnerability to network eavesdropping:● Use Windows authentication to avoid sending credentials over the network.● Install a server certificate on the database server. This results in the automaticencryption of SQL credentials over the network.● Use an SSL connection between the <strong>Web</strong> server <strong>and</strong> database server to protectsensitive application data. This requires a database server certificate.● Use an IPSec encrypted channel between <strong>Web</strong> <strong>and</strong> database server.Design ConsiderationsBefore you start writing code, there are a number of important issues to consider atdesign time. The key considerations are:● Use Windows authentication.●●●●Use least privileged accounts.Use stored procedures.Protect sensitive data in storage.Use separate data access assemblies.

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

Saved successfully!

Ooh no, something went wrong!