polito.it
Politecnico di Torino (logo)

Enhancing Cybersecurity with LLMs: Automated Identification and Risk Scoring of Network Misconfigurations

Mario Todaro

Enhancing Cybersecurity with LLMs: Automated Identification and Risk Scoring of Network Misconfigurations.

Rel. Alessandro Aliberti, Edoardo Patti. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering), 2025

[img] PDF (Tesi_di_laurea) - Tesi
Accesso riservato a: Solo utenti staff fino al 11 Ottobre 2026 (data di embargo).
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (6MB)
Abstract:

In a corporate environment where industrial secrets and critical assets need protection, ensuring robust security is essential. Misconfigurations, improper setups in systems or applications, can create exploitable vulnerabilities. These issues often derive from overlooked security best practices, such as unchanged default settings, excessive permissions, or wrong protocol configurations. This master’s thesis explores an AI-driven solution that leverages Natural Language Processing (NLP) techniques and Large Language Models (LLMs) to mitigate security risks. The aim is to develop a tool that not only assists users in analyzing network configurations and resolving issues, but also focuses on anticipating and preventing attacks by proactively managing security risks. The process begins with user-uploaded security documentation, from which best practices are extracted using a Retrieval-Augmented Generation (RAG) mechanism powered by a FAISS vector database. Next, an LLM generates a structured JSON template based on these best practices, defining a standardized format. The system then fills this template with network details provided by the user, and supplies them to a Llama-based chat-bot, which can perform a detailed security analysis and guide the user in troubleshooting misconfigurations. To enhance reliability and prevent AI hallucinations, the system incorporates few-shot prompt engineering and controlled temperature settings, ensuring that responses remain accurate. The key innovation is the introduction of a multi-LLM system designed to bridge the gap between flexible misconfigurations and rigorously cataloged security weaknesses and vulnerabilities. These models compute cosine similarity between extracted best practices and known weaknesses cataloged in CWE (Common Weakness Enumeration). This approach allows misconfigurations to be mapped directly to specific weaknesses, which can then be linked to known CVEs (Common Vulnerabilities and Exposures). The effectiveness is enhanced by fine-tuning two of the three used models on a specialized cybersecurity dataset, which contains paraphrased security best practices, in order to help the models recognize the semantic nuances specific to cybersecurity.

Relatori: Alessandro Aliberti, Edoardo Patti
Anno accademico: 2024/25
Tipo di pubblicazione: Elettronica
Numero di pagine: 85
Soggetti:
Corso di laurea: Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering)
Classe di laurea: Nuovo ordinamento > Laurea magistrale > LM-32 - INGEGNERIA INFORMATICA
Aziende collaboratrici: NON SPECIFICATO
URI: http://webthesis.biblio.polito.it/id/eprint/35330
Modifica (riservato agli operatori) Modifica (riservato agli operatori)