I recently discovered a buffer overflow exploit in the game, Infected, the US version of the game. I'm attaching the saves to this topic. I tried to call a simple sceKernelExitGame to see if I'm able to do it... but I failed =/. I know this game is not available in the Japanese PS store, neither in the European ps store, I didn't check the US ps store. What I would like here is to learn, but i'm lacking of knowledge
So first of all I tried to associate the PSP's RAM offsets to the savedata's offsets which (normally) give me this:
Offset: save| offset: RAM
0x00005DA2| 0x08F0DA22
(BTW, 0x00005DA2 is the place where the first byte of $ra is erased and the file manipulated is PSP/SAVEPLAIN/ULUS100540000/SDDATA.BIN)
Second, I subtracted 0x14 to both addresses which give me the following:
Offset: save| offset: RAM
0x00005D8E| 0x08F0DA0E
Then I put 0x08F0DA0E at 0x00005DA2 (I even tried to put it in little endian = 0x0EDAF008).
Third, I compiled the following asm code:
- Code: Select all
.set noat
.set noreorder
nop
jal 0x00285BF4 /* 0x00285BF4 is the sceKernelExitGame offset, again, if I'm correct */
nop
with:
psp-as test.s
psp-objcopy -O binary a.out a.bin
Once I’ve got the a.bin file from the asm code above, I copied its data to the savedata from 0x00005D8E.
So basically (again correct me if I’m wrong) I erased $ra with 0x08F0DA0E and from this address I should have my asm code executed which should reach jal 0x00285BF4 an then, exit the game. What did I done wrong?
So starting from the 0x00005D8E offset I have:
00 00 00 00 FD 16 0A 0C 00 00 00 00 00 00 00 00 00 00 00 00 08 F0 DA 0E 59 5F 50 4F 49 4E 54 00 00 00
I would really appreciate your help/comments to make me understand what I did wrong. Thank you to all of you.


