Sponsored Links

Sponsored Links

PS3 Metldr Exploit Leaked, PlayStation 3 Metldr Guide Arrives


Sponsored Links
159w ago - Today an anonymous PlayStation 3 hacker has leaked a PS3 Metldr exploit, followed by a guide from [Register or Login to view links] on how to pwn metldr the "easy" way below.

Download: [Register or Login to view links] / [Register or Login to view links] (Mirror) / [Register or Login to view links] / [Register or Login to view links] / PS3 Metldr Exploit Layman's Guide by lunuxx

From GaryOPA: We received an 'an0nymous email' from some random one-time dropbox, containing a weird little attachment, with a simple note:

Program: metldr838exploit
Author: Unknown
Usage: Unknown
Reason: Unknown

Before posting we had one our PS3 crunching developers look it over, and it seems to be a set of 'C' code and headers and an compiled ELF and SELF that exploits the 'chain of trust' to dump an 'unecrypted' version of your PS3 'metldr'.

Now of course this is not really 'useful' for the average PS3 Jailbreak end-user, but we think it just might be the long waited for 'golden tickets' in the right hard-working hands of some talented 'developers' that are willing to try to help everyone out by pushing the PS3 'scene' to the next level, that almost everyone here has all have been waiting for!

Seems long-time 'scene' developer Mathieulh is claiming ownership of this 'metldr' exploit, and has now published his 'How-To' tutorial for it:

How to pwn metldr the "easy" way

Because some ungrateful person leaked my metldr exploit files I will now be explaining how it actually works, see this as my ultimate release of all times for an ungrateful scene (and scenes in the future)

That's about how I am pissed right now, because of course the person that leaked these files has no idea of how they actually work.

How to pwn metldr the "easy" way:

This is most likely how geohot exploited it in the first way, this takes (give or take) about 10 minutes to be performed. (yeah, not so much of a "I hacked the ps3 all on my own work, especially not when it partially relies on Segher's work, one of the reason geohot never shared the way he exploited metldr to anyone)

I will assume here, that you do not have the loader keys that were made readily available by geohot. This little tutorial also assumes that you have a working .self generating tool

Now You want to gain code execution to metldr, you know that metldr loads loaders to its own space, but you cannot run a loader because the loader needs to be signed and even though you know about the sign fail that Segher introduced at the CCC, you cannot use it because you don't have decrypted signatures to calculate a private key and to get signatures you need keys which you are currently trying to dump, so far you are stuck in a chicken and egg scenario.

The question is, do you really need keys to get a decrypted signature ? Well the real answer is no, thanks to a nifty fail that sony left in in metldr (and the bootloader), you can have the ldr to decrypt the metadata for you, isn't that neat ?

Here's how it works:

STEP I)

In a self file, at address 0x0C a value is used to calculate where the metadata is going to be decrypted, the "offset" is at self header + 0x0C its the "meta header offset" in the SCE structure, it takes the SCE offset + that value, so what you have to do is to have a calculation that is equal to 0x3E01F0 which happens to be where metldr copies over the shared metadata from the mailbox (which is sent over by the ppu), the trick is to have metldr to decrypt the metadata located at.

So basically you have to:

1) set the offset += 0x2000 dump shared lsa and keep increasing 0x2000 until somewhere in the shared lsa changes 0x40 byte
2) when it changes 0x40 bytes, you can add/subtract the proper amount to make it decrypt the proper locations
3) then dump shared lsa and we have decrypted header knowing that metldr uses SCE header 0xECF0, you could calculate it knowing the address 0x3E01F0 - 0xECF0 = the value you would patch at SCE header + 0x0C

ROM:0000F6C0 D2 68 87 E6 metadata_erk: .int 0xD26887E6 ; DATA XREF: ROM:0000F178o for example in CECHA , the address you want to decrypt it to is 0x3E1F0 so it should be 0x3E1F0 - 0xF6C0

