Where the magic happens...

This commit is contained in:
d0k3 2017-05-17 21:44:31 +02:00
parent 490da2e17b
commit dd2963b55c
3 changed files with 15 additions and 12 deletions

View File

@ -1,18 +1,15 @@
# SafeB9SInstaller
Safe, simple, user-friendly installer for sighaxed FIRMs
**DON'T USE THIS YET**
**Stop asking - it's done when it's done(tm)**
For usage instructions, refer to [Plailect's guide](https://3ds.guide/).
## Credits
* **Normmatt**, for sdmmc.c / sdmmc.h
* **Cha(N)**, **Kane49**, and all other FatFS contributors for FatFS
* **SciresM** for being the first fearless person to test this
* **Myria** for the sighax bruteforcer and for finding the sighax (retail&dev) signature
* **SciresM** for dumping boot9, creating boot9strap.firm and for being the first fearless person to test this
* **hedgeberg** for her tireless efforts in dumping the bootrom
* **TuxSH** for FIRM research and useful hints
* **hedgeberg** for dumping the bootrom (when it's done)
* **Plailect** for providing the guide and making this accessible to the common user
* **stuckpixel** for his tireless behind-the-scenes work
* **Gelex** for being of great help on countless occasions

View File

@ -40,8 +40,8 @@
#define ENTRY_BRAHMA (1)
#define ENTRY_GATEWAY (2)
// SafeSigHaxInstaller version
#define VERSION "0.0.3"
// SafeB9SInstaller version
#define VERSION "0.0.5"
// input / output paths
#define INPUT_PATH "0:/boot9strap"

View File

@ -40,10 +40,16 @@ const u8 sectorHash_dev[0x20] = {
0x09, 0x54, 0xE3, 0x85, 0xDE, 0x47, 0x55, 0xAF, 0xC6, 0xCB, 0x1D, 0x8D, 0xC7, 0x84, 0x5A, 0x64
};
// standard sighax signature hash - still unknown (= missing puzzle piece)
// sighax signature hash - thanks go to Myria & SciresM for bruteforcing this
const u8 sighaxHash[0x20] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x07, 0x8C, 0xC0, 0xCF, 0xD8, 0x50, 0xA2, 0x70, 0x93, 0xDD, 0xA2, 0x63, 0x0C, 0x36, 0x03, 0xCA,
0x0C, 0x96, 0x96, 0x9B, 0xD1, 0xF2, 0x6D, 0xA4, 0x8A, 0xC7, 0xB1, 0xBA, 0xE5, 0xDD, 0x52, 0x19
};
// sighax dev signature hash - thanks go to Myria & SciresM for bruteforcing this
const u8 sighaxHash_dev[0x20] = {
0xE6, 0x35, 0xC6, 0x36, 0xDC, 0x62, 0x59, 0xD6, 0x22, 0x8A, 0xF5, 0xBE, 0xD2, 0x84, 0x6E, 0x33,
0x96, 0xD3, 0x78, 0x6E, 0xDF, 0x50, 0x3D, 0x11, 0x86, 0x84, 0x01, 0x59, 0x97, 0x50, 0x42, 0x26
};
u32 ValidateFirmHeader(FirmHeader* header, u32 data_size) {
@ -111,7 +117,7 @@ u32 ValidateSector(void* sector) {
u32 CheckFirmSigHax(void* firm) {
FirmHeader* header = (FirmHeader*) firm;
return (sha_cmp(sighaxHash, header->signature, 0x100, SHA256_MODE) == 0) ? 0 : 1;
return (sha_cmp((IS_DEVKIT) ? sighaxHash_dev : sighaxHash, header->signature, 0x100, SHA256_MODE) == 0) ? 0 : 1;
}
u32 CheckBoot9Strap(void* firm) {