A Journey into Advanced Theoretical Reverse Engineering
Black Hat Asia 2025 · Day 1 · Briefings
Overview
In this compelling Black Hat Asia presentation, Alisa Sage, founder of Zero Day Engineering, unveiled the intricate and previously opaque world of Qualcomm's QDSP6 JTAG and its proprietary In-Silicon Debugger (ISDB). The talk, titled "Unveiling the Mysteries of Qualcomm's QDSP6 JTAG, a Journey into Advanced Theoretical Reverse Engineering," addressed a critical gap in security research: the severe lack of low-level debugging capabilities for Qualcomm's ubiquitous Hexagon architecture. This architecture, a custom Digital Signal Processor (DSP), powers the Snapdragon system-on-chips (SoCs) found in approximately 30% of the global mobile smartphone market, as well as increasingly in laptops.

Key moments
- 0:00 Introduction and speaker's unique research focus.
- 1:06 Explaining Qualcomm's proprietary Hexagon DSP architecture.
- 2:09 The critical problem: lack of Hexagon debugging capabilities.
- 4:05 Snapdragon's multiple DSP cores and distinct RTOS.
- 6:35 Hexagon's unique parallel execution using packet semantics.
- 7:45 Hexagon's NPU expansion to laptops and commercial use.
A Journey into Advanced Theoretical Reverse Engineering
Speakers: Alisa Sage, Founder, Zero Day Engineering
Conference: Black Hat Asia
YouTube: https://www.youtube.com/watch?v=_0W3zeQhBB8
Overview
In this compelling Black Hat Asia presentation, Alisa Sage, founder of Zero Day Engineering, unveiled the intricate and previously opaque world of Qualcomm's QDSP6 JTAG and its proprietary In-Silicon Debugger (ISDB). The talk, titled "Unveiling the Mysteries of Qualcomm's QDSP6 JTAG, a Journey into Advanced Theoretical Reverse Engineering," addressed a critical gap in security research: the severe lack of low-level debugging capabilities for Qualcomm's ubiquitous Hexagon architecture. This architecture, a custom Digital Signal Processor (DSP), powers the Snapdragon system-on-chips (SoCs) found in approximately 30% of the global mobile smartphone market, as well as increasingly in laptops.
Sage's research is significant because the inability to debug Hexagon code at a low level severely hampers offensive security research, vulnerability discovery, and even defensive introspection, making it nearly impossible to detect sophisticated rootkits or analyze complex firmware. By meticulously analyzing open-source code, patent documentation, and developer manuals, Sage theoretically reconstructed how Qualcomm implements debugging internally, circumventing the public lockdown. Her findings provide the first public blueprint for understanding and potentially enabling hardware-level debugging on these critical, yet highly secure, components.
The implications of this work extend beyond academic interest, offering a foundational understanding for security researchers, hardware hackers, and even original equipment manufacturers (OEMs) who have historically been locked out of deep introspection into Qualcomm's proprietary DSPs. Unlocking Hexagon debugging is a crucial step towards auditing the security of baseband modems, neural processing units (NPUs), and other critical components that handle sensitive data and execute complex, high-privilege operations within modern mobile devices.
Background
▶ Watch: Introduction and speaker's unique research focus. (0:00)
Qualcomm's Hexagon architecture is a highly specialized, proprietary custom CPU/DSP architecture integral to all Snapdragon chips currently dominating a significant portion of the mobile and emerging laptop markets. Unlike typical mobile CPUs based on ARM or MIPS, Hexagon is a Very Long Instruction Word (VLIW) architecture, optimized for parallel processing of instructions, high-load sensor inputs, media workflows, and increasingly, neural network operations. Snapdragon SoCs are complex, featuring not just ARM cores running a High-Level Operating System (HLOS) like Android, but also multiple DSPs running a completely different, proprietary Real-Time Operating System (RTOS). These DSPs include the MDSP (mobile DSP for the cellular modem/baseband), CDSP (for sensory input), and the newer NPU (neural processing unit). Each of these DSPs executes large, specialized firmware written in Hexagon opcodes, ranging from hundreds of megabytes to several gigabytes in size.
The primary challenge addressed by Sage's research is the deliberate and comprehensive lack of low-level debugging capabilities for the Hexagon architecture, a stark contrast to the robust debugging tools available for other mainstream CPU architectures. This absence creates a significant barrier for security researchers aiming to find vulnerabilities, develop exploits, or even perform basic introspection to detect malicious activity like rootkits within these critical, privileged components. Without debugging, understanding system behavior, reverse engineering complex firmware, or analyzing crashes becomes an exceedingly difficult, if not impossible, task.
Prior attempts to gain debugging access have been severely limited. Qualcomm offers a hardware product, the Lauterbach TRACE32, which connects to the JTAG output on Snapdragon SoCs. However, its use is heavily restricted, requiring partner endorsement from Qualcomm and non-public configuration information, effectively locking out independent researchers and even many OEMs. Software-based debuggers, common for kernels (e.g., GDB), simply do not exist for the Hexagon RTOS. Some researchers have resorted to building DIY software debuggers by exploiting software vulnerabilities to inject GDB servers into baseband firmware. While demonstrating the pressing need for such tools, this approach is inherently unstable, version-specific, and limited in scope. Even the Hexagon SDK, while providing emulators and simulators for high-level development, offers no utility for real-world hardware vulnerability research on live devices. This landscape underscores the "closed-off" nature of the Hexagon ecosystem and highlights the critical need for a deeper understanding of its internal debugging mechanisms.
Key Findings
▶ Watch: The critical problem: lack of Hexagon debugging capabilities. (2:09)
Alisa Sage's groundbreaking research reveals the existence and internal workings of Qualcomm's proprietary In-Silicon Debugger (ISDB), a previously undocumented hardware ecosystem that acts as the central control for all debugging activities on Hexagon cores. Her findings are crucial for anyone seeking to enable low-level debugging on these widely deployed, yet highly opaque, processors.
The core discovery is that ISDB is not merely a software component but a dedicated internal circuitry within Snapdragon SoCs. It effectively sits between the JTAG infrastructure and the Hexagon cores, introducing a sophisticated layer of security and control over debugging access. This is a significant departure from traditional JTAG implementations, which often provide unrestricted hardware access if exposed.
Key aspects of the ISDB system uncovered by Sage include:
- Proprietary Control: ISDB governs both software and hardware debugging on Hexagon cores, acting as a gatekeeper for JTAG functionality itself.
- Trusted vs. Untrusted Modes: The system distinguishes between "trusted" and "untrusted" debugging modes. Full debugging functionality is reserved for Qualcomm's internal kernel developers (trusted mode), while OEMs and external researchers are relegated to a restricted "untrusted" mode.
CIS_CONFIGRegister: A critical, undocumented register,CIS_CONFIG, found in older Qualcomm programmer references, plays a central role. It allows the privileged software (kernel) to control ISDB features, including setting the trusted/untrusted mode and communicating 40-bit data packets to the ISDB.- "Magic Cookie" Mechanism: Sage discovered a specific byte sequence,
0x53444247(representing "SDBG"), which acts as a "magic cookie." The Hexagon RTOS kernel (or other supervisor-mode firmware) actively scans shared memory (IMM) for this cookie. - Kernel as "Garden Keeper": The kernel functions as a "garden keeper," possessing the unique capability to enable or disable ISDB. Upon finding the magic cookie in IMM at a specific, application-dependent offset, the kernel executes enablement logic for ISDB.
- Extensive Security Checks: Before enabling ISDB, the kernel performs numerous, complex security checks, including verifying fuses, other IMM locations, build-time variables, flags, and attestation certificates. These checks represent significant hurdles for unauthorized debugging.
By piecing together information from Trace32 manuals, discarded open-source kernel code, and vague Qualcomm patents, Sage has provided the first public theoretical framework for understanding how Hexagon debugging is managed, laying the groundwork for future practical enablement efforts.
Technical Deep Dive
▶ Watch: Snapdragon's multiple DSP cores and distinct RTOS. (4:05)
The Qualcomm Hexagon architecture is fundamentally different from typical general-purpose processors. It employs a VLIW (Very Long Instruction Word) design, allowing multiple instructions to be grouped into "packets" (indicated by curly braces in assembly snippets) that execute in parallel on the hardware, not speculatively. This parallel execution is critical for its high-performance workloads, such as cellular modem processing, sensory data aggregation, and neural network inference. The Hexagon cores run a proprietary Real-Time Operating System (RTOS), distinct from the Android HLOS, and host critical firmware for components like the MDSP (baseband), CDSP, and NPU.
The crux of the problem lies in the absence of public, low-level debugging tools for this architecture. While Qualcomm provides the Lauterbach TRACE32 hardware debugger, its operational setup is shrouded in secrecy, requiring direct Qualcomm endorsement and non-public configuration details. This makes it inaccessible to the broader security community. Similarly, software debuggers like GDB are non-existent for the Hexagon RTOS, and the Hexagon SDK's emulators are inadequate for real-world vulnerability research.
Sage's breakthrough began by scrutinizing TRACE32 manuals and open-source code related to the MSM (Mobile Station Modem) kernel. She noticed curious, often unused, mentions of "ISDB debug registers" and macros related to "ISDB" in various drivers and even LLVM. Intriguingly, much of this ISDB-related code was later removed from public repositories, suggesting a deliberate attempt to obscure its existence. Lacking direct hardware access or extensive firmware reverse engineering, Sage turned to Qualcomm patents, which, despite their vague nature designed to claim ownership without full disclosure, provided crucial structural details about the ISDB.
The In-Silicon Debugger (ISDB) is revealed as a proprietary hardware block within the Snapdragon SoC, strategically positioned between the JTAG infrastructure and the Hexagon cores. JTAG, a well-known standard for testing microelectronic circuits, typically offers powerful, unprivileged access to a chip's memory and registers, making it a prime target for hardware reverse engineers. However, Qualcomm's ISDB introduces a unique security layer, preventing direct, unrestricted JTAG access to the Hexagon cores.
The ISDB communicates through a set of undocumented ISDB registers, such as ISDB_DBG_STATUS, ISDB_DBG_ENABLE, and ISDB_DBG_GP0. A critical distinction is that some of these registers are accessible to the Hexagon core running in supervisor mode (i.e., the kernel), while the majority are only accessible via JTAG. This bifurcated access highlights Qualcomm's control over who can manipulate debugging functionality.
A key security feature is the trusted versus untrusted debugging mode. Qualcomm's internal developers are granted "trusted" access, which provides full ISDB functionality. External parties, including OEMs and independent researchers, are restricted to "untrusted" mode, which offers a limited set of debugging capabilities. The ability to switch between these modes is a highly privileged operation.
Central to controlling the ISDB from the software side is the CIS_CONFIG register. Discovered in older versions of Qualcomm's programmer reference manuals for Hexagon, this undocumented register is accessible to Hexagon programs running at the supervisor privilege level. It contains crucial bits, notably ISDB_CORE_READY (indicating ISDB availability) and, most importantly, ISDB_TRUSTED_UNTRUSTED, which directly controls the debugging mode. The CIS_CONFIG register also serves as a conduit for a 40-bit data packet to communicate with the ISDB. Programming this register involves using privileged Hexagon instructions like ASSIGN to set specific bits, followed by an ISYNC instruction to synchronize the changes. Mentions of this register and its programming have been systematically removed from more recent Qualcomm documentation.
The most intriguing finding related to ISDB enablement is the "magic cookie" mechanism. Sage discovered that the Hexagon Qualcomm Real-Time OS (QRTOS) kernel, acting as a "garden keeper," plays a pivotal role in enabling ISDB debugging. The kernel actively scans a specific, application-unique offset within the Inter-Processor Memory (IMM), a shared memory region on the SoC, for a particular byte sequence: 0x53444247, which translates to "SDBG."
When the kernel finds this "magic cookie" at the designated IMM location, it triggers a series of actions. However, before proceeding to actual ISDB enablement, the kernel performs a robust set of security checks. These include verifying various fuses, inspecting other specific locations in IMM, checking build-time variables, flags, and attestation certificates. Sage estimates at least a dozen such checks exist, designed to prevent unauthorized debugging on production devices. Only if all these checks are successfully bypassed does the kernel proceed to the enablement code.
The enablement code itself involves assigning specific values to the CIS_CONFIG register to set the ISDB-related bits, followed by the ISYNC instruction. This sequence activates the ISDB infrastructure. The challenge for researchers is that this kernel code is part of the secure boot chain, meaning it cannot be directly modified without exploiting a software vulnerability.
Therefore, the theoretical "recipe" for enabling JTAG-level debugging on Hexagon cores involves:
- Gaining JTAG access to the device (likely a development board, as production devices might have JTAG fused off or obscured).
- Placing the "magic cookie" (
0x53444247) at the correct, application-specific offset in the IMM. - On a development board, this might be sufficient if the kernel's checks are minimal or absent.
- On a production device, one would need to either bypass all the numerous kernel checks or find a way to inject the low-level ISDB enablement code (the
ASSIGNtoCIS_CONFIGandISYNCsequence) into an early boot stage of a supervisor-privileged Hexagon component, such as the modem's bootloader, using a software vulnerability.
This detailed understanding of ISDB, its registers, the CIS_CONFIG interaction, and the "magic cookie" mechanism provides the foundational knowledge required for any future practical attempts to unlock Hexagon debugging.
Demo / Proof of Concept
▶ Watch: Hexagon's unique parallel execution using packet semantics. (6:35)
Alisa Sage explicitly stated that her research was based entirely on open-source intelligence, including Qualcomm patents, developer manuals, and publicly available kernel code. She did not engage in hardware manipulation, decapsulation, or extensive firmware reverse engineering for this particular project. Consequently, no live demonstration or functional proof-of-concept code was presented. The "recipe" outlined for enabling debugging is theoretical, derived from the discovered internal mechanisms, and would require further practical experimentation to validate on actual hardware.
Defensive Implications
▶ Watch: Hexagon's NPU expansion to laptops and commercial use. (7:45)
Qualcomm's implementation of the In-Silicon Debugger (ISDB) and its intricate control mechanisms present significant defensive implications, highlighting a sophisticated approach to securing critical SoC components. Unlike many hardware architectures where exposed JTAG often grants unfettered access, Qualcomm has engineered a multi-layered defense around Hexagon core debugging.
- JTAG Hardening: The most immediate implication is that simply gaining JTAG access to a Snapdragon SoC is not enough to debug Hexagon cores. The ISDB acts as a formidable gatekeeper, requiring specific software enablement. This means defenders cannot solely rely on physically securing JTAG pins; they must also understand and monitor the software-level mechanisms that control ISDB.
- Kernel as a Security Enforcer: The Qualcomm Real-Time OS (QRTOS) kernel's role as the "garden keeper" for ISDB is a critical security feature. By requiring the kernel to find a "magic cookie" in shared memory (IMM) and pass numerous, complex checks (fuses, attestation, build-time variables) before enabling debugging, Qualcomm has significantly raised the bar for unauthorized access. Defenders should focus on ensuring the integrity of this kernel and its associated enablement logic. Any deviation or bypass of these checks could indicate a compromise.
- Introspection Challenges: For defenders, the lack of accessible low-level debugging tools makes forensic analysis, rootkit detection, and general system introspection on Hexagon cores incredibly difficult. While the ISDB is designed to prevent unauthorized debugging, its existence, once understood, could theoretically be leveraged by defenders (with Qualcomm's cooperation or through similar research) to develop their own introspection tools for detecting malicious firmware or unusual behavior on the baseband or NPU.
- Supply Chain Security: The "trusted" versus "untrusted" debugging modes underscore Qualcomm's control over its ecosystem. OEMs and other partners operate in a restricted "untrusted" mode, limiting their ability to deeply audit the proprietary firmware. This highlights a potential supply chain blind spot, where a lack of transparency could hinder comprehensive security assessments by device manufacturers.
- Future Defensive Strategies: Understanding the ISDB's internal wiring provides a blueprint for future defensive strategies. For instance, monitoring the
CIS_CONFIGregister for unauthorized changes, or detecting the presence of the "magic cookie" in IMM at unexpected times, could serve as indicators of compromise. Furthermore, hardening the kernel's enablement logic and ensuring the integrity of the attestation mechanisms that gate ISDB access are paramount.
In essence, Qualcomm has implemented a robust security posture around Hexagon debugging. While challenging for offensive researchers, this also means that any successful compromise that enables debugging would represent a highly sophisticated attack, requiring deep knowledge of these proprietary mechanisms and likely the exploitation of multiple vulnerabilities. Defenders must recognize the significance of these hidden controls and consider how they might be leveraged both to secure their devices and, eventually, to gain crucial visibility into these currently opaque, yet highly critical, components.
Key Takeaways
- Qualcomm's Hexagon architecture, prevalent in Snapdragon SoCs (30% of mobile market), severely lacks public low-level debugging capabilities, hindering security research and defensive introspection.
- The In-Silicon Debugger (ISDB) is a proprietary hardware ecosystem within Snapdragon SoCs that acts as a secure gatekeeper, controlling all debugging access to Hexagon cores and sitting between JTAG and the cores.
- ISDB implements trusted and untrusted debugging modes, with full functionality reserved for Qualcomm developers, while external parties face restrictions.
- The Qualcomm Real-Time OS (QRTOS) kernel functions as a "garden keeper," enabling ISDB debugging by detecting a "magic cookie" (
0x53444247) in shared memory (IMM) at a specific offset. - Enabling ISDB on production devices requires bypassing a dozen or more complex security checks (e.g., fuses, attestation certificates) implemented in the kernel's enablement logic, or injecting privileged code.
- This theoretical research, based on open-source code and patents, provides the first public foundation for understanding and potentially enabling hardware-level debugging on Hexagon cores, critical for future offensive and defensive security efforts.
About the Speaker(s)
Alisa Sage is the founder of Zero Day Engineering, a training and research project focused on advanced security topics. She is an independent hacker whose primary research interests lie in binary exploitation and vulnerability research, with a particular focus on browsers and hypervisors. Alisa has a notable track record, having showcased some of her exploits at Pwn2Own 2021 and actively participating in vendor bug bounty programs. Her work on Qualcomm's Hexagon architecture, as presented in this talk, represents a "side project" to her core research workflow, demonstrating her broad expertise and commitment to uncovering cutting-edge zero-day vulnerabilities, particularly in critical, low-level components like basebands.
Reviews
Dr. Zero (Offensive Security Researcher) — MUST SEE
Alisa Sage's research into Qualcomm's QDSP6 JTAG and ISDB is a monumental piece of theoretical reverse engineering. By meticulously piecing together fragments from patents, kernel code, and manuals, she's provided the first public blueprint for understanding how debugging is controlled on the Hexagon architecture. This isn't just academic curiosity; it's foundational work that unlocks the ability for serious researchers to audit the most opaque, yet critical, components of modern mobile devices, laying the groundwork for future vulnerability discovery and defensive innovation.
Heather Calloway (CISO) — STRONG ACCEPT
Alisa Sage's theoretical reconstruction of Qualcomm's In-Silicon Debugger (ISDB) on Hexagon architecture is a critical piece of research that illuminates a significant blind spot in mobile and emerging laptop security. While lacking an immediate operational proof-of-concept, this work provides the foundational blueprint for understanding how low-level debugging is controlled and gated on devices powering 30% of the global mobile market. It is a vital step towards addressing the pervasive lack of introspection into these high-privilege components, forcing the industry to confront a significant, hidden supply chain risk.