Once you get the decrypted header, you have the key to decrypt the rest of the metadata. Here you go, you have your decrypted signature.

So far so good, now what's next ?

STEP II)

Contrary to popular beliefs, you do not need to know the public key to calculate the private key, you just need two decrypted signature, you now know how to dump these, so let's assume you just did, now all you have to do is to bruteforce the curve type by constantly reloading a self to metldr, the curve type being only 1 byte, that would be 64 possibilities.

CONGRATULATION, you just signed a loader !

Now what ?

Well Your first reflex would be to sign a loader and use it to dump whatever is in your Isolated Local Store, the first thing you will notice is that you have a bit of metldr's code as a leftover, after a few seconds of disassembly you will figure it's actually some piece of code that clears metldr's code and registers and jumps to some address which is matches your signed loader's entrypoint.

This seems like a more than likely candidate to exploit, as in your goal would be to overwrite that piece of code with your own, that way you would have the whole metldr code right before the point where everything gets cleared out.

Let's try to do just that, from your previous dump, you obviously know that the clear code is located from 0x400 to 0x630, (0x410 being where metldr jumps when it clears) your first attempt would naturally be to have a loader section to load at 0x400, well not so surprisingly, it fails, because you are not without a brain (at least you aren't supposed to be if you're reading and understanding this), you will assume that it is likely that metldr checks if you aren't loading your loader/self section below a certain address, which considering you know the loaders' entrypoint is most likely to be 0x12C00, this assumption is in fact correct as metldr will make sure you cannot load any loader at 0x12BFF and below, seems like a huge let down...

Well, maybe not, because yet again, you are not without a brain, you check out the hardware properties for the Local Store, and you find out that the memory wraps around (memory is a donut as someone once said at some ccc conference).

So what happens when you load your loader at let's say from 0x3F000 to 0x40000+some address? (like 0x40410 for example) ?

Well, it WORKS!
You could put the section at 0x3F000, if you made the length 0x1414 and the last instruction branches "up" to the dump code.

[Register or Login to view code]

