PenHeal: A Two-Stage LLM Framework for Automated Pentesting and Optimal Remediation

Junjie Huang, Quanyan Zhu

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Recent advances in Large Language Models (LLMs) have shown significant potential in enhancing cybersecurity defenses against sophisticated threats. LLM-based penetration testing is an essential step in automating system security evaluations by identifying vulnerabilities. Remediation, the subsequent crucial step, addresses these discovered vulnerabilities. Since details about vulnerabilities, exploitation methods, and software versions offer crucial insights into system weaknesses, integrating penetration testing with vulnerability remediation into a cohesive system has become both intuitive and necessary. This paper introduces PenHeal, a two-stage LLM-based framework designed to autonomously identify and mitigate security vulnerabilities. The framework integrates two LLM-enabled components: the Pentest Module, which detects multiple vulnerabilities within a system, and the Remediation Module, which recommends optimal remediation strategies. The integration is facilitated through Counterfactual Prompting and an Instructor module that guides the LLMs using external knowledge to explore multiple potential attack paths effectively. Our experimental results demonstrate that PenHeal not only automates the identification and remediation of vulnerabilities but also significantly improves vulnerability coverage by 31%, increases the effectiveness of remediation strategies by 32%, and reduces the associated costs by 46% compared to baseline models. These outcomes highlight the trans-formative potential of LLMs in reshaping cybersecurity practices, offering an innovative solution to defend against cyber threats.

Original languageEnglish (US)
Title of host publicationAutonomousCyber 2024 - Proceedings of the Workshop on Autonomous Cybersecurity, Co-Located with
Subtitle of host publicationCCS 2024
PublisherAssociation for Computing Machinery, Inc
Pages11-22
Number of pages12
ISBN (Electronic)9798400712296
DOIs
StatePublished - Nov 7 2024
Event1st International Workshop on Autonomous Cybersecurity, AutonomousCyber 2024, As part of the 31st ACM Conference on Computer and Communications Security, ACM CCS 2024 - Salt Lake City, United States
Duration: Oct 14 2024Oct 18 2024

Publication series

NameAutonomousCyber 2024 - Proceedings of the Workshop on Autonomous Cybersecurity, Co-Located with: CCS 2024

Conference

Conference1st International Workshop on Autonomous Cybersecurity, AutonomousCyber 2024, As part of the 31st ACM Conference on Computer and Communications Security, ACM CCS 2024
Country/TerritoryUnited States
CitySalt Lake City
Period10/14/2410/18/24

Keywords

  • Cybersecurity Automation
  • LLMs
  • Penetration Testing
  • Retrieval-Augmented Generation
  • Vulnerability Remediation

ASJC Scopus subject areas

  • Computational Theory and Mathematics
  • Computer Networks and Communications
  • Computer Science Applications

Fingerprint

Dive into the research topics of 'PenHeal: A Two-Stage LLM Framework for Automated Pentesting and Optimal Remediation'. Together they form a unique fingerprint.

Cite this