Injection vulnerabilities pose a major threat to application-level security. Some of the more common types are SQL injection, cross-site scripting and shell injection vulnerabilities. Existing methods for defending against injection attacks, that is, attacks exploiting these vulnerabilities, rely heavily on the application developers and are therefore error-prone.
In this paper we introduce CSSE, a method to detect and prevent injection attacks. CSSE works by addressing the root cause why such attacks can succeed, namely the ad-hoc serialization of user-provided input. It provides a platform-enforced separation of channels, using a combination of assignment of metadata to user-provided input, metadata-preserving string operations and context-sensitive string evaluation.
CSSE requires neither application developer interaction nor application source code modifications. Since only changes to the underlying platform are needed, it effectively shifts the burden of implementing countermeasures against injection attacks from the many application developers to the small team of security-savvy platform developers. Our method is effective against most types of injection attacks, and we show that it is also less error-prone than other solutions proposed so far.
We have developed a prototype CSSE implementation for PHP, a platform that is particularly prone to these vulnerabilities. We used our prototype with phpBB, a well-known bulletin-board application, to validate our method. CSSE detected and prevented all the SQL injection attacks we could reproduce and incurred only reasonable run-time overhead.
[1]
Chris Anley,et al.
Advanced SQL Injection In SQL Server Applications
,
2002
.
[2]
Gunter Ollmann.
Second - order code injection attacks
,
2004
.
[3]
SQL Injection Signatures Evasion
,
2004
.
[4]
Wolfram Schulte,et al.
Unifying Tables, Objects and Documents
,
2003
.
[5]
David A. Wagner,et al.
This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. Detecting Format String Vulnerabilities with Type Qualifiers
,
2001
.
[6]
John W. Stamey,et al.
Documenting aspect-oriented PHP (AOPHP)
,
2006,
SIGDOC '06.
[7]
Cristina V. Lopes,et al.
Aspect-oriented programming
,
1999,
ECOOP Workshops.
[8]
Todd M. Austin,et al.
High Coverage Detection of Input-Related Security Faults
,
2003,
USENIX Security Symposium.
[9]
Angelos D. Keromytis,et al.
SQLrand: Preventing SQL Injection Attacks
,
2004,
ACNS.