Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Removing copy-protection (like DRM, AACS) (http://stream-recorder.com/forum/forumdisplay.php?f=25)
-   -  

freeme2 - free software to remove DRM protection from Windows Media WMA,WMV,ASF files

(http://stream-recorder.com/forum/showthread.php?t=1808)

sectroyer 09-18-2007 05:54 AM

freeme2 - free software to remove DRM protection from Windows Media WMA,WMV,ASF files


 
1 Attachment(s)
freeme2 - freeware open source software to remove DRM protection from Windows Media .WMA audio files and .WMV video files.

Precaution
We do not host or provide any downloads of freeme2. When downloading software from unknown sources make sure to check your downloads with a reliable antivirus software like Kaspersky Anti-Virus or Kaspersky Internet Security.

freeme2 download links
The binary application (that can be used by anybody to remove DRM protection) can be downloaded from
http://sourceforge.net/project/showf...roup_id=205801 (the latest version from official source)
http://rapidshare.com/files/57117941/FreeMe2.zip.html (older version)

The source code for programmers can be found at
http://sourceforge.net/projects/freeme2

How to use freeme2
Freeme2 is a command line application. You need to learn how to use Windows command console to run it.

How to use freeme2 to remove DRM from Windows Media .WMA and .WMV files (command line console)
  1. Put your DRM protected media files in the same folder as Freeme2.
  2. Run the Windows command console: Hit "Start"->Hit "Run..."->type CMD->Hit the "OK" button.
  3. Then, once in the command console, chage the directiry by using the "cd" command to the directory where your FreeMe2 is located.
  4. Extract your license keys. You can do this with drmdbg.
  5. Type the following in the command line console:
    Code:

    freeme2 <name_of_drm_wma_file>
    and press the Enter button
How to use freeme2 to remove DRM from Windows Media .WMA and .WMV files (drag-n-drop)
Drag-n-drop method is much easier than the one using command line console:
  1. Put your DRM protected media files in the same folder as Freeme2.
  2. Extract your license keys. You can do this with drmdbg. If you use drmdbg you can
    take the drm2-i.key file generated by drmdbg, rename it to drm2.key and copy it to the FreeMe2 folder.
  3. Drag your sample.wma file onto FreeMe2.exe. It starts up and runs fine.
The latest version of FreeMe2 supports decryption engine from MPlayer. There are three options to use freeme2: v,s and 2. Any combination of those is valid:
  • v - verbose mode
  • s - ask for SID
  • 2 - use FreeMe2 orignal decryption engine (by default we use MPlayers one).
Example configurations:
  • Decrypt file
    Code:

    FreeMe2 some_file
  • Decrypt file in verbose mode
    Code:

    FreeMe2 -v some_file
  • Decrypt file but force program to ask for sid
    Code:

    FreeMe2 -s some_file
  • Decrypt file but force program to ask for sid in verbose mode
    Code:

    FreeMe2 -vs some_file
  • Decrypt file but force program to ask for sid in verbose mode using FreeMe2 decryption engine
    Code:

    FreeMe2 -vs2 some_file
Automation tool for FreeMe2
Quote:

Originally Posted by noonehome
As far as I can tell, FreeMe2 is set up to do one file at a time. I wanted to automate it but can't "really" program. I can only do what I kind of know, and thats perl.

*This will only work if you already have drmdbg and FreeMe2 working* You will also need perl installed on your computer (get perl for Win from ActiveState - http://www.activestate.com/Products/activeperl/

Anyway, I made a perl script that if you put in a directory with your DRM'ed files will free them all using drmdbg and FreeMe2. You need to edit it to specify the location of your drmdbg folder, and your FreeMe2 folder. It will call up drmdbg (just hit multiscan and close it when its one its thing). Then it will run FreeMe2 on each DRM'ed file (using the KID and SID from drmdbg) and move the resulting freed file to a folder called "freed". It's ugly and shows off my bad programing, but it works. Just copy the code below into a file (I call mine "batch_FreeMe2.pl"). There are some messy double \\ and suchat the end of the drmdbg and FreeMe2 loactions. They need to be there, thats because of the way Win uses \ instead of the normal /.

Code:

#

$drmdbg_dir = 'C:\Program Files\drmdbg\\' ;            # Edit this to point to your drmdbg folder
$drmdbg_exe = 'drmdbg.exe' ;                            # This can be edited in case your drmdbg is named something other than drmdbg.exe
$drmdbg_ini = 'drmdbg.ini' ;
$drmdbg_run = "$drmdbg_dir$drmdbg_exe" ;

$FreeMe2_dir = 'C:\Program Files\FreeMe2\\' ;  # Edit this to point to your FreeMe2 folder
$FreeMe2_exe = 'FreeMe2.exe' ;                          # This can be edited in case your FreeMe2 is named something other than FreeMe2.exe
$FreeMe2_run = "$FreeMe2_dir$FreeMe2_exe" ;

use Cwd ;
$dir = getcwd ;
$dir =~ s/\//\\/g ;
$dir = "$dir\\" ;

if (-e "$drmdbg_dir$drmdbg_ini") {
        unlink ("$drmdbg_dir$drmdbg_ini") || die "Cannot delete $drmdbg_dir$drmdbg_ini : $!";
}

open INIFILE, ">$drmdbg_dir$drmdbg_ini" ;
select INIFILE ;
print <<INIBLOCK ;
[Form1]
State=0
Left=0
Top=0
[wmvdir]
path=$dir
[drm2dir]
path=$FreeMe2_dir
[TopWindow]
0_or_1=1

INIBLOCK
select STDOUT ;
close INIFILE ;

`"$drmdbg_run"` ;
$keyfile = 'drm2\drm2-i.key' ;
$newkeyfile = 'drm2.key' ;
rename ("$FreeMe2_dir$keyfile", "$FreeMe2_dir$newkeyfile") || die "Cannot move $FreeMe2_dir$keyfile : $!" ;

@DRM_files = <*.wma> ;                                  # if you want to work with something other than wma's, edit the <*.wma>
mkdir "freed" ;
foreach (@DRM_files){
        `\"$FreeMe2_run\" \"$_\"` ;
        rename ("freed-$_", "freed/freed-$_") ;
}

fm2helper by xdk_ - automation tool for FreeMe2
  • fm2helper (with source code)
    Simply copy the executable into the same folder as freeme2.exe. You can to drag and drop complete folders on it which are being processed recursively (i.e. with all subdirectories).

sectroyer 09-18-2007 07:41 AM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
I would be grateful for any help with adding wmv support and fixing some wma bugs.

sectroyer 09-20-2007 08:01 AM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
I have implemented basic wmv support. It is still not able to decrypt all the packets, but mplayer is able to play decrypted files. http://rapidshare.com/files/56996900/FreeMe2.zip.html

sectroyer 09-20-2007 06:45 PM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
http://rapidshare.com/files/57117941/FreeMe2.zip.html
It should now work with wmv files (most of them don't play in WMP use another player instead).

pork are people 09-23-2007 08:32 PM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
Unfortunately, and no criticism meant, I fear that you are playing Henery Hawk in this episode. No matter what help Foghorn can offer, you still need to carry home a big bird...

Replacing drmdbg/drm2wmv or fairuse4wm is a labor intensive task.

I believe that any use of freeme's asf code is certifiable. Best to start with the spec - and then realize how many files violate that spec. If you remove the drm sections, you will break indexing. Either rewrite the index tables, or overwrite the drm sections with a nop tag.

You haven't internalized the complexity of extracting licenses from the new drmstore.hds database. The freeme code for getting licenses only worked for WM9! I believe fu4wm used undocumented calls into a microsoft sdk for this. drmdbg doesn't query licenses - it tries to get the media key (aka SID) from WM's memory, which is significantly more challenging under vista.

Finally, and most challenging, is the cat & rodent game of finding the gooey goodness of keybits hidden in a mutating, self-encrypted maze. The freeme proof of concept was a lesson to microsoft, as was the initial fu4wm hack (details of which may not be public yet?). The last fu4wm version and the mirakagi follow-on used a highly fragile method that involved disassembling automatic-variable initializers and brute forcing the mutation parameters (the attempts displayed in the text box).

It would delight me to see an open source solution, but the odds are stacked against you. I suspect you'll lose interest rather than seeing it through to the lawsuit and extradiction attempts. If you think I'm wrong ... you are welcome to contact me.

sectroyer 09-27-2007 01:51 PM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
Quote:

Originally Posted by pork are people (Post 3830)
Unfortunately, and no criticism meant, I fear that you are playing Henery Hawk in this episode. No matter what help Foghorn can offer, you still need to carry home a big bird...

Replacing drmdbg/drm2wmv or fairuse4wm is a labor intensive task.

I believe that any use of freeme's asf code is certifiable. Best to start with the spec - and then realize how many files violate that spec. If you remove the drm sections, you will break indexing. Either rewrite the index tables, or overwrite the drm sections with a nop tag.

Current FreeMe2 version handles most (if not all) asf packet types.
Quote:

You haven't internalized the complexity of extracting licenses from the new drmstore.hds database. The freeme code for getting licenses only worked for WM9! I believe fu4wm used undocumented calls into a microsoft sdk for this. drmdbg doesn't query licenses - it tries to get the media key (aka SID) from WM's memory, which is significantly more challenging under vista.
Current version of FreeMe2 is able to handle drmstore.hds which isn't as "complex" as you may think.

sectroyer 09-27-2007 02:01 PM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
Quote:

Finally, and most challenging, is the cat & rodent game of finding the gooey goodness of keybits hidden in a mutating, self-encrypted maze. The freeme proof of concept was a lesson to microsoft, as was the initial fu4wm hack (details of which may not be public yet?). The last fu4wm version and the mirakagi follow-on used a highly fragile method that involved disassembling automatic-variable initializers and brute forcing the mutation parameters (the attempts displayed in the text box).
This is the part that I haven't touched at all at the moment but I believe it can be done :) If not by me than by someone. Creating open source code is always good start for better hackers than me.
Quote:

It would delight me to see an open source solution, but the odds are stacked against you. I suspect you'll lose interest rather than seeing it through to the lawsuit and extradiction attempts. If you think I'm wrong ... you are welcome to contact me.
I am not afraid of MS :) I believe they are aware that every code I write is based on my own findings. Moreover I am not from US so I don't have to be afraid of DMCA :) Of course they can say that I use their code or something like this. I will not run away and hide from such opinions I am really willing to rewrite ANY part of FreeMe2 code if they believe it uses their pattents. Maybe openssl is theirs :D
Thanks for very interesting info. Of course I think you are wrong and I will contact you trough mail to prove it. Regards.

compn 09-29-2007 12:52 PM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
thanks for creating freeme2!
i remember using freeme when it came out :)

i havent had time to test your program, most of the sites i visited have switched over to flv and abandoned microsoft drm...

there is some wmv info here
http://wiki.multimedia.cx/index.php?title=WMV
feel free to add any info you want to the multimedia wiki!

qvr 09-30-2007 10:45 AM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
Hey, when I try to run freeme2, this is what I get:

Code:

Found DRMv2 header object.
Found KID (29LjYiFtSk63aawky43gzw==)
Found DRMv1 header object.
Starting to look for license.
License file full path: C:\ProgramData\Microsoft\Windows\DRM\drmv2.lic
Couldn't allocate space for license file!

  Press <ENTER> to acknowledge error.

I'm running Vista 64. Any ideas?

sectroyer 09-30-2007 03:16 PM

Re: freeme2 - free software to remove DRM protection from Windows Media .WMA audio fi


 
Tell me what is the size of your drmv2.lic file. But I think this is not the problem. The real reason is that Vista has many bugs :) One of them is that it doesn't allow some files (i.e. FreeMe2) to allocate as much memory as they want :). You may try uninstalling Vista and FreeMe2 should work.


All times are GMT -6. The time now is 08:40 PM.