Editing Vulnerabilities

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 304: Line 304:
== PS1 Game Savedata ==
== PS1 Game Savedata ==


=== Wipeout (NPEE00004, NPUI94301, NPJI00035) by qwikrazor87 and vonjack ===
=== Pinball Golden Logres (SuperLite 1500 Series) (NPJJ00460) by qwikrazor87 ===


Discovered around 2014-04-08 by qwikrazor87 and vonjack.
Discovered around 2014-04-21 by qwikrazor87.


Maybe not exploitable.
Maybe not exploitable.


=== Pinball Golden Logres (SuperLite 1500 Series) (NPJJ00460) by qwikrazor87 and vonjack ===
=== Noon (NPJJ00466) by qwikrazor87 ===


Discovered around 2014-04-21 by qwikrazor87 and vonjack.
Discovered around 2014-10-03 by qwikrazor87.
 
Maybe not exploitable.
 
=== Noon (NPJJ00466) by qwikrazor87 and vonjack ===
 
Discovered around 2014-04-19 by qwikrazor87 and vonjack.


Maybe not exploitable.
Maybe not exploitable.
Line 338: Line 332:
=== Sports Superbike 2 (SLES03827) / XS Moto by qwikrazor87, Acid_snake and vonjack ===
=== Sports Superbike 2 (SLES03827) / XS Moto by qwikrazor87, Acid_snake and vonjack ===


Discovered around 2014-04-07 by qwikrazor87, Acid_snake and vonjack. Released on 2015-03-12 in TN-X by Total_Noob.
Discovered around 2014-04-07 by qwikrazor87 and Acid_snake. Discovered around 2014-10-03 by vonjack. Released on 2015-03-12 in TN-X by Total_Noob.


https://wololo.net/downloads/index.php/download/8275
https://wololo.net/downloads/index.php/download/8275
Line 404: Line 398:
== System ==
== System ==


=== libtiff exploit #4 (eggsploit) by Malloxis, Matiaz and davee: PSP <= 5.05 ===
=== libtiff exploit #1 (TIFF Exploit 2.00): PSP <= 2.00 ===
 
Discovered on 2005-09-23 by Niacin and Skylark.
 
The exploit involves using a wallpaper and a TIFF image file containing a buffer overflow. Since the data from the wallpaper is in a known location (VRAM), one can use the TIFF overflow to jump to the known VRAM location and execute userode code.
 
Implemented in downgraders (like MPH downgrader to 1.50) and eLoader by Fanjita.
 
https://en.wikibooks.org/wiki/PSP/Homebrew_History#The_TIFF_Exploit


Discovered in 2009-03-15 by Malloxis. Released on 2009-04-12 by Matiaz and davee.
=== libtiff exploit #2 (TIFF Exploit 2.71): PSP <= 2.71 ===


https://www.dcemu.co.uk/vbulletin/threads/197302-5-03-TIFF-Hello-World
Discovered in 2006-09.


https://wololo.net/2009/04/13/eggsplanations/
Implemented in Kriek eLoader and xLoader by Team N00bz.


https://www.youtube.com/watch?v=wV21QqQmX_o
https://en.wikibooks.org/wiki/PSP/Homebrew_History#The_TIFF_Exploit


=== libtiff exploit #3 (TIFF Exploit 4.20) by wololo: PSP <= 4.20 ===
=== libtiff exploit #3 (TIFF Exploit 4.20) by wololo: PSP <= 4.20 ===
Line 424: Line 426:
https://web.archive.org/web/20111226013924/http://secunia.com/advisories/31610/
https://web.archive.org/web/20111226013924/http://secunia.com/advisories/31610/


=== libtiff exploit #2 (TIFF Exploit 2.71): PSP <= 2.71 ===
=== libtiff exploit #4 (eggsploit) by Malloxis, Matiaz and davee: PSP <= 5.05 ===


Discovered in 2006-09.
Discovered in 2009-03-15 by Malloxis. Released on 2009-04-12 by Matiaz and davee.


Implemented in Kriek eLoader and xLoader by Team N00bz.
https://www.dcemu.co.uk/vbulletin/threads/197302-5-03-TIFF-Hello-World


