Discussion:
[Xbox-linux] DVD Information / Copy Protection Schemes
Milosch Meriac
2003-01-29 21:52:03 UTC
Permalink
Hi folks,

I did some research about copy protection schemes. Here my results:

The basic idea is that the DVD drives used in Xboxes can be exchanged with
standard PC drives using some minor glue logic. So i savely assumed that
there is nothing special about the firmware/hardware used in Xbox drives.

DVD's have roughly a cypacity of 4.7G per plane. On one side you can have at
least two data planes - The laser inside your drive can focus on one of the
two layers. A DVD can two sides: this adds to a maximum capacity of 18GB per
DVD.
The 9GB format with two layers on one side is widely used for movie dvd's.
One-layer single-sided dvd's are mainly used on hongkong DVD's.
There are no DVD writers available that support the dual layer technique. It
would be a cool copy protection ("Burst Cutting Area"-usage and Wobbling is
much cooler).
The next problem is, that in "DVD General"-R/-RW's/+R/+RW's the lead-in is
already embossed:

Loading Image...

On the picture you see on the left side the burst-copy-area bar codes of a
Xbox Game DVD and on the right a common DVD-R blank.
The thin bright line on the DVD-R is the border beetween the embossed lead-in
area.
It's highly propable that the BCA (Burst Cutting Area) and the lead-in are
part of the copy protection scheme.
The expensive solution to write our own lead-in would be to use the DVD writer
"DVR-S201" from Panasonic. This writer is the only possibility to write "DVD
Authoring" media where you write the lead-in by yourself.
Media for "DVD Authoring" can't be used because they use a coating where you
need a different wavelength to write data. This behavor is wanted to disallow
users duplication of copyrighted media (CSS and other copy protection schemes
need at least the lead-in for protection information). To make sure that this
recorder would not be used by normal users they made it really expensive:
it's about 4000$.

One idea to simulate a valid BCA is to use a CD labling kit with reflective
stickers to print a valid BCA and stick it on the DVD media.
Maybe we can also can circumvent the "embossed lead in"-protection by writing
a second lead-in and use our BCA-sticker to hide the first lead-in.
The only drawback would be the you can't use the whole capacity of the DVD
anymore.
The cool thing is that this system prevents 1:1 copies of xbox games,
_because_ you can't use the whole capacity - i like this idea , because game
vendors can easily protect their intellectual property (just put important
data at the end of the DVD).
If the TOC/UDF-Filestructures are signed (checksums in lead-In etc.), the
approach would be to take a game file system and to zero all file contents.
We now can use the empty files to put our own data ther: the default.xbe
would contain our data and we can use the other files to put our own user
data like kernel image and ramdisk image or even a filesystem inside there.
The only drawback is that we can't choose the file names freely ;-).

The DVD could also contain CSS protected areas. This is no problem because the
CSS algorithm is unsave and we can calculate the keys easily. I don't think
that it is used because of the license fees.

CPRM (Content Protection For Recorable Media) could be theoretically used but
doesn't make much sense. In the first hand it's not officially announced for
DVD-ROM media and the it doesn't explicitely disable copying the data by
commercial hackers.

If they used "Bad Sectors"/"Correctable Errors" as security feature we can
write our own ECC-information using "disc at once" RAW writing mode.

Additional security features like "wobble codes" presumably not used because
it's not sumpported by current DVD drives-

It seems that they messed up the lead-in to fake the real size of the DVD -
and the real data is hidden. We have to figure out the correct order/type of
IDE commands to circumvent this.
The PARATA Project of Andy could help us much to be used as sniffer for IDE
bus commands.

I would write some basic command line tools to check the protection
possibilities - especially a BCA detection program to show the BCA of every
disc we want to check my assumptions.

--
Milosch Meriac
Milosch Meriac
2003-01-29 22:43:07 UTC
Permalink
Post by Milosch Meriac
Hi folks,
Due to davex it's not the BCA you see on the picture - it's in fact a random
production code that's unreadable by the drive.

Fine: no BCA used at all !

--
Milosch
Milosch Meriac
2003-01-30 00:06:49 UTC
Permalink
Post by Milosch Meriac
The next problem is, that in "DVD General"-R/-RW's/+R/+RW's the lead-in is
thanks to Peter Barth for pointing me to a CT'-article about CD+R/+RW:
writers: the +R/+RW has no embossed lead-in's.

This means that the lead-in is recorded by using the FORMAT_UNIT command.
Both (+R/+RW and -R/-RW) are pregrooved. A dvd writer can distiguish this
media by the wobbling of the pre-groove (817kHz at n=1 for +R/+RW and 140kHz
for -R/-RW). It doesn't make sense that a dvd-reader also makes a difference
between DVD+R and DVD-ROM formats.
Provided that we can patch the firmware of a CD+R/+RW writer we can record
every lead-in we want and therefore copy DVD-ROMs with lead-in protection.

Another interesting point is that the recording layer of CD+RW and C-RW is the
same, but i don't think that it is easier to cheat a CD-RW drive to use CD+RW
media without a embossed pre-groove by patching another wobble frequency than
to cheat a CD+RW drive to write "raw" lead-in's.

--
Milosch
asterisk
2003-01-30 00:16:05 UTC
Permalink
Writing raw lead-ins on CD media is very simple and standard. DAO RAW does
this. Do you mean writing a raw lead-in on DVD media?

koitsu

