WebKit ROP Chain Tutorials [Creation/Editing/Debugging] - PS3 Development

any tips for search tweaks for a higher success rate?

BTW do file write automatically overwrites on existing files? tried replacing a 200mb file from the usb to hdd but the game update becomes small. BTW I set the size to 0xCCF1E83 when doing this

*edit

yep it transferred the file... made a usb backup of the ps3 and extracted it's contents and found that a incompletefile with the size of 0x5FF0000.

gonna try again maybe my usb is acting up since it got corrupted when I was copying back the same file from HDD -> USB via this exploit
 
Last edited:
if i had tips , it would work instantly! set to homepage, as stated on 1st alert

it is being actively worked on, so it will get better...i promise :-p

yes files are overwritten
 
any tips for search tweaks for a higher success rate?

BTW do file write automatically overwrites on existing files? tried replacing a 200mb file from the usb to hdd but the game update becomes small. BTW I set the size to 0xCCF1E83 when doing this
Actually the success rate depends on so many unknown factors it is currently impossible for me to fundamentally improve it without having a full understanding of the webkit heap management.
Now this is my current understanding of the situation & obviously I could be wrong about one or 2 things but still here goes:
Every time something gets added to the page or a js snippet is added or changed, it actually modifies the memory conditions. The javascript interpreter runs on the same memory range as our exploit variables are located. Javascript processing gets done & the interpreter may need on the fly to move a string that's in his way to avoid overwriting it. When this happens, we have a "freeze" condition, if we launch the exploit, one of the strings won't be where it is supposed to be anymore & our execution chain gets broken, the OS freezes then.
That's why new checks were introduced at the end of initRop function to ensure the 3 smallest strings (most likely to be moved) are still at the locations we just scanned them at after all the processing has been done. If not, it's an initialization fail & we reload or end.
This trick is sufficient to reduce the freeze situations to near 0. It works fine but the success rate is what it is & it fluctuates depending on used code.

One way to verify this is simple.
Take the search size for instance, try adding 0x80000 to your current search size & you will see a difference in your success rate. Same thing if you modify the search base actually, allocations begin at 0x80190000, never lower, so you can also use 0x80180000 or even 0x80100000. Try & you will notice a difference in the success rate.
In the same way, using a different javascript code will lead to different rates.
Moreover, the bigger the stack frame string, the bigger the memory range to scan because although a big string is likely to be placed much higher than the others it can also turn out to in the lower range. Then you have to play with probabilities & choose the best scan options knowing that changing search base & search size also alter the conditions... You get the tricky situation here???

However, one of the reason for this headache is rooted in the fact that I have not had the time to properly analyse the webkit heap source to try to improve the odds.
The heap is deterministic so in theory, analysing the webkit heap source code should lead to getting an optimum success rate, whatever that may be.
However imo what we really need is another method altogether. Scanning memory for offsets is like bruteforcing it's wasteful on all levels.
This has been on my mind for a while tbph, I have theoretical plans for a different implementation but again there are time constraints, we cannot work on everything at the same time.
Since October when development really accelerated, we have been working at a high rythm ie 2/3 people working from 6 up to 20h(!) daily for combined work between reversing, coding in C++, testing, making ROP chains, testing again, debugging... No breaks, not even Xmas day or NY. Lol
So in short, I/we will probably look into it at some point in the coming weeks. In the meantime, you guys could experiment with slightly tweaked search sizes and/or search bases. After all it's the objective of this tutorial, don't expect all the answers, get some on your own. ;)
 
Last edited:
search has been tweaked in newest files, as well as 4.70+ FW support as of current

and btw, the GUI has search tweaking as well as manual edit :cool:
 
Last edited:
Tried Read/Write rop chain file test to grab a game's eboot.bin from the ps3

and set this...

source: /dev_hdd0/game/NPJB00695/USRDIR/EBOOT.BIN
destination: /dev_usb000/EBOOT.BIN
size: 0x11BD80

and got a 0kb EBOOT.BIN on the usb device, tested it 2 times and same result on a 4.82 super slim (CECH-4012C)

psid and idps dump works great though
 
haha, i had to laugh because i literally had that same exact idea and added that path last night during testing before i fell asleep to test bdvd!

i have only had a 2501 with no bd for testing and just got a 2001 with working bd last night

after work, i will test some things and post updated files
 
Tried Read/Write rop chain file test to grab a game's eboot.bin from the ps3

and set this...

source: /dev_hdd0/game/NPJB00695/USRDIR/EBOOT.BIN
destination: /dev_usb000/EBOOT.BIN
size: 0x11BD80

and got a 0kb EBOOT.BIN on the usb device, tested it 2 times and same result on a 4.82 super slim (CECH-4012C)

psid and idps dump works great though
Hmmm. Check your params.
Either the permissions flag parameter is not set right for sys_fs_open or one or more parameter(s) of sys_fs_write is/are wrong.
Ideally, as always with any such issue, you need to debug the chain with ProDG!
 
Last edited:
thanks, but that is only part of it. i have been using 0x801A0000 as a base along with several tweaks for each jump.

these were all gathered from lots of testing and the lowest any offset ever is at is around 0x801C0000 or higher.

the other jumps all also have adjustments that can be made for each one

current files are looking for base_fp and the 2 jumps at min_base (0x801A0000) stackframe at min_base+0xA0000, which results in the 0x80300000 area, but this method seems to work good so far. if the range gets above a max var, then the base drops back down to min. the stackframe also can hit in lower 0x81X areas but this way seems ok for now anyways. my testing has been around 30 seconds or so for all offsets found

this is also why i included GUI dropdown boxes for this exact reason, to modify search variables without having to edit the source every time
 
Last edited:
thanks, but that is only part of it. i have been using 0x8A000000 as a base along with several tweaks for each jump.

these were all gathered from lots of testing and the lowest any offset ever is at is around 0x8C000000 or higher.

the other jumps all also have adjustments that can be made for each one

my testing has been around 30 seconds or so for all offsets found
0x8C000000? U sure about that? Not 0x801C0000 or 0x802C0000? Because 0x8C000000 would mean having flooded 180Mb of heap, it's unlikely...
16Mb higher & you get into webkit "stack".

Anyway allocation starts at 0x80190000, that should normally be the maximum base.
If you use various possible chains in one page according to options (I mean chains not just values), each chain will give slightly different success rates. Any tweak must be measured overall...
 
Last edited:
yes you are right lol

edited now, i was off by a 0 or two haha

its setup now for all chains to use same stackframe and case statement to just change values

EDIT #1:

I think we have to open the BDVD device like flash then can read from it...this is a wild assumption and i have not tried anything yet! haha

EDIT #2:

looking in debugger, we get this error after sys_fs_write

/** The operation is not permitted. */
#define EPERM -2147418103 /* 0x80010009 */

the open and read seem to work, i tested with an EBOOT of 0xB77737 in size

could be issues with closing file descriptors. i am fixing that now as this needs done anyways!
 
Last edited:
When testing on OFW4.66 ps3xploit_pett_v001 function Read/Write File Test after successful initialization and clicking the Execute Chain stuck.
 
using default PS3Xploit.bin file and default size? i will double-check offsets soon. i have not tested on older FW yet. Thanks :)
 
Back
Top