Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Adobe Pass support and research #14004
Comments
|
Any progress recently? You used to be able to download on demand shows via streamlink / livestreamer by simply replacing "HLS_DRM" in the M3U8's URL with "HLS" but that no longer works. |
|
Haven't had a chance to look at this lately. If anything the work is in debugging Adobe Flash DRM in multiple ways:
Once one is cracked arguably the rest are done too until a Flash update comes. An exploit is definitely another potential and it could be found by disassembling the Flash plugin. I don't think this DRM scheme has been cracked publicly nor have I seen any content on the web spreading that was from a source that used Adobe's DRM as far as I know. Netflix/Amazon/etc all use their own systems (EME/M3U8+AES key in a browser, their own apps on iOS/Android/etc). |
|
The word "FAXS" reminds me of SAMPLE-AES (#9786), which is a different decryption flow than AES-128. There's a Javascript implementation at video-dev/hls.js#997 |
|
I do not know if anyone wants to continue this work, which is not so much Spectrum as it is to figure out Adobe Pass protocol. I do not have a Spectrum account anymore so I cannot do anymore work on this. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.08.23. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Anyone else interested in helping with this please contact me.I have done a bit of research understanding how watching live TV at https://watch.spectrum.net/livetv works and on iOS as well which uses the Adobe SDK. I have not yet completed this research but these are my discoveries:
GET https://watch.spectrum.net/livetv with no cookies
find line with
window.onload = function () {find next line with
var environments =...parse this base64-encoded string. sample data:
[{"name":"prod","label":"production","splunk":{"domain":" https://splunk.ngclogging.cloud.twc.net/"},"analytics":{"endpoint":"https://v-collector.dp.aws.charter.com/api/collector"},"vpns":{"baseUri":"https://vpns-gen.timewarnercable.com"},"oAuth":{"consumerKey":"joeigjioegj","s":"jaoiegjoejg"},"displayRawRentError":false,"default":true}]"Use this OAuth data to get token
Getting the temporary token:
GET
https://services.timewarnercable.com/auth/oauth/requestOAuth data required from previous
Returns URL-encoded string with xoauth data
example:
oauth_token=xxxx&oauth_token_secret=xxx&xoauth_token_expiration=1503113510937&oauth_callback_confirmed=true'Authorise' your device:
POST https://services.timewarnercable.com/auth/oauth/device/authorize
OAuth data required from last step
POST data:
xoauth_device_id: xxx
xoauth_device_type: ONEAPP-OVP
oauth_token: xxx
username: your spectrum account username (could be an email)
password: ...
To get a session ID, etc:
Oauth GET
https://services.timewarnercable.com/ipvs/api/smarttv/adobe/sessionIn the JSON: ticketId, sessionId, expiration (UNIX timestamp)
Then get stream information, JSON which will have the URI to an m3u8 file:
OAuth GET:
https://services.timewarnercable.com/ipvs/api/smarttv/stream/live/v1/172?adID=<adId>&csid=stva_ovp_pc_live&dai-supported=true&drm-supported=true&encoding=hls&sessionId=<your session ID>&vast-supported=trueI have no idea what
adIDis in the above URL.In the JSON, you will see the key
stream_urlwhich is the full m3u8 URL. This is downloadable without cookies or anything (authorisation is in the query string). It is timed and will eventually expire.In the M3U8, you can find the following:
EXT-X-FAXS-CM key -> base64 decode -> pkcs7 decode
base64 -d file-with-content > faxs.der
openssl pkcs7 -inform der -in faxs.der -print_certs
POST URL is in the metadata
strings -n 10 faxs.der
The POST URL for the license server found in the metadata requires query parameters:
CrmId=twc&AccountId=twc&ContentId=6_ae&SubContentType=Primetime&OriginalUri=/flashaccess/getServerVersion/v3&Ticket=<ticket ID>&SessionId=<SessionId>ContentIdis the channel ID (in this case A&E).You must POST a certificate as is (possibly URL encoded which seems strange yes) in the body of the request. What you get back is a 'individualization certificate', as in the decryption key?
There are two such requests. I do not know why. They differ in size so they are different.
Once the key is grabbed, I assume any TS file can be decrypted. The algorithm is not really known, but I seem to see references to AES-128-CBC in the Adobe Player SDK on iOS. There is a method named:
-[DRMManager initDecryptionSession:playbackSession:error:complete:].Python code to demonstrate (set global variables
USERNAMEandPASSWORD):