https://en.wikibooks.org/wiki/PSP/Homebrew_History#The_TIFF_Exploit
https://wololo.net/2009/04/13/eggsplanations/


=== libtiff exploit #1 (TIFF Exploit 2.00): PSP <= 2.00 ===
https://www.youtube.com/watch?v=wV21QqQmX_o
 
Discovered on 2005-09-23 by Niacin, Skylark and Toc2rta.
 
The exploit involves using a wallpaper and a TIFF image file containing a buffer overflow. Since the data from the wallpaper is in a known location (VRAM), one can use the TIFF overflow to jump to the known VRAM location and execute userode code.
 
Implemented in downgraders (like MPH downgrader from 2.00 to 1.50) and eLoader by Fanjita.
 
https://en.wikibooks.org/wiki/PSP/Homebrew_History#The_TIFF_Exploit
 
[https://web.archive.org/web/20060130220231/http://sunkone.cja.net/psp/loader2/README.txt] -> cjb
 
https://repo.zenk-security.com/Magazine%20E-book/EN-Hacking%20PSP.pdf


=== Unsigned System PRX allowed: PSP <= 6.20 ===
=== Unsigned System PRX allowed: PSP <= 6.20 ===
Line 456: Line 446:
Fixed: since PSP System Software version 6.30.
Fixed: since PSP System Software version 6.30.


=== Old System PRX allowed: PSP any version ===
=== Old System PRX allowed ===


Discovered around 2005.
Discovered around 2005.
Line 477: Line 467:


Fixed: no.
Fixed: no.
=== Fixed syscall numbers: PSP <= ?6.50? ===
On PSP System Software version below 6.60, you could guess the syscall number for any kernel export, allowing you to call any syscall without having the resolved stub readily available.
Fixed on PSP System Software version 6.60 or just before. On PSP System Software version 6.60, SCE developers randomized syscall numbers so you could not guess them anymore.
=== qwikTrick (or Perfect Syscalls) by qwikrazor87: PSP/PS Vita any version ===
Discovered by qwikrazor87 around 2013 but independently discovered by others before, probably in 2011. Released by Acid_snake on 2023-10-15.
On PSP System Software version 6.60, SCE developers randomized syscall numbers so you could not guess them anymore. Therefore hackers became restricted to the functions imported by the application they exploited. This led to limited kernel function access (less chances of triggering a kernel bug) and it also drastically reduced V/HBL compatibility.
If you load a utility module, which loads a prx in user space, you can have a background thread that changes the PRX's stubs table to whichever imports you want. It relies on a race condition so you have to run the code a few times until it works. Eventually you can resolve whatever kernel export even if the original game did not have it.
This exploit was very useful since most Minis games (main attack vector back in time) had limited imports. Team OILIX never released it because they wanted to keep it in case they came across a kernel exploit on some obscure function that not a lot of games import. Also because by then VHBL was already abandoned and everyone wanted eCFW (ARK, TN) instead so making VHBL have perfect syscalls for better compatibility was a waste for this hack. In hindsight it was a bad decision since Team OILIX never actually used the function because soon after was figured out how to craft PBOOT.PBP for PS Vita with any desired imports.
https://github.com/PSP-Archive/ARK-4/blob/add6c946b4bab17ed7488114ccda3357ea42e0f2/common/utils/imports.c#L91


= Kernel =
= Kernel =


== UID planting Type Confusion kexploits by qwikrazor87 and TheFloW ==
== kernel execution using encrypted UID planting Type Confusion kexploit by qwikrazor87 (Trinity, ARK-4): PS Vita <= 3.74 ==
 
Exploiting this bug is straightforward:
1) Plant a fake UID object into kernel.
2) Encode this UID object.
3) Delete the UID object.
 
Basically, what you can do with this primitive is overwriting a function pointer in kernel and make it pointing to some function in usermode instead. Then, we can invoke it and run our code in kernel mode.
 
https://theofficialflow.github.io/2019/06/18/trinity.html#type-confusion
 
=== sceKernelAllocPartitionMemory UID plant kexploit by TheFloW (Trinity, ARK-4): PS Vita <= 3.74 ===


