arrow
Return

Yama: Precise Opcode-Based Data Flow Analysis for Detecting PHP Applications Vulnerabilities

delete2025-01-01
delete0
delete
OA
AI
J
Jiazhen Zhao
K
Kailong Zhu
Y
Yu Lu
H
Hui Huang
Y
Yuliang Lu
DOI:10.1109/TIFS.2025.3592537delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Web applications encompass various aspects of daily life, including online shopping, e-learning, and internet banking. Once there is a vulnerability, it can cause severe societal and economic damage. Due to its ease of use, PHP has become the preferred server-side programming language for web applications, making PHP applications a primary target for attackers. Data flow analysis is widely used for vulnerability detection before deploying web applications because of its efficiency. However, the high complexity of the PHP language makes it difficult to achieve precise data flow analysis, resulting in higher rates of false positives and false negatives in vulnerability detection. In this paper, we present Yama, a context-sensitive and path-sensitive interprocedural data flow analysis method for PHP, designed to detect taint-style vulnerabilities in PHP applications. We have found that the precise semantics and clear control flow of PHP opcodes enable data flow analysis to be more precise and efficient. Leveraging this observation, we established parsing rules for PHP opcodes and implemented a precise understanding of PHP program semantics in Yama. This enables Yama to precisely address the high complexity of the PHP language, including type inference, dynamic features, and built-in functions. We evaluated Yama from three dimensions: basic data flow analysis capabilities, complex semantic analysis capabilities, and the ability to discover vulnerabilities in real-world applications, demonstrating Yama’s advancement in vulnerability detection. Specifically, Yama possesses context-sensitive and path-sensitive interprocedural analysis capabilities, achieving a 99.1% true positive rate in complex semantic analysis experiments related to type inference, dynamic features, and built-in functions. It discovered and reported 38 zero-day vulnerabilities across 24 projects on GitHub with over 1,000 stars each, assigning 34 new CVE IDs. We have released the source code of the prototype implementation and the parsing rules for PHP opcodes to facilitate future research.
Keywords:
Web security
PHP applications vulnerability
data flow analysis
opcode-based

Journal

IEEE Transactions on Information Forensics and Security cover
IEEE Transactions on Information Forensics and Security
IF:
8
Papers:
5.3K
Citations:
2.3W

Organization

N
National University of Defense Technology
Scholars:
3.3K
Papers: 1.0K
Citations: 8.2K
Cited Papers

Cited Papers

Toss a Fault to Your Witcher: Applying Grey-box Coverage-Guided Mutational Fuzzing to Detect SQL and Command Injection Vulnerabilities
err2023-05-01
err0
PREAI
errErik Trickel; Fabio Pagani; Chang Zhu; Lukas Dresel; Giovanni Vigna; Christopher Kruegel; Ruoyu Wang; Tiffany Bao; Yan Shoshitaishvili; Adam Doupé
errShare
errSave
RecurScan: Detecting Recurring Vulnerabilities in PHP Web Applications
err
IF0
err2024-05-13
err0
PREAI
errYoukun Shi; Yuan Zhang; Tianhao Bai; Lei Zhang; Xin Tan; Min Yang
errShare
errSave
Testability Tarpits: the Impact of Code Patterns on the Security Testing of Web Applications
err
IF0
err2022-01-01
err0
PREAI
errFeras Al Kassar; Giulia Clerici; Luca Compagna; Davide Balzarotti; Fabian Yamaguchi
errShare
errSave
Efficient and Flexible Discovery of PHP Application Vulnerabilities
err2017-04-01
err0
PREAI
errMichael Backes; Konrad Rieck; Malte Skoruppa; Ben Stock; Fabian Yamaguchi
errShare
errSave
webFuzz: Grey-Box Fuzzing for Web Applications
err
IF0
err2021-09-30
err0
PREAI
errOrpheas van Rooij; Marcos Antonios Charalambous; Demetris Kaizer; Michalis Papaevripides; Elias Athanasopoulos
errShare
errSave
Variable Feature Usage Patterns in PHP (T)
err
IF0
err2015-11-01
err0
PREAI
errMark Hills
errShare
errSave
Learning Type Inference for Enhanced Dataflow Analysis
err
IF0
err2024-01-11
err0
PREAI
errLukas Seidel; Sedick David Baker Effendi; Xavier Pinho; Konrad Rieck; Brink van der Merwe; Fabian Yamaguchi
errShare
errSave
researcher View more