An Agentic Flow for Finite State Machine Extraction using Prompt Chaining

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wael, Fares, Maklad, Youssef, Hamdi, Ali, Elsersy, Wael
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909690009485312
author Wael, Fares
Maklad, Youssef
Hamdi, Ali
Elsersy, Wael
author_facet Wael, Fares
Maklad, Youssef
Hamdi, Ali
Elsersy, Wael
contents Finite-State Machines (FSMs) are critical for modeling the operational logic of network protocols, enabling verification, analysis, and vulnerability discovery. However, existing FSM extraction techniques face limitations such as scalability, incomplete coverage, and ambiguity in natural language specifications. In this paper, we propose FlowFSM, a novel agentic framework that leverages Large Language Models (LLMs) combined with prompt chaining and chain-of-thought reasoning to extract accurate FSMs from raw RFC documents. FlowFSM systematically processes protocol specifications, identifies state transitions, and constructs structured rule-books by chaining agent outputs. Experimental evaluation across FTP and RTSP protocols demonstrates that FlowFSM achieves high extraction precision while minimizing hallucinated transitions, showing promising results. Our findings highlight the potential of agent-based LLM systems in the advancement of protocol analysis and FSM inference for cybersecurity and reverse engineering applications.
format Preprint
id arxiv_https___arxiv_org_abs_2507_11222
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle An Agentic Flow for Finite State Machine Extraction using Prompt Chaining
Wael, Fares
Maklad, Youssef
Hamdi, Ali
Elsersy, Wael
Computation and Language
Artificial Intelligence
Networking and Internet Architecture
Finite-State Machines (FSMs) are critical for modeling the operational logic of network protocols, enabling verification, analysis, and vulnerability discovery. However, existing FSM extraction techniques face limitations such as scalability, incomplete coverage, and ambiguity in natural language specifications. In this paper, we propose FlowFSM, a novel agentic framework that leverages Large Language Models (LLMs) combined with prompt chaining and chain-of-thought reasoning to extract accurate FSMs from raw RFC documents. FlowFSM systematically processes protocol specifications, identifies state transitions, and constructs structured rule-books by chaining agent outputs. Experimental evaluation across FTP and RTSP protocols demonstrates that FlowFSM achieves high extraction precision while minimizing hallucinated transitions, showing promising results. Our findings highlight the potential of agent-based LLM systems in the advancement of protocol analysis and FSM inference for cybersecurity and reverse engineering applications.
title An Agentic Flow for Finite State Machine Extraction using Prompt Chaining
topic Computation and Language
Artificial Intelligence
Networking and Internet Architecture
url https://arxiv.org/abs/2507.11222