Pixy: a static analysis tool for detecting Web application vulnerabilities

Nenad Jovanović, Christopher Kruegel, Engin Kirda

2006 · 718 citations · 13 references

Concepts

TL;DR

Web applications have grown rapidly in number and importance, but so have their security vulnerabilities, making manual code reviews costly and error‑prone and underscoring the need for automated solutions. This paper proposes using static source‑code analysis to detect vulnerabilities in web applications. The approach employs flow‑sensitive, interprocedural, context‑sensitive data‑flow analysis, along with alias and literal analysis, targeting taint‑style vulnerabilities such as SQL injection, XSS, and command injection, and is implemented in the open‑source Pixy prototype for detecting XSS in PHP scripts. Pixy uncovered 15 previously unknown vulnerabilities in three applications and reproduced 36 known ones, achieving a false‑positive rate of about 50%, which is considered low enough for effective security audits.

Abstract

The number and the importance of Web applications have increased rapidly over the last years. At the same time, the quantity and impact of security vulnerabilities in such applications have grown as well. Since manual code reviews are time-consuming, error-prone and costly, the need for automated solutions has become evident. In this paper, we address the problem of vulnerable Web applications by means of static source code analysis. More precisely, we use flow-sensitive, interprocedural and context-sensitive dataflow analysis to discover vulnerable points in a program. In addition, alias and literal analysis are employed to improve the correctness and precision of the results. The presented concepts are targeted at the general class of taint-style vulnerabilities and can be applied to the detection of vulnerability types such as SQL injection, cross-site scripting, or command injection. Pixy, the open source prototype implementation of our concepts, is targeted at detecting cross-site scripting vulnerabilities in PHP scripts. Using our tool, we discovered and reported 15 previously unknown vulnerabilities in three Web applications, and reconstructed 36 known vulnerabilities in three other Web applications. The observed false positive rate is at around 50% (i.e., one false positive for each vulnerability) and therefore, low enough to permit effective security audits

References

13