Coder Social home page Coder Social logo

widevine-l3-decryptor's Introduction

Deprecation Warning

This repository used to contain code to circumvent Widevine L3 DRM in Chrome on Windows machines.

It's not working anymore as of May 31st 2021, but you can read the reversing writeup.

Update

Google issued a DMCA takedown request against most forks of this repository. The original contents of the repository at the time are archived below.

Widevine L3 Decryptor

Widevine is a Google-owned DRM system that's in use by many popular streaming services (Netflix, Spotify, etc.) to prevent media content from being downloaded.

But Widevine's least secure security level, L3, as used in most browsers and PCs, is implemented 100% in software (i.e no hardware TEEs), thereby making it reversible and bypassable.

This Chrome extension demonstrates how it's possible to bypass Widevine DRM by hijacking calls to the browser's Encrypted Media Extensions (EME) and decrypting all Widevine content keys transferred - effectively turning it into a clearkey DRM.

Usage

To see this concept in action, just load the extension in Developer Mode and browse to any website that plays Widevine-protected content, such as https://bitmovin.com/demos/drm [Update: link got broken?].

Keys will be logged in plaintext to the javascript console.

e.g:

WidevineDecryptor: Found key: 100b6c20940f779a4589152b57d2dacb (KID=eb676abbcb345e96bbcf616630f1a3da)

Decrypting the media itself is then just a matter of using a tool that can decrypt MPEG-CENC streams, like ffmpeg.

e.g:

ffmpeg -decryption_key 100b6c20940f779a4589152b57d2dacb -i encrypted_media.mp4 -codec copy decrypted_media.mp4

NOTE: The extension currently supports the Windows platform only.

How

In the context of browsers the actual decryption of the media is usually done inside a proprietary binary (widevinecdm.dll, known as the Content Decryption Module or CDM) only after receiving the license from a license server with an encrypted key in it.

This binary is usually heavily obfuscated and makes use of third-party solutions that claim to offer software "protection" such as Arxan or Whitecryption.

Some reversing job on that binary can then be done to extract the secret keys and mimic the key decryption algorithm from the license response.

Why

This PoC was done to further show that code obfuscation, anti-debugging tricks, whitebox cryptography algorithms and other methods of security-by-obscurity will eventually by defeated anyway, and are, in a way, pointless.

This is NOT intended for copyright infringement or encouraging piracy.

Legal Disclaimer

This is for educational purposes only. Downloading copyrighted materials from streaming services may violate their Terms of Service. Use at your own risk.

widevine-l3-decryptor's People

Contributors

erjanmx avatar netopwibby avatar qtlunya avatar tomer8007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

widevine-l3-decryptor's Issues

Share research?

I would like to try reversing the Linux library's private key, Would you like to share the research for reversing the windows dll?
For example methods used for detecting the code containing key, de obfuscation process etc...

CryptoJS.CMAC Error

I tested this extension in a particular instance some 5 days ago and it functioned properly. Now, use of the extension in the very same instance (in all respects) results in the following error:
Uncaught (in promise) TypeError: CryptoJS.CMAC is not a function at Object.WidevineCrypto.decryptContentKey

What sort of error is this?

Edit: Never mind, silly issue. Closing.

Can't decrypt

Hi, in one website the plugin can't decrypt the key, appears this message:

https://img.techpowerup.org/201028/screenshot-6.png

embed.js:6 It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior.

drm_engine.js:880 It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior.


The MPD from file is generated with shaka packager

Generated with https://github.com/google/shaka-packager version v2.3.0-5bf8ad5-release

Live content

Hi, I want to extract some keys for live content with this addon but unfortunately I have no keys in console, I also tried with a custom license proxy and pywidevine but I get error as response; the proxy is working fine on Android players live exostreamr and bitmovin. Anyone willing to help/exchange ideas?

Need help in downloading Video

When i try to access the url "https://bitmovin.com/demos/drm"

in the network tab i am seeing the below Url

https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd

In the console the below text is displayed

Found key: 100b6c20940f779a4589152b57d2dacb (KID=eb676abbcb345e96bbcf616630f1a3da)
Found key: 3bda2f40344c7def614227b9c0f03e26 (KID=0294b9599d755de2bbf0fdca3fa5eab7)
Found key: 229f5f29b643e203004b30c4eaf348f4 (KID=639da80cf23b55f3b8cab3f64cfa5df6)

