Guide Guide for getting DRM content. (WIP)

yannic0

Lurker
Joined
Jan 18, 2022
Posts
305
Reaction score
0
This is just a guide that should make getting DRM content easier.
Yes there are already some guides. But I just want to make one that even a non tech-savvy could understand, follow and find.
This guide will go through the process of installing python and the needed tools to get DRM protected content
The guide will be split into multiple parts.
Mac OS users, please head to this guide: https://simpcityopen.com/threads/81957/
Python, PIP and Frida installation
First things first.
Download Python from this site: https://www.python.org/downloads/ and get the latest version*. (Not the pre-release one)

* The latest version of time of writing is 3.11.4
Open up the installer and make sure to press "Add python to PATH"

After selecting that option press install and wait till it's done.
To make sure it is installed properly, open up Terminal (Windows 11) or Powershell (Windows 10/11) and type:
That should give you the following result*

* Version my differ depending on what version is the latest version over time.
With the installation of Python comes the pip package. To check if its installed type in a Terminal or Powershell:
That should also give you the following result*

* Again version my differ over time.
If for whatever reason PIP isn't installed yet, open a Terminal or Powershell and type:
To install frida head into a Terminal or Powershell and type:
Make sure to note somewhere what version got installed which is important later on. * (Version is marked in yellow)

* Versions can be different for you so double check.
Then you need frida-tools which can be installed by typing in Terminal or Powershell:

Android Studio installation and creating your first virtual phone
Download Android Studio https://developer.android.com/studio

And go through the setup of installing.
After installing open up Android Studio.
You can leave most settings on default. Then when it comes to the licenses click accept on all of them till the finish button gets highlighted.

After the installation Android Studio will open and give you the option to "create a new project" like shown below:

If you got an error at this part then you would have to check if your device has virtualisation enabled.
Read this post: https://simpcityopen.com/threads/81957/
Then select "phone and tablet" with an "empty activity" and click on next, like shown in the image below:

Next up select a minimum SDK of Android 9.0 (Pie) or above like shown below:

To create a new device you press the device manager button and click on "create device" like shown below:

Search for the Pixel 6, select it and press next.

You will first need to download the OS, so press the download icon next to the version* you want. (*Choose Android 9.0 or newer.)

After its done downloading select the version again and press next and finish up the new device.
Installing Frida-server on your virtual phone
Next up is to install frida on your virtual phone. Download frida on your PC from here: https://github.com/frida/frida/releases and search for "frida-server" with the right version that was highlighted in yellow when you installed frida using pip, and make sure to pick the android-x86 version, like shown below:

Extract the downloaded file to the following location on your device:
Use Winrar or 7zip. (Or something similar to that.)
And have it sit there like this:

--
Choose one of the two methodes:
Automated method: https://simpcityopen.com/threads/81957/
Open a Terminal or Powershell in the folder where you extracted the tool. There are multiple ways to do this.
  • (Windows 10/11) Shift + Right Click > Open in Terminal/Powershell. (First image)
  • (Windows 11) Right Click + Show more options > Open in Terminal. (First image)
  • (Windows 10/11) In path bar, type "CMD" and press ENTER. (Second image)
Option 1 and 2

Option 3

