_research / mediatek-brom-kamakiri-exploit-deep-dive
RESEARCH ANALYSIS 9 min read

Inside Kamakiri: How a MediaTek Boot ROM Flaw Unlocks Millions of Android Devices

The kamakiri exploit leverages a fundamental flaw in MediaTek's Boot ROM, enabling full device compromise before the OS even loads. Here's what security teams need to know.

2026-05-02 · Source: R0rt1z2 Research Blog
🔬
RESEARCH ANALYSIS

This analysis is based on research published by R0rt1z2 Research Blog. CypherByte adds analysis, context, and security team recommendations.

Executive Summary

A detailed technical dissection published by security researcher R0rt1z2 sheds new light on kamakiri, an exploit targeting the MediaTek Boot ROM (BROM) — the immutable piece of firmware that executes before any operating system code ever runs on hundreds of millions of Android devices. Because the Boot ROM is, by definition, read-only silicon-level code, any exploitable flaw residing there cannot be patched through a conventional over-the-air software update. This places the vulnerability in a uniquely dangerous category: persistent, pre-OS, and structurally difficult to remediate at scale. Security engineers, mobile device management (MDM) administrators, OEM security teams, and enterprise procurement officers responsible for Android fleets built on MediaTek silicon should treat this research as high-priority reading.

The research is equally relevant to the offensive security and forensics communities, where BROM-level exploits have historically served as the foundation for both advanced persistent implants and legitimate device unlocking workflows. Understanding exactly how kamakiri operates — its primitive, its trigger conditions, and its post-exploitation reach — is essential for threat modelers assessing risk in environments that rely on MediaTek-powered endpoints, embedded devices, or consumer electronics. CypherByte presents this analysis to help defenders contextualize the threat, evaluate exposure, and act on concrete mitigations where they exist.

Key Finding: The kamakiri exploit achieves arbitrary code execution inside MediaTek's Boot ROM execution environment, a trust boundary that sits below the bootloader, TEE, and operating system — making conventional endpoint security controls entirely blind to its activity.

Technical Analysis

The MediaTek BROM (Boot ROM) is mask-programmed code embedded directly into the SoC during fabrication. Its primary function is to initialize minimal hardware, verify the next stage of the boot chain, and expose a USB download mode — sometimes called BROM mode or preloader mode — that allows authorized tools to flash firmware onto the device. This USB interface is the attack surface that kamakiri targets.

According to R0rt1z2's research, the exploit leverages a stack-based buffer overflow within the BROM's USB command handling routines. When a device is held in BROM mode — typically achieved by holding specific hardware button combinations or by shorting designated test points — it begins listening for commands over USB using a proprietary MediaTek protocol. The BROM processes incoming data into fixed-size stack buffers without adequately validating the length of attacker-supplied input. By sending a specially crafted oversized payload, an attacker can overwrite the saved return address on the BROM stack and redirect execution to controlled code.

Exploit Primitive: Stack buffer overflow in USB command parsing → return address overwrite → arbitrary code execution in BROM context (highest privilege, pre-OS, no ASLR, no stack canaries in ROM).

The BROM execution environment is notably hostile to modern exploit mitigations. Because the code is immutable ROM, there is no ASLR, no stack canary infrastructure, and no ability for MediaTek to push a patch to the ROM itself. Memory addresses are fixed and consistent across all devices sharing the same SoC revision, making reliable exploitation straightforward once the overflow offset is known. The researcher's work involves identifying the precise offset, locating a suitable ROP (Return-Oriented Programming) gadget chain or direct shellcode landing zone within the ROM's address space, and crafting the USB payload accordingly.

Post-exploitation capability is substantial. Code executing in the BROM context runs with full access to DRAM, eFuses (which store device keys, lock bits, and security configuration), and the memory-mapped peripheral bus. This means a successful kamakiri payload can: read and write arbitrary physical memory, dump or modify eFuse values (subject to one-time-programmable constraints), load unsigned bootloaders, and establish a foothold that survives a full factory reset since it operates below the software partition layer. The researcher details the use of these primitives to achieve full chain unlock on target devices — bypassing MediaTek's SLA (Smart Phone Lock Architecture) and DA (Download Agent) authentication mechanisms.

Impact Assessment

The breadth of affected hardware is significant. MediaTek is the world's largest mobile chipset vendor by volume, supplying SoCs to a vast range of Android OEMs including devices sold across Southeast Asia, Latin America, Africa, and increasingly in North American and European budget and mid-range segments. The kamakiri exploit, as documented, targets multiple MediaTek SoC families, with the BROM vulnerability being architectural rather than isolated to a single chip revision. Specific SoC families referenced in the underlying research community include MT6580, MT6735, MT6737, MT6739, MT6750, MT6753, MT6755, MT6757, MT6763, MT6765, MT6771, and MT6785, among others spanning several product generations.

In practice, physical access to the device is required to trigger BROM mode — this is not a remote exploitation scenario under current documented conditions. However, the physical access requirement should not be dismissed as a meaningful barrier in several real-world threat scenarios: supply chain interdiction, border crossing device inspections, lost or stolen enterprise devices, insider threat actors with brief unsupervised device access, and nation-state adversaries operating in physical proximity. For consumer devices, the kamakiri technique underpins a thriving ecosystem of unofficial bootloader unlocking tools, with security implications for BYOD policies across corporate environments.

