Journal of Computer Applications ›› 2026, Vol. 46 ›› Issue (1): 135-143.DOI: 10.11772/j.issn.1001-9081.2025070909

• Cyber security • Previous Articles     Next Articles

AI-Agent based method for hidden RESTful API discovery and vulnerability detection

Yi LIN1, Bing XIA1(), Yong WANG2, Shunda MENG1, Juchong LIU2, Shuqin ZHANG3   

  1. 1.School of Cyberspace Security,Zhongyuan University of Technology,Zhengzhou Henan 450007,China
    2.Zhengzhou Aiwen Technology Company Limited,Zhengzhou Henan 450002,China
    3.School of Computer Science,Zhongyuan University of Technology,Zhengzhou Henan 450007,China
  • Received:2025-08-11 Revised:2025-09-11 Accepted:2025-09-12 Online:2026-01-10 Published:2026-01-10
  • Contact: Bing XIA
  • About author:LIN Yi, born in 2000, M. S. candidate. His research interests include network security.
    WANG Yong, born in 1981, Ph. D. His research interests include Internet measurement and analysis, cybersecurity, machine learning.
    MENG Shunda, born in 1995, M. S. candidate. His research interests include binary security.
    LIU Juchong, born in 1987, M. S. His research interests include big data governance.
    ZHANG Shuqin, born in 1978, Ph. D., professor. His research interests include internet of things, data mining, network attack and defense, wireless networks.
  • Supported by:
    Program of Hong Kong Theme-based Research Scheme(T41-603/20R);Henan Provincial Science and Technology Research Project(252102210217);Henan Provincial Key Research and Development Program(251111212000)

基于AI智能体的隐藏RESTful API识别与漏洞检测方法

林怡1, 夏冰1(), 王永2, 孟顺达1, 刘居宠2, 张书钦3   

  1. 1.中原工学院 网络空间安全学院,郑州 450007
    2.郑州埃文科技有限公司,郑州 450002
    3.中原工学院 计算机学院,郑州 450007
  • 通讯作者: 夏冰
  • 作者简介:林怡(2000—),男,福建漳州人,硕士研究生,主要研究方向:网络安全
    王永(1981—),男,河南商丘人,博士,主要研究方向:互联网测量与分析、网络安全、机器学习
    孟顺达(1995—),男,河南商丘人,硕士研究生,主要研究方向:二进制安全
    刘居宠(1987—),男,江西吉安人,硕士,主要研究方向:大数据治理
    张书钦(1978—),男,河南禹州人,教授,博士,主要研究方向:物联网、数据挖掘、网络攻防、无线网络。
  • 基金资助:
    香港主题性研究计划项目(T41-603/20R);河南省科技攻关项目(252102210217);河南省重点研发专项(251111212000)

Abstract:

The popularity of RESTful APIs within modern Web services makes API security a critical concern gradually. The mainstream tools for API discovery and vulnerability detection have effect limitations in discovering hidden or undocumented APIs due to relying on API documents or public paths for scanning, and have high false positive rates in complex or dynamic API environments. Addressing these challenges, A2A (Agent to API vulnerability detection), an Agent system for hidden API discovery and vulnerability detection was proposed through agents communicating seamlessly via a Model Context Protocol (MCP), so as to realize full-process automation from hidden API discovery to vulnerability detection. In A2A, adaptive enumeration and HTTP response analysis were employed to discover potential hidden API endpoints automatically, and a service-specific API fingerprint library was combined to confirm and discover hidden APIs, On API vulnerability detection, Large Language Model (LLM) and Retrieval-Augmented Generation (RAG) techniques were integrated by A2A, and high-quality test cases were generated automatically through a feedback iterative optimization mechanism, so as to verify whether the vulnerability exists. Experimental evaluation results indicate that A2A has the average API discovery rate of 91.9%, with an false discovery rate of 7.8%, and discover multiple hidden API vulnerabilities previously undetected by NAUTILUS and RESTler successfully.

Key words: RESTful API, vulnerability detection, Large Language Model (LLM), Retrieval-Augmented Generation (RAG), AI-Agent

摘要:

伴随RESTful API在现代Web服务中的普及,安全问题日益凸显。而现有的主流API识别与漏洞检测工具依赖API文档或公开路径进行扫描,在识别隐藏API或无文档API时效果有限,在复杂或动态API环境下漏洞误报率高。针对这些挑战,基于上下文协议(MCP)无缝通信智能体,提出一种隐藏API发现和漏洞检测的智能体系统A2A (Agent to API vulnerability detection)来实现从API发现到漏洞检测的全流程自动化。A2A通过自适应枚举和HTTP响应分析自动识别潜在的隐藏API端点,并结合服务特定的API指纹库进行隐藏API的确认和发现。A2A在API漏洞检测上则是结合大语言模型(LLM)与检索增强生成(RAG)技术,并通过反馈迭代优化策略,自动生成高质量测试用例以验证漏洞是否存在。实验评估结果表明,A2A的平均API发现率为91.9%,假发现率为7.8%,并成功发现NAUTILUS和RESTler未能检测到的多个隐藏API漏洞。

关键词: RESTful API, 漏洞检测, 大语言模型, 检索增强生成, AI智能体

CLC Number: