向大型语言模型迈进的自动化渗透测试
Towards Automated Pentesting with Large Language Models
AI总结:
本文提出RedShell框架,利用微调的LLM生成针对Windows漏洞的恶意PowerShell代码,实现高效隐私保护的渗透测试自动化。
摘要:
大型语言模型(LLMs)正在通过允许最小人为干预生成有害机器代码重新定义攻击性网络安全。尽管攻击者利用暗网LLM如XXXGPT和WolfGPT生成恶意代码,伦理黑客可以采用类似方法自动化传统渗透测试流程。本文提出了RedShell,一个隐私保护且硬件高效的框架,利用微调的LLM帮助渗透测试人员生成针对Microsoft Windows漏洞的恶意PowerShell代码。RedShell是在文献中的恶意PowerShell数据集上训练的,我们进一步用人工整理的代码样本增强了该数据集。实验显示,我们的框架在生成样本中实现了超过90%的语法有效性,并与参考渗透测试片段有强语义对齐,优于现有最先进方法在编辑距离等距离度量上的表现。此外,功能性实验强调了RedShell在测试场景中生成片段的执行可靠性,该场景模拟了现实环境。本工作揭示了生成AI在恶意代码生成和自动化测试领域最先进的研究现状,认可了LLM在受控环境中如渗透测试中的潜在益处。
英文摘要:
Large Language Models (LLMs) are redefining offensive cybersecurity by allowing the generation of harmful machine code with minimal human intervention. While attackers take advantage of dark LLMs such as XXXGPT and WolfGPT to produce malicious code, ethical hackers can follow similar approaches to automate traditional pentesting workflows. In this work, we present RedShell, a privacy-preserving, hardware-efficient framework that leverages fine-tuned LLMs to assist pentesters in generating offensive PowerShell code targeting Microsoft Windows vulnerabilities. RedShell was trained on a malicious PowerShell dataset from the literature, which we further enhanced with manually curated code samples. Experiments show that our framework achieves over 90% syntactic validity in generated samples and strong semantic alignment with reference pentesting snippets, outperforming state-of-the-art counterparts in distance metrics such as edit distance (above 50% average code similarity). Additionally, functional experiments emphasize the execution reliability of the snippets produced by RedShell in a testing scenario that mirrors real-world settings. This work sheds light on the state-of-the-art research in the field of Generative AI applied to malicious code generation and automated testing, acknowledging the potential benefits that LLMs hold within controlled environments such as pentesting.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。