Design and Implementation of a RAG-Enhanced LLM Chatbot for Penetration Testing Tasks

Penetration Testing also referred to as Ethical Hacking, is a fundamental practice in Cybersecurity that involves evaluating the security of systems, networks, and applications to identify vulnerabilities and potential attacks. Traditional approaches to Penetration Testing are often time-consuming, relying on manual processes, and requiring advanced expertise due to the technical complexity of Penetration Testing tools. In this paper, we introduce a Retrieval-Augmented Generation (RAG) pipeline that enhances a trained large language model (LLM) to serve as an intelligent pentest assistant. We discuss the challenges involved in designing and implementing this architecture. It is designed to assist users throughout the Penetration Testing workflow, ranging from vulnerability assessment to remediation, by providing contextual guidance, command suggestions, and technical explanations in natural language. After implementing the proposed architecture, we found that combining the strengths of LLMs with the RAG pipeline notably improved the chatbot’s ability to assist users. It provided more accurate, relevant, and context-aware responses across various Penetration Testing tasks, making the interaction more effective and intuitive.

Authors

Institutions

Publication Details

Journal
Procedia Computer Science
Published
2026-01-01
DOI
https://doi.org/10.1016/j.procs.2026.03.059
Primary Topic
Web Application Security Vulnerabilities
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Design and Implementation of a RAG-Enhanced LLM Chatbot for Penetration Testing Tasks

Nuno Lopes, Monia Najjar, Rui Fernandes, Óscar R. Ribeiro et al.
Procedia Computer Science
Web Application Security Vulnerabilities
article

Design and Implementation of a RAG-Enhanced LLM Chatbot for Penetration Testing Tasks

Nuno Lopes, Monia Najjar, Rui Fernandes, Óscar R. Ribeiro, Oumaima Ben Fadhel
article en

Abstract

Penetration Testing also referred to as Ethical Hacking, is a fundamental practice in Cybersecurity that involves evaluating the security of systems, networks, and applications to identify vulnerabilities and potential attacks. Traditional approaches to Penetration Testing are often time-consuming, relying on manual processes, and requiring advanced expertise due to the technical complexity of Penetration Testing tools. In this paper, we introduce a Retrieval-Augmented Generation (RAG) pipeline that enhances a trained large language model (LLM) to serve as an intelligent pentest assistant. We discuss the challenges involved in designing and implementing this architecture. It is designed to assist users throughout the Penetration Testing workflow, ranging from vulnerability assessment to remediation, by providing contextual guidance, command suggestions, and technical explanations in natural language. After implementing the proposed architecture, we found that combining the strengths of LLMs with the RAG pipeline notably improved the chatbot’s ability to assist users. It provided more accurate, relevant, and context-aware responses across various Penetration Testing tasks, making the interaction more effective and intuitive.

Procedia Computer ScienceVol. 278
Universidade Politécnica do Cávado e do Ave (PT), Higher Institute of Management (RU), Munster Technological University (IE)
Peace, Justice and strong institutions
Openalex Percentile: Top 10%
Web Application Security Vulnerabilities
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.