Scaling JavaScript Abstract Interpretation to Detect and Exploit Node.js Taint-style Vulnerability
Authors:
- 1 May 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1059-1076
Abstract
Taint-style vulnerabilities, such as OS command injection and path traversal, are common and severe software weaknesses. There exists an inherent trade-off between analysis scalability and accuracy in detecting such vulnerabilities. On one hand, existing syntax-directed approaches often make compromises in the analysis accuracy on dynamic features like bracket syntax. On the other hand, existing abstract interpretation often faces the issue of state explosion in the abstract domain, thus leading to a scalability problem.In this paper, we present a novel approach, called FAST, to scale the vulnerability discovery of JavaScript packages via a novel abstract interpretation approach that relies on two new techniques, called bottom-up and top-down abstract interpretation. The former abstractly interprets functions based on scopes instead of call sequences to construct dynamic call edges. Then, the latter follows specific control-flow paths and prunes the program to skip statements unrelated to the sink. If an end-to-end data-flow path is found, FAST queries the satisfiability of constraints along the path and verifies the exploitability to reduce human efforts.We implement a prototype of FAST and evaluate it against real-world Node.js packages. We show that FAST is able to find 242 zero-day vulnerabilities in NPM with 21 CVE identifiers being assigned. Our evaluation also shows that FAST can scale to real-world applications such as NodeBB and popular frameworks such as total.js and strapi in finding legacy vulnerabilities that no prior works can.Keywords
Funding Information
- National Science Foundation
- Defense Advanced Research Projects Agency
This publication has 58 references indexed in Scilit:
- DAPP: automatic detection and analysis of prototype pollution vulnerability in Node.js modulesInternational Journal of Information Security, 2021
- JaSt: Fully Syntactic Detection of Malicious (Obfuscated) JavaScript2018
- DTaint: Detecting the Taint-Style Vulnerability in Embedded Device Firmware2018
- Efficient and Flexible Discovery of PHP Application Vulnerabilities2017
- An efficient mechanism of generating call graph for JavaScript using dynamic analysis in web application2014
- Protecting Web-Based Single Sign-on Protocols against Relying Party Impersonation Attacks through a Dedicated Bi-directional Authenticated Secure Channel2014
- Redefining web browser principals with a Configurable Origin Policy2013
- Efficient construction of approximate call graphs for JavaScript IDE services2013
- Type Analysis for JavaScript2009
- Abstract Slicing: A New Approach to Program Slicing Based on Abstract Interpretation and Model Checking2006