After DeCSS, DVD Jon Releases DeDRMS 610
An anonymous reader writes "Jon Lech Johansen, who reverse engineered FairPlay back in January, and wrote the decryption code that was later used by an anonymous developer to create the playfair utility, has released a similar utility: DeDRMS. It's only 230 lines. T-shirts anyone?"
Re:Curious how he wrote it in C#. (Score:5, Informative)
I don't even have a C# compiler.
Host it on Freenet? (Score:3, Informative)
Let's host this program on Freenet [sourceforge.net], it is a project that make's the best use for what Freenet was made for.
blah (Score:4, Informative)
jhsvjklhajskdvhakjsdhvalkjsdhkajdhfasd hsfvhasdhvf asdf asdf asdf asdf sdf asdhvashdvasdf asdf asd sdf coipx vxjzlk sdhvaasd fasd fadfg fiobvxcoizv jcxoixz jxzc sdhvaf cmdrtaco sucks akljdkls asd asd fvx sdhvas gh hh hhf dd sdf sf sd
hdvash jk k fgh jgdvvcbbn cv c dhvc c vb fg hdrghdfg fg dg df g dsf
ashdva sdfgsgewrr benrtnrt er er revr dv shdva aioajdoi jfasdioj v;xjf kldasjkl;vasj sdhva sjkdfsdkvn alkn lkan alksnsdflk nsfnvlad dhvahsdva aisovaiouvoivoiua ioua auao iuasi us shdva asivoa jvhbusa ui hiuahsiuhfsa ha ahsdjkfahkdj lfhalksjdfhalk askjda
vhasdvhasdjhvaksjdhva a kjas lkjdakljf svhasdhvaskjhvlaskjdvhas a kljs djklakslj af
asvhajkshvjkshas dhasdjvkhasdv akjdfjadf asds s d fsd fsad fads asdfas asdf asdf sdfs vxcvxcvzxcvx ss dfsdxvc dfa bioub oiu zklxcvx nsm,m,fns,m
sdfas ikj oixj movnxmcvnxcvo sdoifjs dfsddafgdfg kamlxcvbjio zkcnvzlk nxclk xcivx as df sdf asdf asd vi xoizjvzcvn socso s asd addfsdfahtgh fghdfgh df gd d
using System;
using System.IO;
using System.Text;
using System.Security.Cryptography;
class M4PStream
{
private Rijndael alg;
private BinaryReader br;
private BinaryWriter bw;
private byte [] sbuffer;
private string AtomDRMS = "drms";
private string AtomMP4A = "mp4a";
private string AtomSINF = "sinf";
private string AtomUSER = "user";
private string AtomKEY = "key ";
private string AtomIVIV = "iviv";
private string AtomNAME = "name";
private string AtomPRIV = "priv";
private string AtomSTSZ = "stsz";
private string AtomMDAT = "mdat";
public M4PStream( FileStream fs )
{
br = new BinaryReader( fs );
bw = new BinaryWriter( fs );
sbuffer = br.ReadBytes( Convert.ToInt32( fs.Length ) );
alg = Rijndael.Create();
alg.Mode = CipherMode.CBC;
alg.Padding = PaddingMode.None;
}
byte [] NetToHost( byte [] Input, int Pos, int Count )
{
if( BitConverter.IsLittleEndian )
{
for( int i = 0; i < Count; i++ )
{
Array.Reverse( Input, Pos + (i * 4), 4 );
}
}
return Input;
}
int GetAtomPos( string Atom )
{
byte [] Bytes = Encoding.ASCII.GetBytes( Atom );
for( int i = 0; i < (sbuffer.Length - 3); i++ )
{
if( sbuffer[ i + 0 ] == Bytes[ 0 ] &&
sbuffer[ i + 1 ] == Bytes[ 1 ] &&
sbuffer[ i + 2 ] == Bytes[ 2 ] &&
sbuffer[ i + 3 ] == Bytes[ 3 ] )
{
return i;
}
}
throw new Exception( String.Format( "Atom '{0}' not found", Atom ) );
}
uint GetAtomSize( int Pos )
{
byte [] Bytes = new byte[ 4 ];
Buffer.BlockCopy( sbuffer, Pos - 4, Bytes, 0, 4 );
return BitConverter.ToUInt32( NetToHost( Bytes, 0, 1 ), 0 );
}
byte [] GetAtomData( int Pos, bool bNetToHost )
{
uint Size;
byte [] Bytes;
Size = GetAtomSize( Pos );
Bytes = new byte[ Size - 8 ];
Buffer.BlockCopy( sbuffer, Pos + 4, Bytes, 0, Bytes.Length );
return bNetToHost ? NetToHost( Bytes, 0, Bytes.Length / 4 ) : Bytes;
}
public void Decrypt( byte [] CipherText, int Offset, int Count,
byte [] Key, byte [] IV )
{
MemoryStream ms = new MemoryStream();
ICryptoTransform ct = alg.CreateDecryptor( Key, IV );
CryptoStream cs = new CryptoStream( ms, ct, CryptoStreamMode.Write );
cs.Write( CipherText, Offset, (Count / 16) * 16 );
cs.Close();
ms.ToArray().CopyTo( CipherText, Offset );
}
public byte [] GetUserKey( uint UserID, uint KeyID )
{
byte [] UserKey;
BinaryReader bruk;
string strHome =
Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData );
bool bUnix = Environment.OSVersion.ToString().IndexOf( "Unix" ) != -1;
string strFile = String.Format( "{0}{1}{
Re:Curious how he wrote it in C#. (Score:5, Informative)
You are assuming that C# is slow. That is not a good assumption.
Re:Looks like his webserver was written in C#! (Score:5, Informative)
Now let's see how long my little mirror stays up!
http://fire.prohosting.com/xonerate/dedrms.txt
Re:Curious how he wrote it in C#. (Score:5, Informative)
BTW he *could* have included some comments
Re:Looks like his webserver was written in C#! (Score:5, Informative)
In the beginning God created the heaven and the earth.
2 And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.
3 And God said, Let there be light: and there was light.
4 And God saw the light, that it was good: and God divided the light from the darkness.
5 And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
6 And God said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters.
7 And God made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so.
8 And God called the firmament Heaven. And the evening and the morning were the second day.
9 And God said, Let the waters under the heaven be gathered together unto one place, and let the dry land appear: and it was so.
10 And God called the dry land Earth; and the gathering together of the waters called he Seas: and God saw that it was good.
11 And God said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree yielding fruit after his kind, whose seed is in itself, upon the earth: and it was so.
12 And the earth brought forth grass, and herb yielding seed after his kind, and the tree yielding fruit, whose seed was in itself, after his kind: and God saw that it was good.
13 And the evening and the morning were the third day.
14 And God said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years:
15 And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so.
16 And God made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also.
17 And God set them in the firmament of the heaven to give light upon the earth,
18 And to rule over the day and over the night, and to divide the light from the darkness: and God saw that it was good.
19 And the evening and the morning were the fourth day.
20 And God said, Let the waters bring forth abundantly the moving creature that hath life, and fowl that may fly above the earth in the open firmament of heaven.
21 And God created great whales, and every living creature that moveth, which the waters brought forth abundantly, after their kind, and every winged fowl after his kind: and God saw that it was good.
22 And God blessed them, saying, Be fruitful, and multiply, and fill the waters in the seas, and let fowl multiply in the earth.
23 And the evening and the morning were the fifth day.
24 And God said, Let the earth bring forth the living creature after his kind, cattle, and creeping thing, and beast of the earth after his kind: and it was so.
25 And God made the beast of the earth after his kind, and cattle after their kind, and every thing that creepeth upon the earth after his kind: and God saw that it was good.
26 And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth.
27 So God created man in his own image, in the image of God created he him; male and female created he them.
28 And God blessed them, and God said unto them, Be fruitful, and multiply, and replenish the earth, and subdue it: and have dominion over the fish of the sea, and over the fowl of the air, and over every living thing that moveth upon the earth.
29 And God said, Behold, I have given you every herb bearing seed, which is upon the face of all the earth, and every tree, in the which is the fruit of a tree yielding seed; to you it shall be for meat.
30 And to every beast of the earth, and
Re:Written in C# (Score:4, Informative)
Thus c# = c sharp
Re:Looks like his webserver was written in C#! (Score:2, Informative)
Re:Host it on Freenet? (Score:1, Informative)
2. At least it's better than associating Freenet with child pornography, like it is now!
Re:C#, Mono, and making it do something (Score:3, Informative)
www.go-mono.com -> c# compiler -> downloads page
get the file mono-0.31-win32-1.exe
run it, click okay a couple times...
get a copy of the code....
mcs DeDRMS.cs
and you have an exe that's command-driven.
command is : DeDrms.exe myfile.m4p
Re:Curious how he wrote it in C#. (Score:5, Informative)
Re:Curious how he wrote it in C#. (Score:3, Informative)
Re:Host it on Freenet? (Score:5, Informative)
CHK@XTn8vik~xxqsIJzLcDFUlPQqrw4NAwI,griuDFoqruN
(Watch out for the space inserted by the slashdot code, remove it)
It works, but...... (Score:2, Informative)
Re:DeDRMS (Score:4, Informative)
Although I agree that your argument is correct, too - however, the legal owner isn't necessarily the rightful owner: some people will say that selling away copyrights shouldn't be possible, and certainly not rightful.
Not really a cracking tool... (Score:4, Informative)
Freenet mirror (Score:3, Informative)
CHK@XTn8vik~xxqsIJzLcDFUlPQqrw4NAwI,griuDFoqruN
(Watch out for space inserted by the slashdot code, remove it)
Re:C#, Mono, and making it do something (Score:3, Informative)
Re:Curious how he wrote it in C#. (Score:5, Informative)
CODE MIRROR HERE (Score:4, Informative)
SharpDevelop (Score:4, Informative)
Yes, there's also a Linux version [monodevelop.org].
If Apple were smart... (Score:4, Informative)
Re:Curious how he wrote it in C#. (Score:5, Informative)
Install the
You can compile this with csc
Re:C#, Mono, and making it do something (Score:2, Informative)
Re:pretty cool... (Score:5, Informative)
Re:ok... (Score:3, Informative)
Re:Site Down? (Score:1, Informative)
http://www.realcoders.org/dedrm/DeDRMS_cs.cs [realcoders.org]
-Daniel Blair
Re:Curious how he wrote it in C#. (Score:3, Informative)
What this does (Score:5, Informative)
Re:Curious how he wrote it in C#. (Score:5, Informative)
Install the .NET Framework (run Windows Update). It will install one at %WINDIR%\Microsoft.NET\Framework\v1.1.4322\csc.exe
You can compile this with csc /out:DrDRMS.exe *.cs
And if you're on Linux, you can download Mono [go-mono.com] and compile with mcs DeDRMS.cs.
Re:Trouble installing .NET Framework (Score:5, Informative)
Re:Not really a cracking tool... (Score:5, Informative)
VLC will extract your user key and save it into your home directory when you use it to try to play a FairPlay-protected file from an authorized system.
Re:Curious how he wrote it in C#. (Score:2, Informative)
Maybe they weren't assuming anything but had actually done testing?
I don't know about that, but I have in fact done testing and C# is slower at almost everything when compared to C/C++ and it gets really bad at the high end.
Try making the equivalent (in terms of performance and memory usage) of a C++ std::vector in C#.
Re:Inevitable? So what? Who cares? (Score:3, Informative)
And as a guy who has actually lobbied against technology regulation, I am here to tell you that the present "demonstration" does not evidence badness of the technology regulation. Indeed, content people use precisely these circumstances, and again, I am here to tell you it persuades, to evidence that they need the regulation as well as technology to survive.
I am well-versed in the arguments against. I am simply telling you that they do not move legislators to repeal technology regulation, and tend to the contrary, to get them to consider even stranger more desperate bills like last year's spate of "stupid Hollings bills."
Consider this -- How, exactly, does showing that you can pick a lock prove the absurdity and futility of laws making it a crime to own a lock pick? Sure, I can find counterarguments, and you can too, but none that would make men change a vote. And I'm a pretty good advocate as these things go.
This doesen't help.
P.S. Thanks for the litref
This is how to compile it for FREE (Score:5, Informative)
Follow the steps to compile and run it:
(1) Get the source code (at your own risk) and save it as DeDRMS.cs
(2) Download and Install the NET Framework SDK [microsoft.com] for FREE (reqiures Windows 2000, Windows Server 2003 or Windows XP).
(3) Use the included compiler csc.exe to compile the source code into executable code. Use this on command line (dos prompt) C:>csc DeDRMS.cs OR C:>csc.exe DeDRMS.cs
(4) It will create DeDRMS.exe in the same folder where you saved DeDRMS.cs.
(5) Profit or Jail??
Or for those of you on a Linux box (Score:5, Informative)
Binary available here! (Score:4, Informative)
http://userwww.sfsu.edu/~astern/DeDRM
7.00 KB
C# Source
http://userwww.sfsu.edu/~astern/DeDRMS.cs
7.21 KB
Andrew
astern at s f s u dot edu
Re:Curious how he wrote it in C#. (Score:2, Informative)
One thing I noted in looking at the two files in iTunes: The file was still flagged with my email address, but no longer had my name under "Purchased by"... It looks like the file is still tracable to the account that bought it. Take that into account before sharing them. It shouldn't take much work to fix that last bit, and it would be a worthy addition to this program.
Re:Curious how he wrote it in C#. (Score:3, Informative)
There is also rotor [microsoft.com] from Microsoft, which is supposed to compile under MacOS X.
Replying to first post (Score:1, Informative)
I compiled it on my Win2K box and got the following message:
C:\iTunes\ALICEI~1\Dirt>dedrms "05 Rooster 1.m4p"
Exception: Could not find a part of the path "C:\Documents and Settings\administ rator\Application Data\drms\03293A28.001".
Upon surfing Johansen's site, I found the following readme that the Slashdot submitter failed to mention:
Compiling:
* With MonoDevelop [1]: Open DeDRMS.cmbx and click F8.
* With mcs [2]: mcs -out:DeDRMS.exe *.cs
* With csc [3]: csc
[1] http://www.monodevelop.org
[2] http://www.go-mono.com
[3] http://msdn.microsoft.com/netframework/technology
Usage:
* DeDRMS.exe file.m4p
Notes:
DeDRMS requires that you already have the user key file(s) for
your files. The user key file(s) can be generated by playing
your files with the VideoLAN Client [1][2].
DeDRMS does not remove the UserID, name and email address.
The purpose of DeDRMS is to enable Fair Use, not facilitate
copyright infringement.
[1] http://www.videolan.org/vlc/
[2] http://wiki.videolan.org/tiki-read_article.php?ar
2004-04-25 == Jon Lech Johansen ====
So it sounds like you have to run some lame-ass VideoLAN doohickey before DeDRMS will work.
Gee, tres impressive. Tell you what, Jon... call me when you have a standalone M4P2MP3.EXE ready to go. Right now, all of the circumvention hacks for iTunes are way more of a hassle than just burning your tracks to CD and re-ripping them to MP3.
Why C# can outperform C/C++ (Score:5, Informative)
1) Record in the virtual machine/JIT every time a vector gets resized.
2) Based on the pattern of resizing, speculatively allocate for new vectors/resizes as much memory as they'll ever need, or at least as much as they'll need any time soon.
3) When you guess wrong about a speculative allocation, adjust your speculation.
C++ doubles the amount of space allocated for a vector (or queue, or list, or stack, or dequeue, or binary heap, etc) whenever a resize exceeds the amount already allocated, unless you know enough to tell it to do otherwise. This keeps the amortized cost of increasing size by one constant. C++ doesn't benefit from profiling like C# does because there's no virtual machine that can change what binary code is actually sent to the processor. You could hack vector profiling together yourself, but it would be slow. Of course, this doesn't really help C# if you're never resizing your vectors, but that doesn't mean C# can't do better than C, even if C++ will have it beat. If you've ever done much benchmarking of the C++ STL, you know that it's usually faster than otherwise identical code written with arrays, which shouldn't be possible, since the array access code can be done fairly easily in assembly without virtual function table lookups and such, but nonetheless is quite real.
The trick to this whole scheme is doing the speculation quickly and accurately. We may not be to the point yet where JIT code reliably outperforms statically compiled code in less space, but there are an army of extraordinarily intelligent grad students out there writing dissertations on the topic, and I assure you they'll make it happen.
Re:Curious how he wrote it in C#. (Score:3, Informative)
compiled using gcc within the Cygwin bash shell emulation layer for Windows.
A much more fair comparision would have been gcc under a *nix environment instead of the Win32 port. This "benchmark" also didn't take into consideration slower startup times, pauses due to garbage collection or code being JITed. All in all, this benchmark is useless. Though from personal experience, I do agree that C# and Java both have very good performance on modern hardware to make their use a much better alternative over lower level and error prone languages like C/C++. Java and C# both showed good numbers, except for that strange regression in Java's Trig functions.
Re:This is a mistake..... (Score:2, Informative)
Not that I've tried it:-)
Re:What this does (Score:3, Informative)
Non-idiots will use this program to create unencrypted AACs which they will then leave in that format and play on the many media players that support AAC.
If you wanted a shitty-sounding MP3 why not just use Kazaa in the first place?
So which DRM does it decode? (Score:3, Informative)
Re:Curious how he wrote it in C#. (Score:1, Informative)
DRM stripping can be done with iMovie (Score:2, Informative)
Re:Needs wildcard support (Score:3, Informative)
Mini-howto:
Make directory "here" and batch file "foo.bat"
Put single line into batch file:
for %%f in (*.m4p) do DeDRMS "%%f"
Run the batch file.