PS3 LV2_Kernel Exploit Sample Implementation By Naehrwert


83w ago - Following up on his PS3 SCETool update and PS3 Dump_Rootkey code, today Sony PlayStation 3 hacker Naehrwert has posted some details on exploiting the PlayStation 3 lv2_kernel and has made available a sample 3.41 implementation below.

To quote from his blog: Exploiting (?) lv2

A long while ago KaKaRoTo pointed me to a stack overflow he found while reversing lv2_kernel. But there are two problems:

1. The vulnerability is in a protected syscall (the SELF calling it got to have the 0x40... control flags set). So you’d first need to find a suitable usermode exploit (don’t ask us), that gives you code execution with the right privileges.

2. The payload data is copied to lv2 heap first and the function will do a free call on it before the payload has any chance to get executed. This might not sound like a problem but it looks like lv2′s heap implementation will overwrite the free’ed space with 0xABADCAFE and thus destroy the payload.

Here (pastie.org/4755699) is my sample implementation for 3.41 lv2_kernel (although the vulnerability should be present in all versions of lv2 up to the latest firmware), maybe someone of you will find a way to overcome problem (2.) and can get something nice out of it because right now it’s only good to crash lv2.

From Mathieulh (via pastebin.com/naxXkv3M):

The footer signature is still not checked upon npdrm self files execution as of 4.21.

Because kakaroto says something that doesn't make it true. Basically he found a check in 3.55 that was not even called and assumed they used it in 3.60+.

Of course they do whitelist npdrm now so even if the footer isn't checked you cannot run your own npdrm selfs signed with keyset lower than 0x0D making the whole debate rather pointless. Aditional checks are now performed on the actual file format as well such as the segment counter flag that needs to be set to 0x01 except for the very last segment.

Finally, from KDSBest (via twitlonger.com/show/jcmh80): Since naehrwert posted an lv2 exploit I will do so too . The stack pointer points to lv2 and if we do a syscall, the syscall saves register to the stack HAHA.

Btw. It just crashes the console for now, since I totally overwrite dump the lv2 or some memory addresses I don't know. Feel free to try around, adjust the address of the stackpointer and so on. If you managed to get the panic payload executed. Tell me!!! ^^

I didn't managed to make it work on 4.21 so I just did on 4.20






Stay tuned for more PS3 Hacks and PS3 CFW news, follow us on Twitter and be sure to drop by the PS3 Hacks and PS3 Custom Firmware Forums for the latest PlayStation 3 scene updates and homebrew releases!

Comments 231 Comments - Go to Forum Thread »

Quick Reply Quick Reply

PS3 News's Avatar
#216 - PS3 News - 42w ago
Following up on his previous updates, today PlayStation 3 developer JjKkYu has released TrueAncestor EDAT Rebuilder v1.42 followed by v1.45 with the changes outlined below.

Download: TrueAncestor EDAT Rebuilder v1.42 for PS3 / TrueAncestor EDAT Rebuilder v1.45 for PS3

The newest version, but for some reason some function is ripped in the public version.

For detail changes, please read history.txt in the package.

Changelogs:

v1.45
1. Fix bug in rebuilding edat version 1 files.

v1.42 Public Release
1. Batch mode is disabled in public release.
2. Compressed EDAT support is disabled in public release.

v1.41 Internal Release
1. Support rebuilding non-compressed zero content edat files.

v1.40 Internal Release
1. Fix bug in rebuild process.

v1.35 Internal Release
1. Use flatz' rap2rifkey.exe to get rifkey now.

v1.31 Internal Release
1. Fix file missing when failing to rebuild files.

v1.30 Internal Release
1. Change rebuilding method.
2. Support rebuilding compressed edat files.
3. Add generate unlock edat function.
4. Add backup files switch, default is off.
5. Add skip java check.

Finally, in related PlayStation 3 hacking news pink1 has made available an R2R+Edat tool followed by a R2R+edat v1.0.1 update with details below, as follows:

