Skip to content
KitploitKITPLOIT
ToolsBlog
Log in
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
katana — Let's hijack our bootchain - CVE-2021-30327 | Kitploit
Tools/GitHubGitHub/daniel224455/katana
Embedded Systems SecurityVulnerability AnalysisExploitationShellcodeHardware SecurityPayload DevelopmentFirmware AnalysisBinary Exploitation
GitHubdaniel224455/katana

katana

Let's hijack our bootchain - CVE-2021-30327

View Repository
1732118 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Katana

A BootROM exploit for Qualcomm devices released within 2016 til 2019.

Brief Explanation of the Exploit

With the MSM8998 (Nazgul) SoC, the command 0x13 (SAHARA_RESET_STATE_MACHINE_ID) was added. The command called into boot_sahara_entry, which is supposed to reinitialize Sahara. The flaw is that each call into it decreases the stack pointer by 0x60 and there is no stack guard. With enough calls, we exhaust the available stack space (0x3000), corrupt memory beyond the stack and make stack buffers overlap with some of the global function pointer tables. secboot_verify_cert_signature will read the modulus and signature in BIGINT format into stack buffers. Since crypto_ftbl->ModExp was overwritten by the buffers, secmath_BIGINT_modexp will jump into our shellcode from the modulus.

More can be found at HEXACON2023 - Bug Tales : Life and Death in the Sahara

Known vulnerable SoCs

[!CAUTION] Even if the SoC is vulnerable, it does not mean that you can exploit it! If your SoC is listed here, do NOT store any secrets on a device with it. Cellebrite, MSAB and Oxygen Forensics are able to decrypt the user data on Devices with such SoCs, thanks to this CVE.

VulnerableSoCs

Usage

usage: katana.py [-h] -s SOC -e EXPLOIT [-f FIREHOSE]

A PoC for the CVE-2021-30327 vulnerability in Qualcomm Sahara

options:
  -h, --help            show this help message and exit
  -s, --soc SOC         SoC model
  -e, --exploit EXPLOIT
                        Exploit PBL (CVE-2021-30327) with a payload
  -f, --firehose FIREHOSE
                        DevPrg image in case the payload reinitializes Sahara

Credits

  • CVE-2021-30327 This is the CVE which Katana exploits
  • Iskuri (Christopher Wade) Reported CVE-2021-30327 to Qualcomm
  • Seamus Burke & Aaron Willey - First people who exploited this CVE, showcased it at HEXACON2023
  • R0rt1z2 Helped with sniffing this exploit
  • kethily-daniel Gave me a tool which was exploiting this exact Vulnerability
  • halal-beef Script base
Download Tool