Manuscript Offprint
arXiv:2610.291555uGUE: Agentic Hardware-in-the-Loop Fuzzing for 5G Devices and beyond
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Guoqiang Hua*†, Sakshi Udeshi†, Matheus Eduardo Garbelini†, Daisuke Mashima* and Sudipta Chattopadhyay‡
*Singapore University of Technology and Design (SUTD)
†Temasek Laboratories, Nanyang Technological University
‡University of Missouri-Kansas City
Email: guoqiang_hua@mymail.sutd.edu.sg§, {sakshi.udeshi, matheus.garbelini}@ntu.edu.sg, daisuke_mashima@sutd.edu.sg, sudiptac@ieee.org
Abstract—In this paper, we present 5UGUE, a large language model (LLM)-driven hardware-in-the-loop agent, which enables the wireless fuzzing of 5G-enabled devices (such as mobile phones). 5UGUE combines multi-step reasoning with tool-assisted interaction and integrates into the fuzzing pipeline by leveraging specialized tools for internet search, 5G protocol analysis, memory management, and test-case execution. The agent iteratively generates test cases, executes them on targets, collects runtime feedback, and adaptively refines the fuzzing strategy. We evaluate 5UGUE on five commercial off-the-shelf (COTS) 5G devices across six LLMs. The best performing runs for 5UGUE trigger 167 crashes in total (141 novel and 31 unique) within 60 interaction turns (49 to 133 minutes total runtime). In contrast, the best runs for the state-of-the-art baseline (5GHOUL) discovers only 13 crashes in total (10 novel and 6 unique) within 150 minutes. Overall, by integrating LLM-driven agents, 5UGUE demonstrates significantly better crash discovery performance (12.8× total, 5.2× unique improvement). Notably, among the crashes discovered by 5UGUE, MediaTek has confirmed two new high-severity vulnerabilities, with one CVE assigned (CVE-2026-20525), while UNISOC confirmed seven crashes. Finally, to demonstrate that 5UGUE is agnostic to wireless protocols, we also extend it to Bluetooth Classic with only minimal code changes. In our evaluations, 5UGUE finds an average of 6.4 novel crashes and 1.6 unique crashes. In a nutshell, 5UGUE highlights that LLM agents are capable to operate effectively beyond software-in-the-loop settings, extending autonomous vulnerability discovery to the proprietary, hardware-bound systems that affect billions of end-user devices across multiple wireless protocols.
I. INTRODUCTION
The security of 5G-enabled devices is a problem of enormous scale. By the end of 2025, there were an estimated 2.9 billion 5G subscriptions, accounting for one-third of all mobile subscriptions, and this is projected to reach 6.4 billion by 2031, or two-thirds of all mobile subscriptions [1]. Each of these devices relies on proprietary technologies processing untrusted over-the-air signaling, so a single class of vulnerability can impact a vast, rapidly growing population of users. Yet the black-box, hardware-bound nature of these devices makes them difficult to analyze at scale, leaving this critical attack surface comparatively underexplored in the context of offensive security.
Test Case Execution — Feedback

Fig. 1. 5UGUE with respect to state-of-the-art approaches
Large Language Models (LLMs) have demonstrated strong capabilities in code generation, program analysis, and vulnerability discovery. While agentic systems enhance these capabilities through autonomous task execution, existing LLM-based agents are predominantly designed for software-in-the-loop settings [2], [3]. These software-in-the-loop agents often have source code access, coverage and feedback to steer the fuzzing. This is in contrast to real-world wireless systems (such as the 5G baseband devices), where analysis mostly needs to be performed in black-box settings on proprietary hardware. As a result, this rapidly growing attack surface remains out of reach for state-of-the-art fuzzing agents and applying LLM-based agents to wireless 5G security analysis remains an open, active and emerging space of work.
To address this gap, we propose 5UGUE , an autonomous hardware-in-the-loop agent that fuzzes commercial-off-the-shelf (COTS) 5G devices over the air (OTA). Though we have developed 5UGUE primarily for the 5G protocol, the agentic loop makes no protocol-specific assumptions. To showcase this, we extend 5UGUE to Bluetooth Classic (BT) by making minimal procedural code changes (see Section VII-C). We view the state of fuzzing through three paradigms (Figure 1):
§ Corresponding author.
Pronounced “fugue”; a play on 5G and User Equipment (UE), and a nod to the fugue state the 5UGUE agent induces in 5G devices
• Bespoke and conventional fuzzing is fully directed by the creators of the system. Usually, a custom engine [4], [5], [6], [7] mutates an initial seed corpus or manipulates communication on-the-fly with certain heuristics. Coverage and crash feedback are then looped back into the mutator. While such systems have shown promising outcomes in the form of discovering new vulnerabilities, they are pre-encoded by human experts.
• LLM-assisted fuzzing inserts an LLM as a component, not a strategist. The LLM is typically leveraged to strengthen a single constituent element of the fuzzing pipeline e.g., to generate seeds [8], mutate inputs as per a specification [9] or guide the existing fuzzing setup [10]. The model sharpens parts of the fuzzing workflow but it does not see, or steer the entire fuzzing loop.
- In contrast, 5UGUE casts the LLM as a strategist with visibility over the full fuzzing loop. The agent sources the initial seeds, plans tests, executes these tests on a COTS 5G or BT device over the air, observes the resulting logs and possibly crash signals, reasons over it, and determines what to try next, all while having the ability to adapt the strategy based on data through modular tools (See Figure 1: Agentic Fuzzing). The 5UGUE agent orchestrates the full fuzzing loop without any human intervention.
This work makes the following contributions:
• The first agentic, hardware-in-the-loop fuzzing framework for COTS 5G devices: We design and implement 5UGUE. To the best of our knowledge, this is the first agentic fuzzing framework that operates directly on COTS 5G devices. We create an extensible and modular architecture. All the capabilities (e.g., exploit execution, memory, web/literature search) are self contained tools that can be added and removed with minimal effort, making 5UGUE easy to extend and ablate.
• Evaluations: We evaluate 5UGUE along multiple axes. Specifically,
-
Tooling: We evaluate three progressively improved 5UGUE versions and show that adding specific tools enhances fuzzer performance in discovering modem crashes.
-
Models: We demonstrate 5UGUE is LLM-agnostic by using six state-of-the-art LLMs.
-
Generality: We fuzz five COTS 5G devices showcasing 5UGUE's generality and real world performance.
-
Protocol Extensibility: We extend and evaluate 5UGUE beyond 5G to Bluetooth Classic (BT) by making only minimal code changes (i.e. modifying the exploit tool and prompts).
5UGUE demonstrates significantly better crash discovery performance. Specifically the best 5UGUE runs discover 12.8× the total crashes over the best state-of-the-art baseline runs (see Section VII).
• Confirmed Vulnerabilities: We have evaluated phones across two modem vendors, and both vendors have confirmed our findings. As of today, MediaTek has confirmed two new high-severity vulnerabilities, with one CVE assigned (CVE-2026-20525). For the UNISOC target, for which no public information is available, the vendor confirmed the validity of seven crashes discovered by 5UGUE.
• Interactive Dashboard: We release an interactive dashboard cataloging every test run for our evaluations, to aid the transparency and reproducibility of our framework. This dashboard can be found at:
https://5ugue-evaluations.pages.dev
Threat Model: We assume that the attacker sets up a rogue gNB, i.e., she can simulate a 5G NR base station and connect to a victim UE over the air. The attacker is modeled as a Dolev-Yao adversary: it can eavesdrop, modify and inject network messages but it cannot decrypt encrypted messages without the key. Prior works [4], [5], [12] have shown that such an attack model is practical to launch pre-authentication attacks. Similar to several prior works [4], [5], we leverage a software defined radio (SDR) to simulate a rogue gNB.
Structure of a 5G NR test case: We leverage tools employed in prior works [4], [6] to act as a man-in-the-middle (MitM) and mutate the payload of selected packets. We use filters in Wireshark to select specific packets from a communication trace. Figure 2 captures the typical structure of a 5G NR test case. For example, in Figure 2, we select packets containing the RRCSetup element using the filter nr-rrc.rrcSetup_element. We then modify the payload using offset-value pairs. For instance, we mutate the byte (offset) in the payload to 0xFF (value). An example of C++ exploit code is provided in Appendix G.
LLM-based Agentic Systems: An agentic LLM system couples an LLM with the ability to take actions, and gather feedback from an external environment, in contrast to only emitting text in response to a prompt [13], [14]. An agentic framework

Fig. 2. Example Test Case
allows the model to be treated as a decision making controller in the Observe → Reason → Plan → Execute → Adapt loop (See Figure 1).
In modern LLM-driven agentic systems, this capability is realized through tool use, where the model invokes external functions such as search engines, code compilers, or domain-specific APIs and incorporates these results into the system's decision making [15], [16]. To improve over repeated attempts, agents additionally employ various techniques. These include self-reflection where the agents analyze failures and feed the results back into later decisions [17]. An agentic system can carry out multi-step tasks with limited human supervision, which makes it well suited to problems that require iterative exploration and adaptation. In this work, we explore the potential of such agentic systems for hardware-in-the-loop fuzzing of COTS 5G devices. For a broader overview, we refer interested readers to the following resources on agentic systems [13], [14], [16], [18], [19], [20].
III. RELATED WORK
Conventional Software Fuzzing: Vulnerabilities in software are critical and can be exploited by attackers en-masse to create harm. Vulnerabilities like WannaCry ransomware affected about 230,000 to 300,000 computers [21], causing an estimated massive financial impact of USD 4 Billion [22]. Comparable incidents, such as the Heartbleed flaw in OpenSSL, left an estimated 500,000 publicly trusted server exposed [23]. Fuzzing, which was introduced in the early 1990s [24], remains of the most widely deployed techniques to assess software reliability. As of June 2026, GitHub alone hosts about 11,000 repositories related to fuzzing [25]. For a detailed treatment of classic software fuzzing we refer the readers to the following surveys [26], [27], [28]. In the following, we provide a brief overview of the emerging field of LLM/Agentic Software Fuzzing and the state-of-the-art for over-the-air 5G fuzzing.
Agentic Software Fuzzing: One of the early efforts in LLM-powered security testing is PentestGPT [29], which adopts a feedback-driven, modular architecture. Next, ChatAFL [8] uses LLMs to extract protocol information, diversify seed messages, propose next message / sequences to explore new protocol states, thus achieving higher code coverage than AFLNet [30]. LLMIF [9] extends LLM-driven fuzzing to wireless targets (i.e., Zigbee) by feeding constraints context, examples, and execution feedback to the LLM so that produced tests remain compliant to the protocol while generating error-inducing inputs. mGPTFuzz [31] leverages LLMs to parse 1000+ pages of Matter protocol specification into machine-usable guidance and then performs stateful sequence generation. Finally, ELFuzz [32] automatically synthesizes generation-based fuzzers tailored to a system under test via LLM driven synthesis over a fuzzer space. We also refer interested readers to the these relevant surveys [33], [34].
In contrast to the aforementioned works, 5UGUE performs hardware-in-the-loop over-the-air (OTA) fuzzing of COTS 5G NR devices. Every test exercises real silicon 5G modems over a software-defined-radio test-bed. The 5UGUE agent acts as the principal strategist in a closed loop. 5UGUE plans each test, delivers the mutated message over a radio link to a physical handset, and re-plans using the vendor-reported crash oracle. To the best of our knowledge, 5UGUE is the first agentic, hardware-in-the-loop fuzzer to operate directly against commercial 5G baseband firmware.
5G NR Testing and Fuzzing: Several works adapted software fuzzing to the 5G wireless domain, all of which focus on different aspects of mobile protocols. Firstly, LTEFuzz [35] introduced negative testing towards 4G Base Station (eNB) via generation of invalid RRC and NAS uplink payloads, discovering many implementation bugs on commercial eNBs. Next, 5GHOUL [4] was the first work to enable directed fuzzing of layer 2 5G protocols such as MAC, RLC and PDCP. It serves as the basis for 5UGUE due to its comprehensive documentation and maintenance [36]. Other works such as LLFuzz expanded fuzzing to lower layers of 4G protocols by mutating less known signaling messages towards the UE. Lastly, CONSET [37] generates test cases by extracting specification-level constraints that violate semantics of ASN.1 fields through LLM-inferred DSL rules. However, such work is tailored to only mutate messages that contain ASN.1 fields, which are not present in lower layer 5G protocols (i.e., MAC, RLC, PDCP). In contrast, 5UGUE generates invalid messages across any 5G protocol layer regardless of the presence of ASN.1 fields and it also extends easily to other protocols (e.g., BT). Moreover, CONSET does not make its OTA exploits available, preventing a direct comparison with 5UGUE.
Compared to these works, 5UGUE provides a full end-to-end, agentic OTA fuzzing design that automatically produces and verify attack payloads crashing 5G COTS devices. 5UGUE also serves as a platform that can be applied to other wireless technologies by simply changing the testbed and agent tools.
Hardware Fuzzing: Our work is orthogonal to the line of work that aims to fuzz hardware designs written in certain hardware description language [38], [39]. In contrast to this line of work, 5UGUE focuses on an end-to-end OTA fuzzing with 5G COTS devices in the loop.
IV. METHODOLOGY
In this section, we elucidate the design and implementation of 5UGUE. The goal of 5UGUE is to investigate if we can design an LLM-based agentic system to enhance
Algorithm 1 5UGUE (V3) main loop. One iteration of the outer while is a turn.
Require: strategy memo S, version config C, capture path P, modem profile M
Ensure: per-turn updates to msgs, kb, and crash record Let 1: turn 0; firstCrash false; fails 0 2: while true do 3: turn turn + 1 4: if maxTurns > 0 and turn > maxTurns then 5: break 6: 7: prompt BUILDPROMPT(S, C, P, firstCrash, M) 8: SUMMARIZEIFNEEDED(msgs) 9: resp LLM.CHAT(prompt, msgs, toolSchemas) 10: msgs.APPEND(resp.assistant) 11: for all do 12: out DISPATCH(tc.name, tc.args) run tool 13: msgs.APPEND(TOOLRESULT(tc.id, out)) 14: if tc.name then 15: kb.LOGTEST(PARSE(out)) 16: consecutive tests with no crash/new state 17: UPDATEFAILURES(fails, out) 18: MAYBEMARKFIRSTCRASH(firstCrash, out) 19: if firstCrash just confirmed then 20: redirect to novel crashes 21: msgs.APPEND(POSTFIRSTCRASHDIRECTIVE) 22: if fails 5 then 23: reflect in the event of consecutive failures 24: msgs.APPEND(REFLECTIONPROMPT) 25: fails 0
over-the-air (OTA) fuzzing. We enable the 5UGUE to act as a strategist equipped with a set of tools such as web search, persistent memory, over-the-air delivery and exploit compilation leveraging an LLM. This enables the discovery of novel crashes in closed-source 5G New Radio (NR) modems. 5UGUE is a closed-loop, feedback driven fuzzer. It is not used just as a mutation generator; instead, 5UGUE acts as the principal strategist by selecting concrete test cases (packet filters, offsets and values) and re-planning after each test using structured feedback (i.e., crash identifier, mutation count, packet count, and state-machine diff). Additionally, unlike a traditional fuzzing framework where the seeding strategy is usually fixed, 5UGUE treats the strategy for seeding its initial fuzzing inputs as an alterable component.
In the subsequent sections, we delve into the details of 5UGUE design.
A. System Architecture
5UGUE's main loop is organized as follows:
- 5UGUE rebuilds a system prompt with the current strategy memo, version configuration, packet capture path, and a post-first-crash flag (Line 7 in Algorithm 1).
The post-first-crash flag indicates whether the fuzzer has found a crash or not.
-
Check conversation length and summarize if needed, as indicated in Line 8.
-
Invokes a single chat.completions.create call (using an OpenAI-compatible completions API) that carries the full tool schema list and the running message history, as demonstrated in Line 9.
-
Once the LLM API call is completed, for each tool call, dispatch to the appropriate tool handler as shown in Line 11 to Line 13.
-
In case there exists a request to execute one or multiple tests (run an exploit), 5UGUE commits the test results to a knowledge base. This may also trigger an update for the unique crash set, self reflection (on five consecutive failures) or update the previously mentioned post-first-crash flag. Specifically, a “failure” occurs when the test compiles, but neither triggers a crash nor observes a new state in the fuzzing. Once the post-first-crash flag is true, we inject a POST-FIRST-CRASH directive to instruct the agent to focus on novel cases, as a result of the crash pipeline being validated. This is shown in Line 14 to Line 25.
-
5UGUE continues this loop till the maximum defined turns (see Lines 2-5 in Algorithm 1).
Context management: The 5UGUE system estimates the token count by converting message chars to tokens at a 4:1 ratio [40]. When the estimate exceeds a pre-set, version dependent threshold (see Table II), the oldest message up to the last six messages are condensed into a summary. The summarizer module just does not truncate the messages, it walks the tool calls and tool results, parses for the 'test id', 'crash triggered' to emit 'Test Results' and 'Key Findings Recorded', respectively. The 5UGUE summarizer uses 'finding id' markers to emit a section named 'Agent Reasoning Highlights'.
Strategy memory: LLM agents today do not have a reliable memory layer [41]. As a result, 5UGUE does not rely only on conversation history. Instead, a plain-text markdown “strategy” memo is persisted across turns. This strategy memo is re-injected at the end of every system prompt. This lets the agent maintain a durable plan e.g., a sweep tracker of tested offset/value (see Listing 1) combinations that survives context compaction [42].
Reflection: After five consecutive failed tests (i.e., test compiles, does not trigger a crash and there are no new states observed), 5UGUE injects a “reflection required” message. This message directs the agent to inspect mutation count in its test history (to detect filters that never matched), and rewrite its strategy before running any further tests.
Mutation Taxonomy: To prevent the agent from collapsing onto a single class of mutation, 5UGUE requires every test to be tagged with a mutation category drawn from an eight-class taxonomy. The agent is instructed to track per-category coverage in its strategy memo and is capped at three consecutive tests in the same category. The taxonomy serves two roles: it forces structural diversification during exploration, and it gives the reflection mechanism a concrete axis along which to detect missing strategies. Please see Appendix C for details regarding the mutation taxonomy.
Seeding Strategies: Seeding is an essential component for any fuzzing input and the success of the fuzzing campaign is heavily influenced by the quality of the initial seeds [43], [44]. 5UGUE derives its own seeds through its tools and reasoning. The seeding strategy for 5UGUE is an alterable component expressed purely through natural language. In this work, the default seeding strategy is using external knowledge (web search, relevant prior work) to find a suitable initial seed corpus. Alternatively, we demonstrate that in the absence of these external knowledge sources, we instruct the 5UGUE agent to do a broad sweep within a candidate packet. We show that this alternative strategy lets 5UGUE function well even with limited access to external knowledge sources (See Section VII-D). It is interesting to note that both seeding strategies are just prompts fed to the same agent, so switching between the two strategies requires no code change.
Post First Crash Directive: On the first confirmed unique crash within a fuzzing session, 5UGUE appends a FIRST-CRASH-CONFIRMED directive. This directive redirects the agent to focus efforts on discovering new crash variants. Subsequent system prompts also select a post-first-crash variant, reinforcing the messaging to focus efforts on discovering new crash variants.
B. Tool Interface
The agent’s tool schemas are organised in nine modules. Functionally the tools can be grouped as follows

