Per Console Keys

From PS3 Developer wiki
Revision as of 02:59, 26 May 2020 by CelesteBlue (talk | contribs)
Jump to navigation Jump to search

per_console_root_key_0

  • bootldr and metldr are decrypted with this key. See also Boot Order.
  • Might it be obtained with per_console_root_key_1 ? It need more looked into. It might be the case, based on the behavior of the other derivatives known to be obtained through AES.

per_console_root_key_1 (EID_root_key)

  • Derived from per_console_key_0
  • Stored inside metldr
  • Copied to sector 0 by metldr
  • Cleared by isoldr
  • Used to decrypt part of the EID
  • Used to derive further keys
  • Can be obtained with a modified isoldr that dumps it

Obtaining It

Launch the patched isoldr with your preferred method, let it be Option 1, or Option 2...

Option 1 - Dumper Kernel Module

insmod ./spp_verifier_direct.ko
cat metldr > /proc/spp_verifier_direct/metldr
cat dump_eid_root_key.self > /proc/spp_verifier_direct/isoldr
echo 1 > /proc/spp_verifier_direct/run
cat /proc/spp_verifier_direct/debug
hd /ls.bin | less

Option 2 - Dumper Payload

*DO NOT CREATE AN MFW USING THIS IT WOULD BRICK

  • This can also be loaded as with lv2patcher and payloader3.
    • payloader3.git <- ?dead link ?

Comments

  • What these SELFs do is dump the PS3 ISOLATED SPU LS through mbox, so you only need a way to catch this data with PPU code in lv2 environment aka a dongle payload or linux kernel.
  • This has been tested and proven to work on 3.55 MFW.
  • In the dump the remaining dump is the metldr clear code. metldr clears itself and all the registers then jumps to isoldr.
  • Overwritting that code lets you dump your key + metldr.

per_console_root_key_2 (EID0_key)

Obtaining It

Using the reversed code

  • This key can be obtained through AES from eid_root_key.
  • The algorithm is located in isoldr.
  • EID0_key can be gotten through a program such as openssl, using the following command (once installed):
openssl aes-256-cbc -e -in eid0_key_seed -out eid0_enc_seed -nosalt -K (isoldr key) -iv (isoldr RIV) -p -nopad

See Seeds.

Using anergistics (advanced users)

EID0 can be decrypted by setting EID0_key in anergistics and fireing aim_spu_module.self:

  • Load aim_spu_module.self + EID0 + EID0_key in anergistics -> decrypted EID0.
  • This code decrypts EID0 on PC.
  • The prerequisites are:
    • Dump EID0 from your PS3.
    • Dump EID0_key from your PS3 and put it in the code above where the key (eid_mkey?) is needed.
    • Load all of them in anergistic.

Using similar steps, you can provide eid_root_key and obtain EID0_key:

  • EID0_key can be obtained with eid_root_key directly by letting isoldr apply the algorithm in anergistic.
  • It needs modifing anergistic to feed isoldr with eid_root_key.
  • Patched aim_spu_module to dump EID0_Key:

*DO NOT CREATE AN MFW USING THIS IT WOULD BRICK

per_console_root_key_n

These are further derivations of the per_console_key_1 (EID_root_key).

See ps3_decrypt_tools by naehrwert, zecoxao and al..

cVTRM

SRK (Secret or Syscon Root Key - root hash secret (hsec)) (derivation from per console key?) is stored in Syscon along with SRH (Secret or Syscon Root Hash). SRK is used as HMAC hash to authenticate cVTRM data from flash. SRH is a hash of cVTRM data. SRH is computed at runtime and compared with SRH from Syscon.

You can fetch SRH with VTRM or SCM utilities from glevand's ps3-vuart-tools (you need to add the function to the tools to do so) or from GameOS directly if you do some patches at hypervisor level.

cVTRM uses SysCon Isolated Module to do all the cryptographic operations. It uses AES-CBC-128 to encrypt data. It seems like key is fetched from encrypted key table in Syscon (related to EID1?). Also this key can be computed using AES-XTS-128. IV contains all zeroes. Data and tweak keys for XTS are computed from eid_root_key using seeds from SysCon Isolated Module.

Here is an example of decrypted cVTRM blocks:

1B68B7B67048454E863ECA0665EFB086  1B68B7B67048454E863ECA0665EFB08670F3EADB (Drive Revocation List Hash)
70F3EADB96791F41F9A76F4D895DD582  96791F41F9A76F4D895DD5820DB108EC03D19250 (Content Revocation List Hash)
0DB108EC03D192500000000000000000
00000000000000000000000000000000
00000001000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
087E91AEFFB8E66A0000000000000000  6AE6B8FFAE917E08 (PSN) Account ID
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
  • DEAD LINK Here's a link with the added functions. Please test it and report if it works :)