----- Original Message -----
From: "Milosch Meriac" <***@meriac.de>
To: <xbox-linux-***@lists.sourceforge.net>
Cc: <***@weihenstephan.org>; <***@warmcat.com>; <***@caos.at>
Sent: Wednesday, January 29, 2003 4:06 PM
Subject: [Xbox-linux] Update: DVD Information / Copy Protection Schemes
Post by Milosch Meriac
The next problem is, that in "DVD General"-R/-RW's/+R/+RW's the lead-in is
thanks to Peter Barth for pointing me to a CT'-article about CD+R/+RW:
writers: the +R/+RW has no embossed lead-in's.

This means that the lead-in is recorded by using the FORMAT_UNIT command.
Both (+R/+RW and -R/-RW) are pregrooved. A dvd writer can distiguish this
media by the wobbling of the pre-groove (817kHz at n=1 for +R/+RW and 140kHz
for -R/-RW). It doesn't make sense that a dvd-reader also makes a difference
between DVD+R and DVD-ROM formats.
Provided that we can patch the firmware of a CD+R/+RW writer we can record
every lead-in we want and therefore copy DVD-ROMs with lead-in protection.

Another interesting point is that the recording layer of CD+RW and C-RW is
the
same, but i don't think that it is easier to cheat a CD-RW drive to use
CD+RW
media without a embossed pre-groove by patching another wobble frequency
than
to cheat a CD+RW drive to write "raw" lead-in's.

--
Milosch


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See!
http://www.vasoftware.com
Milosch Meriac
2003-01-30 00:47:22 UTC
Permalink
Post by asterisk
Writing raw lead-ins on CD media is very simple and standard. DAO RAW does
this. Do you mean writing a raw lead-in on DVD media?
Yes. On DVD's its part of the copy protection scheme (containing the CSS area
or media keys e.t.c.) - so raw lead-in' are not allowed by design.
This is accomplished either by the firmware of the drive DVD+R/+RW) or
pre-embossed lead-in's on DVD/-R/-RW's.
Only DVD-Authoring Media-Writers like the DVR-S201 could write a real lead-in:
but it seems that it's also prohibited to write a raw lead-in in recent
versions (the got legal problems with this feature). Anyway it uses media
with a different wavelegnth so you can't interchange the DVD-General and
DVD-Authoring media (the non-embossed CD-RW's).

--
Milosch
Milosch Meriac
2003-02-04 05:31:36 UTC
Permalink
Hi folks,

using my dvdinfo tool i now have further information about Xbox DVD's. I hope
this values are correct, because i've discovered some bugs in the DVD
subsystem of the linux kernel.

Game Amped, PAL Version:

Information as reported by a Pioneer DVD-ROM, Model DVD-106S:

- 2 Layers of DVD-ROM type

- DVD Book Version 1.0

- minimum Data Rate is 10.08Mbs

- Disc size 120mm

- Track density: 0.74 micrometers/track

- Linear density: 0.293 micrometers/bit

- BCA not available (as flag, no data returned, btw: BCA is only specified for
single layer media)

- Data area start sector (real ISO image start) at 0x30000 (common for
DVD-ROM's)

- End sector on Layer 0 at 0x31AAF (apparently only 13.3 Megabytes on first
layer !!!)

- End sector on Layer 1at 0xFCE5EF (according to the Drive there are 31,2GB on
Layer 1 - either a driver or software error because with Movie DVD's i got
similar values)

- Manufacturer info inside the Lead-In (string MS00503E and some binary data):

0x0000 01 00 00 00 00 00 00 00 4D 53 30 30 35 30 33 45
0x0010 00 14 43 E8 83 AD C1 01 02 00 00 00 00 00 00 00
(Buffer exploit possible ?)

- Neither CPM, nor CGMS protection

- opposite track path. With opposite track path both layers are tied together,
there is only one Lead-in and Lead-out. In the middle of the media there is
an area called the middle area. The addresses of blocks in one layer are
mirrored in the other layer.
The point is that this does not make sense on this DVD - the middle area
would make it impossible to use the second layer with more than 13.3 Mega
bytes. The total DVD dual layer capacity therefore would be 27 MB.

It could either be that the "Track Path" bit is faked to trick common
dvd drives or they tampered with the middle area itself.
Maybe the next point is a hint for this theory:

- inside ISO headers of the first layer i've found some interesting strings

SEP13011042
Prepared by SmartStor Premastering System.
Session Offset : 0 VTC Sector Offset: 0
20010913104255000000000000000000000000000000000000000000000000000000
SecDualLayerStart=00006832

The decimal value of SecDualLayerStart is:

(DataSector of Layer 0)+1 == first Sector of Layer 1 == 00006832 ==>
identical to SecDualLayerStart !!!

this could mean that the laser has to seek to this sector and then reads on
from inner to outer regions - in fact a sort of "Parallel Track Path"
reading.

This would be relatively easy to implement by drive vendors: they only have
to implement a register where you can set explicitely the layer you want to
read your data from. The software seeks to this sector, switches to the
opposite sector and reads the next valid sectors.

I hope this all could work, so we can master or own DVD using the bink demo
engine and a exploited bink-MPEG file (to stay legal all files within the DVD
file system are cleared with zeros - the bink engine is inserted into
"default.xbe" of the root directory. We also have to pay some minimal license
fee to "RAD Gametools Inc." for using their bink player if it's not freely
distributable. After inserting the DVD, our film starts and Linux hopefully
gets booted by a bink exploit.

It would be interesting to search explicitely for such layer swapping commands
inside the Xbox kernel (at least the string "SecDualLayerStart" doesn't
appear in Xbox Kernel. The sector number can also be obtaind by the
READ_DVD_STRUCTURE command).

--
Milosch

Loading...