This is what the exploit that got leaked (yeah that's not really their work eh but you figured that much by now did you not?) does. It overwrites from 0x000 to 0x480 because I originally loaded the section o size 0x880 to 0x3FC00

So now you get code execution on metldr at the best time possible because your code executes right after metldr copies the root keys from 0x00 to 0x30, which means you get to dump these too. (Although they are hardcoded in metldr's code anyway)

Here you go, you have a metldr dump !

Now as a final line, I'd like to say screw leakers, screw the scene, and this is my last contribution to it EVER. It seems I can't even trust fellow developers to keep my work safe and not leaking it. (Not like any of them would have been able to tell you how all this even works in the first place)

So long, everyone. Remember, don't ever bite the hands that feed you.

P.S. Oh! and btw, if you talented enough to make hardware to dump the shared lsa, you can decrypt any lv0 using this technique.

[Register or Login to view code]

From the PS3 Metldr Exploit ReadMe file:

[Register or Login to view code]

Also from [Register or Login to view links] attempting to defend himself from PS3 Scene Devs: Oh ! and to people who might doubt it's a leak (As in 2 people who might by some miracle have found the very same exploit), the leaked appldr-metldrexploit350.self file not only bares the same name but the same hash and obviously the same signature as the file I've given out to the few people that had it.

If you don't know about this, because of the rand functions involved, the chances of getting an identical signature on a self file are one to trillions, so yeah, definitely my stuff.

To people still claiming that the leaked files weren't crafted by me, look at "run.sh" the "/proc/metldrpwn/mathldr" line is a dead giveaway. IRC Log here: [Register or Login to view links]

Oh ! and just so you know, because the "donut fail" requires a signed ldr to work and gain code execution in metldr doesn't mean there is no way to pwn metldr.2 though obviously you can't use that particular exploit for this) Not like you really need to dump a metldr with an updated keyset, a hardcoded 3.60 min ldr version and some useless gcc optimizations though.

By the way, to Sony engineers' credit, they did check if you'd load a ldr at 0x40000+ they just didn't check if you'd load it at 0x3FFFF or below and have it a positive size

I wonder if people noticed the metldr.spu.cecha.elf, metldr.spu.cech2500.elf and the 1.3MB metldr-cecha.idb in my metldr's collection pic

I don't really care about the ps3 anymore anyway. Here is a protip before I am gone, you can load the bl more than once.

From Sony PS3 hacker adrianc: I hate to burst everyone's bubble but this means nothing. The chain of trust was fixed by moving loaders into lv0.

Until lv0 is either dumped or decrypted, the loaders, and therefore the keys will remain just out of reach. Cold boot exploits are not possible because lv0 sets up the loaders table before passing execution to lv1. Decrypting lv0 requires pwning the bootloader_PE, which is very difficult. If you could sniff the flexio you might be able to dump it that way. Or you could use what is known about the CBE secure boot to preempt bootldr. I suggest the IBM docs as reading material.

They are encrypted with the same key, which is burnt into the CBE efuses. This key is never passed along the chain of trust, so neither metldr or bootldr ever sees their own key. Metldr dumps will give you some perspective on how secure loaders work, and possibly stimulate some ideas for how you might be able to pwn bootldr. However, there is no easy 'find a key, use a key' solution to be found inside metldr.

This exploit does not enable you to find the hardware root key, merely a much weaker derivative which exists to prove the secure loader has been authorised by hardware.

Unconfirmed PS3 Bootldr Key: [Register or Login to view links]

[Register or Login to view code]

From [Register or Login to view links]: [Register or Login to view links] and [Register or Login to view links]

[Register or Login to view code]

From [Register or Login to view links]

[Register or Login to view code]

Related Tweets: 7492E57C2C7C63F44942268FB41C58ED... I found out a lot more too

94D100BE6E24991D65D93F3DA938858CEC2D133051F47DB4287AC86631719B31573EF7CCE071CA8A (placeholder for the future)

eidtool "eid0_hash_encrypt_section_0"

aes_omac1(section_in + 0xA8, section_in, 0xA8, key, 0x80);

From [Register or Login to view links]: The "metldr exploit" had already been replicated long ago by many ppl who feel no need for public acknowledgement.

Finally, from lunuxx via [Register or Login to view links]: Well it works, go get your root key.

[Register or Login to view links]

[Register or Login to view code]

Well in the first 3 lines of my dump:

[Register or Login to view code]


[Register or Login to view code]

From IRC: [eussNL] that is how you can verify your metldr dump, by looking for [Register or Login to view links]

ERK+RIV:
[Register or Login to view code]

PUBLIC:
[Register or Login to view code]

Now we just need a way to do it ourselves without having to install linux on our PS3. They are different for each PS3 (box-specific key that Metldr is signed with, which has new keys for the rest). Lunuxx was just showing us that it is possible and safe to try. It also gives us reference to what a proper dump should look like. A more detailed guide is now available HERE.








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

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

enoughbr's Avatar
#176 - enoughbr - 154w ago
I talked with RealPsDev, he says Lv0 can be decrypted, and that he has seen the Lv0 fully decrypted, for those who do not know what it means to Lv0, it is the key "master" keys of all OFW are derived from it.

[Register or Login to view links]
[code]Now before anyone gets to excited this is strings from a hypervision and bootloader dump from the ram it not useless as it tell a lot of events that happen at certain addresses like the lv0 app version is set at 0x10 ect: + It sucks cause a lot of stuff has been cut out due to memory shortage there about 100kb worth of missing info

sys.lv1.emuioif0irq
lv1.ram.tkm
sys.lv1.be
sys.lv1.iosys.errorhandler
sys.lv0.revision
lv1.ram.tkm
be.0.spu.faultbm
sys.platform.mode
sys.cellos.flags
sys.lv1.iosys.pciex
lv1.ram.ioc
quethshld
gglv1.ram.ioc
quethshld
sys.lv0.version
sys.lv1.iosys.pci.retry
lv1.ram.biu
modesetup1
sys.ac.sd
lv1.ram.biu
modesetup2
sys.lc.polling.time
sys.ac.misc2
lv1.ram.spe
lv1.ram.tkm
lv1.ram.tkm
lv1.ram.mic
sys.lv1console.mode
lv1.ram.mic
be.0.fir.mic
be.0.fir.mic
pme.memory.size
@be.0.ioif0.addr
be.0.ioif1.addr
sys.hw.config
sys.sata.param
sys.hw.model
be.0.fir.spu0
be.0.fir.spu1
be.0.fir.spu2
be.0.nclk
be.0.fir.spu0
sys.flash.boot
sys.qaf.qafen
be.0.fir.spu1
@01 2
l7D-!:yP9>
.WPGHshhc
8c
Tc'>hc
8c
I0= 38
p
I0= 58
p
I0= :8
p
xy< yJ A
:axxD"T
/ C@8A
x;ch;!x;
;up9 %p

ordered ID to masking pattern
ordered id %d -> %p

ordered ID to ID

ordered id %d -> %d

0123456789abcdef
0123456789ABCDEF
../../src/UX/selective/secure/certified
file.ccThis is not certified
CF version mismatch

CF category mismatch

incorrect ext
incorrect file
incorrect file
../../src/UX/selective/secure/self64
file: validation of certified
file failed
sys.lv1console.mode
old syscon mode is obsoluted.
ABEND: assertion failed:
????????????????
ABEND: LOG
too many hdec handlers

srr0:
srr1:
dar:
CONFIGURATION ERROR:
logger@:
buffer address:

start pointer:

end pointer:
sys.lv1log.size
loader parameter full
sys.cellos.flags
sys.mmio.map
mu.1.size
be.0.ioif1.addrbe.0.bp
sys.platform.mode
last remainder:
Releasable
allocator@

free list:

free block bitmap:
stockpile@

budget@

residual =

used =

buffer =
sys.lv0.addresssys.lv0.size
sys.lv0.revision
sys.lv0.versionsys.lv1.ahcr
Total memory:

Lv-0 size:

Heap consumption

Peak at:
WARNING: out of memory -
FATAL: no reserved memory...

remaining reserved memory =
lv1.ram.enable
lv1.ram.ppe
lv1.ram.spe
lv1.ram.mic
lv1.ram.mic
lv1.ram.ioc
quethshld
lv1.ram.ioc
quethshld
lv1.ram.tkm
lv1.ram.tkm
lv1.ram.tkm
lv1.ram.tkm
lv1.ram.tkm
lv1.ram.biu
modesetup1
lv1.ram.biu
modesetup2
be.0.spu.faultbm
spurious interrupt: pu
interrupt:
I/O exception: source lv1
runtime.tcl
invalid GOPI number
a conflict is detected
PANIC: conflicting interface number:
revision:
date:
count =
construction
status =

chain =

reversed

link =

rc =
memory leak in heap for thread
is detected.
managed memory:

leak:
memory leak in stockpile for node
is detected.

shortagesegment
association@
, invalidation
count = WARNING: PTE collision
existing=

inserted=
WARNING: PTE collision

existing=
v:
e0:
e1:
ioaddr:
a:
ioid:
sys.pci.share
sys.lv1.iofaultmsg
: write 0x
: read 0x
WARNING: "enable
time" is deprecated

pme.memory.sizepme.memory.size is not a multiple of 4KB
be.0.fir.ras
eebe.0.fir.l2
be.0.fir.l2
be.0.fir.biu
embe.0.fir.biu
eebe.0.fir.ciu
embe.0.fir.ciu
eebe.0.fir.mic
f0be.0.fir.mic
f1be.0.fir.ioc
embe.0.fir.ioc
dump spu
fir regs
unit: spu
DETECT HW Error
unit: global fir, cause: checkstop
DETECT HW Error
unit: global fir, cause: recoverable
recoverable
dump global fir regs
dump biu fir regs
unit: biu
dump l2 fir regs
unit: l2
dump ioc fir regs
unit: ioc
dump mic fir regs
unit: mic
dump ciu fir regs
unit: ciu
sys.lv1.be
sys.hvlog.size
SPE hang is detected: GUID
UNKNOWN, NPC
construction of SPU management VPU failed

pmi
: already called

: wrong gos
sys.lv1.dump
plat.idPANIC: Can't get loader parameter =
sys.flash.fmt
storage.size
spider.gbe0.macaddr.1
spider.gbe0.macaddr.2
spider.gbe0.macaddr.3
sys.debug.device
rsx.rdcy.3
rsx.rdcy.4
rsx.rdcy.5
rsx.rdcy.6
rsx.rdcy.7
rsx.rdcy.8
sys.lv1.iosysenable
ios.net.eurus.lpar
sys.hw.config
sys.hw.model
be.0.nclk
be.0.ioif0.addrlv1.heap.check
The allocation size from the heap
exceeds
bytes: 0x
lc.allow.large
sys.dbgcard.dgbe
sys.lc.polling.time
hypervisor
EIC driver initialization failed
FAIL: construction of a SPU objs
FAIL: Loader parameter 'be.0.spu.faultbm' is required.
sys.cellos.spu.configure
FAIL: Lv-1 does not support system SPEs more than 2.
,normal,system
sys.lv1.iosys.network
sys.hw.config
sys.hw.model
virtual int cellos::iosys::storage::storage
device:ut
cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
virtual int cellos::iosys::storage::storage
device:ut
cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
virtual int cellos::iosys::storage::storage
device:ut
cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
virtual int cellos::iosys::storage::storage
device:ut
cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
t, cellos::uint64
int cellos::iosys::storage::storage
device::confirm
cellos::uint64
XorWithMask
cellos::iosys::storage::storage
initialize
0123456789abcdefghijklmnopqrstuvwxyz
be.0.fir.spu0
be.0.fir.spu0
\\\\ios.net.eurus.lpar

verifier.self
processor.self
processor.self
module.self
verifier.self
module.self
module.self
module.self
module.self
default.spp
kernel.self
init.self
partitions/2
.,/-0.1/2031425364758697:8;9

chr15m's Avatar
#175 - chr15m - 157w ago
sorry boss, in my excitement i should of checked it out more thoroughly, thought waninkoko had come back to life, and would redeem himself. oh well, sigh

grimmmy's Avatar
#174 - grimmmy - 157w ago
Yeah, the 1k is a fake. It even says 'As you should expect from a parody account' in the account description.

Tidusnake666's Avatar
#173 - Tidusnake666 - 157w ago
Great Boss, I almost fell for it Really, the 1k+ account if a fake.

Also, 3.60+ app keys? NONSENSE. What for? What to decrypt? Everything's decrypted with app keys and then encrypted with masterdisk algo. There maybe masterdisk keys, but APP-keys, never

PS3 News's Avatar
#172 - PS3 News - 157w ago
Quote Originally Posted by chr15m View Post
Waninkoko's back.. lol the race to hack 3.6+ f.w is on.

From twitter.com/#!/hackingblack:

hackingblack: Just discovered the 3.60+ app keys on this JB2 dongle IRC user Falcon donated to me.

hackingblack: Isn't releasing things anonymously just great?

hackingblack: My cfw requires no dongle.

I was going to promote this to the main page, but then noticed the Twitter page address and number of followers hehe:

[Register or Login to view links] (fake?) 1,276 followers
[Register or Login to view links] (real) 14,014 followers

Sponsored Links

Sponsored Links
Sponsored Links

Sponsored Links







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