Editing Bluray disc
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
* [http://www.osta.org/specs/pdf/udf260.pdf UDF] filesystem (a profile of [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-167.pdf ECMA-167]) in cleartext | |||
* File entries are not encrypted, some files are not encrypted | |||
* Some regions of the disc are encrypted (sector by sector) | |||
* One sector is 2048 bytes | |||
* [http://www.osta.org/specs/pdf/udf260.pdf UDF] filesystem (a profile of [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-167.pdf ECMA-167]) | |||
* | |||
* | |||
== Encryption == | == Encryption == | ||
Line 84: | Line 18: | ||
</pre> | </pre> | ||
* 0x00000003 | * 0x00000003 is the number of unencrypted regions | ||
* | * The first unencrypted region is from sector 0x00000000 to sector 0x0000099f | ||
* | * The first encrypted region is from sector 0x0000099f to sector 0x00a26160 | ||
* | * The second unencrypted region is from sector 0x00a26160 to sector 0x00ba73ff | ||
* The second encrypted region is from sector 0x00ba73ff to sector 0x011ddda0 | |||
* | * The third unencrypted region is from sector 0x011ddda0 to sector 0x011fddbf | ||
* 0x011fddbf sectors is 38636746752 bytes whereas the file is 38636748800 bytes : the last sector is not included for some reason. | |||
* 0x011fddbf sectors is 38636746752 bytes whereas the file is 38636748800 | |||
=== Deriving the disc key === | === Deriving the disc key === | ||
Line 103: | Line 33: | ||
* with the IV 0x69474772af6fdab342743aefaa186287 | * with the IV 0x69474772af6fdab342743aefaa186287 | ||
* no padding | * no padding | ||
* data1 is available in the IRD file | |||
* it can be found on the disc with a bunch of SCSI commands. | |||
* it can be found on the disc with a bunch of SCSI commands | |||
=== Sector encryption === | === Sector encryption === | ||
Each | Each sector is encrypted with AES CBC: | ||
* using the disc key | * using the disc key | ||
Line 248: | Line 175: | ||
== IRD file == | == IRD file == | ||
3k3y generates [http://jonnysp.bplaced.net/ IRD files] which contains some information about the disc | 3k3y generates [http://jonnysp.bplaced.net/ IRD files] which contains some information about the disc. | ||
The format is based on .NET BinaryReader/BinaryWriter: | The format is based on .NET BinaryReader/BinaryWriter: | ||
Line 259: | Line 181: | ||
* Integer are in little endian format: | * Integer are in little endian format: | ||
* Variable length strings use a [https://msdn.microsoft.com/fr-fr/library/system.io.binaryreader.readstring(v=vs.110).aspx compressed length prefix]. | * Variable length strings use a [https://msdn.microsoft.com/fr-fr/library/system.io.binaryreader.readstring(v=vs.110).aspx compressed length prefix]. | ||
Compressed data are compressed with gzipped and prefixed with a length (uint32). | |||
The format is (v6 to v9): | The format is (v6 to v9): | ||
Line 267: | Line 191: | ||
!Description | !Description | ||
!Example | !Example | ||
|- | |- | ||
|4B | |4B | ||
|string | |string | ||
|Magic string (" | |Magic string ("IRD") | ||
| | |Exemple | ||
|- | |- | ||
|1B | |1B | ||
Line 281: | Line 201: | ||
|Version | |Version | ||
|6, 7, 8, 9 | |6, 7, 8, 9 | ||
|- | |- | ||
|9B | |9B | ||
|string | |string | ||
| | |Game ID | ||
|BCES01584 | |BCES01584 | ||
|- | |- | ||
|var | |var | ||
|string | |string | ||
| | |Game name | ||
|The Last Of Us | |The Last Of Us | ||
|- | |- | ||
|4B | |4B | ||
|string | |string | ||
| | |Update version | ||
|4.41 | |4.41 | ||
|- | |- | ||
|5B | |5B | ||
|string | |string | ||
| | |Game version | ||
|4.41 | |4.41 | ||
|- | |- | ||
|5B | |5B | ||
|string | |string | ||
| App version | |App version | ||
|01.00 | |01.00 | ||
|- | |- | ||
|4B | |4B | ||
|uint | |uint | ||
|ID | |ID (present in v7 only) | ||
| | | | ||
|- | |- | ||
Line 329: | Line 235: | ||
|compressed | |compressed | ||
|Header | |Header | ||
| | | | ||
|- | |- | ||
Line 336: | Line 240: | ||
|compressed | |compressed | ||
|Footer | |Footer | ||
| | | | ||
|- | |- | ||
Line 343: | Line 245: | ||
|uint | |uint | ||
|Region count | |Region count | ||
| | | | ||
|- | |- | ||
Line 350: | Line 250: | ||
|bytes | |bytes | ||
|Region 1 hash | |Region 1 hash | ||
| | | | ||
|- | |- | ||
Line 357: | Line 256: | ||
|… | |… | ||
|… | |… | ||
|- | |- | ||
|4B | |4B | ||
|uint | |uint | ||
|File count | |File count | ||
| | | | ||
|- | |- | ||
Line 371: | Line 266: | ||
|File 1 key | |File 1 key | ||
| | | | ||
|- | |- | ||
|16B | |16B | ||
|bytes | |bytes | ||
|File 1 hash | |File 1 hash | ||
| | | | ||
|- | |- | ||
Line 384: | Line 276: | ||
|… | |… | ||
|… | |… | ||
|- | |- | ||
|115B | |115B | ||
|bytes | |bytes | ||
|PIC | |PIC (for v=9) | ||
| | | | ||
|- | |- | ||
Line 403: | Line 285: | ||
|bytes | |bytes | ||
|Data 1 | |Data 1 | ||
| | | | ||
|- | |- | ||
Line 410: | Line 290: | ||
|bytes | |bytes | ||
|Data 2 | |Data 2 | ||
| | | | ||
|- | |- | ||
|115B | |115B | ||
|bytes | |bytes | ||
|PIC | |PIC (v<9) | ||
| | | | ||
|- | |- | ||
| | |2B | ||
|uint/bytes | |uint/bytes | ||
|UID | |UID | ||
| | | | ||
|} | |} | ||
== References == | == References == | ||
Line 445: | Line 307: | ||
* 3k3y IsoTools, this is a .NET program available in binary form. The [https://github.com/icsharpcode/ILSpy ILspy] decompiler produces a very readable output. | * 3k3y IsoTools, this is a .NET program available in binary form. The [https://github.com/icsharpcode/ILSpy ILspy] decompiler produces a very readable output. | ||
* PS3 ISO Patcher by BlackDaemon, is a .NET program available in source code | * PS3 ISO Patcher by BlackDaemon, is a .NET program available in source code | ||
{{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> | {{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> |