Here is a tool I put together. It's pretty much rap2rif, rif2rap and an edat fix tool for C00 type demos. Put your act.dat & idps in the data folder and you're ready for rap2rif & rif2rap. To fix C00 type demos input a .pkg from a C00 demo or the PARAM.SFO and it will output the fixed .edat.

Download: R2R+etat.zip / R2R+etat.zip (Mirror) / R2R+etat_v1.0.1.zip / R2R+etat_v1.0.1.zip (Mirror)

This is a small update to R2R+edat, it fixes edats being a byte short & should speed up pkg2edat a lot by only decrypting the first 5MB instead of the whole pkg. Put your act.dat & idps in the data folder and you're ready for rap2rif & rif2rap. To fix C00 type demos input a .pkg from a C00 demo or the PARAM.SFO and it will output the fixed .edat.

Finally, in related PS3 EDAT news from BuC (aka BuC-ShoTz 1-2013) comes some old EDAT SRC Codes as follows: going through old stuff on my pc, for learning purposes i suppose.

  • line 257 creates edat: pastie.org/8642860
  • incomplete only decrypt EDAT.cs: pastie.org/private/6k2xiyfcojuch5tg73va
  • OMAC.cs: pastie.org/private/nmsml5958fpacqp1jbyya
  • RAP.cs: pastie.org/private/hqligcidxft7h1evxwfuw
  • FORM1.cs: pastie.org/private/la7dagczv6bpgrbtcappq
  • BigEndian.cs: pastie.org/private/6dr5vvab5f2fgwccjlxow
  • Aes.cs: pastie.org/private/kik3q7oe2vvnayi40l3rdw
  • libcomp.dll: mediafire.com/?lr82ft3l11tvs69

More PlayStation 3 News...

jjkkyu's Avatar
#215 - jjkkyu - 45w ago
what source do you bf from?

ps33ps's Avatar
#214 - ps33ps - 45w ago
This tool PS3 EDAT Devklic Bruteforcer v1.1 working? i tried 6 different edats and always i got this same message ''Cannot found DevKlic''

aldostools's Avatar
#213 - aldostools - 45w ago
Awesome work from JjKkYu (as usual)!

Here are 2 tips to find the dev_klic even faster:

1- First try to bruteforce the edat against the list of known: ps3tools.aldostools.org/dev_klics.txt


2- If the key is not found above, open the eboot.bin with scetool and show the info. Then open the ELF with HxD and cut from the offset 0 to the offset of the 3rd section.

Usually this will reduce the "devklic source file" (elf) to about a 50% or less of the original size, saving a lot of time.

PS3 News's Avatar
#212 - PS3 News - 45w ago
Following up on his previous updates, today PlayStation 3 developer JjKkYu has released PS3 EDAT Devklic Bruteforcer v1.0 followed by v1.1 and v1.2 with details below.

Download: PS3 EDAT Devklic Bruteforcer v1.0 / PS3 EDAT Devklic Bruteforcer v1.1 / PS3 EDAT Devklic Bruteforcer v1.2

To quote: This tool is used to bruteforce devklic for edat files on pc. It supports bruteforcing from binary or text files. It only take minutes to bruteforce in an elf file, no more waiting for hours or days.

This tool is based on BuC's EDAT Devklic Validator, all credit to BuC.

Update to v1.1

  • Fix a bug while bruteforce in text file.

If you meet some issue, please feedback. Thx.

Update to v1.2

Add 2 Modes:

  • Short Mode: Run only 4 rounds for binary source file. This mode doesn't try all the contents from source file. But it is enough in most cases.
  • Line Mode: Run only 1 round for text source file. This mode reads first 32 bytes in each line as devklic. It runs extremely fast for formatted text source file.

More PlayStation 3 News...













Affiliates - Contact Us - PS3 Downloads - Privacy Statement - Site Rules - Top - © 2014 PlayStation 3 News