I installed FFMPEG and try to execute the below command "ffmpeg -decryption_key 100b6c20940f779a4589152b57d2dacb -i encrypted_media.mp4 -codec copy decrypted_media.mp4"

but i am not sure how encrypted_media.mp4 & decrypted_media.mp4 will be generated and should i replace '-codec' with anyother thing?

I don't have technical knowledge about this.Can you please elaborate how i can download the video specified at https://bitmovin.com/demos/drm?

Bug bounty program

Why go for anonymous glory when you can derive value from your work?

https://bugcrowd.com/netflix

Note in particular:

Device & Content Authorization Targets Overview

Methods of subverting Netflix content authorization systems to achieve video playback on unauthorized devices are in scope. Examples include circumventing the content authorization systems, obtaining private keys used for authorization, etc. Only playback of full content is in scope—supplemental content such as trailers, images etc. is not in scope.

Private keys used for video content decryption are in scope. Reports must contain private key material which enables decryption of video streams at the time reported. Groups of keys discovered at the same time (e.g. leaked together) or using the same methods (shared vulnerability across multiple devices) will only qualify for a single reward. Submissions related to screenshots or screen recording are not in scope. Submissions must include actual private key material.

Reports must contain specific, clearly articulated and actionable details relating to how the keys were discovered or extracted to qualify for a reward.

Hey, this isn't really issue. Just curious

So recently i found out that the extension ain't working anymore, as i can resolve from older issues , it's gotta do something with either chrome's new update or windows. So i was just curious about how can i find new keys instead of rolling back. I'd really appreciate if you'd draft that write up you were talking about.
Thank You

SignedMessage Format

Hi,
I'm reading the .proto file and I have a question regarding the SignedMessage format.
About the signature field - how is the signature generated? using what hash/encryption? I thought they're
using RSA, but you can't perform RSA on such a long message...
thx, and great work btw :)

tutorial use

install chrome 88 version
open for example a netflix hbo max amazon usa movie
start to playback
press F12
and go to console
there you will get the key for decrypt the movie that you are playback

and after use mp4decrypt comand for decrypt the movie
if you want any question PM i am a caring person willing to help, not like the people in this forum who are all soretes children of a mother who swallows semen with AIDS

Request: PlayReady DRM decryptor

Hey,
Do you have any decryptor tool for PlayReady DRM protection?
I'm trying to rip from Netflix AVC codec thats mean the Main Profile, with WideVine L3 Netflix offers only the High Profile
Main: 5800kbps of bitrate
High: 1180kbps of bitrate

I success to download 1 main but not protected one with Edge, plz if you can help me i will pay money.

Error in this extension

Hey this repository give an error like that " It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior. Pleases give any solution.
screenshot

Demo

Can someone explain how you downloaded this demo on readme and encrypted ?
I have like tried 20 different ffmpeg versions to download and encrypt, none of them works.

Download: ffmpeg -i "https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd" -codec copy "test.mp4"
Decrypt: ffmpeg.exe -decryption_key 229f5f29b643e203004b30c4eaf348f4 -i test.mp4 -codec copy test2.mp4

Decrypting with ffmpeg

Can someone confirm they have been able to use ffmpeg to decrypt (e.g. ffmpeg -decryption_key 100b6c20940f779a4589152b57d2dacb -i enc.mp4 -codec copy dec.mp4). I'm trying to do some on-the-fly decoding/decrypting, but i'm not able to get ffmpeg to work. Bento4 mp4decrypt works fine, but it does not accept pipe as input. If ffmpeg works for you, please tell me your version/build number and OS you are using. Thanks!

titorial use this TOOL pirate DRM content

THIS TOOL IS TO PIRATE DOWNLOAD content with drm

Here I leave the steps in a very supportive way and zero selfishness

they will need these tools
(just google them and you will find them easy)

  1. Bento4-SDK-1-6-0-637.x86_64-microsoft-win32
  2. Widevine L3 Decryptor plugin
  3. N_m3u8DL-CLI_v2.9.7_with_ffmpeg_and_SimpleG

