Looney Tunes: Exposing The Lack of DRM Protection in Indian Music Streaming Services
Looney Tunes: Exposing The Lack of DRM Protection in Indian Music Streaming Services
most preferred way of consuming multimedia content and the global OTT service market to grow from $81.60 billion
this is evidenced by the proliferation in the number of stream- in 2019 to $156.9 billion by 2024 exhibiting a CAGR (Com-
ing service providers as well as the exponential growth in pound Annual Growth Rate) of 14% [38]. The Asia Pacific
their subscriber base. Riding on the advancements in low region is set to record the highest growth rate during the
cost electronics, high speed communication and extremely forecast period. According to a joint report published by
cheap data, Over-The-Top (OTT) music streaming is now the the Indian Music Industry (IMI) and Deloitte India [18], the
norm in the music industry and is worth millions of dollars. audio-video OTT market in India is valued at around US$
This is especially true in India where major players offer 280 million with nearly 150 million monthly active users
the so called freemium models which have active monthly accessing soundtracks across various platforms.
user bases running in to the millions. These services namely,
Gaana[33], Airtel Wynk[32] and JioSaavn[34] attract a signif-
icantly bigger audience than their 100% subscription based Service Name Business Model Origin Reference
peers like Amazon Prime Music, Apple Music etc.[35] Given Bundle,
their ubiquity and market dominance, it is pertinent to do a Airtel Wynk Domestic [32]
Ad Supported
systematic analysis of these platforms so as to ascertain their
potential as hotbeds of piracy. This work investigates the re- Apple Music Paid International [4]
silience of the content protection systems of the four biggest Amazon Music Paid International [2]
music streaming services (by subscriber base) from India, Gaana Ad Supported Domestic [33]
namely Airtel Wynk, Ganna, JioSaavn and Hungama. By
considering the Digital Rights Management (DRM) system Hungama Ad Supported Domestic [6]
employed by Spotify as a benchmark, we analyse the secu- Bundle,
JioSaavn Domestic [34]
rity of these platforms by attempting to steal the streamed Paid
content efficiently. Finally, we present a holistic overview
of the flaws in their security mechanisms and discuss possi- Spotify Ad Supported International [11]
ble mitigation strategies. To the best of our knowledge, this Youtube Music Subscription International [13]
work constitutes the first attempt to analyze security of OTT Table 1. OTT music services currently operating in India
music services from India. Our results further confirm the
time tested belief that security through obscurity is not a
long term solution and leaves such platforms open to piracy
and a subsequent loss of revenue for all the stakeholders. Revenue from digital means contributes nearly 78%to
the overall recorded music industry revenue in India and
Keywords: Digital Rights Management, Web Security, Piracy, 54% [27], globally. A survey of India’s audio streaming mar-
OTT Audio Streaming ket reveals that it is primarily divided among domestic play-
ers Wynk, Gaana, JioSaavn, Hungama and global players
Spotify, Amazon Music, Apple Music and more recently
1 Introduction YouTube Music (Table 1). As per a consumer insights survey
OTT is an acronym for “over-the-top” and refers to the dis- conducted by the IFPI in 2018 [28], an average internet user
tribution of multimedia (audio, video) content over a pub- in India spends 21.5 hours every week listening to music,
lic network. Recent trends have shown a mass adoption of higher than the global average of 17.8 hours. It is interesting
smart mobile devices in the consumer market. This coupled to note that despite the popularity, contemporary literature
with a higher penetration of high-speed, cheap Internet and lacks security analysis of any of the domestic OTT platforms
the emergence of advanced technologies, such as 5G, 4G, and forms the primary motivation of this work.
156 salvage the situation. As a part of responsible disclosure, this
Streaming Other Digital Physical
9
Performance Rights Synchronisation 125 15
work was attempted to be communicated to the concerned
11 parties. With the exception of Wynk, response from others
110 7
94 12 13 is awaited.
88 16 9
2
3 11 14
12
11 13
Our Contributions
28 20 19 Our contributions can be summed up as follows -
109
20 20 83 • We present a security analysis of the content protec-
52 tion systems in place for four of the biggest music
31 34
streaming services (by subscriber base) in India.
• We highlight the lax security protocols in place in all
2014 2015 2016 2017 2018
these services by attempting to steal content in an
Note: All USD numbers above have been calculated using exchange rate $1 = INR 68.43
Source: IFPI, Global Music Report, 2019
undetectable way and provide proof of concepts to
automatically acquire content by reverse engineering
Figure 1. The dominance of streaming as the main source their content delivery protocols.
of revenue in the Indian music industry [22] • We present a comparative study of these apps with the
current state-of-the-art DRM systems.
• We present a discussion on the design choices em-
ployed by these services and make recommendations
This easy and free access to content was thought to have
to enhance their security.
solved several issues regarding unsanctioned sharing of me-
dia [30] as it provided Music-as-A-Service which was more Organisation Of The Paper
lucrative to the consumer than content ownership [24]. How-
The following sections contain the conclusions and results of
ever, with the consequential emergence of “stream-ripping”,
our experiments while reverse engineering said services. We
piracy has increasingly kept pace. The gravity of the situa-
first provide a primer on Adaptive Streaming in Section[2.1]
tion reflects in the numbers where estimates point to almost
which is used by most of the OTT streaming services and
US$ 250 million lost each year in India alone while the es-
which would help us elucidate the protocols involved clearly.
timated number of stream-rippers in the US have grown to
We follow this up in Section[2.3] with a brief note on present
an alarming 17 million [42]. The surging popularity of such
day DRM systems. Section[3] is dedicated to describing the
platforms has also not been missed by the shadier sections
Widevine DRM used by Spotify to protect it’s content, to
of our society with more sinister agendas [14]. Couple this
establish a benchmark for comparing the other services. This
with the 40% - 60% of revenue that is lost to pirates, there is
leads us into the results of the reverse engineering in Sec-
hence a dire need to take a critical look at the security of such
tion[4] where we give reconstructions of the protocols used.
content delivering platforms. A recent paper on bypassing
Section[5] contains discussions on the flaws in current DRM
DRM protection in online video streaming [45] is one of the
systems and the design choices made by these services fol-
many research efforts highlighting the need to have a deeper
lowed by our conclusions in Section[7].
understanding on how OTT services should be deployed in
practice.
1.1 Responsible Disclosure
In this work we systematically analyze the four leading
OTT music service providers in India namely Wynk, Gaana, All the services mentioned here were contacted prior to sub-
JioSaavn and Hungama comparing them to the best practices mission of this manuscript with reports on the vulnerabilities
in the industry. To our great surprise, our research reveals in their protocols and with offers to collaborate on the fix. It
that none of these platforms adopt any state-of-the-art DRM should be noted that none of these services have vulnerabil-
protection. Contrary to this they actually attempt a very ity disclosure programs and hence finding a suitable point
rudimentary form of code obfuscation. As a result, we were of contact was tough. When informed of the break, Airtel
able to not only reverse engineer their protocols but also Wynk was all for the idea of a collaborative fix but ended
devise mechanisms leading to automated, unsupervised and up deploying a haphazard patch without consultation and
uninterrupted download of music from their servers. We proper notice which was broken eventually using the same
develop detailed Proof-of-Concepts for the same and illus- techniques.
trate case-studies on each of the platforms. To put things
in context, we also investigate the Spotify web-application 2 Background
and find it adopting very standard DRM protection making This section is provided as a primer for familiarising the
it a benchmark in the comparative study that we furnish reader with certain technologies that are heavily referred to
later. Finally, we discuss possible mitigation strategies to in this work.
2
2.1 Adaptive Streaming
Classical streaming protocols used a technique called progres-
sive streaming to deliver content. In this technique, a single
file sitting on the vendors’s server was delivered to the client
requesting it. Though this method was simple, it had some
obvious inefficiencies which are demonstrated using a toy
example below-
Javascript modules, we were able to piece together the inner source, however the Chrome CDM is closed source [19]
4
CLIENT BROWSER
decryption of these media needs to be performed. The
CDM PLAYER SERVER information (keys, initlialisation vectors) needed for
decryption is included in the license. Based on the
initData, the CDM generates an encrypted license
Get Access Token Login Reqs
Authentication using OAuth / Spotify Login
Set-Cookies:
request and passes it to the player. The player then
GET Request to
open.spotify.com/get_access_token?...
relays this request to a license URI that was obtained
Cookies: asynchronously. If the request and its payload is valid,
Response
clientId: "..." the server responds with an encrypted response that is
accessToken: "< Bearer >" ...
relayed by the player to the CDM. The CDM decrypts
GET Request to
the response to obtain the license.
Get AppCertificate
spclient.wg.spotify.com/widevine-license/v1/
application-certificate
6. Playback Once the licensing information has been
Response
Application certificate bytes obtained, 10 second chunks are downloaded from the
GET Request to
servers and passed to the CDM which decrypts those
Get Authorized CDN URI
gae-spclient.spotify.com/storage-resolve/files/
audio/interactive/<file-id>?version=100000... chunks and passes them to the Audio/Video Stack for
authorizarion: Bearer
playback.
Response
cdnurl: ["audio-ak-spotify-com.akamaized.net/
audio/<file-id>?_token_=exp=<..>hmac=<..>",..],
fileid : <file-id> 3.3 Lessons Learnt
Retrieve First Chunk Of Media
GET Request to
audio-ak-spotify-com.akamaized.net/ audio/<file- Spotify does a few things very well for protecting their con-
id>?_token_=exp=<..>hmac=<..>
Range: bytes=0-163388 tent as it is streamed to a client’s device. For the sake of
Response establishing standard practices, we highlight a few of them
Content Type:Bytes
ftypdashiso6mp4...moov...mvhd....pssh below -
gae-client.spotify.com/widevine-
license/v1/audio/license?exp=<...>&cp=&tok=<...>
authorization: Bearer 2. Streamed Content is Encrypted To prevent stream-
Payload:
ripping (discussed in Section 5.5), content stored on the
Response: License Blob (bytes)
servers is encrypted.
Enc.
3. No Hardcoded Keys The keys for decryption of the
(keys)
Licence
Blob
GET Request to
streamed content are not hardcoded in the files that
Decrypt Blob to
audio-ak-spotify-com.akamaized.net/ audio/<file-
the user has direct access to.
Repeat for different
Acquire Keys
id>?_token_=exp=<..>hmac=<..>
Range: bytes=163389-329949
4. License Information is Invisible to the Player The
Response: Enc. Media File Blob (bytes)
Enc. license information passed between the CDM and the
Ranges
Media
Blob server is encrypted and hence is not accessible to the
Decrypt Media user.
Encrypted
Content 5. Content Decryption Module The CDM is theoret-
Comms using
MSE
ically the weakest part of the protocol. However in
A/V
Stack Method
terms of usable/practical security, since it is closed
source binary, it offers a basic level of protection against
direct observation of the decrypted content, but is the-
Figure 3. Spotify’s Content Retrieval Protocol - Widevine oretically vulnerable to black box cryptanalysis tech-
L3 (Reconstructed) niques and some implementation level exploits. L2
and L1 level Widevine attempt to mitigate this vul-
called initData. initData is then passed on to the nerability by having the decryption occur in a Trusted
Content Decryption Module (CDM). Execution Environment(TEE)[44].
5. Obtaining the License The fragmented4 media chunks
Now that a benchmark has been established, we proceed to
retrieved from the servers are encrypted using AES-128
present an analysis of the four biggest OTT music streaming
in CTR mode. Hence, in order to initlialise playback,
services in India, in the process highlighting security gaffes
4 See moof boxes [25] for information on format of the media fragments where DRM is concerned.
5
4 Case Studies CLIENT SERVER
This section forms the basis of the work done in this paper.
We present here, a reconstruction of the streaming protocols
used by the four biggest (by subscriber base) music streaming Generate deviceId
Generate userAgent
services in India, in view of formulating an exploit to steal
their content. The reconstruction of these protocols involved POST Request to
Client Registration
"sapi.wynk.in/music/v3/account/login"
reverse engineering the Javascript modules executing on the Request Payload
{"deviceId":"c7782aa9-908a-5d13-1643-
client browser using static and dynamic techniques such d26ed0f09429","userAgent":"c7782aa9-908a-5d13-
1643-d26ed0f09429"}
as code de-obfuscation, debugging etc., observing network
packets using Burp[9] and a fair amount of intuition. In all Response 200
{ "isSystemGeneratedContentLang":true,
cases, we were able to completely replicate the protocols in "uid":"4h5TX4l0byA23YpO4UovEHiZ6sk4",
order to get access to the audio content using these standard "songQuality":"a","autoPlaylists":true,
"downloadQuality":"hd",
techniques of reverse engineering. Some code obfuscation "lastAutoRenewalOffSettingTimestamp":0,
"isRegistered":false,
aside, none of these services used industry standard DRM "lang":"en","notifications":true,
"token":"hLO545xc"}
and could be broken with minimal effort by a dedicated
attacker.
Compute search_id
Given below is a summarised analysis of Airtel Wynk,
POST Request to
JioSaavn, Gaana and Hungama. Using this analysis we were "https://playback.wynk.in/streaming/v4/
cscgw/<id>.html?
broad descriptions of what those functions do, while illustrat- Response 200
{"success":true,"url":"<Authorized
ing a protocol. The token/variable names mentioned are also URL>","cookie": {"CloudFront-Policy":"<...>",
"CloudFront-Signature":"<...>", "CloudFront-
similar to their names in the actual JS code. For a detailed Key-Pair-Id":"<...>"},"lyrics":{}}
manifest
Query Parameters
that had serious flaws in their content security mechanism. "Policy", "Signature", "Key-Pair-Id"
quality. The protocol diagram in Figure 1 describes the work- GET Request to Chunk URIs as specified in
ing of Wynk prior to our disclosure. index.m3u8
Query Parameters
"Policy", "Signature", "Key-Pair-Id"
The Protocol in A Nutshell.
Repeat
• Client Registration The client is identified to the Response 200
Audio Content Chunk(.ts)
server using a POST request containing the deviceId
and userAgent parameters in the payload. These pa-
rameters are set by the client and appear to be random Figure 4. Content Retrieval Protocol - Wynk (Reconstructed)
in nature. Our observation was that persisting the val-
ues for these parameters had no effect on the execution
of the protocol. As a response to this request, the server
replies with values for uid and token. signed cookies which we will refer to as CloudFront
• Compute Search Id For Resource A search_id was Cookies.
computed based on the song URL through a combina- • Acquire Manifest On making a request to the URI
tion of string operations and table lookups. obtained as a response in previous request, the server
• Acquire Authenticated URI A POST request is made responds with the manifest file which contains URIs
to retrieve the authenticated URI for content retrieval to the various index.m3u8 files available.
from the CDN. Using token as the key, a SHA1-HMAC • Acquire index.m3u8 Using the URI for the index file
of a string containing the search_id is generated. The of highest quality available, a request is made with
Base64 encoded value of this HMAC is assigned to a query parameters being set using the CloudFront Cook-
request header x-bsy-utkn after appending it to the ies obtained previously. A successful response from
uid. The result of this request is a URL with a set of the server gives us the index.m3u8 file of our choice.
6
• Getting Content By making GET requests to the chunk CLIENT SERVER
URIs present in the index file and setting the appropri-
Generate BK
ate query parameters, the client starts recieving .ts Generate deviceId
media files from the server. By appending those files Set pk
Set sk
in order, the complete audio file is obtained. GET Request to
spit_out() Call
"https://img.wynk.in/webassets/<...>_1.jpg"
Following our disclosure, Wynk made certain changes to Response 200
{....}
their protocol that are listed below -
GET Request to
"https://img.wynk.in/webassets/<...>_2.jpg"
1. A code obfuscation scheme was introduced that re-
Response 200
placed function/variable names, identifiers with what {....}
were essentally array lookups. The array used for lookup POST Request to
check() call
"https://ping.wynk.in/health/check"
was included in the source code which rendered the Headers: 'tk':' ', 'bk':' '
Request Payload
obfuscation useless. {"pid": " "}
2. The client registration process was redesigned and a Response 200
Headers: {"k","n","y","w","m","z","a","p"}
time window was introduced using Time Based OTPs
POST Request to
(TOTPs)[49].
login() call
"https://login.wynk.in/music/account/v1/login"
Headers: x-bsy-ptot, x-bsy-cip
Request Payload
However, the the content retrieval part of the protocol re- {}
mained the same. The introduced changes only served to Response 200
{dt, uid, token, kt}
complicate the process of getting the authenticated URIs for
the CDN. Moreover, content was still being streamed with- Compute search_id
manifest
• spit_out(BK, deviceId) Two requests are made to Query Parameters
"Policy", "Signature", "Key-Pair-Id"
the server using the outputs of this method which ba-
Response 200
sically does some intermixing of the strings deviceId index.m3u8 Index File
and BK. The ouptut strings are then appended with GET Request to Chunk URIs as specified in
"_1.jpg" and "_2.jpg" and treated as endpoints for index.m3u8
Query Parameters
requests. Now, we are not entirely sure why the image "Policy", "Signature", "Key-Pair-Id"
Repeat
Response 200
Audio Content Chunk(.ts)
fidently say that the response to those requests has no
further use. That being said, if either of those requests
are not made, the protocol fails subsequently,
Figure 5. Revised Content Retrieval Protocol - Wynk (Re-
• check() & login() These functions are named after
constructed)
the endpoints to which requests are made. A successful
response to the check endpoint returns several param-
eters which are used to compute the values of certain • Acquire Authenticated URI The values received in
headers in the request to the login endpoint. A suc- the previous step are used to set the headers for an-
cessful response from the login endpoint contains the other request as follows -
parameters dt, uid, token, kt among others. – x-bsy-uuid ← dt
• Compute Search Id This method did not change com- – x-bsy-utkn similar computations as before6
pared to the previous deployment of Wynk – x-bsy-t ← AES(kt, TOTP(dt||sk, 600, 6))7
5 When we say without encryption, we refer to the fact that after the decryp- 6 Thechanges can be observed in the Appendix
tion from the HTTPS layer and gzip unpacking has occurred, the audio 76 digit TOTP generated with a window of 600 seconds. CryptoJS
content is directly playable (unencrypted) implementation of AES used
7
This POST request if successful returns the CloudFront CLIENT SERVER
Cookies with a URI. The rest of the protocol follows
identically to the previous version of Wynk. GET Request to
AES-CBC Decrypt
4.2 JioSaavn Joins The Jam
Get Manifest
With the findings from our work on Wynk, we were inspired GET Request to
<decrypted URI>
to look into other platforms to test if the situation found
Response
with Wynk was a general norm among established players. manifest.m3u8
Get Index
GET Request to
service in terms of number of subscribers. It took some vigi- index URI present in manifest.m3u8
lant effort to get to the media content but once the relevant Response
index.m3u8
execution path was found, piecing together the protocol was
GET Request to
found to be extremely easy and straightforward. URI of audio chunk as given in index.m3u8
Repeat
Response
segment.ts
Response
window__INITIAL_DATA__.
˙
HTML containing Encrypted URL of song media Parameters that are essential for fetching the media
(Example: ID2ieOjCrwfgWv4B1ImC5QfbsDy%2F3il...)
content are encrypted_medial_url and perma_url.
• Generate Auth Token A GET request is made to https:
GET Request to //www.jiosaavn.com/api.php?call=song.generateAuthToken&
https://www.jiosaavn.com/api.php?
call=song.generateAuthToken&url=<encrypted- url=<encrypted_media_url>&bit_rate=<bit_rate> to
Get Authorized CDN URL
url>&bitrate=<bit-rate>..... obtain the authorised URL that is used to fetch the me-
Response dia from the CDNs. The relevant parameters are url
JSON: {'auth_url': <auth-url>, 'type': 'mp4', which is the encrypted_media_url discussed above
'status': 'success'}
and bit_rate which takes the values "128", "320",
(auth-url example:
'https://ac.cf.saavncdn.com/577/2c5b...203b13ea_320.mp4? "64", "32", "16". The response contains auth_url
Expires=1602217480&Signature=jWboJ6ut2Tn...EQw1wWuJw5W4g__&Key-
Pair-Id=APKAJB334VX63D3WJ5ZQ'
which is verified by the CDN to authorize a request.
• Downloading Media A GET request is made to auth_url
to finally retrieve the relevant media. This URL is suf-
Retrieve First Chunk Of Media
Response trieve the media. The bit rate can be chosen by set-
[{...'mediaid': <media_id>, 'file': ting the hcom_audio_qty parameter to one of "high",
'https://www.hungama.com/mdnurl/song/<media_id>?
token=<token>'...}] "low", "medium" in the Cookie header.
POST Request to
• Downloading Media A GET request is made to media_url
Get Authorized Media URL
Response
5 Discussion
{'status': 1, 'mesage': 'successful', 'response':
{'media_url': <media_url>, 'type': 'mp3'}}
5.1 Comparative Analysis
Among the case studies showcased in this work, reversing
Retrieve First Chunk Of Media
it to be pretty similar to JioSaavn and reverse engineered the Table 2. A Comparative Analysis of Practices
following protocol.
11
A.2 Wynk v2 Algorithm 9: login() Function
Input: 𝑘, 𝑛, 𝑦, 𝑤, 𝑚, 𝑧, 𝑎, 𝑝
Algorithm 6: Client Side in Wynk 2.0 Output: 𝑑𝑡, 𝑢𝑖𝑑, 𝑡𝑜𝑘𝑒𝑛, 𝑘𝑡, ...
Input: 𝑢𝑟𝑙; /* Resource Url */ Data: Request Header: H ′
1 begin
Output: [𝑐ℎ𝑢𝑛𝑘𝑠]; /* Audio Chunk List */
2 𝑢𝑟𝑙:=
1 begin Initialisation
"https://login.wynk.in/music/account/v1/login"
2 𝐵𝐾 ← gen_bk(T ,R)
3 𝐵𝑆 := 𝑘 ||𝑛||𝑦||𝑤 ||𝑚||𝑧||𝑎||𝑝
3 𝑑𝑒𝑣𝑖𝑐𝑒𝐼𝑑 ← gen_random_id(R)
4 H ′[x-bsy-ptot] ← T
4 𝑝𝑘 =
/* Generate x-bsy-cip from BS value */
Base64enc(https://sapi.wynk.in/music)
5 a ← [ ], b← 0, t← 0
5 𝑠𝑘 = 51ymYn1MS
6 for 𝑡 ≤ 𝑙𝑒𝑛(𝐵𝑆) − 1 do
6 begin Authentication 7 𝑒 = 10(𝐵𝑆 [𝑡]) + 𝐵𝑆 [𝑡 + 1]
/* Authorisation with the Wynk Servers 8 if 𝑒 ≤ 55 then
to enable authenticated retrieval 9 if 2 ̸ | 𝑏 then
requests */ 10 a.push(200 + 𝑒)
7 spit_out(𝐵𝐾, 𝑑𝑒𝑣𝑖𝑐𝑒𝐼𝑑) 11 else
8 𝑈 := {𝑘, 𝑛, 𝑦, 𝑤, 𝑚, 𝑧, 𝑎, 𝑝} ← check(𝐵𝐾, T ) 12 a.push(100 + 𝑒)
9 𝑀 := {𝑑𝑡, 𝑢𝑖𝑑, 𝑡𝑜𝑘𝑒𝑛, 𝑘𝑡, ...} ← login(𝑈 , T )
13 b++
10 𝐶 ← request_manifest(𝑢𝑟𝑙, 𝑡𝑜𝑘𝑒𝑛, 𝑑𝑡, 𝑠𝑘)
14 else
11 begin Retrieval 15 a.push(100 + 𝑒)
12 [𝑐ℎ𝑢𝑛𝑘𝑠] ← get_song(𝐶)
16 H ′[x-bsy-cip] ← concat(𝑎)
17 𝐶 ← POST(𝑢𝑟𝑙, H ′, payload: {})
18 return 𝐶
Algorithm 7: spit_out() Function
Input: 𝐵𝐾, 𝑑𝑒𝑣𝑖𝑐𝑒𝐼𝑑
Algorithm 10: request_manifest() Function
1 begin
2 𝑑 1, 𝑑 2 ← 𝑑𝑒𝑣𝑖𝑐𝑒𝐼𝑑 [0...36) , 𝑑𝑒𝑣𝑖𝑐𝑒𝐼𝑑 [36...72) Input: {𝑢𝑟𝑙, 𝑑𝑡, 𝑢𝑖𝑑, 𝑡𝑜𝑘𝑒𝑛, 𝑘𝑡 }
3 In 𝑑 1, 𝑑 2 replace "−" → "" Output: Authenticated CloudFront Resource
Parameters
4 𝑑 3, 𝑑 4 ← mix_it(𝑑 1 , 𝐵𝐾), mix_it(𝑑 2 , 𝐵𝐾)
Data: Request Header: H ′′
5 𝑢𝑟𝑙 := "https://img.wynk.in/webassets/"
1 begin
6 GET(𝑢𝑟𝑙 ||𝑑 3 ||"_1.jpg") 2 H ′′[x-bsy-uuid] ← 𝑑𝑡
7 GET(𝑢𝑟𝑙 ||𝑑 4 ||"_2.jpg") /* Generating header x-bsy-utkn */
3 suffix := "/song/v4/stream?ets=true&hlscapable=
1&sq=a&lang=en&id="
4 search_id ← get_search_id(𝑢𝑟𝑙)
Algorithm 8: check() Function
5 𝑚𝑠𝑔 := "POST"|| suffix || search_id ||"{}"
Input: 𝐵𝐾
6 𝑑𝑖𝑔𝑒𝑠𝑡 ← SHA1_HMAC(𝑡𝑜𝑘𝑒𝑛, 𝑚𝑠𝑔)
Output: k,n,y,w,m,z,a,p
7 H ′′[x-bsy-utkn] ← 𝑢𝑖𝑑 ||":"||Base64Enc(𝑑𝑖𝑔𝑒𝑠𝑡)
Data: Request Header: H
1 begin
/* Generating x-bsy-t using Time Based
2 𝑢𝑟𝑙:= "https://ping.wynk.in/health/check" OTPs and CryptoJS AES */
3 H [tk] ← T 8 H ′′[x-bsy-t] ← AES(𝑘𝑡, TOTP(𝑑𝑡 ||𝑠𝑘, 600, 6))
4 H [bk] ← 𝐵𝐾 [0,𝑙𝑒𝑛 (𝐵𝐾)/2) /* Send POST Request To Server */
5 𝑝 ← 𝐵𝐾 [𝑙𝑒𝑛 (𝐵𝐾)/2),𝑙𝑒𝑛 (𝐵𝐾)) 9 𝑋 ← POST(𝑢𝑟𝑙, H ′′, payload: {})
6 𝑈 ← POST(𝑢𝑟𝑙, H ′, payload:{“𝑝𝑖𝑑” : “𝑝”}) 10 return 𝑋
7 return 𝑈
12
References [28] International Federation of the Phonographic Industry. 2018. IFPI
[1] [n.d.]. Adobe Primetime. https://www.adobe.com/in/marketing/ Music Consumer Insight Report. https://www.ifpi.org/downloads/
primetime.html Music-Consumer-Insight-Report-2018.pdf
[2] [n.d.]. Amazon Music. https://music.amazon.in/home [29] B. Kaliski. 1998. PKCS #7: Cryptographic Message Syntax. Technical
[3] [n.d.]. Apple Fairplay Streaming. https://developer.apple.com/ Report. https://tools.ietf.org/html/rfc2315
streaming/fps/ [30] Kate Swanson. 2013. A Case Study on Spotify: Exploring Perceptions
[4] [n.d.]. Apple Music. https://www.apple.com/in/music/ of the Music Streaming Service. MEIEA Journal 13, 1 (2013).
[5] [n.d.]. Denuvo By Irdeto. https://irdeto.com/denuvo/ [31] Renuka Kumar, Sreesh Kishore, Hao Lu, and Atul Prakash. 2020. Se-
[6] [n.d.]. Hungama. https://www.hungama.com/ curity Analysis of Unified Payments Interface and Payment Apps
[7] [n.d.]. Marlin DRM. https://www.intertrust.com/products/drm- in India. In 29th USENIX Security Symposium (USENIX Security 20).
system/marlin-drm/ USENIX Association, 1499–1516. https://www.usenix.org/conference/
[8] [n.d.]. Microsoft PlayReady. https://www.microsoft.com/playready/ usenixsecurity20/presentation/kumar
[9] [n.d.]. PortSwigger Burp Proxy. https://portswigger.net/support/ [32] Airtel Digital Ltd. 2020. Wynk Music - Homepage. Retrieved October
using-burp-proxy 4, 2020 from https://wynk.in/music
[10] [n.d.]. Shaka Player. https://github.com/google/shaka-player [33] Gamma Gaana Ltd. 2020. Gaana - Homepage. Retrieved October 4,
[11] [n.d.]. Spotify. https://www.spotify.com/in/ 2020 from https://gaana.com/
[12] [n.d.]. Widevine. https://www.widevine.com/ [34] Saavn Media Pvt Ltd. 2020. JioSaavn - Homepage. Retrieved October
[13] [n.d.]. Youtube Music. https://music.youtube.com/ 4, 2020 from https://www.jiosaavn.com/
[14] Ben Munson. [n.d.]. Streaming services are being hit hard by hackers, [35] Vainavi Mahendra. 2019. Hybrid OTT and music streaming platforms
Akamai says. https://www.fiercevideo.com/video/streaming-services- get more users than 100% subscription-based platforms. Retrieved
are-being-hit-hard-by-hackers-akamai-says October 4, 2020 from https://brandequity.economictimes.indiatimes.
[15] Alex Biryukov, Gaëtan Leurent, and Arnab Roy. 2013. Cryptanalysis of com/news/media/hybrid-ott-and-music-streaming-platforms-get-
the “Kindle” Cipher. In Selected Areas in Cryptography, Lars R. Knudsen more-users-than-100-subscription-based-platforms/69359360
and Huapeng Wu (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, [36] Colin Mann. 2020. Study: Stream-ripping piracy on the rise. Retrieved
86–103. September 17, 2020 from https://advanced-television.com/2020/09/17/
[16] Bruce E. Boyden. 2011. Is DRM working?: how could we tell?. In study-massive-increase-in-stream-ripping-piracy/
Proceedings of the 11th ACM Workshop on Digital Rights Management, [37] mark. 2019. Audio Downloader Prime. Retrieved September 21, 2019
Chicago, Illinois, USA, October 21, 2011, Yan Chen, Stefan Katzenbeisser, from https://www.jiosaavn.com/
and Ahmad-Reza Sadeghi (Eds.). ACM, 1–2. https://doi.org/10.1145/ [38] Markets and Markets. 2020. Over-The-Top Services Market by Type
2046631.2046633 (Online Gaming, Music Streaming, VoD and Communication), Moneti-
[17] David Buchanan. 2019. . Retrieved October 4, 2020 from https: zation Model (Subscription-based, Advertising-based, and Transaction-
//twitter.com/David3141593/status/1080606827384131590 based), Streaming Device, Vertical, and Region - Global Forecast to
[18] Deloitte India. [n.d.]. Audio OTT Economy in India. 2024. TC2445 (2020). https://www.marketsandmarkets.com/Market-
https://www2.deloitte.com/in/en/pages/technology-media-and- Reports/over-the-top-ott-market-41276741.html
telecommunications/articles/OTT.html [39] Andy Maxwell. 2019. The Scene: Pirates Ripping Content From Amazon
[19] Cory Doctorow. 2019. After Years of Insisting that DRM in HTML & Netflix. Retrieved October 4, 2020 from https://torrentfreak.com/the-
Wouldn’t Block Open Source Implementations, Google says It Won’t scene-pirates-ripping-content-from-amazon-netflix-190707/
Support Open Source Implementations. Retrieved October 4, 2020 from [40] U. S. Government Publishing Office. [n.d.]. Public Law 105–304–Digital
https://boingboing.net/2019/04/03/i-hate-being-right-2.html Millennium Copyright Act. Retrieved October 4, 2020 from http://www.
[20] David Dorwin, Jerry Smith, Mark Watson, and Adrian Bateman. 2017. gpo.gov/fdsys/pkg/PLAW-105publ304/html/PLAW-105publ304.htm
Encrypted Media Extensions. Technical Report. [41] Traci Ruether. 2019. 2019 Video Streaming Latency Report. Re-
[21] EC-Council. 2009. Computer Forensics: Investigating Network Intrusions trieved October 4, 2020 from https://www.wowza.com/blog/2019-
and Cybercrime. Cengage Learning. video-streaming-latency-report
[22] Financial Express. 2019. Audio OTT contributes 70% to music [42] Russ Crupnick. [n.d.]. Thanks to Stream-Ripping, Music Piracy Still a
industry revenue: Deloitte-IMI. https://www.financialexpress. Scourge. https://www.musicwatchinc.com/blog/thanks-to-stream-
com/industry/deloitte-imi-audio-ott-contributes-70-pct-to-music- ripping-music-piracy-still-a-scourge/
industry-revenue/1695436/ [43] Fidus Information Security. 2019. A Primer on Widevine and How It Can
[23] Google. 2017. Widevine DRM Architecture Overview. Retrieved October Be Abused to Download Encrypted Movies/Shows. Retrieved October 4,
4, 2020 from http://www.whymatematica.com/wp-content/uploads/ 2020 from https://fidusinfosec.com/breaking-content-protection-on-
2018/08/Widevine_DRM_Architecture_Overview.pdf streaming-websites/
[24] Hennie van Kuijeren. [n.d.]. The Preference for Music [44] Robert Triggs. 2019. Widevine Digital Rights Management Explained.
as a Service as Opposed to Download to Own. https: Retrieved October 4, 2020 from https://www.androidauthority.com/
//www.inholland.nl/media/10674/masterthesis-hennie-van- widevine-explained-821935/
kuijeren-the-preference-for-music-as-a-service-a.pdf [45] Ruoyu Wang, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni
[25] Apple Inc. 2017. HTTP Live Streaming. Technical Report. https://tools. Vigna. 2013. Steal This Movie: Automatically Bypassing DRM Pro-
ietf.org/html/draft-pantos-http-live-streaming-23#section-3.3 tection in Streaming Media Services. In USENIX Security Symposium.
[26] Apple Inc. 2020. Understanding the HTTP Live Stream- USENIX Association, 687–702.
ing Architecture. Retrieved October 4, 2020 from https: [46] Ruoyu Wang, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni
//developer.apple.com/documentation/http_live_streaming/ Vigna. 2013. Steal This Movie: Automatically Bypassing DRM Protec-
understanding_the_http_live_streaming_architecture tion in Streaming Media Services. In 22nd USENIX Security Symposium
[27] International Federation of the Phonographic Industry. 2018. IFPI (USENIX Security 13). USENIX Association, Washington, D.C., 687–
Global Music Report 2018. https://www.ifpi.org/downloads/GMR2018. 702. https://www.usenix.org/conference/usenixsecurity13/technical-
pdf sessions/paper/wang_ruoyu
13
[47] Wikipedia. 2019. Analog Hole. Retrieved October 4, Adaptive_Streaming_over_HTTP
2020 from https://en.wikipedia.org/wiki/Analog_hole#:~: [49] Wikipedia. 2019. Time Based One Time Passwords. Retrieved October
text=The%20analog%20hole%20(also%20known,ultimately% 4, 2020 from https://en.wikipedia.org/wiki/Time-based_One-time_
20reproduced%20using%20analog%20means. Password_algorithm
[48] Wikipedia. 2019. Dynamic Adaptive Streaming over HTTP. Re-
trieved October 4, 2020 from https://en.wikipedia.org/wiki/Dynamic_
14