AutoPT: How Far Are We from the End2End Automated Web Penetration Testing?
University of Science and Technology of China(中国科学技术大学);QI-ANXIN Technology Research Institute(奇安信技术研究院);Chaitin Future Technology Co., Ltd(观想未来科技有限公司)
渗透测试是保障Web安全的关键手段,可提前发现并修复漏洞,防范数据泄露及严重后果。大语言模型(LLM)强大的推理能力已在诸多领域取得显著进展,基于LLM的智能体的发展潜力有望革新网络安全渗透测试行业。本研究利用真实渗透测试环境构建了一套全面的端到端渗透测试基准,以探究基于LLM的智能体在该领域的能力。研究结果显示,这类智能体熟悉渗透测试任务的框架,但在生成准确指令、执行完整流程方面仍存在局限。据此,我们总结了当前面临的挑战,包括难以维护完整的消息历史、智能体易陷入停滞的问题。\n基于上述发现,我们提出了渗透测试状态机(Penetration testing State Machine,PSM),该机制采用有限状态机(Finite State Machine,FSM)方法来解决上述局限。随后,我们推出了AutoPT——一种由LLM驱动、基于PSM原理的自动化渗透测试智能体,它结合了LLM的固有推理能力与状态机的约束框架。我们的评估结果表明,在GPT-4o mini模型上,AutoPT的表现优于基准框架ReAct,在基准测试目标上将任务完成率从22%提升至41%。与基准框架及人工操作相比,AutoPT还进一步降低了时间与经济成本。因此,我们的AutoPT推动了自动化渗透测试的发展,对学术界和产业界均具有重要影响。
英文摘要:
Penetration testing is essential to ensure Web security, which can detect and fix vulnerabilities in advance, and prevent data leakage and serious consequences. The powerful inference capabilities of large language models (LLMs) have made significant progress in various fields, and the development potential of LLM-based agents can revolutionize the cybersecurity penetration testing industry. In this work, we establish a comprehensive end-to-end penetration testing benchmark using a real-world penetration testing environment to explore the capabilities of LLM-based agents in this domain. Our results reveal that the agents are familiar with the framework of penetration testing tasks, but they still face limitations in generating accurate commands and executing complete processes. Accordingly, we summarize the current challenges, including the difficulty of maintaining the entire message history and the tendency for the agent to become stuck.
Based on the above insights, we propose a Penetration testing State Machine (PSM) that utilizes the Finite State Machine (FSM) methodology to address these limitations. Then, we introduce AutoPT, an automated penetration testing agent based on the principle of PSM driven by LLMs, which utilizes the inherent inference ability of LLM and the constraint framework of state machines. Our evaluation results show that AutoPT outperforms the baseline framework ReAct on the GPT-4o mini model and improves the task completion rate from 22% to 41% on the benchmark target. Compared with the baseline framework and manual work, AutoPT also reduces time and economic costs further. Hence, our AutoPT has facilitated the development of automated penetration testing and significantly impacted both academia and industry.
Hackers or Hallucinators? A Comprehensive Analysis of LLM-Based Automated Penetration Testing
School of Cyber Science and Engineering, Sichuan University(四川大学网络空间安全学院);Institute for Network Sciences and Cyberspace, Tsinghua University(清华大学网络科学与网络空间研究院);College of Computing and Data Science, Nanyang Technological University(南洋理工大学计算与数据科学学院);National University of Singapore(新加坡国立大学);College of Electronic Engineering, National University of Defense Technology(国防科技大学电子工程学院);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);School of Artificial Intelligence, Wuhan University(武汉大学人工智能学院)
Decoupling Reconnaissance and Exploitation: Measuring the Capability Boundaries of LLM-Based Web Penetration Testing
University of Science and Technology of China(中国科学技术大学);Suzhou Institute for Advanced Research, University of Science and Technology of China(中国科学技术大学苏州先进研究院);Nanjing University of Science and Technology(南京理工大学);Research Institute, Runjian Co., Ltd(润杰有限公司研究院)
Staying on the Attack Path: Structured State for Long-Horizon Automated Penetration Testing
Tianjin University(天津大学);Changchun University of Science and Technology(长春理工大学);Jilin Province Key Laboratory of Network and Information Security(吉林省网络与信息安全重点实验室);Shihezi University(石河子大学)
随着网络攻击事件的不断增长,重要的是要开发创新和有效的技术来评估和防御网络系统免受网络攻击。其中一个众所周知的技术是执行渗透测试,由一组安全专业人员(即红队)进行。众所周知,渗透测试可以有效地发现现有和新的漏洞,但是,安全评估的质量取决于红队成员的质量以及他们对渗透测试的时间和投入。在本文中,我们提出了一种新的自动化框架,名为“HARMer”的网络攻击生成,以解决与手动攻击执行的红队的挑战。我们提出的新框架,设计和实现是基于一个可扩展的图形安全模型,称为分层攻击表示模型(HARM)。(1)我们提出了自动化框架的要求和关键阶段。(2)我们提出了基于安全度量的攻击规划策略及其算法。(3)我们在一个真实的企业网和Amazon Web Services中进行实验。结果显示了框架的不同阶段如何相互作用,以模拟攻击者的操作。该框架将允许安全管理员以自动化的方式自动评估各种威胁和攻击的影响。
AgentSnare: Learning to Delay, Divert, and Defuse Autonomous Web Penetration Agents
Zhejiang University(浙江大学);Tsinghua University(清华大学);The University of Hong Kong(香港大学);Hainan University(海南大学);Anhui University(安徽大学);The Hong Kong Polytechnic University(香港理工大学)