Fig. 3. Tools in 5UGUE
Packet inspection: The following tools are used to get relevant information from the packet captures:
-
list_packet_types: Enumerates unique packet types in a capture file, providing a compact summary of the corresponding filter, state, descriptive information, and occurrence count.
-
inspect_packets: Retrieves fully dissected packet fields for packets matching a specified filter or index range.
-
get_packet_hex: Retrieves the raw hexadecimal bytes of a packet specified by index.
-
get_field_info: Retrieves the byte offset, bitmask, and size of a specified protocol field.
Similar tools are used in conventional protocol fuzzing works to get packet-level information during fuzzing [4]. See marker ④ in Figure 3.
Exploit execution: While the exploits are systematically generated as test cases using the 5UGUE agent, we leverage the infrastructure provided by prior works [4], [6] to execute these exploits on smartphones. Concretely, the 5UGUE agent moves from a hypothesis to a concrete test against the UE. The tool submit_custom_exploit performs a static validation of an exploit. Specifically, the tool validates whether the required function signatures such as tx_post_dissection used to mutate packets payload exist for the underlying 5GHOUL setup to launch exploits. In cases where function signatures are missing or incorrect, this validation fails, and the exploit is therefore not executed. The execute_test tool helps the agent run one exploit file through the underlying setup aforementioned, and similarly with the execute_test_batch tool, the 5UGUE agent can run up to five tests, which are executed sequentially in a single tool call. The tool call returns a rich structured result: test id, compile success/error, execution time, crash details, newly observed states and transitions, capture and log paths, mutation delivery count, a sample of the mutation log, and an inline plain-text analysis that flags common failure modes. The execute_test_batch tool is only available for the V3 agent version and above. This module corresponds to marker ⑤ in Figure 3.
Crash and State Information: These tools aid the agent in device-side inspection after a test exploit is run. The analyze_crash_log tool parses the device monitor log in a test folder, extracts crash IDs (with timestamps) leveraging the standard crash-oracle pattern used in prior 5G fuzzing works [4]. Concretely, the tool reads the log monitor and returns the crash context ( 1 KB context slice around the crash-ID field). The tool read_device_log reads lines from a device log file, which is capped at 200 lines per call. This tool is needed to retrieve recent diagnostic messages from the device log, which can support the analysis of crashes and abnormal behavior. Finally, the view_state_machine tool builds the full state-transition graph from a pcapng capture leveraging state-transition utilities used in prior works [6], [4]. This returns all observed states and transitions so that the agent can reason about protocol-level coverage. See marker ⑥ and ⑧ in Figure 3.
Device inspection: These tools leverage Android Debug Bridge (ADB) to provide agent-side visibility into the UE. The adb_logcat tool retrieves the last N minutes of Android logs (default 5, capped at 2000 lines) with an optional case-insensitive regex filter. This gives the agent the ability to retrieve targeted insights that the deterministic oracle may have missed. The adb_dmesg tool reads the kernel ring buffer and is intended for kernel panics, and lower level hardware errors that do not appear in the logcat. The adb_dumpsys tool retrieves information from (telephony.registry, phone, carrier_config, netd, connectivity), giving the agent a structured view of the radio and telephony state. The adb_device_state tool returns a consolidated snapshot of the device: baseband version, SIM state, network type, operator, radio technology boot status, uptime, and a subset of telephony.registry. The agent can use it to confirm the modem is alive and attached after a test. The adb_modem_health tool is a lightweight liveness probe. See marker ⑦ in Figure 3.
Memory Tools: These tools provide the agent access to an explicit knowledge-base that persists beyond a single context window. This means that the observation and strategy can survive context summarisation and can even be persisted across runs. The save_finding tool records a free-form description with tags (e.g., crash, hypothesis) and a list of related test IDs. This allows the agent to record observations, crash patterns, hypotheses and failures. To aid in retrieval, the agent may use the query_findings tool to search the observations by tag or keyword. The system also allows the agent to investigate the past test history using the get_test_history tool, which includes descriptions, crash status, and any new states or transitions discovered. The 5UGUE agent also maintains a markdown strategy memo that is re-injected into the system prompt at every turn. This aids in maintaining continuity and is updated using the update_strategy tool. This module corresponds to marker ⑨ in Figure 3.
Web Search: These tools let the 5UGUE agent engage with prior work. The goal is to let the agent's exploration be guided by known vulnerabilities. The web_search tool queries a configurable search provider and returns (title, URL, snippet) triplets for the top results. The fetch_url tool then retrieves and extracts plain text from a chosen URL (CVE advisory, blog post, paper page). There are two domain-specific modifications for the security-research setting for the fetch_url tool: (i) GitHub blob URLs are auto-rewritten to raw.githubusercontent.com for reliable code extraction. (ii) GitHub repository roots are resolved through the Contents API into a readable directory listing. This is so that the agent can browse exploit repositories rather than reading HTML. This module corresponds to marker ② in Figure 3.
Local Paper Repository Search: Complementing the web search, the query_papers tool performs a case-insensitive keyword search over the title and abstract of a locally curated 5G related paper collection with optional category filter. The read_paper tool then returns the extracted full text of a chosen paper (subject to chunking). The list_paper_categories enumerates all the available categories such as Wireless Fuzzing and Testing and Overshadowing and Injection Attacks with paper counts. This gives the agent a map of the corpus before issuing targeted queries. See marker ① in Figure 3.
C. Agent Versioning
To isolate the contributions of each of the subsystems of 5UGUE, we expose three versions of 5UGUE. These are runtime configurations of 5UGUE that can be selected by a single flag. A version configuration is a set of boolean flags that gates:
-
content to be injected into the system prompt,
-
tools registered with the LLM powering 5UGUE,
Table II summarizes the capability of 5UGUE versions.
-
V1: The agent has access to the protocol-introspection, exploit-execution (single test only), crash and state inspection, device inspection, and the within-session memory tools. For external knowledge, it uses the local paper corpus and the generic web search. When the agent fetches URLs, they are returned as raw HTML.
-
V2: V2 extends V1 with the GitHub intelligence layer described in the tool interface (see Section IV-B). While fetching the URLs, the tool rewrites blob URLs to raw.githubusercontent.com and resolves repository roots through the GitHub Contents API into a readable directory listing. This helps 5UGUE to navigate exploit repositories correctly and read source files reliably.
-
V3: V3 extends V2 by registering the batch testing tool, allowing the 5UGUE agent to dispatch up to five exploits in a single tool call that are then executed sequentially. Because the batched execution tool results are larger, we raise the context summarization threshold from 50,000 to 200,000 tokens, preventing premature summarization that may discard batch results.
-
V3-filtered: V3-filtered is adapted from V3 by limiting the agent’s access to external knowledge. To this end, we disable paper tools and block the access to github.com, gitlab.com, gitlab.org, githubusercontent.com, and asset-group.github.io in web tools. V3-filtered also implements an alternative broad sweep-based seeding strategy to continue finding appropriate seeds in the absence of certain external knowledge sources.
D. Execution and Oracle
5UGUE leverages prior works [4], [6], which is an over-the-air (OTA) fuzzing framework for launching 5G exploits to target devices. The exploit development is facilitated through a structured C++ interface, which is lightweight and amenable to automatic generation (e.g., by LLMs). Such exploits operate primarily at the packet and byte levels, and leverage simple APIs to support flexible packet mutation. Within an exploit, 5UGUE specifies target packets using Wireshark-style filters and directly manipulate packet payloads as needed. Once the exploit is ready, it is compiled into a module, which applies the specified packet manipulation logic at runtime. While an
we specifically exclude the ASSET Research Group website, as 5GHOUL disclosure is hosted on this domain
TABLE I
MODULES AND THEIR ASSOCIATED TOOLS
| Module | Tools |
|---|---|
| packet_tools.py | list_packet_types, inspect_packets, get_packet_hex, get_field_info |
| protocol_tools.py | search_fields |
| state_tools.py | view_state_machine |
| crash_tools.py | analyze_crash_log, compare_crashes, read_device_log |
| adb_tools.py | adb_logcat, adb_dmesg, adb_dumpsys, adb_device_state, adb_modem_health |
| exploit_tools.py | submit_custom_exploit, execute_test, execute_test_batch, read_exploit_source, list_exploits |
| memory_tools.py | save_finding, query_findings, get_test_history, update_strategy, promote_finding, query_global_findings |
| paper_tools.py | query_papers, read_paper, list_paper_categories |
| web_tools.py | web_search, fetch_url |
TABLE II
5UGUE VERSION CONFIGURATIONS. EACH VERSION PROGRESSIVELY UNLOCKS CAPABILITIES, ISOLATING THE CONTRIBUTION OF GITHUB-AWARE RETRIEVAL (V2) AND BATCHED EXECUTION (V3). V3-FILTERED IS A RESTRICTED VARIANT OF V3.
| Capability | V1 | V2 | V3 | V3-filtered |
|---|---|---|---|---|
| Basic tools (e.g., packet inspection tools) | ✓ | ✓ | ✓ | ✓ |
| Local paper corpus | ✓ | ✓ | ✓ | |
| Web search | ✓ | ✓ | ✓ | filtered |
| GitHub-aware fetch | ✓ | ✓ | ||
| Batched test execution | ✓ | ✓ | ||
| Context summarization threshold | 50,000 | 50,000 | 200,000 | 200,000 |
exploit may or may not induce a crash, 5UGUE primarily relies on tools analyzing ADB logs from the target device to determine whether a crash has occurred given that the target is a smartphone. In the case of non-phone targets, 5UGUE instead determines crash by using tools examining device-specific logs (e.g., serial console outputs), if available. When such logs are absent or insufficient, potential crashes are inferred by monitoring the communication behavior of the target, such as detecting the non-responsiveness. In our evaluation, target devices include phones and BT devices, thus, crash detection is performed through the analysis of ADB logs and serial port output. In particular, modem crashes are typically accompanied by distinctive error indicators in the logs, such as Modem Resets! and modem_failure, whereas BT devices output error indicators like Guru Meditation Error from serial port. These indicators are not observed during normal, benign communication, making them reliable signals for crash detection. For a detailed treatment of the underlying framework, we refer readers to the following resources [4], [6], [36], [45].
The oracle, packet capture handling, and post-processing are deterministic and the 5UGUE agent interacts with this deterministic system through the exploit execution tools (see Section IV-B).
Unique Crashes: We define a crash as unique within a 5UGUE fuzzing session by its crash identifier string (crash ID). This string is extracted from the device log by the same crash-oracle pattern similar to prior work [46]. After every executed test, 5UGUE parses out the crash ID, and checks it against the set of crash IDs already recorded in the session's external knowledge base. It is important to note that this knowledge base is not accessible to the 5UGUE agent, it is just used to make a deterministic presence check. If the crash ID is absent, then the crash is recorded as a new unique crash, else the test is retained in the test history.
E. Crash Root Cause Analysis and Mitigation
The crashes discovered by 5UGUE were observed on COTS devices running proprietary firmware. Hence, in the absence of source code, we analyzed all diagnostic information available from the tested devices. For example, the ADB logs reported the following assertion failure: [AS-SERT] file:mcu/l1/nl1/internal/md97/src/tx/nr_tx_mngr_mcu.c line:817 p1:0x00000000. This information localizes the failure to a specific firmware component and source-code location, but does not reveal the failed condition or the underlying implementation flaw. Based on the triggering inputs and the available diagnostic evidence, the crashes may result from insufficient validation or improper handling of invalid or unexpected values in the firmware. However, due to the closed-source firmware, it is impossible to highlight if the failure is caused by an assertion violation, an invalid state transition, unsafe memory access, or another error condition. Consequently, we cannot prescribe or validate exact source-level mitigation measures for the affected firmware.
As security researchers, we have responsibly disclosed the crash-inducing inputs to the affected vendors and collaborated with them to investigate potential mitigation measures and firmware patches. In general, several discovered failures could be mitigated in the firmware by strengthening the validation of externally controlled values before processing them and by introducing graceful error-handling and recovery mechanisms for unexpected inputs.
V. CASE STUDY
A. Case Study: An Actual 5UGUE Run
In this case study, we demonstrate how 5UGUE operates, focusing on the structure and formulation of prompts across multiple interaction turns, as well as the tools invoked during execution. The study is conducted using 5UGUE V3 with a OnePlus Nord CE 2 5G target. Prior to the experiment, a set of tools is prepared, as summarized in Table I, along with several prompts. We note that such is a one-time effort. The experiment begins with the initial prompt (Prompt 1), which is sent to the configured LLM in Turn 1. A simplified version of this initial prompt is shown in Listing 1. In this prompt, we assign the role of 5G expert to LLM, describe the test environment, define the task objective and provide details of the available tools that LLM could understand and invoke. In response, the LLM produces Response 1 as shown in Listing 2, which includes an analysis of the fuzzing task and identifies a set of tool calls. The response demonstrates that LLM starts by conducting researches about known vulnerabilities before running any exploits. Specifically, the LLM wants to invoke two tool calls in Response 1: web_search and query_papers. In the next step, 5UGUE executes the tools as specified in Response 1, and their outputs are collected for use in the next turn. The LLM request, LLM response and tool execution form a complete turn. Subsequently in Turn 2, the request and response in Turn 1, together with the tool call results, are concatenated to form Prompt 2, as shown in Listing 3. Specifically, the tool calls are tracked by tool_call_id during the experiment. This enables LLMs to link a tool call and its result. The LLM generates a response and identifies the tools to be executed. The results are then collected, and the process repeats, forming an iterative interaction loop.
According to our observations, the 5UGUE agent primarily focused on survey and information gathering during the initial turns. In this case study, the agent devoted Turns 1–14 to research activities, systematically recording intermediate discoveries using the save_finding tool. These findings were stored in a knowledge base that the agent could subsequently query and reference through retrieval tools.
Beginning in Turn 15, the agent transitioned from survey to exploit generation and execution by leveraging the execute_test_batch tool (see Table I). Concretely, the agent generated and executed multiple exploit scripts, several of which successfully triggered crashes. After each exploit execution, the 5UGUE agent also invoked save_finding and update_strategy tools to document execution outcomes and iteratively refine its fuzzing strategy. This feedback loop enabled the agent to adapt its subsequent actions based on prior experimental results.
After discovering the first crash, the agent dynamically modified its operational objective to prioritize the discovery of novel crashes. Specifically, 5UGUE updated Workflow Point 3 in the prompt shown in Listing 1 to: NOVEL CRASH HUNTING: Your toolchain is proven. Your SOLE objective now is finding novel crashes. The updated prompt was then applied in all subsequent turns. Following this objective shift, 5UGUE continued researching, generating and executing exploits until the configured turn budget is reached.
B. Case Study: Building the 5UGUE Agent
GitHub Content Retrieval Optimization: We followed an iterative process when developing 5UGUE. After making
You are a 5G NR security researcher conducting over-the-air (OTA) fuzz testing against a OnePlus UE (User Equipment) running a MediaTek modem using the WDissector framework.
Your goal is to discover unique modem crashes by crafting and executing targeted protocol mutations.
Workflow
-
Inspect
-
Research (REQUIRED): a. Online exploit search (REQUIRED) b. Academic research c. For each paper or CVE, extract and record the details via 'save_finding'
-
Get a crash first (TOP PRIORITY)
-
Hypothesize: Based on protocol knowledge and research, identify fields likely to trigger modem bugs
-
Test: Write a C exploit and run it
-
Analyze: Read the 'analysis' field in the result
-
Record (MANDATORY): You MUST record what you tried, what happened and what you learned.
-
Update strategy: You need to maintain your fuzzing strategy
-
Iterate: Adjust strategy based on results. Explore related mutations near crashes
Available Tools
- web_search: Search for exploit write-ups, vulnerability reports, security advisories, and technical articles
Input: query: string, max_results: int
- query_papers: Search stored papers in the local 5G paper collection
Input: keyword: string, max_results: int
- ...
Listing 1. Prompt 1
I'll start by surveying the packet types, researching known vulnerabilities, and then designing targeted tests to discover crashes. Let me begin systematically.
I want to make the following tool calls:
- tool_call_id: 1, web_search({ "query": "MediaTek modem 5G NR RRC crash vulnerability CVE", "max_results": 10})
- tool_call_id: 2, query_papers({ "keyword": "fuzzing baseband modem", "max_results": 10})
Listing 2. Response 1
changes to 5UGUE, such as modifying tools and refining prompts, we evaluated whether 5UGUE was still functioning effectively. Specifically, we examined the LLM prompts and responses to identify any anomalies and assessed whether there were any changes in fuzzing performance. During the development of the fetch_url tool, we observed that it returned redundant HTML structures when processing GitHub repository URLs. We examined the tool outputs by inspecting execution logs, which revealed that they often contained substantial amounts of irrelevant content including HTML
{Prompt 1} {Response 1}
Tool call results
- tool_call_id: 1
- title: Vulnerability in Qualcomm and MediaTek 5G modems affects..., url: ...
- title: New attack impacts 5G phones with Qualcomm, MediaTek..., url: ... ...
- tool_call_id: 2
- paper: 5G Fuzzing, abstract: Effective fuzzing framework to find vulnerabilities...
- paper: Baseband Bugs, abstract: We propose a systematic way to locate the malicious... ...
Listing 3. Prompt 2
structural tags, CSS styles or JavaScript code. This redundancy increased token consumption and reduced the efficiency of LLM analysis. To address this, we enhanced the tool by integrating GitHub APIs to retrieve the repository tree structure in clean JSON format when the input corresponds to a GitHub repository URL. This optimization can be extended to other web URLs. However, we specifically optimized for GitHub URLs, as we observed a high frequency of calls to them.
Batching Exploit Execution: The initial 5UGUE system only provided the execute_test tool, which allowed 5UGUE to execute a single exploit per tool call. This design introduced overhead when evaluating multiple candidate exploits, as the LLM was required to generate separate tool calls for each execution attempt. Consequently, the cost and complexity of repeated tool invocation discouraged broader exploit exploration. To address this limitation, we developed the execute_test_batch tool, which enables 5UGUE to enqueue and execute multiple exploits sequentially within a single tool call. This batching mechanism reduces tool-calling overhead and encourages more comprehensive exploit evaluation. Section VII-A demonstrates the performance improvement achieved by employing this tool in the V3 configuration.
Research Quality: While developing 5UGUE, we observed that the agent autonomously performs a preliminary research phase before fuzzing. This raises the question of how to assess the quality of this research. In practice, low-quality research may return irrelevant information (e.g., unrelated papers or websites), which can reduce fuzzing effectiveness and require improvements to the research process or tools.
To evaluate the usefulness of the agent's research, we introduce the metric research quality, which measures how well the retrieved information supports effective fuzzing. The textual research output is automatically evaluated using predefined rules. We define a research quality scoring scheme ranging from 0 (lowest) to 5 (highest), as shown in Table III. These scores capture increasing relevance and precision of vulnerability-related knowledge. Evaluation is performed in a top-down manner: the system first checks whether the criteria for score 5 are met and otherwise proceeds to lower scores. Lower scores reflect coarse understanding (e.g., referencing projects or CVEs), while higher scores capture finer-grained technical details e.g., protocol structures and byte-level information. At score 5, the research enables a crash during fuzzing, indicating that the retrieved knowledge is both accurate and actionable.
The scores are not strictly cumulative; instead, the metric primarily serves as a diagnostic tool to assess whether the agent conducts meaningful and actionable research. Currently, research quality is evaluated only on the mediatek (MediaTek Dimensity 900) target, where public vulnerability and crash-related resources enable objective assessment (e.g., mapping to known CVEs). For other targets, the lack of ground truth makes these criteria difficult to apply.
In particular, achieving score 5 requires that a crash is triggered during the fuzzing session, and that the agent has already demonstrated score 4-level knowledge, ensuring that the success is grounded in sufficiently detailed and actionable understanding rather than incidental discovery.
VI. EVALUATION SETUP
Hardware Setup: We evaluate 5UGUE on two protocols: Bluetooth Classic (BT) and 5G. The tested 5G devices include five phones from three manufacturers, equipped with modems from two major 5G chipset vendors: MediaTek and UNISOC. According to Counterpoint Research [47], MediaTek and UNISOC accounted for 32% and 14%, respectively, of global smartphone AP/SoC shipments in Q1 2026. For Bluetooth experiments, we used ESP32-Ethernet-Kit as the host board to establish connection with target ESP-WROOM-32. Instructions for setting up the host and target boards are provided in prior work [45]. The 5G devices were selected to represent the different modem implementations as well as the differences between smartphone brands. Table IV summarizes the devices evaluated (hereafter referred to as targets). The Firmware column reports the firmware version associated with each target. For 5G targets, this information is obtained using the command adb shell getprop gsm.version.baseband, whereas for BT targets, it refers to the ESP-IDF commit of the flashed firmware. For clarity, we use the Device ID defined in Table IV to consistently refer to each target throughout the text and the evaluation.
Each 5G testbed consists of a host PC and a software-defined radio (SDR). The two testbeds are situated in different rooms within the office to avoid potential interference. The
TABLE III RESEARCH QUALITY SCORES
| Score | The agent... |
|---|---|
| 0 | Provides no relevant vulnerability-related information |
| 1 | Mentions a related project or known vulnerability (e.g. “CVE-2023-32842”) |
| 2 | Correctly identifies the relevant message type (e.g., “RRC Setup”) |
| 3 | Identifies the relevant substructure within the message (e.g., “searchSpace”) |
| 4 | Provides precise byte-level details (e.g., offset and value) |
| 5 | Triggers a crash for the specific input instance using the retrieved information, with score 4-level knowledge demonstrated |
TABLE IV TEST DEVICE SPECIFICATIONS
| Protocol | Device Model | Modem | Firmware | Android Security Patch | Device ID |
|---|---|---|---|---|---|
| 5G | OnePlus Nord CE 2 5G | MediaTek Dimensity 900 | IV2201_11_F.48 | 2023-05-05 | mediatek |
| 5G | REDMI 15C 5G | MediaTek Dimensity 6300 | AP3A.240905.015.A2 | 2025-08-01 | mediatek_d6300 |
| 5G | OnePlus Nord 3 | MediaTek Dimensity 9000 | CPH2493_16.0.3.500(EX01) | 2026-02-01 | mediatek_d9000 |
| 5G | OnePlus Ace 5 Ultra | MediaTek Dimensity 9400 | PLC110_15.0.2.610(CN01) | 2025-09-01 | mediatek_d9400 |
| 5G | Hisense F50+ | UNISOC UD710 | PPR1.180610.011 release-keys | 2020-12-05 | unisoc_ud710 |
| BT | ESP-WROOM-32 | N.A. | ESP-IDF commit 3de8b79 | N.A. | esp32 |
PC runs both the 5GHOUL stack and 5UGUE, while the SDR facilitates 5G NR communication with the targets. One testbed is powered by an AMD Ryzen AI Max+ 395 processor with 128 GB of RAM, whereas the other uses an AMD Ryzen 7 5800H processor with 12 GB of RAM. Both systems run Ubuntu 22.04.5 LTS and are equipped with USRP B210 SDRs.
Software Setup: 5UGUE is implemented in Python (Approximately 16,070 LoC covering agent logic, tool implementations, and tests). We used Claude Code [48] to assist with code generation and an existing 5G fuzzing framework [36] to launch exploit test cases.
Choice of LLMs: We evaluated 5UGUE on six LLMs, balancing evaluation coverage against cost of experiments. We were guided by existing LLM leaderboards [49]. The criteria for selection were: capability (inclusion of flagship SOTA models), diversity (models from multiple LLM providers), and open-source practicality (to compare open source models to proprietary ones). The resulting set of models (See Table V) contains four widely adopted commercial models and two state-of-the-art open-source models. All of the models were released in 2026. In our evaluations, we adopt the OpenAI API format for API invocation using OpenRouter [50] and Microsoft Foundry [51].
TABLE V SUMMARY OF EVALUATED LLMs, WITH COST IN USD PER MILLION TOKENS.
| Model | Provider | Release | License | Cost (Input / Output) |
|---|---|---|---|---|
| Claude Sonnet 4.6 | Anthropic | Feb 2026 | Proprietary | 15 |
| GPT-5.5 | OpenAI | Apr 2026 | 30 | |
| Gemini 3.1 Pro | Feb 2026 | 12 * | ||
| Qwen3.7 Plus | Alibaba | Jun 2026 | 1.6 | |
| DeepSeek V4 Pro | DeepSeek | Apr 2026 | Open-source | 0.87 |
| Kimi K2.6 | MoonshotAI | Apr 2026 | 3.5 |
- Gemini 3.1 Pro charges 18 (Output) per million tokens for prompts exceeding 200K tokens.
Repeated Runs and Analysis: To account for variability introduced by stochastic LLM outputs and fuzzing processes, we repeat each experiment five times under identical configurations and analyze the aggregated results across all runs.