https://theofficialflow.github.io/2019/06/18/trinity.html#type-confusion
https://theofficialflow.github.io/2019/06/18/trinity.html#type-confusion
Line 519: Line 480:
It involves AES enc/dec (using sceChnnlsv buffer in kernel RAM for fake thread UID) for it to work with the sceKernelDeleteThread UID kexploit.
It involves AES enc/dec (using sceChnnlsv buffer in kernel RAM for fake thread UID) for it to work with the sceKernelDeleteThread UID kexploit.


=== sceKernelDeleteThread UID plant kexploit by qwikrazor87: PS Vita <= 3.50 ===
== kernel arbitrary read using sceNpCore_8AFAB4A0 double-fetch race condition kexploit by qwikrazor87 (Trinity, ARK-4): PS Vita <= 3.70 ==
 
Discovered around 2014-10-20 by qwikrazor87.
 
After qwikrazor87 released this exploit, Sony of course could not just change their whole design. Instead, they added a few mitigations like XOR’ing uid->uid with a random seed, or detecting that the UID object was within the heap region. These mitigations were quite effective. As you’d have to plant 2^32 different UID object’s to successfully guess the random seed. Furthermore, planting data within this heap region was not quite obvious, as that was only used by kernel internals.
 
https://github.com/GuidoAlessandroMenichetti/kxploits/blob/master/(3.50)%20sceKernelDeleteThread/explanation.txt
 
=== Stack Pointer UID plant kexploit by qwikrazor87: PS Vita <= ?3.50? ===
 
Discovered around 2014-01-29 by qwikrazor87.
 
The exploit steps are:
1) Execute assembly that does saves context.
2) Execute assembly that writes the evil UID 0x05FEF601 and the hijacked function _sceKernelLibcTime address to address 0x88000000.
3) Create a dummy thread whose name is at address 0x88000000, using sceKernelCreateThread.
4) Execute assembly that does something.
5) Free the evil UID 0x05FEF601 at using sceKernelFreePartitionMemory.
6) Execute assembly that restores context.
7) Call the hijacked function _sceKernelLibcTime.
 
=== sceKernelFreePartitionMemory UID plant kexploit by qwikrazor87: PS Vita <= ?3.50? ===
 
Discovered around 2014-01-03 by qwikrazor87.
 
Call sceIoOpen many times to corrupt an UID then free the UID using sceKernelFreePartitionMemory.
 
=== sceKernelClearEventFlag UID plant (project OILIX) kexploit by qwikrazor87: PS Vita <= ?3.50? ===
 
Discovered around 2013-10-15 by qwikrazor87.
 
== Kernel arbitrary read using sceNpCore_8AFAB4A0 double-fetch race condition kexploit by qwikrazor87 (Trinity, ARK-4): PS Vita <= 3.70 ==


https://theofficialflow.github.io/2019/06/18/trinity.html#double-fetch-race-condition
https://theofficialflow.github.io/2019/06/18/trinity.html#double-fetch-race-condition
Line 564: Line 494:
https://bitbucket.org/Acid_Snake/ark-4/src/master/kxploit/vpl/kxploit.c 3.51-3.52 from TN-V]
https://bitbucket.org/Acid_Snake/ark-4/src/master/kxploit/vpl/kxploit.c 3.51-3.52 from TN-V]


== _sceKernelFreeMemoryBlock kexploit by qwikrazor87: PS Vita <= 3.50 ==
== Free kexploit by qwikrazor87: PS Vita <= 3.50 ==


Discovered around 2015-02-11 by qwikrazor87. Released on 2015-04-18 by anonymous (probably qwikrazor87).
Discovered around 2015-02-11 by qwikrazor87. Released on 2015-04-18 by anonymous (probably qwikrazor87).
Line 573: Line 503:


https://pastebin.com/Sdz0XPRg
https://pastebin.com/Sdz0XPRg
== sceKernelDeleteThread UID kexploit by qwikrazor87: PS Vita <= 3.50 ==
Discovered around 2014-10-20 by qwikrazor87.
https://github.com/GuidoAlessandroMenichetti/kxploits/blob/master/(3.50)%20sceKernelDeleteThread/explanation.txt


