Manuscript Offprint

arXiv:2609.31594

From Source Code to Network Profile: Automated and Traceable MUD Profile Generation for IoT Devices

Alessandro Lotto, Abdulla R. A. Almenhali, Savio Sciancalepore, Alessandro Brighente, Mauro Conti

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Alessandro Lotto

University of Padua

Padua, IT

alessandro.lotto@math.unipd.it

Abdulla R. A. Almenhali

University of Padua

Padua, IT

abdulla.almenhali@studenti.unipd.it

Savio Sciancalepore

Eindhoven University of Technology

Eindhoven, NL

s.sciancalepore@tue.nl

Alessandro Brighente

University of Padua

Padua, IT

alessandro.brighente@unipd.it

Abstract

The Manufacturer Usage Description (MUD) standard allows manufacturers of Internet of Things (IoT) devices to define in a MUD file the profile of the expected network behavior of their devices. The MUD file can then be translated into enforceable access-control policies, thus restricting compromised devices to operate solely through manufacturer-defined communication patterns. However, the practical adoption of MUD depends on profiles that are accurate, complete, and maintainable. Existing approaches use traffic-based automation to reduce the manual effort to create MUD profiles, but require device deployment and prolonged monitoring, while capturing only behavior exercised during observation. Rare, failure-triggered, or configuration-dependent communications may remain absent, producing incomplete policies that may disrupt legitimate operation and offer limited insight into the software components responsible for each rule.

In this paper, we present AutoMUD, a source-code-driven tool that generates traceable MUD profiles for IoT devices from their firmware and software source code. AutoMUD combines static and syntactic extraction, retrieval-grounded language-model reasoning, and deterministic validation and compilation to recover the communication behavior characterizing an IoT device and translate eligible endpoints into policy rules. By analyzing code-level evidence, AutoMUD exposes even rarely exercised and conditional communication paths, links every generated rule to its source-level provenance, and preserves excluded findings with explicit reasons for review. Our evaluation on a Linux-based repository demonstrates that AutoMUD recovers the complete communication behavior, consolidates the validated behavior into semantic endpoint groups, and generates the expected structurally valid MUD profile. Through a controlled semantic fault-injection campaign, we also demonstrate that AutoMUD enables an analyst to detect, localize, explain, and correct propagated errors, recovering policies semantically identical to their clean counterparts.

1 Introduction

Internet of Things (IoT) devices increasingly support automation, sensing, and remote control across homes, healthcare, industry, energy systems, and urban infrastructure [1, 37]. At the same time, their widespread deployment, combined with their constrained resources, limited monitoring, and weak update practices, expands the attack surface of modern networks. Once compromised, an

Mauro Conti

University of Padua

Padua, IT

mauro.conti@unipd.it

IoT device may communicate with malicious endpoints, ports, or services unrelated to its intended function [6]. Restricting each device to the communications required for its legitimate operation can therefore reduce the impact of compromise.

The Manufacturer Usage Description (MUD) standard of the Internet Engineering Task Force (IETF) implements this principle by allowing manufacturers to describe the intended network behavior of a device through a machine-readable MUD profile [16]. A MUD controller can retrieve this profile and translate it into access-control policies, treating undeclared traffic as unauthorized[13, 16, 21]. Despite its potential, MUD adoption today remains limited, especially because producing and maintaining accurate profiles requires detailed knowledge of devices' communication behavior [13, 21, 34]. Within large manufacturers of IoT devices, this knowledge may be distributed across firmware, cloud-service, integration, and network teams, making manual profile construction time consuming, error-prone, and difficult to maintain across devices, configurations, and software versions [13, 34].

To date, the only automated solution to this problem is the use of traffic-based tools, such as MudGee [10], which reduce manual effort of MUD profile generating by translating observed communications into MUD rules. However, they require devices to be deployed and monitored for sufficiently long periods to obtain representative traces [9, 11, 20]. Even then, rare, configuration-dependent, update-related, or failure-triggered communications may remain unobserved and consequently absent from the generated policy [1, 6, 37]. Such omissions may later disrupt legitimate operation when the profile is enforced. Moreover, if the device is compromised during data collection, its MUD profile could inevitably encode malicious behavior. Furthermore, traffic traces may show that some communications occurred, but they provide limited evidence about the software component, configuration, or execution path that caused it. In this context, manufacturers could significantly benefit from an automated MUD generation approach that can recover the expected network behavior by connecting each communication pattern to inspectable evidence without requiring device deployment.

Contribution. In this paper, we present AutoMUD, a source-code-driven tool for automated and traceable MUD profile generation. AutoMUD builds on the observation that firmware and software artifacts contain direct evidence of implemented communication behavior, including networking APIs, protocol handlers, configuration structures, and connection-setup logic. Building on such rationale, AutoMUD processes a source code-base through lightweight static and syntactic code extraction, semantic retrieval, retrieval-grounded Large Language Model (LLM) reasoning, and deterministic validation and compilation. AutoMUD isolates network-relevant applications, discovers protocol and endpoint candidates, validates their values and uses, infers communication roles and transport semantics, and consolidates eligible behaviors into MUD rules. Each generated rule remains linked to the source evidence and intermediate decisions that produced it, while unresolved or non-representable findings are retained for review and not converted into permissions. Since AutoMUD analyzes implemented capabilities, it can generate a source-grounded MUD profile before device deployment and without requiring relevant communications to appear in traffic traces. This enables AutoMUD to recover even rare, configuration-dependent, and difficult-to-exercise communication paths that may remain unobserved even during prolonged monitoring. In addition, its source-to-rule traceability provides manufacturers with inspectable evidence for validating and maintaining the resulting policy. We evaluate AutoMUD on a Linux-based repository containing curl, wget, and OpenSSH services, which represent heterogeneous networking implementations, demonstrating the effectiveness of the tool and its potential for detecting and correcting propagated semantic errors. In summary, this paper makes the following contributions:

• Automated source-code-driven MUD generation. We design AutoMUD to recover implemented network behavior from static firmware and software artifacts and generate a MUD profile without requiring device deployment. This approach further exposes rare and configuration-dependent behavior that may be missed during time-limited observation campaigns.

• Traceable protocol-to-policy synthesis. We introduce a systematic procedure that maps source evidence into MUD-level protocol, endpoint, transport, role, and direction abstractions. Intermediate artifacts preserve the provenance of generated rules and the reasons associated with excluded candidates, supporting review of both policy inclusions and omissions.

• Source-grounded evaluation and semantic-accountability assessment. We evaluate AutoMUD on several controlled Linux-based codebases, and show that it reconstructs the expected profile while preventing non-endpoint values from becoming permissions. Through controlled semantic fault injection tests, we further demonstrate that its traceability artifacts can expose, localize, explain, and support the correction of an erroneous rule that structural validation alone does not detect.

Roadmap. The remainder of the paper is structured as follows. Sec. 2 introduces preliminary notions. Sec. 3 reviews the current literature. Sec. 4 presents the AutoMUD tool. Sec. 5 presents the experimental evaluation and results. Sec. 6 discusses our key findings. Finally, Sec. 7 concludes the paper.

References (47)