feat(exploit): Replace checkm8 placeholders with real exploit data
Updated exploit stages with actual USB transfer sequences from gaster. Added real callback overwrite structures, magic constants, and heap spray logic (both large_leak and no-leak paths). Replaced shellcode placeholders with actual ARM64 and ARMv7 bytes from ipwndfu binary. Payload assembly now builds correct per-chip header structs using the full chip_db offset table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e2f936d6b7
commit
369e6bcbfa
10 changed files with 860 additions and 447 deletions
|
|
@ -20,26 +20,29 @@ int checkm8_exploit(device_info_t *dev);
|
|||
|
||||
/*
|
||||
* Stage 1: Reset DFU state machine to a known clean state.
|
||||
* Sends DFU_DNLOAD with empty data, then DFU_ABORT.
|
||||
* Sends DFU_DNLOAD with suffix-length zeroes, polls through manifest
|
||||
* states, then resets to dfuIDLE.
|
||||
*/
|
||||
int checkm8_stage_reset(exploit_ctx_t *ctx);
|
||||
|
||||
/*
|
||||
* Stage 2: Heap spray. Send carefully sized USB transfers to create
|
||||
* a predictable heap layout in the DFU SRAM region.
|
||||
*/
|
||||
int checkm8_stage_spray(exploit_ctx_t *ctx);
|
||||
|
||||
/*
|
||||
* Stage 3: Trigger use-after-free. Abort a DFU transfer mid-stream
|
||||
* to free the io_buffer while the pointer remains live.
|
||||
* Stage 2: Setup -- trigger use-after-free. Sends an async DFU_DNLOAD
|
||||
* with DFU_MAX_TRANSFER_SZ bytes, then overwrite padding to provoke
|
||||
* a stall that frees the io_buffer while the pointer remains live.
|
||||
*/
|
||||
int checkm8_stage_setup(exploit_ctx_t *ctx);
|
||||
|
||||
/*
|
||||
* Stage 4: Overwrite freed buffer with ROP chain and shellcode.
|
||||
* After this stage the BootROM executes our payload and the serial
|
||||
* string should contain "PWND:[checkm8]".
|
||||
* Stage 3: Heap spray. Two paths based on chip config:
|
||||
* Path A (large_leak > 0): stall-based GET_DESCRIPTOR spray.
|
||||
* Path B (large_leak == 0): send/stall cycles to create heap holes.
|
||||
*/
|
||||
int checkm8_stage_spray(exploit_ctx_t *ctx);
|
||||
|
||||
/*
|
||||
* Stage 4: Overwrite freed callback with controlled data, then send
|
||||
* the payload (chip-specific header + shellcode) in DFU_MAX_TRANSFER_SZ
|
||||
* chunks. After execution the serial string contains "PWND:[checkm8]".
|
||||
*/
|
||||
int checkm8_stage_patch(exploit_ctx_t *ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue