Nowadays, an increasing number of applications uses deserialization. This technique, based on rebuilding the instance of objects from serialized byte streams, can be dangerous since it can open the application to attacks such as remote code execution (RCE) if the data to deserialize is originating from an untrusted source. Deserialization vulnerabilities are so critical that they are in OWASP's list of top 10 security risks for web applications. This is mainly caused by faults in the development process of applications and by flaws in their dependencies, i.e., flaws in the libraries used by these applications. No previous work has studied deserialization attacks in-depth: How are they performed? How are weaknesses introduced and patched? And for how long are vulnerabilities present in the codebase? To yield a deeper understanding of this important kind of vulnerability, we perform two main analyses: one on attack gadgets, i.e., exploitable pieces of code, present in Java libraries, and one on vulnerabilities present in Java applications. For the first analysis, we conduct an exploratory large-scale study by running 256515 experiments in which we vary the versions of libraries for each of the 19 publicly available exploits. Such attacks rely on a combination of gadgets present in one or multiple Java libraries. A gadget is a method which is using objects or fields that can be attacker-controlled. Our goal is to precisely identify library versions containing gadgets and to understand how gadgets have been introduced and how they have been patched. We observe that the modification of one innocent-looking detail in a class -- such as making it public -- can already introduce a gadget. Furthermore, we noticed that among the studied libraries, 37.5% are not patched, leaving gadgets available for future attacks. For the second analysis, we manually analyze 104 deserialization vulnerabilities CVEs to understand how vulnerabilities are introduced and patched in real-life Java applications. Results indicate that the vulnerabilities are not always completely patched or that a workaround solution is proposed. With a workaround solution, applications are still vulnerable since the code itself is unchanged.
翻译:现在,越来越多的应用程序使用消毒。 这个技术, 以重建来自串联的字串流的物体实例为基础, 可能是危险的, 因为它可以打开对远程代码执行(RCE)等攻击的应用程序的应用程序, 如果用于消毒的数据来自一个不信任的来源。 消毒的弱点非常关键, 以至于它们出现在 OWASP 的前十大网络应用程序安全风险列表中。 这主要是由于应用程序开发过程中的错误, 以及这些应用程序所依赖的缺陷, 即: 这些应用程序所使用的图书馆的缺陷。 没有以前的工作研究过消毒攻击的深度: 它们是如何运行的? 弱点是如何被引入和修补的? 对于在代码库中存在的弱点有多长? 为了更深入地了解这种重要的弱点, 我们进行了两项主要分析: 攻击工具, 即: 攻击工具, 在 Java 库中, 正在推出的代码, 正在被开发, 以及 弱点在 Java 应用程序中存在。 对于第一个分析, 我们进行大规模研究, 通过进行 蒸发式的应用程序, 正在进行 进行 256515 的实验, 我们一直在进行这种变现的图书馆的分析, 正在使用一个工具, 正在使用一个工具, 复制一个工具, 正在使用一个工具, 使用一个工具, 一种工具, 使用一个工具, 正在使用一个工具, 一种工具, 一种工具可以被复制一个工具。