Editing Pandora
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
On August 22 2007, Team C+D released the "Pandora's Battery" which was the [[Prometheus]] Project everyone was waiting for. It converted a spare Memory Stick Pro Duo and | On August 22 2007, Team C+D released the "Pandora's Battery" which was the [[Prometheus]] Project everyone was waiting for. It converted a spare Memory Stick Pro Duo and battery into a "Magic Memory Stick" and "JigKick Battery". Some People mistake Pandora's Battery for the Jigkick Battery, but Pandora's battery is both the Magic Memory Stick and the JigKick Battery. The Memory Stick and battery can then be used to downgrade any PSP of any version or to recover from a brick. To convert the Memory Stick and battery another PSP which is able to run 1.50 homebrew is needed. The Memory Stick can also be converted without using a homebrew PSP by using a Pandora's battery program, such as Pandora Easy GUI. After the downgrade/unbrick service has been completed, the Memory Stick and battery can be restored for normal usage. | ||
= [[JigKick Battery]] = | |||
This is a battery with its serial changed to 0xFFFFFFFF. When a psp's battery serial number is changed to 0xFFFFFFFF the PSP boots the ipl from sector 16 on the physical drive (the Magic Memory Stick). This unlocks the service mode of the PSP and launches the IPL from the Memory Stick (instead of from flash0). You can either Hardmod a battery or Softmod it. | |||
Hardmod is when you you make a JigKick Battery by opening it up and and removing a pin, this can be done to any battery. | |||
Softmod is when you make a JigKick Battery by using a program. But it has to be suitable. New Batteries cannot be softmodded. | |||
Click here to find out more! | |||
= [[Magic Memory Stick]] = | |||
A Magic Memory Stick refers to any memory stick that has been converted to boot, and work with a JigKick Battery. Depending on the method of creation, a Magic Memory Stick can either downgrade or boot PSPs to 1.50 FW (Phat), upgrade any PSP to 3.71/3.80 M33, and their counterparts, or be able to launch various homebrew. But it has to be suitable. The Memory sticks can be made into Magic Memory Sticks only if they are Pro Duo, and below 4GB. | |||
= In-depth Technological Details = | |||
The fake encrypted data is bruteforced to decrypt into your chosen data (to be able to exploit the preipl). And the signature for your fake encrypted data is bruteforced again to make it appear valid in the eyes of the crypto engine so that it will will go ahead and decrypt your fake encrypted data. | |||
The | The preipl exploit works like this: | ||
<pre> | <pre> | ||
First a decrypted | First a decrypted ipl block: | ||
0x00: load address | 0x00: load address | ||
0x04: data size | 0x04: data size | ||
Line 88: | Line 38: | ||
</pre> | </pre> | ||
Which means load 0xF50-byte data to 0x040F1EA0. 0xB71C6EBA is the checksum of the previous block. Then entry address is 0 since it | Which means load 0xF50-byte data to 0x040F1EA0. 0xB71C6EBA is the checksum of the previous block. Then entry address is 0 since it hasnt reached the end yet and there are more blocks to load. Once it has loaded all the ipl blocks the very last block will have entry address of where the whole ipl has been loaded (typically 0x040F0000). And will then jump to that address. | ||
Preipl pseudocode for loading & decrypting the ipl: | |||
Code: | |||
<pre> | <pre> | ||
int iplBlockNumber = 0; | int iplBlockNumber = 0; | ||
Line 128: | Line 78: | ||
iplBlockNumber++; | iplBlockNumber++; | ||
} | } | ||
</pre> | </pre> | ||
As the | As the preipl loads the first ipl block (the fake one), it decrypts the block in-place, ie. the decrypted block just overwrites your encrypted block. The fake block only decrypts into four bytes of all 0's so it ends up only overwriting the first four bytes of your fake block (with four 0's) after decryption. | ||
The fake signed block: | The fake signed block: | ||
Line 148: | Line 99: | ||
000000A0: 00 00 00 00 00 00 00 00 00 00 00 01 C6 5F 74 12 | 000000A0: 00 00 00 00 00 00 00 00 00 00 00 01 C6 5F 74 12 | ||
</pre> | </pre> | ||
The most important parts to note: | The most important parts to note: | ||
Line 154: | Line 106: | ||
0x70-0x73 is the size of the decrypted data (only 4 bytes) | 0x70-0x73 is the size of the decrypted data (only 4 bytes) | ||
A slight flaw in the crypto engine allowed bruteforce to be performed on a magnitude-times smaller scale than normally required | A slight flaw in the crypto engine allowed the bruteforce to be performed on a magnitude-times smaller scale than normally required. | ||
After decryption, the preipl thinks the data is now a decrypted ipl block. | |||
So note the first 0x10 bytes: | So note the first 0x10 bytes: | ||
<pre> | <pre> | ||
Line 165: | Line 116: | ||
0x00000000 (checksum) | 0x00000000 (checksum) | ||
</pre> | </pre> | ||
It passes the checksum test (with 0x00000000), it skips the loading of any data (since the loadaddr has been faked to 0x00000000), see's the entry address of 0xBFD00100 and thinks it has reached the end of the ipl and so goes jumps to that address (which is where your unsigned code will be). | |||
So that's essentially it in a nutshell. But dont let a quick 5 min. summary of the exploit underestimate the enormous effort involved in bringing it to fruition (as the final product known as Pandora). | |||
= Properly encrypted Pandora compatible IPL blocks = | |||
On March 10th 2018, Developer Mathieulh released properly encrypted Pandora hack compatible IPL blocks using kirk cmd 0x01 key. | |||
[https://twitter.com/Mathieulh/status/972475508612050944] | |||
[https://twitter.com/Mathieulh/status/972476883802689537] | |||
Here are a few of those: | |||
* Retail flagged IPL block with entrypoint set to 0xBFD00100: | * Retail flagged IPL block with entrypoint set to 0xBFD00100: | ||
Line 203: | Line 152: | ||
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
</pre> | </pre> | ||
* Devkit flagged IPL block with entrypoint set to 0xBFD00100: | * Devkit flagged IPL block with entrypoint set to 0xBFD00100: | ||
Line 226: | Line 176: | ||
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
</pre> | </pre> | ||
* Devkit flagged IPL block with entrypoint set to 0xBFE01100 (only works on DTP-T1000/DEM-1000!, does not work on 2.6.0+ Kbooti): | * Devkit flagged IPL block with entrypoint set to 0xBFE01100 (only works on DTP-T1000/DEM-1000!, does not work on 2.6.0+ Kbooti): | ||
Line 249: | Line 200: | ||
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | 000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ | ||
</pre> | </pre> | ||
* Retail flagged IPL with entrypoint set to 0xBFE01100 (only works on DTP-T1000/DEM-1000!, does not work on 2.6.0+ Kbooti): | * Retail flagged IPL with entrypoint set to 0xBFE01100 (only works on DTP-T1000/DEM-1000!, does not work on 2.6.0+ Kbooti): | ||
Line 274: | Line 226: | ||
* Retail flagged IPL with entrypoint set to 0xBFC00100 (only works on DTP-T1000/DEM-1000!, does not work on 2.6.0+ Kbooti): | * Retail flagged IPL with entrypoint set to 0xBFC00100 (only works on DTP-T1000/DEM-1000!, does not work on 2.6.0+ Kbooti): | ||
<pre> | <pre> | ||
Line 296: | Line 249: | ||
</pre> | </pre> | ||
* IPL Block for Prototype (0.4 and 0.6) iplloader, containing the following MIPS assembly instructions (the jal instruction is not used because of the address length, instead the address is stored to a register using the load immediate instruction, then the jump register instruction is used to jump to it, assembly is used to artificially make the jump because older IPL blocks cannot contain an entrypoint value, the old iplloader instead jumps to 0x88400000 as an hardcoded entrypoint address): | * IPL Block for Prototype (0.4 and 0.6) Lib-PSP iplloader, containing the following MIPS assembly instructions (the jal instruction is not used because of the address length, instead the address is stored to a register using the load immediate instruction, then the jump register instruction is used to jump to it, assembly is used to artificially make the jump because older IPL blocks cannot contain an entrypoint value, the old Lib-PSP iplloader instead jumps to 0x88400000 as an hardcoded entrypoint address) : | ||
<pre> | <pre> | ||
.set noreorder | .set noreorder | ||
Line 306: | Line 259: | ||
.end start | .end start | ||
.set reorder | .set reorder | ||
</pre> | </pre> | ||
This block will jump to 0xBFE01100 so you can use this block as if you were using a Pandora IPL block on the prototype | This block will jump to 0xBFE01100 so you can use this block as if you were using a Pandora IPL block on the prototype pre-ipl, which saves you time from encrypting new IPLs all the time you need to test a new build. | ||
<br> | |||
Note: There is no 0xBFC00100 IPL block for the prototype | Note: There is no 0xBFC00100 IPL block for the prototype pre-ipl because they do not load IPL blocks there and you cannot use that address as it would overwrite the pre-ipl code itself which does not use a payload section/address and runs entirely from 0xBFC00000 | ||
<pre> | <pre> | ||
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||
Line 333: | Line 286: | ||
</pre> | </pre> | ||
* IPL Block for 0.7.0 and later (up to 2.7.1) iplloader, containing the previously mentioned jr MIPS assembly instruction to address 0xBFE01100 | * IPL Block for 0.7.0 and later (up to 2.7.1) Lib-PSP iplloader, containing the previously mentioned jr MIPS assembly instruction to address 0xBFE01100 | ||
This IPL block has been tested successfully on 2.6.0 and 2.7.1 kbooti | This IPL block has been tested successfully on 2.6.0 and 2.7.1 kbooti | ||
<pre> | <pre> | ||
Line 357: | Line 310: | ||
</pre> | </pre> | ||
All these | All these blocks have been properly tested and are confirmed to be working (the dev blocks have been successfully tested on kbooti 0.7.0 and 0.9.0, only the last one with using the jr instruction works up to kbooti 2.7.1) | ||
These are available in binary format here: | |||
[https://mega.nz/#F!MlFi1QqZ!fGo2pkCEmjFiPynKtDC0Hg] | |||
The IPL SDK (available here: [https://github.com/mathieulh/PSP_IPL_SDK]) contains full low-level driver implementation for both devices which you can use in your projects. | The 0xBFD00100 version of these blocks work as-is by replacing the time attacked forged block with the properly encrypted ones supplied. The 0xBFE01100 and 0xBFCD00100 version (which only works on Development Tool units), may require you to rebuild/recompile your custom IPLs using 0xBFE01100 or 0xBFCD00100 as the entrypoints respectively as well as using a modified iplboot as the one used by retail custom IPLs uses pre-ipl hardcoded addresses, it may be wiser to rebuild it as a fully valid IPL instead using ipltool [https://github.com/zecoxao/ipltool],although using the Pandora compatible IPL block instead would allow you to port retail custom IPL projects on devkit with minimal efforts. | ||
Keep in mind that under normal circumstances neither the Memory Stick, not the NAND devices are initialized by the DTP-T1000 Lib-PSP iplloader, reading or writing to and from either of these devices will require you to add the initialization routine to your IPL (most likely within your iplboot binary). The IPL SDK (available here: [https://github.com/mathieulh/PSP_IPL_SDK] ) contains full low-level driver implementation for both devices which you can use in your projects. |