== _sceUsbGpsGetData kernel write kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==
== _sceUsbGpsGetData kernel write kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==
Line 580: Line 516:
Simply call <code>_sceUsbGpsGetData(0x10000, sw_address);</code> where <code>sw_address</code> is the address of the function to hijack, usually _sceKernelLibcTime.
Simply call <code>_sceUsbGpsGetData(0x10000, sw_address);</code> where <code>sw_address</code> is the address of the function to hijack, usually _sceKernelLibcTime.


== _sceWlanSetHostDiscover kernel write kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.15? ==
== Stack Pointer hijack kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==
 
Discovered around 2014-01-29 by qwikrazor87 and Acid_snake.
 
The exploit steps are:
1) Execute assembly that does saves context.
2) Execute assembly that writes the evil UID 0x05FEF601 and the hijacked function _sceKernelLibcTime address to address 0x88000000.
3) Create a dummy thread whose name is at address 0x88000000, using sceKernelCreateThread.
4) Execute assembly that does something.
5) Free the evil UID 0x05FEF601 at using sceKernelFreePartitionMemory.
6) Execute assembly that restores context.
7) Call the hijacked function _sceKernelLibcTime.
 
== _sceWlanSetHostDiscover arbitrary write by qwikrazor87 and Acid_snake: PS Vita <= ?3.15? ==


Discovered around 2014-01-19 by qwikrazor87 and Acid_snake.
Discovered around 2014-01-19 by qwikrazor87 and Acid_snake.


In sceWlanDrv_lib library, the _sceWlanSetHostDiscover function allows arbitrary write to kernel.
In sceWlanDrv_lib library, the _sceWlanSetHostDiscover function allows arbitrary write to kernel.
== sceKernelFreePartitionMemory UID kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==
Discovered around 2014-01-03 by qwikrazor87 and Acid_snake.
Call sceIoOpen many times to corrupt an UID then free the UID using sceKernelFreePartitionMemory.


== sceGeList kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==
== sceGeList kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==


Discovered around 2013-10-21 by qwikrazor87 and Acid_snake.
Discovered around 2013-12-31 by qwikrazor87 and Acid_snake.


== sceVideocodec race condition kexploit by qwikrazor87 and Acid_snake: PS Vita <= 3.36 ==
== sceVideocodec race condition kexploit by qwikrazor87 and Acid_snake: PS Vita <= 3.36 ==
Line 600: Line 555:
https://bitbucket.org/Acid_Snake/ark-4/src/master/kxploit/sceVideocodec/kxploit.c
https://bitbucket.org/Acid_Snake/ark-4/src/master/kxploit/sceVideocodec/kxploit.c


== _sceSdGetLastIndex race condition kexploit by qwikrazor87 and Acid_snake (TN-X, TN-V): PS Vita <= 3.20 ==
== _sceSdGetLastIndex kexploit by qwikrazor87 and Acid_snake (TN-X, TN-V): PS Vita <= 3.20 ==


Discovered around 2013-10-21 by qwikrazor87 and Acid_snake. Implemented in TN-V4 by Total_Noob around 2013-12-12. Implemented in TN-X by Total_Noob around 2014-04-22.
Discovered around 2013-12-13 by qwikrazor87 and Acid_snake. Implemented in TN-X by Total_Noob around 2014-04-22.


There is a time-of-check to time-of-use exploit in chnnlsv.
There is a time-of-check to time-of-use exploit in chnnlsv.
Line 622: Line 577:
== _sceSdRemoveValue race condition kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==
== _sceSdRemoveValue race condition kexploit by qwikrazor87 and Acid_snake: PS Vita <= ?3.20? ==


Discovered around 2013-10-21 by qwikrazor87 and Acid_snake.
Discovered around 2013-12-13 by qwikrazor87 and Acid_snake.


There is a time-of-check to time-of-use exploit in chnnlsv.
There is a time-of-check to time-of-use exploit in chnnlsv.
Line 630: Line 585:
Discovered around 2013-12-13 by qwikrazor87 and Acid_snake.
Discovered around 2013-12-13 by qwikrazor87 and Acid_snake.


== _sceLoadCertFromFlash kexploit by by qwikrazor87 and Acid_snake (ARK, TN-V): PS Vita <= ?3.15? ==
== _sceLoadCertFromFlash kexploit by Total_Noob (TN-V): PS Vita <= ?3.15? ==