Fig. 4. 5UGUE performance in discovering crashes under different configurations. All reported values are averaged over five runs: the bars show the number of crashes discovered, the italic numbers indicate the total number of crashes, and the dashed line represents the research quality score.
VII. EVALUATION RESULTS
A. How effectively does 5UGUE discover crashes?
To evaluate the effectiveness of 5UGUE, we ran different configurations of system prompts and registered tools, as described in Section IV-C, using Claude Sonnet 4.6 on the mediatek (MediaTek Dimensity 900) target (see Table IV).
Figure 4 presents the discovered crash statistics and research quality scores. We categorize crashes that can be found in public resources, such as websites or CVE disclosures, with available exploit scripts, as known crashes, while those that do not appear in any publicly accessible sources are categorized as novel crashes.
Crashes are usually associated with some form of identifier [46], allowing us to count the number of unique crashes. For example, the disclosure page for related work [4], [36] lists many crash identifiers for mediatek. Moreover, we have provided a list of known crash strings for mediatek (See Table IX in Appendix D).
The results show that introducing additional tools in V2 and V3, such as the GitHub fetch tool and the batch testing tool as mentioned in Section V-B, effectively improved both crash discovery performance and research quality. Specifically, the average total number of crashes across five runs increased from 7.2 in V1 to 12.8 and 32.2 in V2 and V3, respectively. Although the number of novel crashes in V2 slightly
such as “[ASSERT] file:mcu/l1/mml1/mml1_endc/src/mml1_endc_db_hdlr.c line:524 p1:0x91920c70” decreased by 0.4 compared with V1, the number of known crashes increased substantially to 10.4, representing a improvement. This improvement is likely attributable to the GitHub fetch tool, which enables enhanced retrieval of public exploit scripts. The batch testing tool introduced in V3, along with its enlarged context window (see Section IV-C), led to a significant advancement in discovered crashes, with increases of 10 novel crashes and 15 known crashes compared to V1. Moreover, the average number of unique crashes across five runs increased from 3.6 in V1 to 7.0 and 10.0 in V2 and V3, respectively. Finally, the average research quality score (see Section V-B), computed across five runs, increased from 3.14 for V1 to 4.20 for V2, before lowering slightly to 4.14 for V3.
Key Finding: 5UGUE is effective in discovering crashes. Compared to V1, V3 achieves a improvement in the average number of total crashes, a improvement in the average number of unique crashes, and a 31.8% increase in the average research quality score.
This demonstrates that GitHub fetch and batch testing tools substantially enhance both crash discovery performance and research quality.
B. How effectively does 5UGUE discover crashes across different modems?
To assess the generality and performance of 5UGUE across different devices, we ran 5UGUE V3 against the five targets (see Table IV), with each experiment repeated five times.
Figure 5 shows the discovered crash statistics. The results show that, across the five targets, 5UGUE discovers at least 11 crashes on average, including at least 2 unique crashes. Specifically, 5UGUE discovers the highest number of crashes on the mediatek (MediaTek Dimensity 900) target, with averages of 32.2 total crashes and 10 unique crashes. This is expected, as substantially more online information is available for this target, allowing 5UGUE to learn from existing exploit-related knowledge. Among the remaining four targets, for which publicly available information is limited, 5UGUE is still able to effectively identify more than 10 crashes per target. Specifically, 5UGUE discovers the fewest crashes on

