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.

148 Part III: Building Secure <strong>Web</strong> <strong>Application</strong>sVulnerabilitiesVulnerabilities that can lead to code injection include:● Poor input validation, particularly where your assembly calls intounmanaged code● Accepting delegates from partially trusted code● Over-privileged process accountsAttacksCommon code injection attacks include:● Buffer overflows● Invoking a delegate from an untrusted sourceCountermeasuresCountermeasures that you can use to prevent code injection include:●●●●●Validate input parameters.Validate data passed to unmanaged APIs.Do not accept delegates from untrusted sources.Use strongly typed delegates <strong>and</strong> deny permissions before calling the delegate.To further reduce risk, run assemblies using least privileged accounts.Information DisclosureAssemblies can suffer from information disclosure if they leak sensitive data such asexception details <strong>and</strong> clear text secrets to legitimate <strong>and</strong> malicious users alike. It isalso easier to reverse engineer an assembly’s Microsoft Intermediate Language(MSIL) into source code than it is with binary machine code. This presents a threat tointellectual property.VulnerabilitiesVulnerabilities that can lead to information disclosure include:● Weak or no formal exception h<strong>and</strong>ling● Hard-coded secrets in codeAttacksCommon attacks include:● Attempting to cause errors by passing malformed input to the assembly●Using ILDASM on an assembly to steal secrets

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

Saved successfully!

Ooh no, something went wrong!