Discovered around 2013-10-22 by qwikrazor87 and Acid_snake. Implemented in TN-V by Total_Noob.
Discovered around 2013-10-22 by Total_Noob.


https://github.com/GuidoAlessandroMenichetti/TN-Rev/blob/master/loader/main.c
https://github.com/GuidoAlessandroMenichetti/TN-Rev/blob/master/loader/main.c
Line 792: Line 747:


http://www.kingx.de/forum/showthread.php?tid=15275
http://www.kingx.de/forum/showthread.php?tid=15275
https://github.com/DaveeFTW/ChickHEN/blob/main/Launcher/main.c


This exploit clobbers 16 bytes of kernel memory, so it is needed to read kernel memory before exploiting and restore the other 12 after.
This exploit clobbers 16 bytes of kernel memory, so it is needed to read kernel memory before exploiting and restore the other 12 after.
Line 820: Line 773:


https://www.hitchhikr.net/Exploit_2.6.zip
https://www.hitchhikr.net/Exploit_2.6.zip
https://github.com/mathieulh/3.90-M33/blob/master/experiments/iplreboot/experiments/experiments/kernel/GTA%20stub/loader.c
https://github.com/mathieulh/3.90-M33/blob/master/experiments/iplreboot/experiments/experiments/kernel/dump_reboot_v2.6/copy.c


== reused index.dat key: PSP 2.00, 2.01 ==
== reused index.dat key: PSP 2.00, 2.01 ==
Line 849: Line 798:
Fixed: since PSP System Software version 6.35.
Fixed: since PSP System Software version 6.35.


= iplloader =
= Lib-PSP iplloader =


== NMI Backdoor ==
== NMI Backdoor ==
Line 861: Line 810:
Applicable to: None
Applicable to: None