In Terminal or Powershell type:
Try this instead:
(So add ".\" infront of it.)
You should see an emulator.

Make sure you started your virtual phone by going to Android Studio > Device Manager and then pressing the play button of your virtual phone.
(You should see the play button turn into a stop button and a phone will appear below it.)
If that doesn't work go to the following folder:
Open up Terminal or Powershell and type:
Try this instead:
(Add ".\" infront of it.)
You should see the name of your virtual phone on it. To start up your phone type the following:
Example:

Your virtual phone is now running.
Continue by typing the following command, make sure to check what version you currently need to use:

After it has been "inserted" on your phone type the following command to acces the phone (Take a look at the example images if you find this part hard.):
Example:

KEEP THIS TERMINAL OR POWERHSELL OPEN!
Setting up the Dumper script
Head over to the following github on your PC (Not your virtual phone) https://github.com/wvdumper/dumper and press the green "Code "button and then "Download zip".
image4cd8d25dcc2e386a.png

Extract the zip file wherever you want. (I have it still in downloads folder) head into the folder and open up the requirements.txt file using notepad.
image65b962c80078751b.png

Add the following line to the file:
It should look something like this now:
image920bcc60ebad9b1b.png


Save the file and open a new Terminal or Powershell. (While still having the previous one open.)
You can open a terminal or powershell by either right clicking and selecting terminal/powershell (1) or by typing "CMD" in the path bar (2).
Option 1

Option 2

In the second terminal or powershell type:
Once it is done installing the needed packages type the following:
KEEP THIS TERMINAL OR POWERSHELL OPEN AS WELL!
Getting keys using the Dumper script
Finally use your virtual phone and navigate using chrome to the following site: https://bitmovin.com/demos/drm
The site will ask if it is allowed to play protected videos. Press ALLOW.
Scroll a bit down till you see the video and press play.
You should see some activity in your second terminal or powershell. That means it has worked! 🎉
To verify that, head into the dumper-main folder and check if you see the "key_dumps" folder:

When heading further into the folders you'll find "private_keys" keep going into that folder till you see these two files:

Rename these files accordingly:
Original nameNew name
client_id.bindevice_client_id_blob
private_key.pemdevice_private_key
Make sure to change the extension, this should happen when you rename the files.
Check to see if the file type has changed to just "File" instead of a BIN or PEM file.*

*Note that this is a comparison, you will only have the two files (device_client_id_blob and device_private_key)
You are now ready to use the keys for the scraping tools.
(I'll make a guide to a few of those scrapers below, with again the intention of making it simple to understand and follow.)
In the meantime you can try it yourself by following the already existing guides from here:
https://simpcityopen.com/threads/2257/
 
Nice one, thank you :peepolove:
I've put links into the relevant posts in my OF guide to point people here
 
Thanks! After successfully extracting the keys is there any reason why you couldn't uninstall Android Studio, Python, etc? Or do the keys expire at some point and need to be generated again?
 
I would suggest always leaving python installed as it is used in most scrapers.
And for Android Studio it's best to keep that one installed as well as the generated keys might don't work after a while. (That will safe some time for future usage)
 
I've made some batch scripts that can speed up the process a little bit, saves you having to go into adb.exe manually etc. https://github.com/sim0n00ps/L3-Dumping. I've tried to explain as much as possible what paths need to go where.
Also a tip would be in Helpers/Scanner.py to change the filenames in line 44 from "client_id.bin" to "device_client_id_blob" and line 47 from "private_key.pem" to "device_private_key". Saves you having to rename the files and remove the extensions afterwards.
 
Works super good! I'll add it to the guide as the "automated" version
 
Hello, I would like to ask for a little help as I am following a tutorial, but unfortunately, not everything is working for me.
Specifically, I am following the step-by-step instructions, choosing the automatic method, and when I complete all the steps, I launch the device and then run the 'run.bat'.
Indeed, two commandlines open up. However, when I proceed with the next steps, the instructions mention that I should see some activity in one of the commandlines. Unfortunately, nothing happens on my end. Also, there is no new folder appearing in the 'dumper-main' folder. I have tried redoing everything, but the same issues persist. I am including shots from my commandlines. Maybe someone will be able to provide me with some advice. Thank you in advance for any help.
https://i.pixl.li/246574e7dad017050.png
https://i.pixl.li/1e172e8a70f4c7dd0.png
 
Fault on my end. (Forgot to mention that you should still run the requirements script.) Will add to the guide!
 
Hey, got everything to work with the automatic method only after i changed the name of the client files and put them into the cdm folder. Except the blob file is not found in the OF downloader. The device key is, after i renamed it it changed to file. When i renamed the blob file, it did not change from a bin file to a file, might that be the reason?
 
Yeah most likely. The extension needs to change to "file". See the following image:
imageddca91dc6d8f83c8.png
 
You know how the bin file will be changed to file? It did not happen after renaming. What can i do to make it happen?
 
Can you go ahead and enable this:
imagee05d8dc9a426ec06.png

That way you can see if the file still has the extension behind it. (If so when editing the name you need to remove the .bin or .pem part (Windows ask if it can change the extension, just press allow. See next image:)
image58f3368fe0e4ae5d.png
 
Thanks man, still i get the message the blob file is not found, not sure what i did wrong, gonna retry everything. The private key is recognized though.
 
ive got everything done so im just stuck on the keys part. i would get this first error "Unable to start: Error binding to address 127.0.0.1:27042: Address already in use then when i restart ill get 'adb' is not recognized as an internal or external command"
 
Try the following.
Instead of calling the adb command like:
Try this:
 
I think I've had this before and I ended up just deleting the phone and restarting the process
 
I tried that but no luck
With the manual way, while requirements are satisfied I still get ModuleNotFoundError: No module named 'frida'
 
Back
Top