Guided Reasoning in LLM-Driven Penetration Testing Using Structured Attack Trees

2509.07939v1 cs.CR, cs.LG 2025-09-11
Авторы:

Katsuaki Nakano, Reza Feyyazi, Shanchieh Jay Yang, Michael Zuzak

Резюме на русском

--------------------------------------------------------- ## Контекст --------------------------------------------------------- Область исследования — автоматизация процессов по pentesting с использованием Large Language Models (LLMs), которая набирает все большую популярность в силу потенциала повышения эффективности и консистентности в оценке системных уязвимостей. Несмотря на этот потенциал, существующие LLM-based agents для pentesting часто полагаются на self-guided reasoning, который ведет к неточностям, hallucinated actions или циклическим решениям. Эти проблемы приводят к неэффективности в работе Agenet и потере времени на unproductive actions, таких как попытки использовать неактивные software libraries или повторение уже проведенных техник. Требуется метод, который сможет ограничить работу LLM с помощью уже проверенных penetration testing methodologies. Такой подход может повысить как точность, так и эффективность автоматизированных pentesting исследований. ## Метод --------------------------------------------------------- Методология разработана на основе deterministic task tree, построенного на основе MITRE ATT&CK Matrix — востребованной в профессиональном pentesting инфраструктуры. Этот task tree включает в себя разделение на определенные tactics, techniques, и procedures, которые формируют ключевые этапы pentesting chain. LLM-based agent использует этот task tree как основу для рассуждений, что позволяет исключить непродуктивные или самодостаточные действия. Такая архитектура создает для LLM фреймворк, который приводит к более предсказуемому и точному поведению. Эталонные LLMs (Llama-3-8B, Gemini-1.5, и GPT-4) были использованы для оценки проработки 10 HackTheBox pentesting exercises с 103 отдельными subtasks, представляющими реальные cyberattack сценарии. ## Результаты --------------------------------------------------------- Логика определенного task tree позволила LLM-agent выполнить 71.8%, 72.8%, и 78.6% subtasks при использовании Llama-3-8B, Gemini-1.5, и GPT-4, соответственно. Это существенно превосходит результаты state-of-the-art LLM penetration testing tools, которые, используя self-guided reasoning, прошли только 13.5%, 16.5%, и 75.7% subtasks. Более того, эти стандартные методы требуют значительно большего числа model queries — 86.2%, 118.7%, и 205.9% в сравнении с новым подходом. Это демонстрирует улучшенную точность и эффективность за счет использования guided reasoning. ## Значимость --------------------------------------------------------- Результаты имеют практическое значение в области cybersecurity, где эффективность и точность pentesting играют ключевую роль. Новая guided reasoning pipeline может быть применена в системах для защиты enterprise systems, повысив как точность, так и эффективность. Благодаря deterministic task tree, LLM agent может сфокусироваться на выполнении только продуктивных действий, что сокращает время и ресурсы на поиск уязвимостей. Это имеет потенциал для повышения уровня защиты компаний от cyber threats. ## Выводы --------------------------------------------------------- Результаты исследований показывают, что интеграция deterministic task tree в LLM-driven pentesting pipelines может значительно повысить точность и эффективность автоматизированных pentest

Abstract

Recent advances in Large Language Models (LLMs) have driven interest in automating cybersecurity penetration testing workflows, offering the promise of faster and more consistent vulnerability assessment for enterprise systems. Existing LLM agents for penetration testing primarily rely on self-guided reasoning, which can produce inaccurate or hallucinated procedural steps. As a result, the LLM agent may undertake unproductive actions, such as exploiting unused software libraries or generating cyclical responses that repeat prior tactics. In this work, we propose a guided reasoning pipeline for penetration testing LLM agents that incorporates a deterministic task tree built from the MITRE ATT&CK Matrix, a proven penetration testing kll chain, to constrain the LLM's reaoning process to explicitly defined tactics, techniques, and procedures. This anchors reasoning in proven penetration testing methodologies and filters out ineffective actions by guiding the agent towards more productive attack procedures. To evaluate our approach, we built an automated penetration testing LLM agent using three LLMs (Llama-3-8B, Gemini-1.5, and GPT-4) and applied it to navigate 10 HackTheBox cybersecurity exercises with 103 discrete subtasks representing real-world cyberattack scenarios. Our proposed reasoning pipeline guided the LLM agent through 71.8\%, 72.8\%, and 78.6\% of subtasks using Llama-3-8B, Gemini-1.5, and GPT-4, respectively. Comparatively, the state-of-the-art LLM penetration testing tool using self-guided reasoning completed only 13.5\%, 16.5\%, and 75.7\% of subtasks and required 86.2\%, 118.7\%, and 205.9\% more model queries. This suggests that incorporating a deterministic task tree into LLM reasoning pipelines can enhance the accuracy and efficiency of automated cybersecurity assessments

Ссылки и действия