Sponsored Links

Sponsored Links

PS3 LV2_Kernel Exploit Sample Implementation By Naehrwert


Sponsored Links
109w 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.

[Register or Login to view code]

From Mathieulh (via pastebin.com/naxXkv3M):

[Register or Login to view code]

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!!! ^^

[Register or Login to view code]

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 235 Comments - Go to Forum Thread »

• Please Register at PS3News.com or Login to make comments on Site News articles. Thanks!

Reborn's Avatar
#30 - Reborn - 128w ago
this look like it could come in handy!

NTA's Avatar
#29 - NTA - 128w ago
Console applications too good. Dunno why I used to hate them so much lol. Thanks for the update!

PS3 News's Avatar
#28 - PS3 News - 128w ago
Following up on his previous release, today PlayStation 3 developer naehrwert (with flat_z's help) has updated PS3 SCETool v0.2.7 which adds local NP license handling among the changes outlined below.

Download: [Register or Login to view links] / [Register or Login to view links] (Required) / [Register or Login to view links] / [Register or Login to view links] / [Register or Login to view links]

scetool 0.2.7 [public build] (C) 2011-2012 by naehrwert
NP local license handling (C) 2012 by flatz

Setup:

  • /data/keys : Keyfile.
  • /data/ldr_curves : Loader curves (7744 bytes).
  • /data/vsh_curves : VSH curves (360 bytes).
  • /data/idps : IDPS as binary file
  • /data/act.dat : act.dat
  • /rifs/* : *.rif files
  • /raps/* : *.rap files

Keyfile format:

[Register or Login to view code]

Keyset example:

[Register or Login to view code]

NPDRM key(set) names:

  • [NP_tid]: Title ID OMAC1 key.
  • [NP_ci]: Control info OMAC1 key.
  • [NP_klic_free]: Free klicensee.
  • [NP_klic_key]: klicensee key.
  • [NP_idps_const]: IDPS constant.
  • [NP_rif_key]: rif key.
  • [NP_sig]: Footer signature ECDSA keyset.

Help text:

[Register or Login to view code]

Version 0.2.7:

  • Added local NP license handling.
  • Added option to override klicensee.
  • Added option to disable section skipping (in SELF generation).

Regarding the PS3 SCETool Scripts (linked above): This is a nice little set of batch scripts that someone made to work along side SCETool.

Use the GETSELFINFO.bat to figure out what version your EBOOT (my copy of Resistance 3 was ver. 3.65) is which helped explain why some EBOOTs couldn't be modified. Don't forget to grab the Conent ID if you're changing the EBOOT from an update.

Finally, in related news keperfear has made a [Register or Login to view links] stating that you will need to have at least .Net 3.0 Framework installed to use it.

More PlayStation 3 News...

PS3 News's Avatar
#27 - PS3 News - 135w ago
Following up on his previous revision, today PlayStation 3 developer naehrwert has updated PS3 SCETool v0.2.5 which utilizes metadata information for decryption among the changes outlined below.

Download: [Register or Login to view links] / [Register or Login to view links] (Required)

scetool 0.2.5 public build (C) 2011-2012 by naehrwert

Setup:

  • /data/keys : Keyfile.
  • /data/ldr_curves : Loader curves (7744 bytes).
  • /data/vsh_curves : VSH curves (360 bytes).

Keyfile format:

[Register or Login to view code]

Keyset example:

[Register or Login to view code]

NPDRM key(set) names:

  • [NP_tid]: Title ID OMAC1 key.
  • [NP_ci]: Control info OMAC1 key.
  • [NP_klic_free]: Free klicensee.
  • [NP_klic_key]: Klicensee key.
  • [NP_sig]: Footer signature ECDSA keyset.

Help text:

[Register or Login to view code]

History:

Version 0.2.5:

  • Added option to use provided metadata info for decryption.
  • "PS3" path environment variable will now be searched for keys/ldr_curves/vsh_curves too.
    Version 0.2.4:
  • Added option to display raw values.
  • Moved factory Auth-IDs to (as they are on ps3devwiki now).

Version 0.2.2:

  • Added options to override control/capability flags (32 bytes each).
  • Fixed where a false keyset would crash scetool when decrypting a file.
  • Some source level changes and optimizations.

Version 0.2.1:

  • zlib is required to use scetool.
  • 'sdk_type' was changed to 'revision' in data/keys.

Greetings to: you know who you are!

More PlayStation 3 News...

Konatarola's Avatar
#26 - Konatarola - 140w ago
its for encrypt/decrypt any elf/self with the known keys so far (this will not work from selfs up to 3.55+) like Ezio says...
is mostly for development purposes.

Sponsored Links

Sponsored Links
Sponsored Links

Sponsored Links







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