Fig. 5. Performance of 5UGUE V3 and 5GHOUL in discovering crashes across five targets. For each target, results are averaged over five runs. Total indicates the mean number of crashes per run, while Unique denotes the mean number of unique crashes as defined in Section IV-D.
unisoc_ud710, which may be attributed to the particularly scarce publicly available information about UNISOC chipsets.
Figure 14 presents the actual runtime of 5UGUE. The average runtime for each target remains below 105 minutes within 60 turns under the V3 configuration. We observe that the runtime varies across the five runs for each target, likely due to the agent dynamically selecting different fuzzing paths during execution.
Key Finding: 5UGUE generalizes effectively across different modem targets, discovering crashes on all five evaluated targets. Averaged over five runs, 5UGUE discovers 21 total crashes and 4.48 unique crashes per target. Across targets with varying levels of publicly available information, 5UGUE identifies more than 11 crashes on every target, with total crashes ranging from 11.6 on unisoc_ud710 to 32.2 on mediatek.
C. Does 5UGUE extend to other protocols?
5UGUE's agentic loop makes no wireless protocol specific assumptions. To demonstrate this, we adapted 5UGUE to Bluetooth Classic (BT) and conducted experiments (using the 5UGUE V3 configuration) on the BT target esp32, making only minimal changes to 5UGUE. Specifically, we modified the existing exploit tools to support launching exploits against BT targets using prior work [45]. We also created a new prompt for the BT target by adapting the existing 5G prompts. Appendix I highlights the key changes made when adapting the 5G prompts for BT fuzzing. These changes were basic and procedural, including references to the BT experimental environment and API documentation for BT exploit generation.
The target BT device, esp32 exposes a crash identifier through its serial port, which can be used to distinguish unique crashes. However, there are no publicly accessible sources documenting BT exploits and crash identifiers for esp32. Therefore, we categorize all crashes discovered by 5UGUE on esp32 as novel crashes.
We repeat the experiment five times using Claude Sonnet 4.6. On average, 5UGUE discovered 6.4 novel crashes, 8 total crashes, and 1.6 unique crashes across the five runs. The number of novel crashes differs from the total number of crashes because some crashes discovered by 5UGUE were unclassified, meaning that they did not have a crash identifier (see Appendix B for details). We observe that three out of eight unique BT crashes could not be reproduced, an issue also reported in prior work [46]. We consider addressing these BT specific limitations beyond the scope of this work.
Overall, our results show that 5UGUE extends to other protocols with minimal changes and still triggers crashes without protocol-specific optimization.
Key Finding: With minimal procedural changes and no protocol-specific optimization, 5UGUE was successfully extended to BT and discovered an average of 6.4 novel crashes and 1.6 unique crashes on esp32 across five runs.
D. How does 5UGUE perform with restricted access to external knowledge?

Fig. 6. Performance of 5UGUE V3-filtered in discovering crashes in mediatek and unisoc_ud710 targets. All values are averaged over five runs. The bars represent the number of crashes discovered, and the italic numbers indicate the total number of crashes.
- The sum of known and novel crashes is not equal to the number of total crashes because of an unclassified crash (a crash without crash identifier) for mediatek. See Appendix B for details.
In the standard versions (V1, V2 and V3) of 5UGUE, seeding is not performed by supplying a fixed corpus of packets or offsets (see Figure 2). Instead, 5UGUE dynamically derives the initial seed inputs (candidate packets, payloads, and mutation targets) by combining externally obtained information with the agentic feedback loop. To test the flexibility of 5UGUE, we conducted experiments using V3-filtered, introduced in Section IV-C, on two modem targets from different vendors. The results are shown in Figure 6.
With a seeding strategy identical to V3, V3-filtered could barely discover any crashes i.e., only one of the five runs triggered a crash. By analyzing the fuzzing strategy in that successful run, we found that key move was to initially test multiple mutation offsets within the same test case, rather than testing individual offsets across different test cases.
This motivated an offset-first payload-sweeping strategy and the re-sweeping of packets that had previously exposed crashes. We instructed 5UGUE to generate more test cases in each batch to increase its exploration throughput. Additionally, we introduced structured crash-map state tracking which records the mutation offsets explored and the corresponding exploit outcomes allowing 5UGUE to retain the results of previous attempts and avoid redundant exploration.
Specifically, across five runs, 5UGUE V3-filtered discovers an average of 17.4 total crashes (12 novel, 2.8 unique) on mediatek, and an average of 22.2 total crashes (all novel, 3.4 unique) on unisoc_ud710. Two of the five runs on mediatek did not discover any crashes. Due to the stochasticity in the fuzzing process, such a variation is unsurprising.
Overall, these results show that altering the seeding strategy does not hinder 5UGUE's fuzzing capability. External knowledge facilitates seeding by providing useful hints about promising packets, payloads, and mutation targets. When such knowledge is limited, 5UGUE can still bootstrap the initial seeding process. V3 and V3-filtered differ primarily in their seeding strategies: non-filtered versions of 5UGUE derive seeds and mutation targets mainly from external knowledge, whereas V3-filtered uses the refined prompt to bootstrap exploration without target-specific packets or offsets. More broadly, the results demonstrate that 5UGUE's seeding strategy can be readily adapted through natural-language instructions.
Key Finding: Despite having limited access to external knowledge sources, 5UGUE V3-filtered discovers an average of 17.4 and 22.2 total crashes, including 2.8 and 3.4 unique crashes, on mediatek and unisoc_ud710, respectively.
E. How does the choice of LLM affect the performance of 5UGUE?

