feat(device): Replace chip_db placeholders with real gaster offsets
Complete chip offset table from gaster source for 16 BootROM variants (A9 through A11/M2). Includes all memory addresses, ROP gadgets, heap spray params, and callback overwrite offsets. Extended chip_info_t with full exploit configuration fields. Split table into chip_db_table.h. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6cd54f5272
commit
e2f936d6b7
4 changed files with 504 additions and 257 deletions
|
|
@ -6,18 +6,46 @@
|
||||||
/*
|
/*
|
||||||
* chip_info_t -- static descriptor for a known Apple SoC variant.
|
* chip_info_t -- static descriptor for a known Apple SoC variant.
|
||||||
*
|
*
|
||||||
* heap_base : DFU SRAM heap base (ttbr0_addr from gaster); 0 if not
|
* All memory addresses and exploit parameters are sourced from gaster
|
||||||
* vulnerable.
|
* (github.com/0x7ff/gaster). Fields are 0 when unused for a given chip.
|
||||||
* payload_base : Insecure memory / shellcode load address
|
|
||||||
* (insecure_memory_base from gaster); 0 if not vulnerable.
|
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t cpid;
|
uint32_t cpid;
|
||||||
const char *name; /* "A7", "A8", ..., "A17" */
|
const char *name; /* "A7", "A8", ..., "A17" */
|
||||||
const char *marketing; /* "iPhone 5s", "iPhone X", etc. */
|
const char *marketing; /* "iPhone 5s", "iPhone X", etc. */
|
||||||
int checkm8_vulnerable; /* 1 = A5-A11, 0 = A12+ */
|
int checkm8_vulnerable; /* 1 = A5-A11, 0 = A12+ */
|
||||||
uint64_t heap_base; /* DFU heap base (0 if not vuln) */
|
|
||||||
uint64_t payload_base; /* Shellcode addr (0 if not vuln) */
|
/* Exploit config */
|
||||||
|
uint16_t config_large_leak; /* heap spray iterations (0 = no-leak path) */
|
||||||
|
uint16_t config_overwrite_pad; /* overwrite padding size */
|
||||||
|
uint16_t config_hole; /* hole count for newer chips (0 if unused) */
|
||||||
|
|
||||||
|
/* Memory addresses */
|
||||||
|
uint64_t insecure_memory_base;
|
||||||
|
uint64_t patch_addr;
|
||||||
|
uint64_t memcpy_addr;
|
||||||
|
uint64_t aes_crypto_cmd;
|
||||||
|
uint64_t boot_tramp_end;
|
||||||
|
uint64_t gUSBSerialNumber;
|
||||||
|
uint64_t dfu_handle_request;
|
||||||
|
uint64_t usb_core_do_transfer;
|
||||||
|
uint64_t dfu_handle_bus_reset;
|
||||||
|
uint64_t handle_interface_request;
|
||||||
|
uint64_t usb_create_string_descriptor;
|
||||||
|
uint64_t usb_serial_number_string_descriptor;
|
||||||
|
|
||||||
|
/* ROP gadgets (A10+ only, 0 for older) */
|
||||||
|
uint64_t ttbr0_addr;
|
||||||
|
uint64_t tlbi;
|
||||||
|
uint64_t nop_gadget;
|
||||||
|
uint64_t ret_gadget;
|
||||||
|
uint64_t func_gadget;
|
||||||
|
uint64_t write_ttbr0;
|
||||||
|
uint64_t ttbr0_vrom_off;
|
||||||
|
uint64_t ttbr0_sram_off;
|
||||||
|
|
||||||
|
/* ARMv7 payload dest (0 for ARM64 chips) */
|
||||||
|
uint64_t payload_dest_armv7;
|
||||||
} chip_info_t;
|
} chip_info_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
270
include/device/chip_db_table.h
Normal file
270
include/device/chip_db_table.h
Normal file
|
|
@ -0,0 +1,270 @@
|
||||||
|
#ifndef CHIP_DB_TABLE_H
|
||||||
|
#define CHIP_DB_TABLE_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* chip_db_table.h -- static chip table with real gaster offsets (part 1).
|
||||||
|
*
|
||||||
|
* Included by chip_db.c only. Do not include this file elsewhere.
|
||||||
|
* All values sourced from gaster (github.com/0x7ff/gaster).
|
||||||
|
*
|
||||||
|
* Part 2 (ROP-capable chips and A12+ entries) is in chip_db_table_rop.h,
|
||||||
|
* which is included at the end of the array below.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* clang-format off */
|
||||||
|
static const chip_info_t g_chip_table[] = {
|
||||||
|
|
||||||
|
/* ================================================================ */
|
||||||
|
/* ARMv7 chips (32-bit) */
|
||||||
|
/* ================================================================ */
|
||||||
|
|
||||||
|
/* CPID 0x8947 -- A7, iPhone 5s / iPad Air */
|
||||||
|
/* gaster: iBoot-1458.2 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8947,
|
||||||
|
.name = "A7",
|
||||||
|
.marketing = "iPhone 5s / iPad Air",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_large_leak = 626,
|
||||||
|
.config_overwrite_pad = 0x660,
|
||||||
|
.insecure_memory_base = 0x34000000,
|
||||||
|
.memcpy_addr = 0x9A3C,
|
||||||
|
.aes_crypto_cmd = 0x7061,
|
||||||
|
.gUSBSerialNumber = 0x3402DDF8,
|
||||||
|
.dfu_handle_request = 0x3402D92C,
|
||||||
|
.usb_core_do_transfer = 0x79ED,
|
||||||
|
.dfu_handle_bus_reset = 0x3402D944,
|
||||||
|
.handle_interface_request = 0x7BC9,
|
||||||
|
.usb_create_string_descriptor = 0x72A9,
|
||||||
|
.usb_serial_number_string_descriptor = 0x3402C2DA,
|
||||||
|
.payload_dest_armv7 = 0x34039800,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8950 -- iBoot-1145.3 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8950,
|
||||||
|
.name = "A9",
|
||||||
|
.marketing = "Apple TV (3rd gen)",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_large_leak = 659,
|
||||||
|
.config_overwrite_pad = 0x640,
|
||||||
|
.insecure_memory_base = 0x10000000,
|
||||||
|
.memcpy_addr = 0x9ACC,
|
||||||
|
.aes_crypto_cmd = 0x7301,
|
||||||
|
.gUSBSerialNumber = 0x10061F80,
|
||||||
|
.dfu_handle_request = 0x10061A24,
|
||||||
|
.usb_core_do_transfer = 0x7621,
|
||||||
|
.dfu_handle_bus_reset = 0x10061A3C,
|
||||||
|
.handle_interface_request = 0x8161,
|
||||||
|
.usb_create_string_descriptor = 0x7C55,
|
||||||
|
.usb_serial_number_string_descriptor = 0x100600D8,
|
||||||
|
.payload_dest_armv7 = 0x10079800,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8955 -- iBoot-1145.3.3 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8955,
|
||||||
|
.name = "A9",
|
||||||
|
.marketing = "Apple TV (3rd gen, rev A)",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_large_leak = 659,
|
||||||
|
.config_overwrite_pad = 0x640,
|
||||||
|
.insecure_memory_base = 0x10000000,
|
||||||
|
.memcpy_addr = 0x9B0C,
|
||||||
|
.aes_crypto_cmd = 0x7341,
|
||||||
|
.gUSBSerialNumber = 0x10061F80,
|
||||||
|
.dfu_handle_request = 0x10061A24,
|
||||||
|
.usb_core_do_transfer = 0x7661,
|
||||||
|
.dfu_handle_bus_reset = 0x10061A3C,
|
||||||
|
.handle_interface_request = 0x81A1,
|
||||||
|
.usb_create_string_descriptor = 0x7C95,
|
||||||
|
.usb_serial_number_string_descriptor = 0x100600D8,
|
||||||
|
.payload_dest_armv7 = 0x10079800,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x7002 -- S1P/S2, Apple Watch Series 1/2 */
|
||||||
|
/* gaster: iBoot-2098.0.0.2.4 */
|
||||||
|
{
|
||||||
|
.cpid = 0x7002,
|
||||||
|
.name = "S1P",
|
||||||
|
.marketing = "Apple Watch Series 1/2",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x500,
|
||||||
|
.insecure_memory_base = 0x46018000,
|
||||||
|
.memcpy_addr = 0x89F4,
|
||||||
|
.aes_crypto_cmd = 0x6341,
|
||||||
|
.gUSBSerialNumber = 0x46005958,
|
||||||
|
.dfu_handle_request = 0x46005898,
|
||||||
|
.usb_core_do_transfer = 0x6E59,
|
||||||
|
.dfu_handle_bus_reset = 0x460058B0,
|
||||||
|
.handle_interface_request = 0x7081,
|
||||||
|
.usb_create_string_descriptor = 0x6745,
|
||||||
|
.usb_serial_number_string_descriptor = 0x4600034A,
|
||||||
|
.payload_dest_armv7 = 0x46007800,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8002 -- S3, Apple Watch Series 3 */
|
||||||
|
/* gaster: iBoot-2651.0.0.1.31 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8002,
|
||||||
|
.name = "S3",
|
||||||
|
.marketing = "Apple Watch Series 3",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x5C0,
|
||||||
|
.config_hole = 5,
|
||||||
|
.insecure_memory_base = 0x48818000,
|
||||||
|
.memcpy_addr = 0xB6F8,
|
||||||
|
.aes_crypto_cmd = 0x86DD,
|
||||||
|
.gUSBSerialNumber = 0x48802AB8,
|
||||||
|
.dfu_handle_request = 0x48806344,
|
||||||
|
.usb_core_do_transfer = 0x9411,
|
||||||
|
.dfu_handle_bus_reset = 0x4880635C,
|
||||||
|
.handle_interface_request = 0x95F1,
|
||||||
|
.usb_create_string_descriptor = 0x8CA5,
|
||||||
|
.usb_serial_number_string_descriptor = 0x4880037A,
|
||||||
|
.payload_dest_armv7 = 0x48806E00,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8004 -- S3, Apple Watch Series 3 (GPS+Cellular) */
|
||||||
|
/* gaster: iBoot-2651.0.0.3.3 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8004,
|
||||||
|
.name = "S3",
|
||||||
|
.marketing = "Apple Watch Series 3 (GPS+Cellular)",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x5C0,
|
||||||
|
.config_hole = 5,
|
||||||
|
.insecure_memory_base = 0x48818000,
|
||||||
|
.memcpy_addr = 0xA884,
|
||||||
|
.aes_crypto_cmd = 0x786D,
|
||||||
|
.gUSBSerialNumber = 0x48802AE8,
|
||||||
|
.dfu_handle_request = 0x48806384,
|
||||||
|
.usb_core_do_transfer = 0x85A1,
|
||||||
|
.dfu_handle_bus_reset = 0x4880639C,
|
||||||
|
.handle_interface_request = 0x877D,
|
||||||
|
.usb_create_string_descriptor = 0x7E35,
|
||||||
|
.usb_serial_number_string_descriptor = 0x488003CA,
|
||||||
|
.payload_dest_armv7 = 0x48806E00,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* ================================================================ */
|
||||||
|
/* ARM64 chips (A8 - A9 era, no ROP gadgets needed) */
|
||||||
|
/* ================================================================ */
|
||||||
|
|
||||||
|
/* CPID 0x7000 -- A8 variant */
|
||||||
|
/* gaster: iBoot-1992.0.0.1.19 */
|
||||||
|
{
|
||||||
|
.cpid = 0x7000,
|
||||||
|
.name = "A8",
|
||||||
|
.marketing = "iPod touch 6G / iPad mini 4",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x500,
|
||||||
|
.insecure_memory_base = 0x180380000,
|
||||||
|
.patch_addr = 0x100007E98,
|
||||||
|
.memcpy_addr = 0x100010E70,
|
||||||
|
.aes_crypto_cmd = 0x10000DA90,
|
||||||
|
.boot_tramp_end = 0x1800E1000,
|
||||||
|
.gUSBSerialNumber = 0x1800888C8,
|
||||||
|
.dfu_handle_request = 0x180088878,
|
||||||
|
.usb_core_do_transfer = 0x10000EBB4,
|
||||||
|
.dfu_handle_bus_reset = 0x180088898,
|
||||||
|
.handle_interface_request = 0x10000EEE4,
|
||||||
|
.usb_create_string_descriptor = 0x10000E074,
|
||||||
|
.usb_serial_number_string_descriptor = 0x18008062A,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x7001 -- A8X, iPad Air 2 */
|
||||||
|
/* gaster: iBoot-1991.0.0.2.16 */
|
||||||
|
{
|
||||||
|
.cpid = 0x7001,
|
||||||
|
.name = "A8X",
|
||||||
|
.marketing = "iPad Air 2",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x500,
|
||||||
|
.insecure_memory_base = 0x180380000,
|
||||||
|
.patch_addr = 0x10000AD04,
|
||||||
|
.memcpy_addr = 0x100013F10,
|
||||||
|
.aes_crypto_cmd = 0x100010A90,
|
||||||
|
.boot_tramp_end = 0x1800E1000,
|
||||||
|
.gUSBSerialNumber = 0x180088E48,
|
||||||
|
.dfu_handle_request = 0x180088DF8,
|
||||||
|
.usb_core_do_transfer = 0x100011BB4,
|
||||||
|
.dfu_handle_bus_reset = 0x180088E18,
|
||||||
|
.handle_interface_request = 0x100011EE4,
|
||||||
|
.usb_create_string_descriptor = 0x100011074,
|
||||||
|
.usb_serial_number_string_descriptor = 0x180080C2A,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8960 -- A10 Fusion (early iBoot) */
|
||||||
|
/* gaster: iBoot-1704.10 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8960,
|
||||||
|
.name = "A10",
|
||||||
|
.marketing = "iPhone 7 / iPhone 7 Plus",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_large_leak = 7936,
|
||||||
|
.config_overwrite_pad = 0x5C0,
|
||||||
|
.insecure_memory_base = 0x180380000,
|
||||||
|
.patch_addr = 0x100005CE0,
|
||||||
|
.memcpy_addr = 0x10000ED50,
|
||||||
|
.aes_crypto_cmd = 0x10000B9A8,
|
||||||
|
.boot_tramp_end = 0x1800E1000,
|
||||||
|
.gUSBSerialNumber = 0x180086CDC,
|
||||||
|
.dfu_handle_request = 0x180086C70,
|
||||||
|
.usb_core_do_transfer = 0x10000CC78,
|
||||||
|
.dfu_handle_bus_reset = 0x180086CA0,
|
||||||
|
.handle_interface_request = 0x10000CFB4,
|
||||||
|
.usb_create_string_descriptor = 0x10000BFEC,
|
||||||
|
.usb_serial_number_string_descriptor = 0x180080562,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8000 -- A9 (TSMC), iPhone 6s */
|
||||||
|
/* gaster: same offsets as 0x8003, iBoot-2234.0.0.2.22 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8000,
|
||||||
|
.name = "A9",
|
||||||
|
.marketing = "iPhone 6s / iPhone SE",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x500,
|
||||||
|
.insecure_memory_base = 0x180380000,
|
||||||
|
.patch_addr = 0x10000812C,
|
||||||
|
.memcpy_addr = 0x100011030,
|
||||||
|
.aes_crypto_cmd = 0x10000DAA0,
|
||||||
|
.boot_tramp_end = 0x1800E1000,
|
||||||
|
.gUSBSerialNumber = 0x180087958,
|
||||||
|
.dfu_handle_request = 0x1800878F8,
|
||||||
|
.usb_core_do_transfer = 0x10000EE78,
|
||||||
|
.dfu_handle_bus_reset = 0x180087928,
|
||||||
|
.handle_interface_request = 0x10000F1B0,
|
||||||
|
.usb_create_string_descriptor = 0x10000E354,
|
||||||
|
.usb_serial_number_string_descriptor = 0x1800807DA,
|
||||||
|
.ttbr0_addr = 0x1800C8000,
|
||||||
|
.ttbr0_vrom_off = 0x400,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8003 -- A9 (Samsung), iPhone 6s variant */
|
||||||
|
/* gaster: iBoot-2234.0.0.2.22 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8003,
|
||||||
|
.name = "A9",
|
||||||
|
.marketing = "iPhone 6s (Samsung variant)",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x500,
|
||||||
|
.insecure_memory_base = 0x180380000,
|
||||||
|
.patch_addr = 0x10000812C,
|
||||||
|
.memcpy_addr = 0x100011030,
|
||||||
|
.aes_crypto_cmd = 0x10000DAA0,
|
||||||
|
.boot_tramp_end = 0x1800E1000,
|
||||||
|
.gUSBSerialNumber = 0x180087958,
|
||||||
|
.dfu_handle_request = 0x1800878F8,
|
||||||
|
.usb_core_do_transfer = 0x10000EE78,
|
||||||
|
.dfu_handle_bus_reset = 0x180087928,
|
||||||
|
.handle_interface_request = 0x10000F1B0,
|
||||||
|
.usb_create_string_descriptor = 0x10000E354,
|
||||||
|
.usb_serial_number_string_descriptor = 0x1800807DA,
|
||||||
|
.ttbr0_addr = 0x1800C8000,
|
||||||
|
.ttbr0_vrom_off = 0x400,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Part 2 continues in chip_db_table_rop.h (ROP chips + A12+ entries) */
|
||||||
|
#include "device/chip_db_table_rop.h"
|
||||||
186
include/device/chip_db_table_rop.h
Normal file
186
include/device/chip_db_table_rop.h
Normal file
|
|
@ -0,0 +1,186 @@
|
||||||
|
/*
|
||||||
|
* chip_db_table_rop.h -- chip table part 2: ROP-capable chips + A12+ stubs.
|
||||||
|
*
|
||||||
|
* Included by chip_db_table.h inside the g_chip_table[] array.
|
||||||
|
* Do not include this file directly. All values from gaster.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ================================================================ */
|
||||||
|
/* ARM64 chips with ROP gadgets (A9X, A10, A10X, A11, T2) */
|
||||||
|
/* ================================================================ */
|
||||||
|
|
||||||
|
/* CPID 0x8001 -- A9X, iPad Pro (1st gen) */
|
||||||
|
/* gaster: iBoot-2481.0.0.2.1 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8001,
|
||||||
|
.name = "A9X",
|
||||||
|
.marketing = "iPad Pro (1st gen)",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x5C0,
|
||||||
|
.config_hole = 6,
|
||||||
|
.insecure_memory_base = 0x180000000,
|
||||||
|
.patch_addr = 0x100007668,
|
||||||
|
.memcpy_addr = 0x1000106F0,
|
||||||
|
.aes_crypto_cmd = 0x10000C9D4,
|
||||||
|
.boot_tramp_end = 0x180044000,
|
||||||
|
.gUSBSerialNumber = 0x180047578,
|
||||||
|
.dfu_handle_request = 0x18004C378,
|
||||||
|
.usb_core_do_transfer = 0x10000DDA4,
|
||||||
|
.dfu_handle_bus_reset = 0x18004C3A8,
|
||||||
|
.handle_interface_request = 0x10000E0B4,
|
||||||
|
.usb_create_string_descriptor = 0x10000D280,
|
||||||
|
.usb_serial_number_string_descriptor = 0x18004486A,
|
||||||
|
.ttbr0_addr = 0x180050000,
|
||||||
|
.tlbi = 0x100000404,
|
||||||
|
.nop_gadget = 0x10000CD60,
|
||||||
|
.ret_gadget = 0x100000118,
|
||||||
|
.func_gadget = 0x10000CD40,
|
||||||
|
.write_ttbr0 = 0x1000003B4,
|
||||||
|
.ttbr0_vrom_off = 0x400,
|
||||||
|
.ttbr0_sram_off = 0x600,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8010 -- A10 Fusion (ROP path) */
|
||||||
|
/* gaster: iBoot-2696.0.0.1.33 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8010,
|
||||||
|
.name = "A10",
|
||||||
|
.marketing = "iPhone 7 / iPod touch 7G",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x5C0,
|
||||||
|
.config_hole = 5,
|
||||||
|
.insecure_memory_base = 0x1800B0000,
|
||||||
|
.patch_addr = 0x1000074AC,
|
||||||
|
.memcpy_addr = 0x100010730,
|
||||||
|
.aes_crypto_cmd = 0x10000C8F4,
|
||||||
|
.boot_tramp_end = 0x1800B0000,
|
||||||
|
.gUSBSerialNumber = 0x180083CF8,
|
||||||
|
.dfu_handle_request = 0x180088B48,
|
||||||
|
.usb_core_do_transfer = 0x10000DC98,
|
||||||
|
.dfu_handle_bus_reset = 0x180088B78,
|
||||||
|
.handle_interface_request = 0x10000DFB8,
|
||||||
|
.usb_create_string_descriptor = 0x10000D150,
|
||||||
|
.usb_serial_number_string_descriptor = 0x1800805DA,
|
||||||
|
.ttbr0_addr = 0x1800A0000,
|
||||||
|
.tlbi = 0x100000434,
|
||||||
|
.nop_gadget = 0x10000CC6C,
|
||||||
|
.ret_gadget = 0x10000015C,
|
||||||
|
.func_gadget = 0x10000CC4C,
|
||||||
|
.write_ttbr0 = 0x1000003E4,
|
||||||
|
.ttbr0_vrom_off = 0x400,
|
||||||
|
.ttbr0_sram_off = 0x600,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8011 -- A10X Fusion, iPad Pro 10.5 / Apple TV 4K */
|
||||||
|
/* gaster: iBoot-3135.0.0.2.3 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8011,
|
||||||
|
.name = "A10X",
|
||||||
|
.marketing = "iPad Pro 10.5\" / Apple TV 4K",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x540,
|
||||||
|
.config_hole = 6,
|
||||||
|
.insecure_memory_base = 0x1800B0000,
|
||||||
|
.patch_addr = 0x100007630,
|
||||||
|
.memcpy_addr = 0x100010950,
|
||||||
|
.aes_crypto_cmd = 0x10000C994,
|
||||||
|
.boot_tramp_end = 0x1800B0000,
|
||||||
|
.gUSBSerialNumber = 0x180083D28,
|
||||||
|
.dfu_handle_request = 0x180088A58,
|
||||||
|
.usb_core_do_transfer = 0x10000DD64,
|
||||||
|
.dfu_handle_bus_reset = 0x180088A88,
|
||||||
|
.handle_interface_request = 0x10000E08C,
|
||||||
|
.usb_create_string_descriptor = 0x10000D234,
|
||||||
|
.usb_serial_number_string_descriptor = 0x18008062A,
|
||||||
|
.ttbr0_addr = 0x1800A0000,
|
||||||
|
.tlbi = 0x100000444,
|
||||||
|
.nop_gadget = 0x10000CD0C,
|
||||||
|
.ret_gadget = 0x100000148,
|
||||||
|
.func_gadget = 0x10000CCEC,
|
||||||
|
.write_ttbr0 = 0x1000003F4,
|
||||||
|
.ttbr0_vrom_off = 0x400,
|
||||||
|
.ttbr0_sram_off = 0x600,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8015 -- A11 Bionic, iPhone 8/X */
|
||||||
|
/* gaster: iBoot-3332.0.0.1.23 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8015,
|
||||||
|
.name = "A11",
|
||||||
|
.marketing = "iPhone 8 / iPhone 8 Plus / iPhone X",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x540,
|
||||||
|
.config_hole = 6,
|
||||||
|
.insecure_memory_base = 0x18001C000,
|
||||||
|
.patch_addr = 0x10000624C,
|
||||||
|
.memcpy_addr = 0x10000E9D0,
|
||||||
|
.aes_crypto_cmd = 0x100009E9C,
|
||||||
|
.boot_tramp_end = 0x18001C000,
|
||||||
|
.gUSBSerialNumber = 0x180003A78,
|
||||||
|
.dfu_handle_request = 0x180008638,
|
||||||
|
.usb_core_do_transfer = 0x10000B9A8,
|
||||||
|
.dfu_handle_bus_reset = 0x180008668,
|
||||||
|
.handle_interface_request = 0x10000BCCC,
|
||||||
|
.usb_create_string_descriptor = 0x10000AE80,
|
||||||
|
.usb_serial_number_string_descriptor = 0x1800008FA,
|
||||||
|
.ttbr0_addr = 0x18000C000,
|
||||||
|
.tlbi = 0x1000004AC,
|
||||||
|
.nop_gadget = 0x10000A9C4,
|
||||||
|
.ret_gadget = 0x100000148,
|
||||||
|
.func_gadget = 0x10000A9AC,
|
||||||
|
.write_ttbr0 = 0x10000045C,
|
||||||
|
.ttbr0_vrom_off = 0x400,
|
||||||
|
.ttbr0_sram_off = 0x600,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* CPID 0x8012 -- T2 Security Chip */
|
||||||
|
/* gaster: iBoot-3401.0.0.1.16 */
|
||||||
|
{
|
||||||
|
.cpid = 0x8012,
|
||||||
|
.name = "T2",
|
||||||
|
.marketing = "Apple T2 Security Chip",
|
||||||
|
.checkm8_vulnerable = 1,
|
||||||
|
.config_overwrite_pad = 0x540,
|
||||||
|
.config_hole = 6,
|
||||||
|
.insecure_memory_base = 0x18001C000,
|
||||||
|
.patch_addr = 0x100004854,
|
||||||
|
.memcpy_addr = 0x10000EA30,
|
||||||
|
.aes_crypto_cmd = 0x1000082AC,
|
||||||
|
.boot_tramp_end = 0x18001C000,
|
||||||
|
.gUSBSerialNumber = 0x180003AF8,
|
||||||
|
.dfu_handle_request = 0x180008B08,
|
||||||
|
.usb_core_do_transfer = 0x10000BD20,
|
||||||
|
.dfu_handle_bus_reset = 0x180008B38,
|
||||||
|
.handle_interface_request = 0x10000BFFC,
|
||||||
|
.usb_create_string_descriptor = 0x10000B1CC,
|
||||||
|
.usb_serial_number_string_descriptor = 0x18000082A,
|
||||||
|
.ttbr0_addr = 0x18000C000,
|
||||||
|
.tlbi = 0x100000494,
|
||||||
|
.nop_gadget = 0x100008DB8,
|
||||||
|
.ret_gadget = 0x10000012C,
|
||||||
|
.func_gadget = 0x100008DA0,
|
||||||
|
.write_ttbr0 = 0x100000444,
|
||||||
|
.ttbr0_vrom_off = 0x400,
|
||||||
|
.ttbr0_sram_off = 0x600,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* ================================================================ */
|
||||||
|
/* A12 and later: NOT checkm8-vulnerable. All offsets zeroed. */
|
||||||
|
/* ================================================================ */
|
||||||
|
|
||||||
|
{ .cpid = 0x8020, .name = "A12", .marketing = "iPhone XS / iPhone XR" },
|
||||||
|
{ .cpid = 0x8027, .name = "A12Z", .marketing = "iPad Pro (4th gen)" },
|
||||||
|
{ .cpid = 0x8030, .name = "A13", .marketing = "iPhone 11 / iPhone 11 Pro" },
|
||||||
|
{ .cpid = 0x8101, .name = "A14", .marketing = "iPhone 12 / iPad Air (4th gen)" },
|
||||||
|
{ .cpid = 0x8103, .name = "M1", .marketing = "iPad Pro (5th gen) / MacBook (M1)" },
|
||||||
|
{ .cpid = 0x8110, .name = "A15", .marketing = "iPhone 13 / iPhone SE (3rd gen)" },
|
||||||
|
{ .cpid = 0x8112, .name = "M2", .marketing = "iPad Pro (6th gen) / MacBook (M2)" },
|
||||||
|
{ .cpid = 0x8120, .name = "A16", .marketing = "iPhone 14 Pro / iPhone 14 Pro Max" },
|
||||||
|
{ .cpid = 0x8130, .name = "A17", .marketing = "iPhone 15 Pro / iPhone 15 Pro Max" },
|
||||||
|
|
||||||
|
/* Null-terminated sentinel */
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
/* clang-format on */
|
||||||
|
|
||||||
|
#endif /* CHIP_DB_TABLE_H */
|
||||||
|
|
@ -1,253 +1,13 @@
|
||||||
|
/* chip_db.c -- chip database lookup API */
|
||||||
|
|
||||||
#include "device/chip_db.h"
|
#include "device/chip_db.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
/*
|
/* The static table lives in a separate header to respect the 300-line limit */
|
||||||
* Memory address sources:
|
#include "device/chip_db_table.h"
|
||||||
* A10 (0x8010), A11 (0x8015): from gaster (github.com/0x7ff/gaster)
|
|
||||||
* heap_base = ttbr0_addr
|
|
||||||
* payload_base = insecure_memory_base
|
|
||||||
* A7-A9X: insecure_memory_base from gaster where available; placeholder
|
|
||||||
* values (marked PLACEHOLDER) for chips not detailed in gaster.
|
|
||||||
* A12+: not vulnerable, both fields are 0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* clang-format off */
|
|
||||||
static const chip_info_t g_chip_table[] = {
|
|
||||||
/*
|
|
||||||
* A7 -- iPhone 5s, iPad Air, iPad mini 2/3
|
|
||||||
* gaster: insecure_memory_base not listed for 0x8947 (32-bit, ARMv7s).
|
|
||||||
* payload_dest_armv7 used instead; heap_base is PLACEHOLDER.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8947,
|
|
||||||
"A7",
|
|
||||||
"iPhone 5s / iPad Air",
|
|
||||||
1,
|
|
||||||
0x34000000, /* PLACEHOLDER: 32-bit DFU SRAM base */
|
|
||||||
0x34039800 /* payload_dest_armv7 from gaster (0x8947 variant) */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A8 -- iPhone 6/6 Plus, iPod touch 6G
|
|
||||||
* gaster: insecure_memory_base = 0x180380000, ttbr0 not set (A8 uses
|
|
||||||
* insecure_memory_base as the payload target directly).
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8960,
|
|
||||||
"A8",
|
|
||||||
"iPhone 6 / iPhone 6 Plus",
|
|
||||||
1,
|
|
||||||
0x180380000, /* insecure_memory_base doubles as heap base for A8 */
|
|
||||||
0x180380000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A8 variant (iPad mini 4 / iPod touch 6G second silicon rev)
|
|
||||||
* gaster: insecure_memory_base = 0x180380000 (same as 0x8960).
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x7000,
|
|
||||||
"A8",
|
|
||||||
"iPod touch 6G / iPad mini 4",
|
|
||||||
1,
|
|
||||||
0x180380000,
|
|
||||||
0x180380000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A8X -- iPad Air 2
|
|
||||||
* gaster: insecure_memory_base = 0x180380000 (same family).
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x7001,
|
|
||||||
"A8X",
|
|
||||||
"iPad Air 2",
|
|
||||||
1,
|
|
||||||
0x180380000,
|
|
||||||
0x180380000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A9 -- iPhone 6s/6s Plus, iPhone SE (1st gen)
|
|
||||||
* gaster: insecure_memory_base = 0x180380000.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8000,
|
|
||||||
"A9",
|
|
||||||
"iPhone 6s / iPhone SE",
|
|
||||||
1,
|
|
||||||
0x180380000,
|
|
||||||
0x180380000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A9 variant (Samsung-fab A9 used in some iPhone 6s/6s Plus units)
|
|
||||||
* gaster: insecure_memory_base = 0x180380000.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8003,
|
|
||||||
"A9",
|
|
||||||
"iPhone 6s (Samsung variant)",
|
|
||||||
1,
|
|
||||||
0x180380000,
|
|
||||||
0x180380000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A9X -- iPad Pro 9.7-inch / 12.9-inch (1st gen)
|
|
||||||
* gaster: ttbr0_addr = 0x180050000, no insecure_memory_base listed;
|
|
||||||
* use ttbr0_addr as payload_base (PLACEHOLDER for payload_base).
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8001,
|
|
||||||
"A9X",
|
|
||||||
"iPad Pro (1st gen)",
|
|
||||||
1,
|
|
||||||
0x180050000, /* ttbr0_addr from gaster */
|
|
||||||
0x180050000 /* PLACEHOLDER: insecure_memory_base not in gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A10 Fusion -- iPhone 7/7 Plus, iPod touch 7G
|
|
||||||
* gaster: ttbr0_addr = 0x1800A0000, insecure_memory_base = 0x1800B0000.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8010,
|
|
||||||
"A10",
|
|
||||||
"iPhone 7 / iPhone 7 Plus",
|
|
||||||
1,
|
|
||||||
0x1800A0000, /* ttbr0_addr from gaster */
|
|
||||||
0x1800B0000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A10X Fusion -- iPad Pro 10.5-inch / 12.9-inch (2nd gen), Apple TV 4K
|
|
||||||
* gaster: ttbr0_addr = 0x1800A0000 (same as A10).
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8011,
|
|
||||||
"A10X",
|
|
||||||
"iPad Pro 10.5\" / Apple TV 4K",
|
|
||||||
1,
|
|
||||||
0x1800A0000, /* ttbr0_addr from gaster (same config as 0x8010) */
|
|
||||||
0x1800B0000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A11 Bionic -- iPhone 8/8 Plus, iPhone X
|
|
||||||
* gaster: ttbr0_addr = 0x18000C000, insecure_memory_base = 0x18001C000.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
0x8015,
|
|
||||||
"A11",
|
|
||||||
"iPhone 8 / iPhone 8 Plus / iPhone X",
|
|
||||||
1,
|
|
||||||
0x18000C000, /* ttbr0_addr from gaster */
|
|
||||||
0x18001C000 /* insecure_memory_base from gaster */
|
|
||||||
},
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
/* A12 and later: NOT checkm8-vulnerable. */
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
|
|
||||||
/* A12 Bionic -- iPhone XS/XS Max/XR */
|
|
||||||
{
|
|
||||||
0x8020,
|
|
||||||
"A12",
|
|
||||||
"iPhone XS / iPhone XR",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* A12Z Bionic -- iPad Pro (4th gen), Apple Silicon DTK */
|
|
||||||
{
|
|
||||||
0x8027,
|
|
||||||
"A12Z",
|
|
||||||
"iPad Pro (4th gen)",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* A13 Bionic -- iPhone 11 series */
|
|
||||||
{
|
|
||||||
0x8030,
|
|
||||||
"A13",
|
|
||||||
"iPhone 11 / iPhone 11 Pro",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* A14 Bionic -- iPhone 12 series, iPad Air (4th gen) */
|
|
||||||
{
|
|
||||||
0x8101,
|
|
||||||
"A14",
|
|
||||||
"iPhone 12 / iPad Air (4th gen)",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* M1 -- MacBook Air/Pro (early 2020), iPad Pro (5th gen) */
|
|
||||||
{
|
|
||||||
0x8103,
|
|
||||||
"M1",
|
|
||||||
"iPad Pro (5th gen) / MacBook (M1)",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* A15 Bionic -- iPhone 13 series, iPhone SE (3rd gen) */
|
|
||||||
{
|
|
||||||
0x8110,
|
|
||||||
"A15",
|
|
||||||
"iPhone 13 / iPhone SE (3rd gen)",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* M2 -- MacBook Air/Pro (2022), iPad Pro (6th gen) */
|
|
||||||
{
|
|
||||||
0x8112,
|
|
||||||
"M2",
|
|
||||||
"iPad Pro (6th gen) / MacBook (M2)",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* A16 Bionic -- iPhone 14 Pro/Pro Max */
|
|
||||||
{
|
|
||||||
0x8120,
|
|
||||||
"A16",
|
|
||||||
"iPhone 14 Pro / iPhone 14 Pro Max",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* A17 Pro -- iPhone 15 Pro/Pro Max */
|
|
||||||
{
|
|
||||||
0x8130,
|
|
||||||
"A17",
|
|
||||||
"iPhone 15 Pro / iPhone 15 Pro Max",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
/* Null-terminated sentinel */
|
|
||||||
{ 0, NULL, NULL, 0, 0, 0 }
|
|
||||||
};
|
|
||||||
/* clang-format on */
|
|
||||||
|
|
||||||
const chip_info_t *
|
const chip_info_t *
|
||||||
chip_db_lookup(uint32_t cpid)
|
chip_db_lookup(uint32_t cpid)
|
||||||
|
|
@ -280,19 +40,22 @@ chip_db_print_all(void)
|
||||||
{
|
{
|
||||||
const chip_info_t *p;
|
const chip_info_t *p;
|
||||||
|
|
||||||
printf("%-8s %-5s %-38s %s %s %s\n",
|
printf("%-8s %-5s %-38s %4s %5s %5s %4s %18s\n",
|
||||||
"CPID", "Name", "Marketing", "Vuln", "HeapBase", "PayloadBase");
|
"CPID", "Name", "Marketing", "Vuln", "Leak", "OvPad", "Hole",
|
||||||
printf("%-8s %-5s %-38s %s %s %s\n",
|
"InsecureMemBase");
|
||||||
|
printf("%-8s %-5s %-38s %4s %5s %5s %4s %18s\n",
|
||||||
"--------", "-----", "--------------------------------------",
|
"--------", "-----", "--------------------------------------",
|
||||||
"----", "----------", "-----------");
|
"----", "-----", "-----", "----", "------------------");
|
||||||
|
|
||||||
for (p = g_chip_table; p->name != NULL; p++) {
|
for (p = g_chip_table; p->name != NULL; p++) {
|
||||||
printf("0x%04X %-5s %-38s %-4d 0x%09" PRIX64 " 0x%09" PRIX64 "\n",
|
printf("0x%04X %-5s %-38s %4d %5u 0x%03X %4u 0x%09" PRIX64 "\n",
|
||||||
p->cpid,
|
p->cpid,
|
||||||
p->name,
|
p->name,
|
||||||
p->marketing,
|
p->marketing,
|
||||||
p->checkm8_vulnerable,
|
p->checkm8_vulnerable,
|
||||||
p->heap_base,
|
(unsigned)p->config_large_leak,
|
||||||
p->payload_base);
|
(unsigned)p->config_overwrite_pad,
|
||||||
|
(unsigned)p->config_hole,
|
||||||
|
p->insecure_memory_base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue