While the automated detection of cryptographic API misuses has progressed significantly, its precision diminishes for intricate targets due to the reliance on manually defined patterns. Large Language Models (LLMs) offer a promising context-aware understanding to address this shortcoming, yet the stochastic nature and the hallucination issue pose challenges to their applications in precise security analysis. This paper presents the first systematic study to explore LLMs' application in cryptographic API misuse detection. Our findings are noteworthy: The instability of directly applying LLMs results in over half of the initial reports being false positives. Despite this, the reliability of LLM-based detection could be significantly enhanced by aligning detection scopes with realistic scenarios and employing a novel code and analysis validation technique, achieving a nearly 90% detection recall. This improvement substantially surpasses traditional methods and leads to the discovery of previously unknown vulnerabilities in established benchmarks. Nevertheless, we identify recurring failure patterns that illustrate current LLMs' blind spots. Leveraging these findings, we deploy an LLM-based detection system and uncover 63 new vulnerabilities (47 confirmed, 7 already fixed) in open-source Java and Python repositories, including prominent projects like Apache.


翻译:尽管加密API误用的自动化检测已取得显著进展,但由于依赖手动定义的模式,其在复杂目标上的检测精度有所下降。大语言模型(LLMs)提供了具有前景的上下文感知理解能力,有望弥补这一不足,但其随机性本质和幻觉问题为其在精确安全分析中的应用带来了挑战。本文首次系统性地探索了LLMs在加密API误用检测中的应用。我们的发现值得关注:直接应用LLMs的不稳定性导致超过一半的初始报告为误报。尽管如此,通过将检测范围与现实场景对齐,并采用一种新颖的代码与分析验证技术,基于LLM的检测可靠性可得到显著提升,实现了接近90%的检测召回率。这一改进大幅超越了传统方法,并导致在既有基准测试中发现了先前未知的漏洞。然而,我们识别出了反复出现的失败模式,这些模式揭示了当前LLMs的盲点。利用这些发现,我们部署了一个基于LLM的检测系统,并在开源Java和Python代码库中发现了63个新漏洞(其中47个已确认,7个已修复),其中包括Apache等知名项目。

1
下载
关闭预览

相关内容

应用程序接口(简称 API),又称为应用编程接口,就是软件系统不同组成部分衔接的约定。
综述:面向移动端大语言模型的隐私与安全
专知会员服务
19+阅读 · 2025年9月7日
重新思考不确定性:大语言模型时代的关键综述与分析
专知会员服务
39+阅读 · 2024年11月20日
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
大型语言模型网络安全综述
专知会员服务
68+阅读 · 2024年5月12日
大型语言模型在预测和异常检测中的应用综述
专知会员服务
70+阅读 · 2024年2月19日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
内省扩散语言模型
专知会员服务
2+阅读 · 4月14日
国外反无人机系统与技术动态
专知会员服务
3+阅读 · 4月14日
大规模作战行动中的战术作战评估(研究论文)
未来的海战无人自主系统
专知会员服务
3+阅读 · 4月14日
美军多域作战现状分析:战略、概念还是幻想?
无人机与反无人机系统(书籍)
专知会员服务
19+阅读 · 4月14日
美陆军2026条令:安全与机动支援
专知会员服务
7+阅读 · 4月14日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员