| 引用本文: | 郑炜,李云帆,桂奎,吴潇雪,陈翔,邓沛然.基于抽象语法树变异的漏洞样本生成方法.软件学报,2025,36(10):4590-4611 |
| |
|
| |
|
|
| 本文已被:浏览 1473次 下载 1154次 |
 码上扫一扫! |
|
|
| 基于抽象语法树变异的漏洞样本生成方法 |
|
郑炜1, 李云帆1, 桂奎1, 吴潇雪2, 陈翔3, 邓沛然1
|
|
1.西北工业大学 软件学院, 陕西 西安 710072;2.扬州大学 信息工程学院, 江苏 扬州 225127;3.南通大学 人工智能与计算机学院, 江苏 南通 226019
|
|
| 摘要: |
| 随着信息技术的持续发展, 软件产品的数量和种类不断增加, 然而即使是高质量的软件也可能存在漏洞. 此外, 软件更新速度快, 软件架构愈发复杂, 这导致漏洞逐渐进化成新的形态, 传统的漏洞检测方法和规则难以适用于新的漏洞特征. 由于零日漏洞样本的稀缺性, 软件演化过程中出现的零日漏洞难以被发现, 这为软件安全带来很大的潜在风险. 提出一种基于抽象语法树变异的漏洞样本生成方法, 能够模拟真实漏洞的结构和语法规则, 生成更符合实际情况的漏洞样本, 它可以为软件安全性和可靠性提供更加有效的解决方案. 该方法通过分析 Eclipse CDT 生成的抽象语法树结构, 提取节点中的语法信息, 重构节点和抽象语法树, 优化抽象语法树结构, 并设计一系列变异算子, 然后在优化后的抽象语法树上进行变异操作. 该方法可以生成具有UAF和CUAF漏洞特征的变异样本, 这些样本可以用于零日漏洞的检测, 有助于提高零日漏洞的检测率. 实验结果表明, 该方法比传统检测方法中的随机变异方法平均减少了 34% 的无效样本量, 并且可以生成更加复杂的变异样本; 此外, 该方法可以生成更加复杂的变异样本, 提高检测的覆盖率和准确率. |
| 关键词: 抽象语法树 零日漏洞 变异算子 漏洞样本生成 |
| DOI:10.13328/j.cnki.jos.007309 |
| 分类号:TP311 |
| 基金项目:国家自然科学基金(62141208); 陕西省重点研发计划(2021GY-041) |
|
| Vulnerability Sample Generation Method Based on Abstract Syntax Tree Variation |
|
ZHENG Wei1, LI Yun-Fan1, GUI Kui1, WU Xiao-Xue2, CHEN Xiang3, DENG Pei-Ran1
|
|
1.School of Software, Northwestern Polytechnical University, Xi’an 710072, China;2.School of Information Engineering, Yangzhou University, Yangzhou 225127, China;3.School of Artificial Intelligence and Computer Science, Nantong University, Nantong 226019, China
|
| Abstract: |
| With the continuous development of information technology, the quantity and variety of software products are increasing, but even high-quality software may contain vulnerabilities. In addition, the software update speed is fast, and the software architecture is increasingly complex, which leads to the gradual evolution of vulnerabilities into new forms. Consequently, traditional vulnerability detection methods and rules are difficult to apply to new vulnerability features. Due to the scarcity of zero-day vulnerability samples, zero-day vulnerabilities that appear in the software evolution process are difficult to find, which brings great potential risks to software security. This study proposes a vulnerability sample generation method based on abstract syntax tree mutation, which can simulate the structure and syntax rules of real vulnerabilities, generate vulnerability samples more in line with the actual situation, and provide a more effective solution for software security and reliability. This method analyzes the abstract syntax tree structure generated by Eclipse CDT, extracts the syntactic information in the nodes, reconstructs the nodes and abstract syntax trees, optimizes the abstract syntax tree structure, and designs a series of mutation operators. Subsequently, it performs mutation operations on the optimized abstract syntax trees. The method proposed in this paper can generate mutation samples with the characteristics of UAF and CUAF vulnerabilities, which can be used for the detection of zero-day vulnerabilities and help to improve the detection rate of zero-day vulnerabilities. Experimental results show that this method reduces the invalid sample size by 34% on average compared with the random variation method in traditional detection methods, and can generate more complex mutated samples. In addition, this method can generate more complex mutated samples, enhancing the coverage and accuracy of detection. |
| Key words: abstract syntax tree (AST) zero-day vulnerability variation operator vulnerable sample generation |
|
|
|
|