一句话:提出基于抽象解释的统一健全分析,静态识别 Java 中七类注入攻击的污点数据流。
该文针对 Java Web 应用中七类注入攻击(SQL 注入、跨站脚本、重定向、命令、反射、路径穿越、信任边界违规)共有的弱点:用户可控数据无约束地从 source 流向可能触发危险操作的 sink。作者提出统一的健全防护机制,基于抽象解释,将程序翻译为建模所有显式数据流的布尔公式,进行过程间、流敏感、上下文敏感的分析;污点作用于堆中动态分配的引用类型,并具备对象敏感与字段敏感。实现于 Java/Android 分析器 Julia,在意大利大型银行的网上银行与客户关系管理及开源第三方应用中发现漏洞,包括 2017 年 Equifax 数据泄露所涉命令注入;在 Juliet Suite 与 OWASP Benchmark 上与 10 多个静态分析器对比,表明其是唯一健全(在明示限制如多线程与 native 代码下)且可处理工业代码、精度更高的注入分析。
The most dangerous security-related software errors, according to the OWASP Top Ten 2017 list, affect web applications. They are potential injection attacks that exploit user-provided data to execute undesired operations: database access and updates ( SQL injection ); generation of malicious web pages ( cross-site scripting injection ); redirection to user-specified web pages ( redirect injection ); execution of OS commands and arbitrary scripts ( command injection ); loading of user-specified, possibly heavy or dangerous classes at run time ( reflection injection ); access to arbitrary files on the file system ( path-traversal ); and storing user-provided data into heap regions normally assumed to be shielded from the outside world ( trust boundary violation ). All these attacks exploit the same weakness: unconstrained propagation of data from sources that the user of a web application controls into sinks whose activation might trigger dangerous operations. Although web applications are written in a variety of languages, Java remains a frequent choice, in particular for banking applications, where security has tangible relevance. This article defines a unified, sound protection mechanism against such attacks, based on the identification of all possible explicit flows of tainted data in Java code. Such flows can be arbitrarily complex, passing through dynamically allocated data structures in the heap. The analysis is based on abstract interpretation and is interprocedural, flow-sensitive, and context-sensitive. Its notion of taint applies to reference (non-primitive) types dynamically allocated in the heap and is object-sensitive and field-sensitive. The analysis works by translating the program into Boolean formulas that model all possible data flows. Its implementation, within the Julia analyzer for Java and Android, found injection security vulnerabilities in the Internet banking service and in the customer relationship management of large Italian banks, as well as in a set of open-source third-party applications. It found the command injection, which is at the origin of the 2017 Equifax data breach, one of the worst data breaches ever. For objective, repeatable results, this article also evaluates the implementation on two open-source security benchmarks: the Juliet Suite and the OWASP Benchmark for the automatic comparison of static analyzers for cybersecurity. We compared this technique against more than 10 other static analyzers, both free and commercial. The result of these experiments is that ours is the only analysis for injection that is sound (up to well-stated limitations such as multithreading and native code) and works on industrial code, and it is also much more precise than other tools.
@article{paperbot707,
title = {Static Identification of Injection Attacks in Java},
author = {Fausto Spoto and Elisa Burato and Michael D. Ernst and Pietro Ferrara and Alberto Lovato and Damiano Macedonio and Ciprian Spiridon},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {41},
number = {3},
year = {2019},
doi = {10.1145/3332371}
}