/* checkm8_internal.h -- Shared constants and helpers for checkm8 split files */ #ifndef CHECKM8_INTERNAL_H #define CHECKM8_INTERNAL_H #include "exploit/exploit.h" /* Heap spray parameters (from gaster analysis) */ #define SPRAY_COUNT 26 /* Number of spray transfers */ #define SPRAY_SIZE 0x800 /* Size of each spray chunk (2 KiB) */ /* Stall timeout for mid-stream abort (microseconds) */ #define STALL_USEC 100000 /* 100 ms */ /* Maximum attempts for the full exploit sequence */ #define MAX_EXPLOIT_TRIES 3 /* Short delay between exploit stages (microseconds) */ #define STAGE_DELAY_USEC 10000 /* 10 ms */ /* CPID values for ROP chain selection */ #define CPID_A10 0x8010 #define CPID_A10X 0x8011 #define CPID_A11 0x8015 /* * assemble_payload -- Build the exploit payload (ROP chain + shellcode) * for the given context's chip. Allocates ctx->payload_buf. * Returns 0 on success, -1 on failure. */ int assemble_payload(exploit_ctx_t *ctx); #endif /* CHECKM8_INTERNAL_H */