학술논문

Scaling JavaScript Abstract Interpretation to Detect and Exploit Node.js Taint-style Vulnerability
Document Type
Conference
Source
2023 IEEE Symposium on Security and Privacy (SP) SP Security and Privacy (SP), 2023 IEEE Symposium on. :1059-1076 May, 2023
Subject
Components, Circuits, Devices and Systems
Computing and Processing
Privacy
Scalability
Prototypes
Syntactics
Software
Explosions
Security
Node.js
Abstract-Interpretation
Vulnerability-Detection
Language
ISSN
2375-1207
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.