Fig. 7. 5UGUE's crash discovery performance with different LLMs. All values are averaged over five runs. The bars represent the number of crashes discovered, the italic numbers indicate the total number of crashes, and the dashed line represents the research quality score.
- The sum of known and novel crashes is not equal to the number of total crashes because of an unclassified crash (a crash without crash identifier) for Kimi K2.6. See Appendix B for details.
To evaluate the impact of different LLMs on the performance of 5UGUE, we conducted tests using six different models with the V3 configuration on the mediatek (MediaTek Dimensity 900) target (see Table IV). Figure 7 shows the metrics for discovered crashes and research quality.
The results show that Kimi K2.6 achieves the best overall crash discovery performance among the six models, discovering on average 13.4 known crashes, 22.2 novel crashes, and 8.6 unique crashes across five runs. Claude Sonnet 4.6 ranks second overall, discovering on average 19.4 known crashes,
See Appendix H for the refined V3-filtered prompt.
12.8 novel crashes, and the highest number of unique crashes, 10.0, across five runs. In contrast, Gemini 3.1 Pro performs the worst, discovering on average only 3.8 known crashes, 2.0 novel crashes, and 3.6 unique crashes across five runs.
We have also computed the Pearson correlation between research quality score and the total number of crashes. For each model, the total number of crashes was extracted from Figure 7 and paired with the corresponding research quality score. The resulting correlation coefficient was , suggesting a moderate positive correlation [52].
Specifically, Gemini 3.1 Pro and Qwen3.7 Plus achieve relatively low research quality scores of 2.74 and 2.52, respectively, and their crash discovery performance ranks among the lowest across the six models. In contrast, Kimi K2.6 achieves the highest research quality score of 4.69, which is consistent with its strong crash discovery performance. Although DeepSeek V4 Pro obtains the second-highest research quality score of 4.23, its crash discovery performance ranks second lowest among the six models.
Key Finding: The choice of LLM substantially affects the performance of 5UGUE: Kimi K2.6 discovers the most crashes, with an average of 35.8 total crashes, which is as that of Gemini 3.1 Pro, the worst-performing model with only 5.8 total crashes. Kimi K2.6 also outperforms the second-best model, Claude Sonnet 4.6, by 11.2% in total crash discovery.
F. How does 5UGUE compare to the state-of-the-art 5G NR fuzzing?
In this evaluation, we compare 5UGUE V3 with the conventional, non-agentic fuzzing approach employed by the baseline 5GHOUL [4]. We followed the default experimental setup described in 5GHOUL and ran it against all five targets. Specifically, we conducted the fuzzing campaign with packet mutation and optimization enabled through the EnableMutation and EnableOptimization parameters in the fuzzer. We also limited each baseline fuzzing session to 150 minutes. In contrast, we observed that agentic fuzzing with 5UGUE typically takes less than 150 minutes. Similarly, we repeated each baseline fuzzing session on each target five times and report the averaged results.
Figure 5 shows the average number of crashes discovered during the fuzzing campaign across five runs for both 5GHOUL and 5UGUE. The results clearly show that 5UGUE discovers substantially more total crashes and unique crashes than 5GHOUL across all five targets. Specifically, on the mediatek target, 5UGUE discovers 32.2 crashes, including 10 unique crashes, whereas 5GHOUL discovers only 1.4 crashes and 0.6 unique crashes on average.
5UGUE discovers the first crash substantially faster and with fewer iterations than 5GHOUL across all five targets. In summary, 5UGUE finds at least one crash in every fuzzing session, whereas 5GHOUL fails to find crashes in some runs and on two targets (mediatek_d6300 and mediatek_9400) across all five runs. For example, on mediatek, the mean Time to First Crash (TTFC) is reduced from 88 minutes to 4.5 minutes, and the mean Iteration to First Crash (ITFC) from 1381 to 3. In addition, 5UGUE requires less execution time than the fixed 150-minute fuzzing duration of 5GHOUL across all evaluated targets. Details are included in Figures 13-14 in Appendix J.
Key Finding: Averaged over five runs across five 5G targets, 5UGUE discovers 21 crashes per target versus 1.2 for the prior non-agentic approach 5GHOUL (17.5× as many). 5UGUE finds crashes on every target, whereas 5GHOUL fails to find any crash on two targets.
VIII. Threats to Validity
Evaluated protocols: We focus our evaluation on 5G NR because it is a key constituent element of critical infrastructure with massive scale: by the end of 2025, there were an estimated 2.9 Billion 5G subscriptions, projected to reach 6.4 Billion by 2031 [1]. Because 5UGUE makes no 5G-specific assumptions, it easily extends to other protocols, as we show with Bluetooth Classic (BT). We defer detailed multi-protocol evaluations for future work.
Exploit generation and LLM capability: 5UGUE relies on LLMs for information gathering, packet analysis, and iterative reasoning before generating exploits. Thus, its effectiveness is influenced by the current capabilities of LLMs. Compared to conventional non-agent fuzzing approaches that generate test cases directly, 5UGUE agentic workflow introduces additional latency and might introduce logical errors in the code. However, we argue that this is a common trade-off for any LLM-based exploit generation. We expect future advances in LLMs will further improve 5UGUE's performance.
Cost and accessibility: 5UGUE relies on LLM interaction, which may introduce deployment constraints in environments with strict privacy, connectivity, or resource requirements. While locally deployed open-source models provide an alternative, they may require substantial computational resources. As discussed in Appendix F, running 5UGUE can also incur higher cost than conventional fuzzing, which may affect adoption in resource-constrained settings.
IX. CONCLUSION
We presented 5UGUE, a pioneering agentic, hardware-in-the-loop fuzzing framework that operates directly on COTS 5G and Bluetooth Classic (BT) devices. 5UGUE's agentic framework leverages the LLMs as a strategist which has full control of the fuzzing loop. Across progressively equipped versions 5UGUE improves crash discovery by from V1 to V3. 5UGUE generalizes across five COTS 5G devices resulting in 21 total crashes per device on average. In comparison to the state-of-the-art baseline, 5UGUE discovers as many crashes. We also show that 5UGUE is agnostic to wireless protocols by adapting it to BT.
5UGUE comprehensively shows that LLM agents can autonomously conduct fuzzing in a hardware-in-the-loop setting, reaching the billions of proprietary, black-box 5G devices that continuously process untrusted, over-the-air wireless signals. To promote open science and reproducible research, we release the source code for 5UGUE:
https://github.com/asset-group/5uGUE-release
Generative AI usage: We leverage generative AI for editorial and coding assistance. Generative AI is also integral to the proposed methodology. Nonetheless, we did not use LLM-generated text and LLM suggestions by the assistance were manually reviewed by us before integration. The details of our Generative AI usage is in Appendix A.
ETHICS CONSIDERATIONS
All experiments in this study were carried out in a controlled, isolated environment to avoid any impact on production systems or real users. During our experiments, we identified multiple device crashes. We handle these findings responsibly and do not publicly disclose details of previously unknown crashes. As of the time of submission, all newly discovered crashes from MediaTek and UNISOC have been disclosed to the vendors.
The tool developed in this work is intended to facilitate systematic crash discovery and improve the robustness and security of target platforms. However, as a dual-use technology, it could potentially be misused by attackers to discover vulnerabilities that may impact users if not responsibly disclosed. The likelihood of such misuse is moderated by the technical expertise required to effectively operate the tool and interpret its outputs. To mitigate these risks, we follow responsible disclosure practices and refrain from releasing exploit code or sensitive technical details that could enable weaponization of discovered crashes. In developing this tool, our goal is to advance security research by enabling systematic crash discovery. We weighed its benefits such as improving software reliability and accelerating crash discovery against the risks of misuse. We support open research through code release while mitigating risk via responsible disclosure and by withholding exploit details. We conclude that the benefits outweigh the risks when paired with responsible use.
Finally, this work does not involve human subjects or the collection of personal data, and therefore does not raise concerns related to human subjects research.
REFERENCES
[1] Ericsson, “Mobile subscriptions outlook,” 2026, accessed: 2026-06-04. [Online]. Available: https://www.ericsson.com/en/reports-and-papers/mobility-report/dataforecasts/mobile-subscriptions-outlook
[2] V. Mayoral-Vilches, L. J. Navarrete-Lozano, M. Sanz-Gómez, L. S. Espejo, M. Crespo-Álvarez, F. Oca-Gonzalez, F. Balassone, A. Glera-Picón, U. Ayucar-Carbajo, J. A. Ruiz-Alcalde et al., “Cai: An open, bug bounty-ready cybersecurity ai,” arXiv preprint arXiv:2504.06017, 2025.
[3] D. Simsek, A. Eghbali, and M. Pradel, “Pocgen: Generating proof-of-concept exploits for vulnerabilities in npm packages,” arXiv preprint arXiv:2506.04962, 2025.
[4] M. E. Garbelini, Z. Shang, S. Luo, S. Chattopadhyay, S. Sun, and E. Kurniawan, “5Ghoul: Unleashing chaos on 5G edge devices via stateful multi-layer fuzzing,” IEEE Transactions on Dependable and Secure Computing, vol. 22, no. 6, pp. 6230–6247, 2025.
[5] T. D. Hoang, T. Oh, C. Park, I. Yun, and Y. Kim, “LLFuzz: An Over-the-Air dynamic testing framework for cellular baseband lower layers,” in 34th USENIX Security Symposium (USENIX Security 25). Seattle, WA: USENIX Association, Aug. 2025, pp. 5267–5286. [Online]. Available: https://www.usenix.org/conference/usenixsecurity25/presentation/hoang
[6] Z. Shang, M. E. Garbelini, and S. Chattopadhyay, “U-fuzz: Stateful fuzzing of iot protocols on COTS devices,” in IEEE Conference on Software Testing, Verification and Validation, ICST 2024, Toronto, ON, Canada, May 27-31, 2024. IEEE, 2024, pp. 209–220.
[7] K. Tu, A. Al Ishtiaq, S. M. M. Rashid, Y. Dong, W. Wang, T. Wu, and S. R. Hussain, “Logic gone astray: A security analysis framework for the control plane protocols of 5g basebands,” in 33rd USENIX Security Symposium (USENIX Security 24), 2024, pp. 3063–3080.
[8] R. Meng, M. Mirchev, M. Böhme, and A. Roychoudhury, “Large language model guided protocol fuzzing,” in NDSS, 2024.
[9] J. Wang, L. Yu, and X. Luo, “Llmif: Augmented large language model for fuzzing iot devices,” in 2024 IEEE symposium on security and privacy (SP). IEEE, 2024, pp. 881–896.
[10] W. Bin, A. Yang, K. Li, A. Liu, H. Li, G. Luo, W. Huang, and Y. Zhuang, "Attention distance: A novel metric for directed fuzzing with large language models," in International Conference on Software Engineering (ICSE), 2026.
[11] “5G; NR; NR and NG-RAN Overall Description; Stage-2,” European Telecommunications Standards Institute (ETSI), Technical Specification ETSI TS 138 300 V16.4.0, Jan. 2021, 3GPP TS 38.300 version 16.4.0 Release 16.
[12] S. R. Hussain, M. Echeverria, I. Karim, O. Chowdhury, and E. Bertino, “5GReasoner: A property-directed security and privacy analysis framework for 5g cellular network protocol,” in Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, ser. CCS '19. New York, NY, USA: Association for Computing Machinery, 2019, p. 669–684. [Online]. Available: https://doi.org/10.1145/3319535.3354263
[13] Z. Xi, W. Chen, X. Guo, W. He, Y. Ding, B. Hong, M. Zhang, J. Wang, S. Jin, E. Zhou et al., “The rise and potential of large language model based agents: A survey,” Science China Information Sciences, vol. 68, no. 2, p. 121101, 2025.
[14] L. Wang, C. Ma, X. Feng, Z. Zhang, H. Yang, J. Zhang, Z. Chen, J. Tang, X. Chen, Y. Lin et al., “A survey on large language model based autonomous agents,” Frontiers of Computer Science, vol. 18, no. 6, p. 186345, 2024.
[15] S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y. Cao, "React: Synergizing reasoning and acting in language models," arXiv preprint arXiv:2210.03629, 2022.
[16] Anthropic, “Building Effective AI Agents,” https://www.anthropic.com/engineering/building-effective-agents, 2024.
[17] N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao, “Reflexion: Language agents with verbal reinforcement learning,” Advances in neural information processing systems, vol. 36, pp. 8634–8652, 2023.
[18] Anthropic, “Effective context engineering for ai agents,” 2025. [Online]. Available: https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
[19] OpenAI, “Harness engineering: leveraging Codex in an agent-first world,” [Accessed 09-06-2026]. [Online]. Available: https://openai.com/index/harness-engineering/
[20] Y. Wang, W. Zhong, Y. Huang, E. Shi, M. Yang, J. Chen, H. Li, Y. Ma, Q. Wang, and Z. Zheng, “Agents in software engineering: Survey, landscape, and vision,” Automated Software Engineering, vol. 32, no. 2, p. 70, 2025.
[21] M. F. Prevezianou, “Wannacry as a creeping crisis,” in Understanding the creeping crisis. Springer, 2021, pp. 37–50.
[22] Kaspersky, “What is wannacry ransomware?” [Online]. Available: https://www.kaspersky.com/resource-center/threats/ransomware-wannacry
[23] L. Rainie and M. Duggan, “Heartbleed’s Impact,” https://www.pewresearch.org/internet/2014/04/30/heartbleeds-impact/, [Accessed 07-06-2026].
[24] B. P. Miller, L. Fredriksen, and B. So, “An empirical study of the reliability of unix utilities,” Communications of the ACM, vol. 33, no. 12, pp. 32–44, 1990.
[25] GitHub, “Github fuzzing repos,” 2026. [Online]. Available: https://github.com/search?q=fuzzing&type=Repositories
[26] V. J. Manès, H. Han, C. Han, S. K. Cha, M. Egele, E. J. Schwartz, and M. Woo, “The art, science, and engineering of fuzzing: A survey,” IEEE Transactions on Software Engineering, vol. 47, no. 11, pp. 2312–2331, 2019.
[27] A. Barkworth, L. Mcdonald, and M. Ijaz Ul Haq, “Survey of software fuzzing techniques,” Dec 2021.
[28] S. Mallissery and Y.-S. Wu, “Demystify the fuzzing methods: A comprehensive survey,” ACM Computing Surveys, vol. 56, no. 3, pp. 1–38, 2023.
[29] G. Deng, Y. Liu, V. Mayoral-Vilches, P. Liu, Y. Li, Y. Xu, T. Zhang, Y. Liu, M. Pinzger, and S. Rass, “{PentestGPT}: Evaluating and harnessing large language models for automated penetration testing,” in 33rd USENIX Security Symposium (USENIX Security 24), 2024, pp. 847–864.
[30] V.-T. Pham, M. Böhme, and A. Roychoudhury, “Aflnet: A greybox fuzzer for network protocols,” in 2020 IEEE 13th international conference on software testing, validation and verification (ICST). IEEE, 2020, pp. 460–465.
[31] X. Ma, L. Luo, and Q. Zeng, “From one thousand pages of specification to unveiling hidden bugs: Large language model assisted fuzzing of matter {IoT} devices,” in 33rd USENIX Security Symposium (USENIX Security 24), 2024, pp. 4783–4800.
[32] C. Chen, B. Dolan-Gavitt, and Z. Lin, “{ELFuzz}: Efficient input generation via {LLM-driven} synthesis over fuzzer space,” in 34th USENIX Security Symposium (USENIX Security 25), 2025, pp. 6279–6298.
[33] Y. Jiang, J. Liang, F. Ma, Y. Chen, C. Zhou, Y. Shen, Z. Wu, J. Fu, M. Wang, S. Li et al., “When fuzzing meets llms: Challenges and opportunities,” in Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering, 2024, pp. 492–496.
[34] Y. Wan, M. Huang, X. Li, Y. Nie, W. Zhen, and F. Zhong, “Large language models-driven fuzzing: A systematic survey,” Engineering Applications of Artificial Intelligence, vol. 178, p. 115126, 2026.
[35] H. Kim, J. Lee, E. Lee, and Y. Kim, “Touching the untouchables: Dynamic security analysis of the lte control plane,” in 2019 IEEE Symposium on Security and Privacy (SP), 2019, pp. 1153–1168.
[36] ASSET Group, “5ghoul 5G NR attacks,” 2025, accessed: 2026-05-18. [Online]. Available: https://github.com/asset-group/5ghoul-5g-nr-attacks
[37] Q. Huang, X. Wang, W. Guo, G. Gu, and H. Hu, “Semantics over syntax: Uncovering pre-authentication 5g baseband vulnerabilities,” in 35th USENIX Security Symposium (USENIX Security 26). USENIX Association, 2026. [Online]. Available: https://www.usenix.org/conference/usenixsecurity26/presentation/huang-qiqing
[38] L. Wu, M. Rostami, H. Li, J. Rajendran, and A.-R. Sadeghi, "GenHuzz: An efficient generative hardware fuzzer," in 34th USENIX Security Symposium (USENIX Security 25). Seattle, WA: USENIX Association, Aug. 2025, pp. 1787–1805. [Online]. Available: https://www.usenix.org/conference/usenixsecurity25/presentation/wu-lichao
[39] T. Trippel, K. G. Shin, A. Chernyakhovsky, G. Kelly, D. Rizzo, and M. Hicks, “Fuzzing hardware like software,” in 31st USENIX Security Symposium (USENIX Security 22), 2022, pp. 3237–3254.
[40] OpenAI, “What are tokens and how to count them?” [Online]. Available: https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them
[41] C. Packer, V. Fang, S. G. Patil, K. Lin, S. Wooders, and J. E. Gonzalez, “Memgpt: Towards llms as operating systems,” CoRR, vol. abs/2310.08560, 2023. [Online]. Available: https://doi.org/10.48550/arXiv.2310.08560
[42] Anthropic, “Context engineering: memory, compaction, and tool clearing,” 2026. [Online]. Available: https://platform.claude.com/cookbook/tool-use-context-engineering-context-engineering-tools
[43] A. Herrera, H. Gunadi, S. Magrath, M. Norrish, M. Payer, and A. L. Hosking, “Seed selection for successful fuzzing,” in Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis, ser. ISSTA 2021. New York, NY, USA: Association for Computing Machinery, 2021, p. 230–243. [Online]. Available: https://doi.org/10.1145/3460319.3464795
[44] G. Klees, A. Ruef, B. Cooper, S. Wei, and M. Hicks, “Evaluating fuzz testing,” in Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, ser. CCS '18. New York,
NY, USA: Association for Computing Machinery, 2018, p. 2123–2138. [Online]. Available: https://doi.org/10.1145/3243734.3243804
[45] M. E. Garbelini, V. Bedi, S. Chattopadhyay, S. Sun, and E. Kurniawan, “BrakTooth: Causing havoc on bluetooth link manager via directed fuzzing,” in 31st USENIX Security Symposium (USENIX Security 22). Boston, MA: USENIX Association, Aug. 2022, pp. 1025–1042. [Online]. Available: https://www.usenix.org/conference/usenixsecurity22/presentation/garbelini
[46] G. Hua, M. E. Garbelini, and S. Chattopadhyay, “Airbugcatcher: Automated wireless reproduction of iot bugs,” in 2024 Annual Computer Security Applications Conference (ACSAC), 2024, pp. 607–620.
[47] Counterpoint Research, “Global Smartphone AP-SoC Market Share: Quarterly,” https://counterpointresearch.com/en/insights/global-smartphone-apsoc-market-share-quarterly, Jun. 2026, accessed: 2026-06-09.
[48] Anthropic, “Claude code,” 2026, claude Code by Anthropic — AI Coding Agent, Terminal, IDE. Accessed: 2026-05-10. [Online]. Available: https://claude.com/product/claude-code
[49] LLM Stats, “Llm stats,” 2026, accessed: 2026-05-15. [Online]. Available: https://llm-stats.com/
[50] OpenRouter, “Openrouter,” 2026, accessed: 2026-05-18. [Online]. Available: https://openrouter.ai/
[51] Microsoft, “Azure AI Foundry,” 2026, accessed: 2026-06-05. [Online]. Available: https://ai.azure.com/
[52] M. M. Mukaka, “Statistics corner: A guide to appropriate use of correlation coefficient in medical research,” Malawi Medical Journal, vol. 24, no. 3, pp. 69–71, 2012.
APPENDIX A
GENERATIVE AI USAGE CONSIDERATIONS
-
Editorial assistance: We used Claude (Anthropic, Sonnet 4.6 and Opus 4.7 classes, accessed via Claude Code and the public API) for editorial assistance during drafting: paragraph restructuring, prose tightening, BIBTEX consistency checks, and LATEX layout debugging. All texts including claims, citations, statistics, and experimental number in the manuscript were authored and verified by us against our own experiment logs and source repositories. Suggested wording from the model was reviewed line-by-line and accepted, edited, or rejected by the authors.
-
Coding assistance: We used modern coding agents (such as Claude Code) to help implement the 5UGUE framework and to build supporting tooling for experiment orchestration, monitoring, and results reporting. All such code was reviewed by the authors, and its correctness was confirmed through extensive evaluations.
-
GenAI in the methodology: Generative AI is integral to our methodology. 5UGUE is an agentic framework in which large language models drive the fuzzing loop. The framework’s effectiveness is established empirically and reported in the results.
-
Responsibility: We did not use LLM-generated text to fabricate citations, experimental numbers, or threat-model claims. Every factual claim was cross-checked against the artifact data or the cited literature, and the bibliography was audited entry-by-entry for accuracy of authors, titles, and venues.
-
Reproducibility: 5UGUE relies on publicly available large language models to operate the framework. We acknowledge the risk that at a future time, these proprietary models may not be publicly available. To guard against this risk, we also report experiments with publicly available open weights models, such that the findings presented in this paper may be verified at a future time independently. We also make available the code for inspection such that the scientific community can review and reproduce our work.
APPENDIX B DETAILED RESULTS
We provide the detailed experiment results of 5UGUE in Table VI and detailed experiment results of 5GHOUL in Table VII. Note that version v3f refers to the V3-filtered mentioned in Section IV-C. Moreover, an LLM API interruption occurred during run 0917481c, causing the final two turns to fail. Nevertheless, the run identified numerous crashes before the interruption. We report this issue for completeness. Notably, the two high severity vulnerabilities confirmed by MediaTek were found in run eb0f389d and d3a1aa4c respectively. We note that in some cases of 5UGUE experiments, the crash string cannot be recovered. The crash is still detected, but without its string, it cannot be classified or counted. Hence, the category breakdown can sum to less than the total. They occur in the tests with following Run ID:
• 863ef044
• 2cefbe6f
• 7105d3d1
• 2e28f2ea
• ee27c761
• 9e3797d4
• 0a0ecf26
• 79fef804
The detailed results are available at:
https://5ugue-evaluations.pages.dev
APPENDIX C MUTATION TAXONOMY
To prevent the agent from collapsing onto a single class of mutation, 5UGUE requires every test to be tagged with a mutation category which is derived from an eight-class taxonomy. The 5UGUE agent passes the taxonomy as the mutation_category argument for the execute_test and execute_test_batch tools. The categories are summarised in Table VIII.
We hypothesize that the taxonomy serves two roles. First, it forces structural diversification during exploration, counteracting the tendency of the model to over-exploit whichever mutation last produced a crash. Second, it gives the reflection mechanism a concrete axis along which to detect missing strategies. When a reflection is triggered, untested or under-tested categories are an explicit prompt for the next round of hypotheses. The taxonomy is used to try to quantitatively measure the gap (via the strategy memo) in the current round of fuzzing and enumerate the axis along which the agent could try future test cases.
APPENDIX D PUBLICLY ACCESSIBLE CRASH IDENTIFIERS
Several crash identifiers for the target MediaTek (MediaTek Dimensity 900) platform are publicly available on the 5GHOUL disclosure page: https://asset-group.github.io/disclosures/5ghoul/. Table IX summarizes the corresponding crash identifiers. However, we were unable to locate publicly available crash identifiers for the other targets.
APPENDIX E
METRICS TO THE FIRST CRASH

