Developers create modern software applications (Apps) on top of third-party libraries (Libs). When library vulnerabilities are reachable through application code, the applications can be vulnerable to software supply chain attacks. Prior work shows that developers often require concrete and executable evidence, i.e., proof-of-vulnerability (PoV) tests, to decide whether a reported dependency vulnerability poses a practical security risk to their application. However, manually crafting such tests is challenging, and existing tool support is insufficient to automate the procedure. To streamline test generation, we created PoVSmith -- a new approach that combines call path analysis, exemplar test, code context, and feedback into multiple prompts to guide a coding agent (i.e., Codex) and a large language model (i.e., GPT) for test generation, execution, and assessment. We evaluated PoVSmith on 33 $\langle$App, Lib$\rangle$ Java program pairs, where each App depends on a vulnerable Lib. PoVSmith revealed 158 unique application-level entry points (i.e., public methods) calling vulnerable library APIs; 152 (96\%) of them were correctly found, together with the call paths properly recognized. With such method call information, PoVSmith generated 152 tests, 84 (55\%) of which demonstrated feasible ways of attacking Apps by exploiting Lib vulnerabilities. PoVSmith substantially outperforms the state-of-the-art LLM-based approach, as it reduces human involvement while dramatically improving test quality. Our work contributes (1) a novel approach of agent-based test generation, (2) an iterative code refinement process driven by execution feedback, and (3) LLM-based quality assessment grounded in both the test context and execution logs.


翻译:开发者在第三方库(Libs)之上构建现代软件应用(Apps)。当库中的漏洞可通过应用程序代码被利用时,应用程序可能面临软件供应链攻击风险。先前研究表明,开发者通常需要具体且可执行证据,即证明漏洞测试(PoV tests),来判断已报告的依赖项漏洞是否对其应用程序构成实际安全威胁。然而,手动编写此类测试具有挑战性,现有工具支持不足以自动化该流程。为简化测试生成,我们创建了PoVSmith——一种结合调用路径分析、示例测试、代码上下文与反馈的新型方法,通过多提示机制引导编码智能体(即Codex)和大语言模型(即GPT)进行测试生成、执行与评估。我们在33对$\langle$应用,库$\rangle$Java程序对上评估了PoVSmith,其中每个应用依赖存在漏洞的库。PoVSmith揭示了158个调用漏洞库API的应用程序级入口点(即公共方法);其中152个(96%)被正确识别,且调用路径被准确解析。基于此类方法调用信息,PoVSmith生成了152个测试,其中84个(55%)成功演示了利用库漏洞攻击应用的可执行方案。PoVSmith显著优于基于大语言模型的最新方法,在减少人工参与的同时大幅提升测试质量。本文贡献包括:(1)基于智能体的测试生成新方法,(2)由执行反馈驱动的迭代代码优化流程,(3)结合测试上下文与执行日志的大语言模型质量评估机制。

0
下载
关闭预览

相关内容

软件(中国大陆及香港用语,台湾作软体,英文:Software)是一系列按照特定顺序组织的计算机数据和指令的集合。一般来讲软件被划分为编程语言、系统软件、应用软件和介于这两者之间的中间件。软件就是程序加文档的集合体。
深度学习中的架构后门:漏洞、检测与防御综述
专知会员服务
12+阅读 · 2025年7月19日
【新书】使用生成式人工智能进行软件测试
专知会员服务
45+阅读 · 2025年1月6日
《使用静态污点分析检测恶意代码》CMU最新30页slides
专知会员服务
22+阅读 · 2023年10月11日
专知会员服务
19+阅读 · 2021年6月10日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
Web渗透测试Fuzz字典分享
黑白之道
21+阅读 · 2019年5月22日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
0+阅读 · 13分钟前
定向能反无人机系统最新发展动态
专知会员服务
3+阅读 · 今天13:50
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
2+阅读 · 今天13:33
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员