Vulnerable: iplloader (all PSP bootrom versions, 0.7.0 and newer PSP DevKit Kbooti versions, PS Vita's PSP emulator bootrom)
Vulnerable: Lib-PSP iplloader (all bootrom versions, 0.7.0 and newer Kbooti versions, PS Vita's PSP emulator bootrom)


The iplloader bootrom (present within Tachyon's IC package) as well as iplloader versions 0.7.0 and onward feature a NMI/Interrupt handler backdoor (most likely used internally for debugging purposes) in its loader part at the very first instructions of the bootrom.
The Lib-PSP iplloader bootrom (present within Tachyon's IC package) as well as Lib-PSP iplloader versions 0.7.0 and onward feature a NMI/Interrupt handler backdoor (most likely used internally for debugging purposes) in its loader part at the very first instructions of the bootrom.


This backdoor allows anyone in control of the memory location address 0xBC100000 to perform a jump to an arbitrary location defined in coprocessor register $9
This backdoor allows anyone in control of the memory location address 0xBC100000 to perform a jump to an arbitrary location defined in coprocessor register $9


If value at address 0xBC100000 is not equal to 0 and coprocessor register $9 is set, iplloader will jump to the address set in the register very early in the code (by the 8th instruction). Else (if value at address 0xBC100000 is equal to 0), coprocessor register $9 will be reset back to 0.
If value at address 0xBC100000 is not equal to 0 and coprocessor register $9 is set, Lib-PSP iplloader will jump to the address set in the register very early in the code (by the 8th instruction). Else (if value at address 0xBC100000 is equal to 0), coprocessor register $9 will be reset back to 0.


Below are the relevant pieces of code:
Below are the relevant pieces of code:
Line 882: Line 831:
</pre>
</pre>


This backdoor may allow an attacker performing a hardware based attack to set those values and gain iplloader time code execution.
This backdoor may allow an attacker performing a hardware based attack to set those values and gain Lib-PSP iplloader time code execution.


== Arbitrary IPL Load Address ==
== Arbitrary IPL Load Address ==
Line 894: Line 843:
Fixed: Partially in Tachyon 0x00600000. The CPU scratchpad (0xA0010000 uncached; 0x80010000 cached) range is now blacklisted, whilst all other addresses remain allowed.
Fixed: Partially in Tachyon 0x00600000. The CPU scratchpad (0xA0010000 uncached; 0x80010000 cached) range is now blacklisted, whilst all other addresses remain allowed.


iplloader will not control the location at which it will load/copy the block. It will happily attempt to perform a memcpy (at a rate of 1 DWORD per cycle) to whatever load address is specified in the IPL header, assuming that the header passes the checks (Kirk cmd 1, Kirk cmd 1 ECDSA, Kirk cmd 0x6C SHA1 (on Tachyon 0x00600000 and later), ...). This allows to write a payload at arbitrary locations.
Lib-PSP iplloader will not control the location at which it will load/copy the block. It will happily attempt to perform a memcpy (at a rate of 1 DWORD per cycle) to whatever load address is specified in the IPL header, assuming that the header passes the checks (Kirk cmd 1, Kirk cmd 1 ECDSA, Kirk cmd 0x6C SHA1 (on Tachyon 0x00600000 and later), ...). This allows to write a payload at arbitrary locations.


== Arbitrary IPL Entrypoint Address ==
== Arbitrary IPL Entrypoint Address ==
Line 904: Line 853:
Applicable to: IPL time code execution on 01g and 02g, used in Pandora
Applicable to: IPL time code execution on 01g and 02g, used in Pandora


Fixed: iplloader 2.6.0
Fixed: Lib-PSP iplloader 2.6.0


iplloader will jump to any location specified in the last IPL block's entrypoint. This allows arbitrary execution. This was used in conjunction with the Kirk time-attack to craft a block and gain execution from at address 0xBFD00100 in the Pandora hack, and thus allowed to craft a "valid" block in a more timely fashion.
Lib-PSP iplloader will jump to any location specified in the last IPL block's entrypoint. This allows arbitrary execution. This was used in conjunction with the Kirk time-attack to craft a block and gain execution from at address 0xBFD00100 in the Pandora hack, and thus allowed to craft a "valid" block in a more timely fashion.


Note: The vulnerability is also present on Tachyon 0x00600000 and later, but cannot be exploited by itself due to an ECDSA signature (Kirk cmd 17) check.
Note: The vulnerability is also present on Tachyon 0x00600000 and later, but cannot be exploited by itself due to an ECDSA signature (Kirk cmd 17) check.
Line 922: Line 871:
Fixed: Tachyon 0x00600000. Bootrom now requires a minimum IPL block size of 0x100.
Fixed: Tachyon 0x00600000. Bootrom now requires a minimum IPL block size of 0x100.


iplloader will not control the block size. This allows to craft a small, favorable for time-attack, IPL block.
Lib-PSP iplloader will not control the block size. This allows to craft a small, favorable for time-attack, IPL block.


https://web.archive.org/web/20100409005536/http://my.malloc.us/silverspring/pandora-exploit/
https://web.archive.org/web/20100409005536/http://my.malloc.us/silverspring/pandora-exploit/


== iplloader assumes a block with the checksum 0 is the first IPL block ==
== Lib-PSP iplloader assumes a block with the checksum 0 is the first IPL block ==


Found by: C+D/Prometheus - Earliest discovery: 2006 Q4
Found by: C+D/Prometheus - Earliest discovery: 2006 Q4
Line 936: Line 885:
Fixed: indirectly since Tachyon 0x00600000 as no IPL that run on Tachyon 0x00600000 and onwards have a block that uses a previous block checksum of 0 other than block #0 itself.
Fixed: indirectly since Tachyon 0x00600000 as no IPL that run on Tachyon 0x00600000 and onwards have a block that uses a previous block checksum of 0 other than block #0 itself.


This implementation fault has been exploited to create a memory hole in VRAM that could be filled with our own payload to gain execution and dump iplloader.
This implementation fault has been exploited to create a memory hole in VRAM that could be filled with our own payload to gain execution and dump Lib-PSP iplloader.


== iplloader do not perform the XOR step when running in Jig/Service mode ==
== Lib-PSP iplloader do not perform the XOR step when running in Jig/Service mode ==


Found by: Mathieulh - Earliest discovery: 2019 Q1
Found by: Mathieulh - Earliest discovery: 2019 Q1


Introduced: iplloader 3.5.0
Introduced: Lib-PSP iplloader 3.5.0


Applicable to: Code execution on 3.5.0 iplloader without previous knowledge of the XOR key.
Applicable to: Code execution on 3.5.0 Lib-PSP iplloader without previous knowledge of the XOR key.


Fixed: probably never as 3.5.0 is the last known iplloader revision for Development Tool
Fixed: probably never as 3.5.0 is the last known Lib-PSP iplloader revision for Development Tool


This is not so much a vulnerability as a poor design implementation.  
This is not so much a vulnerability as a poor design implementation.  


To allow service centers to use a unique Memory Stick for multiple PSP models during servicing, iplloader deliberately disables the XOR step, allowing a non XORed IPL to run from Memory Stick. This is done so that the IPL can run on all systems from 01g to 11g. This is also presumably done because XOR keys may differ in between Tachyon revisions.
To allow service centers to use a unique Memory Stick for multiple PSP models during servicing, Lib-PSP iplloader deliberately disables the XOR step, allowing a non XORed IPL to run from Memory Stick. This is done so that the IPL can run on all systems from 01g to 11g. This is also presumably done because XOR keys may differ in between Tachyon revisions.


This allows a potential attacker with the ability to enable Jig mode on a targeted PSP to bypass the XOR step and thus not requiring to know the XOR key to gain execution at IPL time assuming that all other checks (Kirk cmd 1, Kirk cmd 1 ECDSA, Kirk cmd 0x6C SHA1 (on Tachyon 0x00600000 and later), ...) are passed.
This allows a potential attacker with the ability to enable Jig mode on a targeted PSP to bypass the XOR step and thus not requiring to know the XOR key to gain execution at IPL time assuming that all other checks (Kirk cmd 1, Kirk cmd 1 ECDSA, Kirk cmd 0x6C SHA1 (on Tachyon 0x00600000 and later), ...) are passed.


== iplloader clears the XOR key after doing a cache sync during normal execution ==
== Lib-PSP iplloader clears the XOR key after doing a cache sync during normal execution ==


Found by: Proxima - Earliest discovery: 2020-01-27
Found by: Proxima - Earliest discovery: 2020-01-27


Introduced: iplloader 3.5.0
Introduced: Lib-PSP iplloader 3.5.0


Applicable to: Dumping the iplloader 3.5.0 XOR key from Jig mode execution when used in conjunction with the arbitrary load address vulnerability
Applicable to: Dumping the Lib-PSP iplloader 3.5.0 XOR key from Jig mode execution when used in conjunction with the arbitrary load address vulnerability


Fixed: probably never as 3.5.0 is the last known iplloader revision for Development Tool
Fixed: probably never as 3.5.0 is the last known Lib-PSP iplloader revision for Development Tool


3.5.0 iplloader clears the XOR key after doing a cache sync during normal execution. This allows to retrieve the key from the uncached memory at address 0xA001088C.
3.5.0 Lib-PSP iplloader clears the XOR key after doing a cache sync during normal execution. This allows to retrieve the key from the uncached memory at address 0xA001088C.


In Jig mode execution, the key is cleared much earlier, however resulting in the cache being synced once the key is already gone. This allows to easily retrieve the key using a XORed IPL block loaded at address 0xBFE01000.
In Jig mode execution, the key is cleared much earlier, however resulting in the cache being synced once the key is already gone. This allows to easily retrieve the key using a XORed IPL block loaded at address 0xBFE01000.


While it may be possible that Tachyon 0x00600000 and later iplloader fix this issue, it is irrelevant because the code should remain accessible as part of the Tachyon bootrom at address 0xBFC00000)
While it may be possible that Tachyon 0x00600000 and later Lib-PSP iplloader fix this issue, it is irrelevant because the code should remain accessible as part of the Tachyon bootrom at address 0xBFC00000)


== Faulty ECDSA Hash Comparison ==
== Faulty ECDSA Hash Comparison ==
Line 980: Line 929:
Fixed: never
Fixed: never


Starting with Tachyon 0x00600000, iplloader XORs each IPL block hash as they are loaded, and then uses this final XOR to verify the signature.
Starting with Tachyon 0x00600000, Lib-PSP iplloader XORs each IPL block hash as they are loaded, and then uses this final XOR to verify the signature.


This means that inserting two identical blocks in the chain will cancel the XOR change and the signature will remain valid.
This means that inserting two identical blocks in the chain will cancel the XOR change and the signature will remain valid.
Please note that all contributions to PSP Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PSP Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)