Fig. 8. Metrics to the first crash of 5UGUE with different configurations
Figure 8 shows the Time to First Crash (TTFC) and Iteration to First Crash (ITFC) for 5UGUE with different configurations on the mediatek (MediaTek Dimensity 900) target. Interestingly, the results show that the TTFC and ITFC values in V3 increased compared with those in V1 and V2. Nevertheless, the statistics indicate that 5UGUE can reach the first crash efficiently, requiring less than five minutes and fewer than four iterations.

Fig. 9. Metrics to the first crash of 5UGUE with different LLMs
Figure 9 shows the TTFC and ITFC metric for different models. The results show that most models are able to trigger the first crash within 6 minutes and 4 iterations. The exception is Qwen3.7 Plus, which requires 9.2 minutes and 6 iterations. Moreover, GPT-5.5 takes the shortest time to trigger the first crash, requiring only 2.9 minutes, while DeepSeek V4 Pro requires the fewest iterations, with an average of 1.2 iterations. Based on the results in Figure 7 and Figure 9, there is no clear relationship between the first-crash metrics and overall crash discovery performance. In other words, taking longer to trigger the first crash does not necessarily indicate poor crash discovery performance.
TABLE VI DETAILED RESULTS OF 5UGUE Run ID Model Version Protocol Device Max Turns Actual Turns Research Quality Score Max Research Quality Score Mean Known Crashes Novel Crashes Total Crashes Total Input Tokens Total Output Tokens Unique Crashes Total Tests Time to First Crash (s) Tests till First Crash Total Session Time (s) f36b22e2 claude-sonnet-4.6 v1 5G mediatek 60 60 3 2.29 0 0 0 2686481 37164 0 15 N/A N/A 1731.93 1ee9bc84 claude-sonnet-4.6 v1 5G mediatek 60 60 5 3.57 9 10 19 2755479 36343 8 35 202.38 1 2383.45 311998b2 claude-sonnet-4.6 v1 5G mediatek 60 60 3 2.57 0 0 0 2962820 56417 0 17 N/A N/A 2198.86 cff0ab54 claude-sonnet-4.6 v1 5G mediatek 60 60 5 2.71 4 4 8 2894170 24320 4 23 146.37 1 1463.99 e4665b99 claude-sonnet-4.6 v1 5G mediatek 60 60 5 4.57 9 0 9 2127590 24266 6 21 237.03 1 1557.78 18756b85 claude-sonnet-4.6 v2 5G mediatek 60 60 5 3.29 9 4 13 3074105 24735 6 23 171.31 1 1503.66 d6c66c53 claude-sonnet-4.6 v2 5G mediatek 60 60 5 5.0 10 0 10 2661500 28820 7 24 145.93 1 1789.68 bf449521 claude-sonnet-4.6 v2 5G mediatek 60 60 5 4.29 8 6 14 2607968 25726 8 24 158.93 1 1621.9 872ab778 claude-sonnet-4.6 v2 5G mediatek 60 60 5 4.57 13 0 13 3557783 25789 7 23 144.21 1 1592.7 3ec5eb4b claude-sonnet-4.6 v2 5G mediatek 60 60 5 3.86 12 2 14 2905711 30239 7 25 150.96 1 1780.37 2d37c3d2 claude-sonnet-4.6 v3 5G mediatek 60 60 5 4.0 23 0 23 7602010 64402 7 90 385.97 5 5925.9 b6f34475 claude-sonnet-4.6 v3 5G mediatek 60 60 5 3.0 14 19 33 7969781 88742 9 89 157.49 1 5032.15 84a567a4 claude-sonnet-4.6 v3 5G mediatek 60 60 5 5.0 18 19 37 6800278 71359 13 104 311.42 4 5192.6 059c9b96 claude-sonnet-4.6 v3 5G mediatek 60 60 5 3.86 26 26 52 7004034 70277 13 95 366.37 5 6251.19 e462c521 claude-sonnet-4.6 v3 5G mediatek 60 60 5 4.86 16 0 16 5510275 55872 8 81 136.94 1 4341.28 a06742ed gpt-5.5 v3 5G mediatek 60 60 5 3.86 15 18 33 6483916 73347 8 86 137.08 1 6416.21 bc9a3f17 gpt-5.5 v3 5G mediatek 60 60 5 3.43 8 29 37 6747933 102342 7 107 215.03 2 8417.89 02f283f4 gpt-5.5 v3 5G mediatek 60 59 5 3.71 4 0 4 6025873 85878 2 91 159.08 1 8085.8 ef3c7ff4 gpt-5.5 v3 5G mediatek 60 60 3 2.57 5 25 30 7039435 71615 5 67 192.72 2 4102.85 a45085b7 gpt-5.5 v3 5G mediatek 60 60 5 3.29 11 31 42 7400863 116944 8 111 159.45 1 7417.57 d5769390 Kimi-K2.6 v3 5G mediatek 60 60 5 4.29 15 36 51 5677608 85838 9 101 132.78 2 6837.33 6725bed9 Kimi-K2.6 v3 5G mediatek 60 60 5 4.57 9 28 37 5641302 85352 7 97 185.9 1 5858.07 f431bdc8 Kimi-K2.6 v3 5G mediatek 60 60 5 4.71 17 15 32 4801378 73157 10 98 295.5 3 6395.32 2cefbe6f Kimi-K2.6 v3 5G mediatek 60 60 5 4.86 12 14 27 5079632 75141 8 85 493.88 5 6592.04 8fdacdad Kimi-K2.6 v3 5G mediatek 60 60 5 5.0 14 18 32 6490526 102468 9 128 463.86 5 8704.63 2910da3f DeepSeek-V4-Pro v3 5G mediatek 60 60 5 4.0 12 10 22 5398889 53498 7 91 780.82 1 5803.92 c2a340e1 DeepSeek-V4-Pro v3 5G mediatek 60 60 5 3.57 8 0 8 5624671 60734 1 91 248.45 1 5600.98 c2bd6c88 DeepSeek-V4-Pro v3 5G mediatek 60 60 5 4.71 9 12 21 5097396 49962 8 71 256.01 1 5005.56 250a6c85 DeepSeek-V4-Pro v3 5G mediatek 60 60 5 4.71 10 7 17 5535008 51751 6 93 165.58 1 5101.85 b07df44f DeepSeek-V4-Pro v3 5G mediatek 60 60 5 4.14 13 10 23 6130928 63558 6 94 228.83 2 5133.58 9bb22c8e qwen3.7-plus v3 5G mediatek 60 60 5 2.57 3 17 20 4680684 75872 3 77 939.88 12 4679.92 c06f8695 qwen3.7-plus v3 5G mediatek 60 60 3 2.43 4 11 15 6621988 87665 6 57 381.26 3 4629.08 99a0a473 qwen3.7-plus v3 5G mediatek 60 60 3 2.43 2 10 12 4568985 76557 4 44 1012.57 11 3348.02 6f050bfb qwen3.7-plus v3 5G mediatek 60 60 5 2.29 5 38 43 4681222 78815 5 101 184.56 1 5481.66 7f480e7c qwen3.7-plus v3 5G mediatek 60 60 5 2.86 6 6 12 4839774 66424 6 58 250.3 3 3732.5 cb7afd2e gemini-3.1-pro-preview v3 5G mediatek 60 60 5 3.14 8 3 11 5121450 60619 6 82 148.98 1 4501.07 3d1480f3 gemini-3.1-pro-preview v3 5G mediatek 60 60 3 2.43 0 0 0 3556144 26569 0 36 N/A N/A 2098.82 4eeebb39 gemini-3.1-pro-preview v3 5G mediatek 60 60 5 3.29 7 5 12 4821014 61140 7 88 399.43 5 5390.8 5c369a09 gemini-3.1-pro-preview v3 5G mediatek 60 20 5 2.14 1 1 2 456913 10427 2 6 142.91 1 446.42 71437e33 gemini-3.1-pro-preview v3 5G mediatek 60 21 5 2.71 3 1 4 683804 17144 3 14 153.18 1 932.25 eb0f389d claude-sonnet-4.6 v3 5G mediatek d6300 60 60 0 0.0 0 32 32 6887233 78463 6 106 184.52 1 7113.95 d3a1aa4c claude-sonnet-4.6 v3 5G mediatek d6300 60 60 0 0.0 0 25 25 6544623 68929 3 87 245.24 2 6237.71 3d3387e4 claude-sonnet-4.6 v3 5G mediatek d6300 60 60 0 0.0 0 19 19 5754122 62420 2 87 465.51 2 5799.23 c04072d6 claude-sonnet-4.6 v3 5G mediatek d6300 60 60 0 0.0 0 21 21 6047362 58764 2 101 831.59 12 6544.39 712fcca0 claude-sonnet-4.6 v3 5G mediatek d6300 60 60 0 0.0 0 15 15 5822063 60032 4 71 262.6 1 5252.55 b7698b81 claude-sonnet-4.6 v3 5G mediatek d9000 60 60 0 0.0 0 32 32 6353360 66467 5 81 172.85 1 5063.18 2e28f2ea claude-sonnet-4.6 v3 5G mediatek d9000 60 60 0 0.0 0 29 30 8195281 98375 5 116 179.34 1 7976.46 7105d3d1 claude-sonnet-4.6 v3 5G mediatek d9000 60 60 0 0.0 0 26 28 7150811 84666 5 98 271.66 3 6412.93 6d5b064d claude-sonnet-4.6 v3 5G mediatek d9000 60 60 0 0.0 0 21 21 5854353 68087 5 81 176.54 1 5297.78 1d8b8cef claude-sonnet-4.6 v3 5G mediatek d9000 60 60 0 0.0 0 22 22 7946529 86947 5 91 207.46 1 5899.44 227ede3a claude-sonnet-4.6 v3 5G mediatek d9400 60 60 2 2.0 0 8 8 6859856 78972 1 72 274.0 2 5223.0 e117f7f6 claude-sonnet-4.6 v3 5G mediatek d9400 60 60 2 2.0 0 14 14 6761280 91602 2 98 329.0 3 6666.0 79649d36 claude-sonnet-4.6 v3 5G mediatek d9400 60 60 2 2.0 0 8 8 6220083 57053 2 76 258.0 1 5397.0 aafecd6d claude-sonnet-4.6 v3 5G mediatek d9400 60 60 2 2.0 0 13 13 7867230 94679 2 97 423.0 2 7433.0 4a6ec326 claude-sonnet-4.6 v3 5G mediatek d9400 60 60 2 2.0 0 18 18 6145516 70305 3 91 335.0 1 6372.0 f086dc0f claude-sonnet-4.6 v3 5G unisoc ud710 60 60 0 0.0 0 1 1 5078951 38156 1 40 2953.0 40 2942.0 044b9a07 claude-sonnet-4.6 v3 5G unisoc ud710 60 60 0 0.0 0 17 17 6015624 68260 3 63 333.0 3 4021.0 863ef044 claude-sonnet-4.6 v3 5G unisoc ud710 60 60 0 0.0 0 32 33 7667669 89138 4 88 351.0 3 5877.0 6d447c9f claude-sonnet-4.6 v3 5G unisoc ud710 60 60 0 0.0 0 3 3 5427811 39324 1 45 1837.0 25 2985.0 2d894f89 claude-sonnet-4.6 v3 5G unisoc ud710 60 60 0 0.0 0 4 4 4937848 41509 1 43 1901.0 23 3168.0 a6b315fb claude-sonnet-4.6 v3f 5G mediatek 60 60 3 2.86 0 0 0 6391091 65825 0 40 N/A N/A 3602.69 ee27c761 claude-sonnet-4.6 v3f 5G mediatek 60 60 3 2.57 16 9 26 6520492 76116 5 60 1890.28 15 5160.7 f28c9342 claude-sonnet-4.6 v3f 5G mediatek 60 60 4 2.43 5 23 28 7466542 92063 4 90 1171.51 15 6047.98 0917481c claude-sonnet-4.6 v3f 5G mediatek 60 60 4 3.14 5 28 33 7104529 115339 5 103 340.19 3 7065.0 ff2cf18f claude-sonnet-4.6 v3f 5G mediatek 60 60 3 2.29 0 0 0 7752395 66863 0 43 N/A N/A 3870.35 5bde8c9b claude-sonnet-4.6 v3f 5G unisoc ud710 60 60 0 0.0 0 16 16 5636359 65373 3 74 358.66 4 4552.64 355aa882 claude-sonnet-4.6 v3f 5G unisoc ud710 60 60 0 0.0 0 25 25 6193971 80888 4 79 253.55 1 5039.4 8c93d6ad claude-sonnet-4.6 v3f 5G unisoc ud710 60 60 0 0.0 0 24 24 7229351 101671 2 105 478.37 5 6839.05 aced05a4 claude-sonnet-4.6 v3f 5G unisoc ud710 60 60 0 0.0 0 28 28 7600117 112901 5 110 696.3 10 7014.74 e7b8fb4a claude-sonnet-4.6 v3f 5G unisoc ud710 60 60 0 0.0 0 18 18 7323769 118727 3 79 912.14 13 5698.48 9e3797d4 claude-sonnet-4.6 v3 BT esp32 60 60 0 0.0 0 8 11 7157800 64706 2 46 734.92 6 3741.11 ca02a365 claude-sonnet-4.6 v3 BT esp32 60 60 0 0.0 0 1 1 6081335 41967 1 26 2356.93 26 2373.63 0a0ecf26 claude-sonnet-4.6 v3 BT esp32 60 60 0 0.0 0 15 18 5822158 62856 3 70 448.85 5 4582.13 79fef804 claude-sonnet-4.6 v3 BT esp32 60 60 0 0.0 0 8 10 5804721 52802 2 49 2125.83 24 3700.08 8145e294 claude-sonnet-4.6 v3 BT esp32 60 60 0 0.0 0 0 0 5233921 38625 0 22 N/A N/A 2437.57 17
TABLE VII DETAILED RESULTS OF 5GHOUL ON 5G TARGETS
| Modem | Device | Fuzzing Duration (m) | Time to First Crash (m) | Tests till First Crash | Total Crashes | Unique Crashes | Num Fuzzed Packet | Num Iteration |
|---|---|---|---|---|---|---|---|---|
| mediatek | OnePlus Nord CE 2 5G | 150 | 102.538 | 1197 | 3 | 1 | 6350 | 1725 |
| mediatek | OnePlus Nord CE 2 5G | 150 | N.A. | N.A. | 0 | 0 | 2625 | 1724 |
| mediatek | OnePlus Nord CE 2 5G | 150 | 24.1071 | 274 | 1 | 1 | 4438 | 1672 |
| mediatek | OnePlus Nord CE 2 5G | 150 | 11.1133 | 134 | 3 | 1 | 7422 | 1646 |
| mediatek | OnePlus Nord CE 2 5G | 150 | N.A. | N.A. | 0 | 0 | 5420 | 1743 |
| mediatek_d6300 | REDMI 15C 5G | 150 | N.A. | N.A. | 0 | 0 | 10774 | 2651 |
| mediatek_d6300 | REDMI 15C 5G | 150 | N.A. | N.A. | 0 | 0 | 8309 | 2562 |
| mediatek_d6300 | REDMI 15C 5G | 150 | N.A. | N.A. | 0 | 0 | 10252 | 2634 |
| mediatek_d6300 | REDMI 15C 5G | 150 | N.A. | N.A. | 0 | 0 | 11554 | 2507 |
| mediatek_d6300 | REDMI 15C 5G | 150 | N.A. | N.A. | 0 | 0 | 11516 | 2339 |
| mediatek_d9000 | OnePlus Nord 3 | 150 | 5.80866 | 105 | 5 | 1 | 7466 | 2428 |
| mediatek_d9000 | OnePlus Nord 3 | 150 | 33.7339 | 531 | 1 | 1 | 11003 | 2447 |
| mediatek_d9000 | OnePlus Nord 3 | 150 | 14.7682 | 221 | 3 | 3 | 9111 | 2294 |
| mediatek_d9000 | OnePlus Nord 3 | 150 | 29.5569 | 445 | 4 | 1 | 9553 | 2353 |
| mediatek_d9000 | OnePlus Nord 3 | 150 | 2.54865 | 40 | 8 | 2 | 10227 | 2343 |
| mediatek_d9400 | OnePlus Ace 5 Ultra | 150 | N.A. | N.A. | 0 | 0 | 5441 | 1587 |
| mediatek_d9400 | OnePlus Ace 5 Ultra | 150 | N.A. | N.A. | 0 | 0 | 3536 | 1661 |
| mediatek_d9400 | OnePlus Ace 5 Ultra | 150 | N.A. | N.A. | 0 | 0 | 11689 | 1573 |
| mediatek_d9400 | OnePlus Ace 5 Ultra | 150 | N.A. | N.A. | 0 | 0 | 8488 | 1916 |
| mediatek_d9400 | OnePlus Ace 5 Ultra | 150 | N.A. | N.A. | 0 | 0 | 7531 | 1712 |
| unisoc_ud710 | Hisense F50+ | 150 | N.A. | N.A. | 0 | 0 | 4961 | 1928 |
| unisoc_ud710 | Hisense F50+ | 150 | N.A. | N.A. | 0 | 0 | 6466 | 1609 |
| unisoc_ud710 | Hisense F50+ | 150 | N.A. | N.A. | 0 | 0 | 5793 | 1518 |
| unisoc_ud710 | Hisense F50+ | 150 | N.A. | N.A. | 0 | 0 | 8512 | 1474 |
| unisoc_ud710 | Hisense F50+ | 150 | 1.58358 | 21 | 2 | 2 | 8138 | 1551 |
TABLE VIII THE EIGHT-CLASS MUTATION TAXONOMY USED BY 5UGUE.
| Category | Structural transformation |
|---|---|
| bit_flip | Boundary / reserved values at a field: eg. 0x00, 0xFF. |
| truncation | Shorten the packet by reducing pkt_length or zeroing trailing bytes. |
| type_confusion | Change a message-type identifier (eg. RRC message type). |
| length_overflow | Set a length field larger or smaller than the actual content (eg. TLV lengths, MAC SDU lengths). |
| field_deletion | Zero out an entire mandatory field or Information Element (IE) that the modem must parse. |
| flooding | Emit mutated packets at high frequency via counter-based triggers (counter % N). |
| multi_stage | Sequence attacks across protocol phases (eg. corrupt auth then SMC), carrying state across packets. |
| encoding_corruption | Corrupt the ASN.1 PER encoding itself: tag bytes, length determinants, choice indices, extension bits. |
APPENDIX F
HOW COST-EFFICIENT IS 5UGUE IN TERMS OF LLM USAGE?
We report the LLM costs across different experiments to evaluate the cost-efficiency of 5UGUE. Figure 10 presents the results. We compute the cost using token usage data collected from the mediatek (MediaTek Dimensity 900) experiments in two comparison settings. First, to compare different configurations, we use Claude Sonnet 4.6 and evaluate V1, V2, and V3. Second, to compare different LLMs, we use the V3 configuration and evaluate all models. For each setting, we first average the input and output token counts across five runs, and then compute the cost using the model-specific token
TABLE IX PUBLICLY ACCESSIBLE CRASH IDENTIFIERS FOR MEDIATEK TARGET
| Crash Identifiers | |
|---|---|
| [ASSERT] file:mcu/11/mmll1/mmll_endc/src/mmll_endc_db_hdlr.c line:524 p1:0x91920c70 | |
| [ASSERT] file:mcu/11/nl1/internal/md97/src/rx_nr_xrd_spcmd_ext_csif_csi.c line:2657 p1:0x00000000 | |
| [Fatal error(MPU_NOT_ALLOW)] err_code1:0x0000001D err_code2:0x910D66F6 err_code3:0x910D66E2 | |
| [Fatal error(MPU_NOT_ALLOW)] err_code1:0x0000001D err_code2:0x90F5D83A err_code3:0x90F5D836 | |
| [ASSERT] file:dsp3/coresonic/msonic/modem/slm/nr/nr_post_proc/src/nr_slm_rpt_hdlr.c line:9302 | |
| [ASSERT] file:mcu/11/nl1/internal/md97/src/rfd/nr_rfd_configdatabase.c line:4380 p1:0x00000001 | |
| [ASSERT] file:dsp3/coresonic/msonic/modem/brp/nr/nr_brp/src/nr_brp_top_irq.c line:927 | |
| [ASSERT] file:mcu/11/nl1/internal/md97/src/ctrl/nr_ctrl_mgm.c line:16460 | |
| [Fatal error(MPU_NOT_ALLOW)] err_code1:0x0000001D err_code2:0x910885CE err_code3:0x910885CA | |
| [Fatal error(MPU_NOT_ALLOW)] err_code1:0x0000001D err_code2:0x910885AC err_code3:0x910885A8 | |