Risk Escalation Factor: Because exploitation occurs below the OS, full disk encryption, MDM enrollment, and remote wipe capabilities are all defeatable if an adversary achieves BROM-level code execution with sufficient time and access.

CypherByte's Perspective

Kamakiri is a crystalline example of a threat class that the mobile security industry has systematically underinvested in defending against: silicon-level trust boundary violations. The Android security model — with its verified boot chain, TEE isolation, and layered permission model — is architecturally sound when the BROM behaves as intended. When it does not, the entire edifice above it becomes contingent on a foundation that has already been compromised. This is precisely the threat model that sophisticated nation-state actors have exploited in documented cases against journalists, dissidents, and high-value corporate targets using tools like Pegasus and its contemporaries.

What makes R0rt1z2's research particularly valuable to the defender community is its transparency. The detailed public documentation of the vulnerability mechanism — available at blog.r0rt1z2.com — enables security researchers, OEM security teams, and threat intelligence analysts to build accurate detection logic and risk models rather than working from assumptions. CypherByte's position is that responsible publication of this class of research, even when full remediation is not possible, advances the aggregate security posture of the ecosystem by forcing honest risk accounting. Vendors and enterprises that were implicitly treating MediaTek BROM as a trusted black box now have evidence that this assumption requires reexamination.

Indicators and Detection

Detection of kamakiri exploitation presents genuine challenges because the attack occurs entirely below the operating system's visibility horizon. Conventional EDR, mobile threat defense (MTD), and MDM agents have zero telemetry into BROM execution. However, several indirect indicators and environmental controls can assist defenders:

USB Enumeration Anomalies: A device entering BROM mode enumerates on the host system as a MediaTek-specific USB device with Vendor ID 0x0E8D and device IDs associated with BROM/preloader modes (e.g., 0x0003, 0x2000). Monitoring USB enumeration logs on managed endpoints and flagging unexpected MediaTek BROM device connections can surface exploitation attempts or unauthorized unlock workflows.

Boot State Attestation Failures: Post-exploitation, devices that have had their bootloader unlocked or had unauthorized code executed in BROM context will typically fail Android Verified Boot (AVB) attestation checks. MDM solutions supporting hardware attestation via Android SafetyNet / Play Integrity API should flag MEETS_BASIC_INTEGRITY failures or basicIntegrity: false responses as requiring investigation on affected SoC families.

eFuse State Changes: Where OEM diagnostic tooling or factory test access is available, comparing eFuse state before and after a suspected compromise event may reveal unauthorized bit writes. This is operationally complex but applicable in OEM and high-security enterprise contexts.

Physical Security Indicators: Devices returned from repair, transit, or any period of uncontrolled physical access should be treated as potentially compromised and subjected to attestation verification before being reintroduced to sensitive environments.

Recommendations

For Enterprise Security Teams: Implement USB device class whitelisting on corporate endpoints to prevent unauthorized MediaTek BROM USB enumeration. Enforce hardware attestation checks via your MDM platform and establish a policy of automatic quarantine for devices that fail Play Integrity API strong integrity checks. Review BYOD policies governing MediaTek-chipset devices in environments where sensitive data is processed.

For OEM Security and Product Teams: Engage MediaTek's product security team to understand which SoC revisions are confirmed affected and what silicon-level mitigations (if any) exist in newer tape-outs. Evaluate whether your device's Download Agent authentication and SLA implementation provides meaningful defense-in-depth even against an actor with BROM-level access. Consider whether your threat model warrants hardware security module integration for key material that must survive a BROM compromise scenario.

For MDM Administrators: Ensure attestation-based access controls are enforced for all corporate resources accessed from managed Android devices on MediaTek hardware. Do not rely solely on software-layer controls — assume that a device with unverified boot state integrity may have been fully compromised below the software layer.

For Security Researchers: R0rt1z2's methodology — combining USB protocol reverse engineering with ROM disassembly and dynamic testing via custom tooling — represents a reproducible framework for evaluating other vendor BROM implementations. We encourage security teams with appropriate hardware lab capabilities to conduct similar assessments against device families in their threat models.

Source Credit: This analysis is based on original research published by R0rt1z2 at blog.r0rt1z2.com — "Dissecting a mantis - the kamakiri exploit". CypherByte thanks the researcher for the detailed and transparent technical disclosure that made this analysis possible.
// TOPICS
#research#analysis

How this article was produced

This analysis was produced by CypherByte's automated research pipeline, starting from the published summary of the original report credited below. Articles are published automatically. It can include context and recommendations that are not in the original report, so read the original for the researchers' own findings.

Sources

Spotted an error? Tell us on X (@cypherbyteio) with this page's address so we can fix it.

// WANT MORE LIKE THIS?

CypherByte Premium is coming soon, with deep-dive writeups and a weekly threat briefing. Join the waitlist for founding member pricing.