Steps

  1. install Widevine L3 Decryptor on chrome 88 (does not work on later versions) or microsoft edge
    to install the extension enable developer mode in the extensions section and simply drag the folder
  2. open the video you want to get
    for example an HBO MAX USA movie
  3. before starting to play the movie you want to hack, press f12 on your browser.
    Inside there go to the console tab and you will get 3 keys that the Widevine L3 Decryptor will give you.
    Those 3 keys are for decrypting DRM-encrypted content.
    Now go to the network tab and filter on the shipda, in the search line type
    mpd
    copy the address that comes out and paste it in
    N_m3u8DL-CLI_v2.9.7.exe
    and you give enter
  4. now select the video resolution or audio quality you need
    press enter and it will start downloading in the download folder
  5. then copy the video and rename it for example to
    hbomaxvideo.mp4
    and go and paste it in the folder
    Bento4-SDK-1-6-0-637.x86_64-microsoft-win32 \ bin
    then there you open a cmd console for example with shift right click open terminal console
    and copy the following

mp4decrypt.exe --key 1: 9c97a0eaed18f201c4386d3a04d57ed4 --show-progress hbomaxvideo.mp4 c: \ Bento4-SDK-1-6-0-637.x86_64-microsoft-win32 \ bin \ video_decrypted.mp4

(video / audio format extension may vary)

and the number
9c97a0eaed18f201c4386d3a04d57ed4

It is the key that the Widevine L3 Decryptor gives you, that key is essential to HACK the movie and REMOVE THE DRM.
You will have to try, one of the keys is for the video, another for the audio and another for the subtitle

  1. and now the most important thing, enjoy the DEENCRYPTED content, totally HACKED

tutorial use

this plugin is used to download drm content
this is a tutorial use how use this plugin

first you need this tools

  1. Bento4-SDK-1-6-0-637.x86_64-microsoft-win32
  2. plugin Widevine L3 Decryptor
  3. N_m3u8DL-CLI_v2.9.6_with_ffmpeg_and_SimpleG

steps

  1. install Widevine L3 Decryptor in chrome 88 (dont work in more recent) or microsoft edge
    just install the extension folder
  2. open your video that you want get
    for example a movie in HBO MAX usa
  3. after start playback press f12 in your browser
    go to console tab and there you will get 3 keys for decrypt the encrypted files
    and go to network
    and for HBO MAX search for mpd
    copy url and paste in
    N_m3u8DL-CLI_v2.9.6_with_ffmpeg_and_SimpleG
  4. now select the resolution video or quality audio that you need
    enter and start to download
  5. after copy the video and rename for example
    hbomaxvideo.mp4
    and go to folder
    Bento4-SDK-1-6-0-637.x86_64-microsoft-win32\bin
    paste there and open a console tab in there
    and in there copy this

mp4decrypt.exe --key 1:9c97a0eaed18f201c4386d3a04d57ed4 --show-progress hbomaxvideo.mp4 c:\Bento4-SDK-1-6-0-637.x86_64-microsoft-win32\bin\video_decrypted.mp4

(the extension can to vary)

the
9c97a0eaed18f201c4386d3a04d57ed4

is the key that you obtain in widevine
you have to will test one key is for audio another for video and another to subtitule

  1. enjoy video and audio without encrypt

tutorial how use this tool

THIS TOOL IS TO PIRATE DOWNLOAD content with drm

Here I leave the steps in a very supportive way and zero selfishness

they will need these tools
(just google them and you will find them easy)

  1. Bento4-SDK-1-6-0-637.x86_64-microsoft-win32
  2. Widevine L3 Decryptor plugin
  3. N_m3u8DL-CLI_v2.9.7_with_ffmpeg_and_SimpleG

Steps

  1. install Widevine L3 Decryptor on chrome 88 (does not work on later versions) or microsoft edge
    to install the extension enable developer mode in the extensions section and simply drag the folder
  2. open the video you want to get
    for example an HBO MAX USA movie
  3. before starting to play the movie you want to hack, press f12 on your browser.
    Inside there go to the console tab and you will get 3 keys that the Widevine L3 Decryptor will give you.
    Those 3 keys are for decrypting DRM-encrypted content.
    Now go to the network tab and filter on the shipda, in the search line type
    mpd
    copy the address that comes out and paste it in
    N_m3u8DL-CLI_v2.9.7.exe
    and you give enter
  4. now select the video resolution or audio quality you need
    press enter and it will start downloading in the download folder
  5. then copy the video and rename it for example to
    hbomaxvideo.mp4
    and go and paste it in the folder
    Bento4-SDK-1-6-0-637.x86_64-microsoft-win32 \ bin
    then there you open a cmd console for example with shift right click open terminal console
    and copy the following