Fig. 10. Average LLM token cost on the mediatek target. Input and output token counts are averaged across five runs, and the cost is computed using the model-specific pricing in Table V.
prices listed in Table V. Specifically, the cost is computed as , where and denote the average numbers of input and output tokens across five runs, respectively, and and denote the corresponding input and output prices per million tokens.
For the experiments on different versions using Claude Sonnet 4.6 on the mediatek (MediaTek Dimensity 900) target, the cost increases from 9.29 in V2 and $21.98 in V3, as more tools are introduced in V2 and V3. This increase in cost is expected because the agent performs more actions with additional tool support, and this consumes more tokens. As discussed in Section VII-A, V3 outperforms both V1 and V2, suggesting that its additional cost is justified by the improved performance.
Moreover, GPT-5.5 is the most expensive model in the V3 experiments, with a cost of 2.15. Among the three proprietary models, Gemini 3.1 Pro is the cheapest, costing 4.39, while achieving the best overall crash discovery performance across all models.
These results indicate that higher LLM cost does not necessarily lead to better crash discovery performance. For example, GPT-5.5 incurs the highest cost but does not achieve the best performance, whereas Kimi K2.6 achieves the strongest overall performance at a relatively low cost.
#include <ModulesInclude.hpp>
wd_filter_t f1;
int setup(wd_modules_ctx_t *ctx) { ctx->config->fuzzing.global_timeout = false; f1 = wd_filter("nr-rrc.rrcSetup_element"); return 0; }
int tx_pre_dissection(uint8_t *pkt_buf, int pkt_length, wd_modules_ctx_t *ctx) { wd_register_filter(ctx->wd, f1); return 0; }
int tx_post_dissection(uint8_t *pkt_buf, int pkt_length, wd_modules_ctx_t *ctx) { if (wd_read_filter(ctx->wd, f1)) { pkt_buf[48] = 0xFF; return 1; } return 0; }
Listing 4. Example exploit code
Key Finding: The cost of 5UGUE varies substantially with both versioning and LLM choice, but higher cost does not necessarily translate to better performance. The cost rises from 21.98 in V3, a 2.6× increase. Across LLMs, the cost ranges from 36.40 for GPT-5.5. Kimi K2.6 achieves the best overall crash discovery performance at only $4.39.
APPENDIX G EXAMPLE EXPLOIT CODE
Listing 4 presents an example of a 5G exploit written in C++.
APPENDIX H V3-FILTERED PROMPT
Figure 11 shows the refined 5G prompt for 5UGUE V3-filtered. Due to its length, the prompt is split across two pages.
APPENDIX I BT PROMPT
Figure 12 presents selected parts of our BT prompt, focusing primarily on the modifications made to the 5G prompt. Specifically, the prompt describes the Bluetooth fuzzing environment by identifying the role as a Bluetooth security researcher and defining the workflow objective as discovering bugs in the Bluetooth stack. In addition, the briefing section includes several Bluetooth-related keywords, such as host, peripheral, and L2CAP. We also provide BT-specific documentation to help 5UGUE understand the relevant concepts and generate exploits.
APPENDIX J COMPARISON OF TTFC, ITFC AND SESSION TIME BETWEEN 5UGUE AND 5GHOUL
Figure 13 shows the Time to First Crash (TTFC) and Iteration to First Crash (ITFC) values for both 5GHOUL and 5UGUE. TTFC represents the time, in minutes, until the first crash occurs during testing, while ITFC denotes the number of iterations completed before the first crash occurs. In 5GHOUL, one iteration represents a full communication period between an airplane turning off and turning back on, during which different packets may be fuzzed. However, 5UGUE does not adopt the same iteration concept, as it executes a single test run with a fixed set of fuzzed packets. Therefore, for comparison, we treat each test run in 5UGUE as one iteration.
Notably, 5UGUE discovers at least one crash in every fuzzing session, whereas 5GHOUL discovers no crash in some sessions. For cases where 5GHOUL fails to detect any crash, we assign a TTFC value of 151 minutes to indicate that the configured 150-minute session timeout was reached. Similarly, the ITFC value is set to the maximum number of iterations performed across the five tested devices.
The results show that 5UGUE finds the first crash with significantly faster and with fewer iterations than 5GHOUL across all five targets. Specifically, for the mediatek (MediaTek Dimensity 900) target, the mean TTFC is 88 minutes for 5GHOUL and 4.5 minutes for 5UGUE, while the mean ITFC is 1381 and 3, respectively. Moreover, across all five runs, 5GHOUL does not discover any crashes on the mediatek_d6300 and mediatek_9400 targets. The maximum-value bars further show that, for all targets except mediatek_d9000, 5GHOUL fails to discover any crash in at least one of the five runs. In comparison, 5UGUE consistently discovers crashes in every run across all targets.
Figure 14 presents the fuzzing duration for 5GHOUL and 5UGUE. While the duration of 5GHOUL fuzzing is fixed at 150 minutes, the runtime of 5UGUE across five runs is shown as a box plot. Overall, 5UGUE V3 requires less time than 5GHOUL across all five 5G targets.
Workflow
-
Inspect: Use list_packet_types to survey the capture. Drill into specific packets with inspect_packets.
-
Research:
a. Online exploit search: Use web_search to find exploit write-ups, vulnerability reports, and security advisories (e.g.
web_search(query=" {search_example_1}"), web_search(query=" {search_example_2}"). Use fetch_url to read full content from promising results. Also search for confirmed crash patterns and CVEs specific to the target modem.
b. Read CVE write-ups and advisories for concrete exploit details (target field, mutation, root cause). CVEs without an exact (offset, value, filter) are directional only — extract the bug class and target layer, then let empirical sweeping find the actual crash. Complete research in one turn, then move to testing.
c. For each CVE or advisory, extract and record (via save_finding with tag web_sourced):
-
The bug class / root cause pattern (e.g., unchecked length, missing enum validation, null deref on optional release)
-
Why the parser was vulnerable — what assumption was violated
-
Generalization potential — what other protocol fields or layers likely share the same weakness
-
The specific field+value — use these to attempt reproduction first, then generalize to adjacent fields
d. After research, use search_fields / get_field_info to find ALL fields in the capture matching each bug class. Call update_strategy with a generalization matrix: [bug_class × candidate_fields × mutation_values], ranked by exploitability (pre-auth > post-auth, frequent packets > rare).
2.5. NOVEL CRASH HUNTING (ACTIVE — crash confirmed): Your toolchain is proven. Your SOLE objective is finding different and new non_publicly_known_crash and fully_novel_crash crashes.
-
Coarse-to-Fine Search Strategy:
-
Filter Selection: Before committing to a packet filter, use list_packet_types to verify the target packet type appears frequently enough per session for efficient sweeping. Packet types that match only 1–2 times per session give too few mutations to sweep effectively — reserve them for pinpoint tests once you know the exact (offset, value). Prefer higher-frequency packet types for sweep phases.
-
Phase 1 (Progressive Payload Sweep — ALWAYS FIRST): Do not guess a single static offset or attempt to calculate the exact start of the payload mathematically. Instead, use a Rotating Sweep Strategy starting from deep inside the packet and progressing forward. Transport headers (MAC/RLC) occupy only the top-level framing bytes of pkt_buf. The target message PDU (RRC / NAS payload) starts immediately past outer transport headers. Your Phase 1 sweep must cover both outer PDU framing bytes (immediately past transport headers) and inner nested IEs through the end of the packet. Use the counter variable to dynamically step through a large window of target byte offsets, simultaneously rotating through a diverse array of mutation values. NEVER indiscriminately zero out blocks of bytes.
-
Offset-First Sweep Order: Design your sweep rotation to step through different target offsets on consecutive matching packets within the session (1st matching packet = offset X, 2nd matching packet = offset X+1, 3rd matching packet = offset X+2, etc.). Because a test session only receives a limited number of matching packets, mutating the same offset with different values on consecutive packets will leave the rest of your target offset window un-tested. In C code, you MUST compute offset using modulo % (offset = start + ((counter - 1) % num_offsets)) and value using division / (val = vals[((counter - 1) / num_offsets) % num_vals]). NEVER use integer division / for calculating byte offsets, as that mutates the same byte repeatedly on consecutive packets.
-
Mutation Value Selection: Do not copy-paste a fixed static array of hex numbers across all scripts. Instead, dynamically construct diverse candidate arrays covering different 8-bit value classes across your test cases: (1) Sequential Enum & Choice Indices (small sequential non-zero integers to activate alternative protocol choice branches), (2) Arbitrary Byte & Multi-Bit Patterns (multi-bit combinations, inverse bitmasks, and diverse byte patterns spanning the full 8-bit spectrum), and (3) Boundary & Sign-Bit Flips (minimum/maximum boundary limits, sign-bit toggles, and zero).
-
Sweep Window Sizing by Packet Frequency: Adjust your target offset window size N based on the packet's observed delivery frequency per session. For low-frequency packets (~1 match per session / low mutation yield per test execution), set micro-sweep windows of N offsets per script (e.g. N ~ 5–8 offsets). Using concise micro-windows ensures that both the offset rotation AND the value candidate rotation finish executing within the limited session matches before timeout, rather than leaving un-tested tails or un-executed values. For high-frequency packets (many matches per session), wider windows of N offsets per script (e.g. N ~ 30-50) are appropriate.
-
Buffer Calibration & Protocol Layer Calculation: When inspecting packet bytes with inspect_packets, note that pkt_buf passed to your exploit code is ALREADY stripped of lower transport headers (i.e., the first 48 transport header bytes in raw PCAP dumps are already stripped, so pkt_buf[0] begins right at the "mac-nr" magic header tag 6d 61 63 2d 6e 72). Analyze the protocol layer encapsulation hierarchy (MAC context -> RLC -> PDCP -> RRC / NAS) and calculate the header byte lengths for each layer. Ensure your Phase 1 sweep window covers both outer PDU framing bytes (past the MAC context header) and inner nested IEs, avoiding arbitrary large overhead assumptions (do NOT add an extra 48 bytes to pkt_buf indices).
-
WARNING: The Illusion of Coverage: If your script attempts to sweep a range of combinations (e.g. from offset to offset + N), but the test result returns mutation_count: M (where M < N), you only actually tested the first M combinations! The fuzzer session timed out or ended before the rest could run. In your Strategy / Crash Map Table, log ONLY the M combinations actually reached. Do not mark the remaining untested combinations as covered.
-
Gap-Filling Resume Rule: If a sweep ends early at offset Y (before reaching the planned end offset Z), your very next sweep on that target MUST start at offset Y+1 to cover the un-tested gap [Y+1 ... Z] before jumping to a new offset region.
-
Phase 2 (Crash Isolation / Bisection): If Phase 1 triggers a CRASH with M mutations (leaving candidate offsets K ... K+M-1), isolate the exact byte efficiently within a single turn using execute_test_batch. Note that in any test script, it is completely valid to test multiple candidate offsets (or a small sub-range) within the same script. Make best use of execute_test_batch by splitting the candidate offsets across 3 to 5 test cases in a single batch call (e.g., Test 1 tests sub-range A, Test 2 tests sub-range B, Test 3 tests sub-range C). Because the batch executes these test cases sequentially, one of the tests in the batch will trigger the crash, pinpointing the exact vulnerable offset immediately in that turn.
Fig. 11. V3-filtered post-first-crash prompt for 5G targets (continued on the next page)
-
Phase 3 (Value Sweep at Isolated Offsets): Once Phase 2 isolates specific sensitive byte offsets, run value sweeps at EACH of those offsets, testing 4–8 representative values starting with small values (0x01, 0x03, 0x07, 0x0F, 0x00, 0x40, 0x80, 0xFF). You can rotate values in a single script using vals[(counter-1) % N]. Important: If a value crashes on the 1st packet (mutation_count: 1), the test ends immediately — subsequent values in the array were not tested! To find different or novel crash signatures at that same offset, start your next test script with the next untested value in the sequence.
-
Phase 4 (Fine-Grained Zero In & Expansion): At the highest-yield offsets, do not just stop at reproducing the crash. Expand around it to mine for NOVEL crashes! Test adjacent bytes ( bytes) because parser vulnerabilities often cluster together. Test multi-byte combinations, every nibble, and odd/even variants. Exploring the immediate vicinity of a known crash is the #1 way to discover non_publicly_known_crash and fully_novel_crash signatures.
-
Hotspot Re-Sweep Rule (Vulnerable Packet Mining): A confirmed crash on a packet filter proves that this target packet type's parser contains vulnerable assertion or state-handling logic. Once you finish local expansion around the confirmed crash offset, do NOT jump to a completely different packet filter! Instead, immediately re-enter Phase 1 sweeping across all remaining UNTESTED offsets on that SAME vulnerable packet filter. A packet filter that yielded one crash is your highest-probability attack surface for discovering additional, unique crash signatures.
-
Phase Transition Rule: After 5 consecutive Phase-4 tests at an offset/field that yield no new crash:
-
If this packet filter HAS triggered a crash: Mark that specific offset as EXHAUSTED in your crash map table. Your top priority MUST be to continue Phase 1 sweeping on the SAME vulnerable packet filter across its remaining untested offset windows to mine for additional unique crashes.
-
If this packet filter HAS NEVER triggered a crash: Mark the tested offset window as EXHAUSTED. Once an offset region on a non-crashing filter is exhausted, pivot to a NEW packet filter / attack surface.
-
Stay close to what works. Historical data shows that nearly all novel crashes come from variations on known vulnerable areas, not from jumping to entirely new attack surfaces.
-
Value variants at the same offset — trying different values at a confirmed crash offset often triggers a different crash signature. Values close to the original byte value, boundary values, and values producing different ASN.1 interpretations have all yielded non-public crashes.
-
Adjacent offset exploration — bytes near a confirmed crash offset ( to bytes) often share similar parser weaknesses. Exploring the gaps between known crash zones in the same region has been productive.
-
Multi-field value combinations — varying both bytes in a confirmed multi-byte crash (e.g. different (byteA, byteB) pairs) can trigger different crash components.
-
Inner byte deletion / zeroing — zeroing individual bytes between known crash zones that have never been individually tested can reach new code paths.
-
Prioritize non-public & novel crashes: If a test returns publicly_known_crash, try a different value at that offset — it may yield a non-public or novel crash.
-
Maintain momentum: After every test, immediately call save_finding + update_strategy. Your strategy must include a structured crash map table of every (offset, value) pair tested and its result (crash_category or no_crash) — the table is what survives context summarization and prevents repeating combinations. Mark exhausted offsets as EXHAUSTED in the table.
-
Hypothesize: Based on protocol knowledge and research, identify fields likely to trigger modem bugs (boundary values, security-critical fields, malformed ASN.1).
-
Test: Write C exploits and run them. Whenever you use execute_test_batch, make best use of the batch call by including 3 to 5 complementary test cases per batch (up to the tool limit of 5). Do not settle for only 1 or 2 tests when covering an attack surface. Fill your batch with consecutive, non-overlapping window segments (e.g., Test 1 covers offsets K ... K+N-1, Test 2 covers K+N ... K+2N-1, Test 3 covers K+2N ... K+3N-1) to sweep large continuous byte regions in a single turn. Set the mutation_category parameter.
- Logging API Constraint: Note that wd_log_y (as well as wd_log_g and wd_log_r) accepts only a single string argument (void wd_log_y(const char *msg)). It is NOT a variadic printf function. Do NOT pass format specifiers or multiple arguments (e.g., wd_log_y("offset=%d", off) will cause compilation failure: too many arguments). Use snprintf to format dynamic variables into a buffer before passing to wd_log_y, or use plain static string literals.
- Analyze: Read the analysis field in the result carefully:
-
Guard Check Precision: When adding packet length checks in C scripts (e.g. if (pkt_length < N)), verify the exact byte length of matching packets via inspect_packets so that your guard logic does not inadvertently reject valid target packets (which results in mutation_count: 0).
-
Check mutation_count: if 0, your filter never matched — fix the filter before trying a new strategy. DIAGNOSTIC PIVOT: If you experience 3+ tests with 0 mutations, write a NO-OP test (no mutations, global_timeout=true) to observe the baseline traffic and ensure the modem is actually progressing to the target state. If mutation_count is consistently low (< 3) across multiple tests on the same filter despite matching, the target packet appears too rarely for efficient sweeping — switch to a higher-frequency packet type for sweep phases, or narrow to a pinpoint (single offset, single value) test.
-
Check total_packets: if < 30, the UE rejected the connection early — use a less aggressive mutation or target a later-stage packet.
-
Check new_states/new_transitions: new states are leads worth investigating with diff_state_machines or view_state_machine.
-
If crash: use analyze_crash_log, read_device_log to understand the root cause.
-
If stuck (3+ tests with no crash and no new leads): use web_search or fetch_url to research the specific crash component, field, or error you're seeing. All tools remain available throughout — research is not limited to step 2.
- Record & Update Strategy (MANDATORY): save_finding and update_strategy are a mandatory paired call. After EVERY execute_test or execute_test_batch, you MUST invoke BOTH tools in the same response:
-
save_finding: records test observations, findings, and tags (include test_id in related_tests).
-
update_strategy: rewrites your strategy memo and updates the Crash Map Table with every (offset, value) pair tested and its result (crash_category or no_crash).
- Iterate: Adjust strategy based on results. Explore related mutations near crashes. Move on from exhausted areas. Never repeat the same mutation technique on similar fields — diversify across the mutation taxonomy. You may use web_search and fetch_url at any point — not just during the initial research phase.
Fig. 11. V3-filtered post-first-crash prompt for 5G targets (continued from the previous page)
ROLE_DESC_DEFAULT
You are a Bluetooth security researcher conducting fuzz testing against an {vendor} {device} target device using the WDissector framework. Your goal is to discover unique Bluetooth stack crashes by crafting and executing targeted protocol mutations."
CONSTRAINTS_TEMPLATE
-
Each test takes ~45 seconds (compile + transmission + monitoring). Be strategic.
-
You can only mutate TX packets (Bluetooth host -> peripheral). The peripheral is the target.
-
Crash oracle: monitor logs for {logcat_patterns}, etc. Crash IDs come from {crash_id_field} lines.
-
The previous non-agentic system found ZERO crashes. Any unique crash is a significant win.
-
Batch tool calls: When you have multiple independent tool calls (e.g., several search_fields or inspect_packets), make them ALL in a single response. Do not make one tool call per turn when you could batch them. After a test, combine save_finding + update_strategy in one turn.
WORKFLOW_V3_AND_FULL_POST_FIRST_CRASH
...
- Hypothesize: Based on protocol knowledge and research, identify fields likely to trigger Bluetooth stack bugs (boundary values, security-critical fields).
...
INITIAL BRIEFING TEMPLATE
Start by surveying these packet types. Identify which ones are TX (Bluetooth host -> peripheral) as those are the ones you can mutate. Focus on security-critical messages first (L2CAP, SDP, LMP), then explore other protocol layers.
RESEARCH_TEMPLATE
...
- Search the local paper collection for Bluetooth fuzzing and stack/controller exploitation papers, read the most relevant ones
...
WDISSECTOR_API
Your exploit is a C shared library loaded by bt_fuzzer. Below is a complete, compilable template.
Key APIs
-wd_filter(const char *filter_str) -> wd_filter_t -- Create a Wireshark display filter (e.g. "btbrlmp.op == 40")
-wd_register_filter(ctx->wd, filter) -- Register filter for current packet (call in tx_pre_dissection)
-wd_read_filter(ctx->wd, filter) -> bool -- Check if current packet matches filter (call in tx_post_dissection)
-wd_log_y(const char *msg) -- Log message (yellow)
-pkt_buf -- Pointer to payload start.
-
CRITICAL - Offset Calculation: Always call the get_field_info tool first to find the correct field offset (e.g. for btbrlmp.fpage) rather than attempting to manually parse raw packet hex dumps (which leads to off-by-one errors).
-
Note that the byte_offset returned by get_field_info is relative to the start of the H4 packet. Since pkt_buf in tx_post_dissection starts after the 7-byte H4/HCI header, you MUST calculate the index in pkt_buf as:
index_in_pkt_buf = byte_offset - 7
Example: If get_field_info for btbrlmp.fpage returns byte_offset: 13, you MUST use pkt_buf[6] (13 - 7 = 6) in your C++ code. Do NOT use 13 or any other value.
- get_field_info refuses ASN.1 fields — for those, anchor by hex pattern via get_packet_hex + inspect_packets.
- Return 1 from tx_post_dissection to send mutated packet, 0 for unmodified.
Config tuning guide
| Field | Default | Tunable? | Notes |
|---|---|---|---|
| --- | --- | --- | --- |
| disable_role_switch | false | Yes | Set true to force master role and prevent role switching |
| bridge_hci | true | No | Must be true — required for HCI interception |
| intercept_tx | true | No | Must be true — required to hold and modify TX packets |
| lmp_sniffing | true | No | Must be true — required for low-level LMP visibility |
| rx_bypass | false | Yes | Set true for flooding exploits that skip RX processing |
| rx_bypass_on_demand | false | No | Must be false |
Fig. 12. Selected parts of the BT prompt highlighting the modifications made to the 5G prompt.

(a) Time to First Crash (TTFC)

(b) Iteration to First Crash (ITFC)
Fig. 13. 5UGUE V3 and 5GHOUL in discovering the first crash across five targets. Numbers are averaged over five runs for each target and the error bars represent the minimum–maximum range of the observed data.

Fig. 14. Execution time of 5UGUE V3 and 5GHOUL. 5GHOUL runs for a fixed duration, while 5UGUE results are obtained over five runs. The dashed line represents the mean.