mp4decrypt.exe --key 1: 9c97a0eaed18f201c4386d3a04d57ed4 --show-progress hbomaxvideo.mp4 c: \ Bento4-SDK-1-6-0-637.x86_64-microsoft-win32 \ bin \ video_decrypted.mp4

(video / audio format extension may vary)

and the number
9c97a0eaed18f201c4386d3a04d57ed4

It is the key that the Widevine L3 Decryptor gives you, that key is essential to HACK the movie and REMOVE THE DRM.
You will have to try, one of the keys is for the video, another for the audio and another for the subtitle

  1. and now the most important thing, enjoy the DEENCRYPTED content, totally HACKED

Extract key for linux

Hello!
I’m really like this plugin and I know that @tomer8007 doesn’t want to extract the Linux key but I am a Linux user and I would like to use it on Linux. Can somebody give me detailed instructions on how to extract the key? Please contact me at [email protected] if you would like to help.

Thanks for your help in advance!

Would you please create a writeup as to what you had to defeat in order to get chromeRSAPrivateKey?

// Extracted by applying some mathematical tricks to Arxan's white-box algorithm
That's not a good enough explanation for a lot of us :)

For those of us who don't have the time to reverse the DLL ourselves, a writeup describing what obfuscation was actually used in the most popular DRM module is quite interesting.

Since you were generous enough to create this repo, perhaps you'll be kind enough to create this writeup as well :)

tutorial download pirate DRM content with this extension

THIS TOOL IS TO PIRATE DOWNLOAD content with drm

Here I leave the steps in a very supportive way and zero selfishness

they will need these tools
(just google them and you will find them easy)

  1. Bento4-SDK-1-6-0-637.x86_64-microsoft-win32
  2. Widevine L3 Decryptor plugin
  3. N_m3u8DL-CLI_v2.9.7_with_ffmpeg_and_SimpleG

Steps

  1. install Widevine L3 Decryptor on chrome 88 (does not work on later versions) or microsoft edge
    to install the extension enable developer mode in the extensions section and simply drag the folder
  2. open the video you want to get
    for example an HBO MAX USA movie
  3. before starting to play the movie you want to hack, press f12 on your browser.
    Inside there go to the console tab and you will get 3 keys that the Widevine L3 Decryptor will give you.
    Those 3 keys are for decrypting DRM-encrypted content.
    Now go to the network tab and filter on the shipda, in the search line type
    mpd
    copy the address that comes out and paste it in
    N_m3u8DL-CLI_v2.9.7.exe
    and you give enter
  4. now select the video resolution or audio quality you need
    press enter and it will start downloading in the download folder
  5. then copy the video and rename it for example to
    hbomaxvideo.mp4
    and go and paste it in the folder
    Bento4-SDK-1-6-0-637.x86_64-microsoft-win32 \ bin
    then there you open a cmd console for example with shift right click open terminal console
    and copy the following

mp4decrypt.exe --key 1: 9c97a0eaed18f201c4386d3a04d57ed4 --show-progress hbomaxvideo.mp4 c: \ Bento4-SDK-1-6-0-637.x86_64-microsoft-win32 \ bin \ video_decrypted.mp4

(video / audio format extension may vary)

and the number
9c97a0eaed18f201c4386d3a04d57ed4

It is the key that the Widevine L3 Decryptor gives you, that key is essential to HACK the movie and REMOVE THE DRM.
You will have to try, one of the keys is for the video, another for the audio and another for the subtitle

  1. and now the most important thing, enjoy the DEENCRYPTED content, totally HACKED

Widevine CDM Version

From which Widevine Content Decryption Module (widevinecdm.dll) version is key?
Because Google recenty push new version of Desktop L3 CDM for Windows/Linux

Version for Debian/Kali or Unix-based Operating Systems

Is it possible to fork a version for Linux at all? I appreciate your work, however doing any sort of meaningful test on Windows, particularly regarding anything which manipulates the OS directly (since it's not open-source), is difficult for me.

Thanks for reading

Widevine on arm64 linux

Currently there is no widevine decryption module available for arm64 gnu Linux , because well . Google never decided to release one. There is one available for every other major architecture though.

I'm wondering if there would be some way package this in a way that would make it possible to watch widevine content on arm64.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.