<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by kr-b on Medium]]></title>
        <description><![CDATA[Stories by kr-b on Medium]]></description>
        <link>https://medium.com/@kr_b?source=rss-cff027ec06fc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*HCKfA52j8IRECuJAa1o7Ig.png</url>
            <title>Stories by kr-b on Medium</title>
            <link>https://medium.com/@kr_b?source=rss-cff027ec06fc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:19:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kr_b/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bestiefy — IDOR Galore]]></title>
            <link>https://medium.com/@kr_b/bestiefy-idor-vulnerabilities-fba837b9fcf6?source=rss-cff027ec06fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/fba837b9fcf6</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[exploit]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[idor]]></category>
            <dc:creator><![CDATA[kr-b]]></dc:creator>
            <pubDate>Tue, 21 Apr 2020 10:01:18 GMT</pubDate>
            <atom:updated>2020-04-21T10:06:49.612Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<p>Bestiefy — IDOR Galore</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*6y_WCHYBpaHBhgbIQGviDg.png" /><figcaption><a href="https://bestiefy.com/">https://bestiefy.com</a> — Web app for creating simple 10 question quizzes</figcaption></figure><h3>Bestiefy</h3><p>Bestiefy is a web app where users create short 10 question quizzes with questions about themselves, these can be shared easily with a short url like this <a href="https://bestiefy.com/q?=zUTXl&amp;nbsp">https://bestiefy.com/q?=abc12</a>.<br>Results to a quiz are stored in a leaderboard that anyone can view, but only the quiz creator can see the exact answers provided by answerers .</p><h3>Discovery</h3><p>So I saw a few people posting these links on their Snapchat stories to this new web app, and as with any new website I find, I look around for some low hanging fruit. Just looking through the source code and network connections, the first thing I noticed was, when taking a quiz, clicking an answer automatically shows you if it’s correct or not, without making any network requests, this means that all the answers must be stored in the browser. This led me to look at the /api/quizzes endpoint…</p><h3>Vulnerability</h3><p>After looking around at what requests are made to the API, the first thing I noticed was there’s no session, csrf or auth tokens being sent across (apart from a creator ID, which doesn’t matter much, as you’ll see), so anyone could just play around with it. Which is what I did…</p><h3>Exploits</h3><p>There are a few exploits possible with this as a result of the endpoint being completely open to anyone. Here are the ones I could think of.</p><h4>Get all answers to a quiz</h4><p>The first example I can think of is the first issue I found when the answers to questions must have been stored in the browser before being submitted, so I found the endpoint related to this. The following request will return all questions and their answers (and other info) of the quiz in JSON format:</p><pre>GET <a href="https://bestiebackend.herokuapp.com/api/quizzes/%7Bquid">https://bestiebackend.herokuapp.com/api/quizzes/{quid_id}</a></pre><h4>Add custom leaderboard entry</h4><p>The endpoint for submitting quiz results is also unprotected, so arbitrary entries can be input into the leaderboard, bypassing the web page filters. This can be done with the following request:</p><pre>PATCH <a href="https://bestiebackend.herokuapp.com/api/quizzes/%7Bquid_id%7D">https://bestiebackend.herokuapp.com/api/quizzes/{quid_id}</a><br>{<br>    &quot;answerers&quot;: {<br>        &quot;uid&quot;: str,<br>        &quot;name&quot;: str,<br>        &quot;score&quot;: int<br>    }<br>}</pre><p>The value supplied for uid doesn’t matter at all, can be a random string. The name value can also be anything, it bypasses the 15 character limit on the web page. The score field can be any integer value, even above 10…</p><h4>Completely replace quiz</h4><p>The worst one I could think of is completely replacing the contents of a quiz. I tried doing this by repeating the same request used to make a quiz and tweaking the qid and the creator_id values but no luck. After a little while of looking around I noticed you can delete your own quiz, so I checked, and yes of course there’s an IDOR. So you can delete any quiz with the following request:</p><pre>DELETE /api/quizzes/{quiz_id}</pre><p>Now, to replace a quiz. I remembered when I was playing around with replacing quizzes using the API endpoint to create a quiz, that I couldn’t actually replace an existing one, but I could specify any other quiz id and it would work. So you can then chain these two together to completely replace a quiz’s contents by first deleting it and then creating one with the same id using this request:</p><pre>POST /api/quizzes<br>{<br>  &quot;qid&quot;: &quot;{quiz_id}&quot;,<br>  &quot;name&quot;: &quot;quiz name&quot;,<br>  &quot;questions&quot;: [<br>    {<br>      &quot;question&quot;: &quot;question&quot;,<br>      &quot;options&quot;: [<br>        &quot;answer0&quot;,<br>        &quot;answer1&quot;<br>      ],<br>      &quot;color&quot;: 0,<br>      &quot;answer&quot;: 0<br>    }<br>    ...<br>  ],<br>  &quot;langloc&quot;: &quot;EU-EN&quot;,<br>  &quot;creator&quot;: &quot;whatever&quot;<br>}</pre><h3>Fix</h3><p>After I emailed the developers a couple of times, getting no response, I checked the website once more before sending another email, and I noticed an access denied error when trying to make a request to the API. This is due to a new Authorization: Bearer {token} header. So i had a quick look to see what code was creating that token</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e00a63a7554c41dba73ec6c6eac52a6/href">https://medium.com/media/9e00a63a7554c41dba73ec6c6eac52a6/href</a></iframe><p>So this must all be done on the client side, so I just needed to find how the j variable was initialized so maybe I can recreate it.</p><p>I found a j.a.initializeApp() with an API key and all other informaiton needed to create your own token. This then can be done with a simple POST request to:<br><a href="https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=[API_KEY]">https://identitytoolkit.googleapis.com/v1/accounts:signUp?key={api_key}</a><br>And the returned idToken can then be put in the Authorization header.</p><h3>Extra stuff</h3><p>As I did with my <a href="https://medium.com/@kristian.balog/netflix-party-simple-xss-ec92ed1d7e18">Netflix Party exploit</a>, I created a little python script to automate all these hacks just as a fun little project:<br><a href="https://github.com/kr-b/bestiefy_exploit">https://github.com/kr-b/bestiefy_exploit</a></p><h3>Disclaimer</h3><p>I have tried to reach out to the developers, telling them about this vulnerability and possible fix ideas, but got no response.. So I’m just posting it for everyone to play around with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fba837b9fcf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Netflix Party — XSS Vulnerabilities]]></title>
            <link>https://medium.com/@kr_b/netflix-party-simple-xss-ec92ed1d7e18?source=rss-cff027ec06fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec92ed1d7e18</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[exploit]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[netflix]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[kr-b]]></dc:creator>
            <pubDate>Tue, 14 Apr 2020 19:07:16 GMT</pubDate>
            <atom:updated>2022-09-04T09:53:07.862Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>Netflix Party — XSS Vulnerabilities</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*SYx4Dc5kE23G-ceEM9Ro0w.jpeg" /><figcaption><a href="https://netflixparty.com/">https://netflixparty.com</a> Chrome extension that lets you watch Netflix shows and movies with your friends.</figcaption></figure><h3>User nickname</h3><h4>Discovery</h4><p>One late night playing some World of Warcraft, my friend and I decided we wanted to watch a Netflix show together, so we went ahead and installed the new <a href="http://netflixparty.com/">Netflix Party</a> Chrome add-on that is all over the news and social media. We start up a party, and out of curiosity I start looking around to see what we can do with this, and I spot a set user nickname field.. So just as a shot in the dark I thought why not just try it? I set my name as</p><pre>&lt;script&gt;alert(1)&lt;/script&gt;</pre><p>I get nothing…</p><p>Then I pause the video and a popup appears! Whenever I paused/played the video, sent a message, joined or left a party, it would write my nickname to the chat bar on the right and execute the JavaScript on all members of the party.</p><h4>Vulnerability</h4><p>After looking around at the JavaScript of the extension, I spot the vulnerable code in the addMessage() function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e15fffafa0210c8f901260ca40004448/href">https://medium.com/media/e15fffafa0210c8f901260ca40004448/href</a></iframe><p>The developers were clever enough to escape the input string for messagevariable however, the userNickname variable was inserted into the HTML without any filtering, thus creating the XSS vulnerability as any HTML tags will be parsed by the browser.</p><h4>Exploits</h4><p>An XSS vulnerability allows an attacker to inject HTML and also execute arbitrary JavaScript. Here are a few examples of possible attacks I could think of.</p><p><strong>Change chat history<br></strong>Starting with a fun, harmless one. You can change the messages and usernames of all the party member with the below payload by setting it as your nickname.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5bd3fc6d3f923755344d76ed41f8a37/href">https://medium.com/media/b5bd3fc6d3f923755344d76ed41f8a37/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*k108KTtJoenK7HxQScPQHA.png" /><figcaption>Users exchange messages (just me right now 😢 very lonely)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*ug4nS7JYPESjKA_2cubCxw.png" /><figcaption>After changing nickname to payload, all the messages are changed</figcaption></figure><p><strong>Convincing phishing attack</strong><br>This can also lead to a more severe attack. By setting your nickname to the below payload, a full screen iframe will be created on the page, covering it, containing the attacker’s webpage which can contain a fake Netflix login page saying for example “Your session has expired, Please Login again”, the credentials will then get sent to the attacker. All this will happen without the victims ever leaving netflix.com.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6361e2c573631df9f5fb5d0a83533821/href">https://medium.com/media/6361e2c573631df9f5fb5d0a83533821/href</a></iframe><h4>Fix</h4><p>I reported the vulnerability to the developers, after a couple days with no response I chased them up and they fixed it within 1 week.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b9c6f2df73b21e2071602e73e601d43/href">https://medium.com/media/1b9c6f2df73b21e2071602e73e601d43/href</a></iframe><h3>XSS Vulnerability — User Icon</h3><h4>Discovery</h4><p>After reviewing the fix for the previous bug, I stumbled upon something else, that I’m surprised I didn’t notice before, maybe I was too preoccupied playing with the first thing I found (good tip, look for the same vulnerability). There was another use input field which I forgot about, the user icon.</p><h4>Vulnerability</h4><p>Users can’t change their icons by uploading files however, they choose an icon from a list of files stored locally by the extension. This code below then prints that to the page</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b804f718bbfe199d1744997b68e79c35/href">https://medium.com/media/b804f718bbfe199d1744997b68e79c35/href</a></iframe><p>This value is created with chrome.runtime.getURL(&#39;img/&#39; + newicon) and newIcon can’t be edited directly from the extension, but the value is stored in and fetched from Chrome’s local storage, which can be edited!</p><p>The $userIcon variable is not filtered, so a simple payload like this would work:</p><pre>x&quot; onerror=alert(1)<br>// which turns into<br>&lt;img src=&quot;chrome-extension://.../img/x&quot; onerror=&quot;alert(1)&quot;&gt;<br>// this can be stored by (while in context of NetflixParty)<br>chrome.storage.local.set({&quot;userIcon&quot;: &#39;x&quot; onerror=alert(1)&#39;});</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*KMNCgb2X4ajn6htJSZ8QLQ.png" /><figcaption>User can then join any party or have members join their party, and the JavaScript will be executed instantly</figcaption></figure><h4>Exploits</h4><p>The exploits possible with this are exactly the same as the previous examples but they just need to be tweaked a little bit and not be within &lt;script&gt; tags but part of the onerror function.</p><h4>Fix</h4><p>I then reported this bug, and chased them up a couple times over a few weeks but still no response. So I thought giving this to the hacker community might make them notice :\</p><h3>Conclusion</h3><p>As this is a very trending and popular extension, with it being promoted by big media outlets and at time of writing, has over 8 million downloads, it’s quite important to also consider the security aspects when building such an application. Although the vulnerability here doesn’t impact the developer’s assets such as their own servers or any stored information on their side, this does put their users at risk</p><h3>Extra Info</h3><p>Just out of curiosity and wanting to practice some programming, I reverse engineered the application and wrote a full exploit tool for this in Python as the application is using unprotected/unauthenticated web sockets (another vulnerability for another time) anyone that has the details of a Netflix Party (npSessionId, npServerId) can talk to the server and interact with it. This means that an attacker can exploit the above mentioned XSS without even needing a Netflix account, they just join a session by providing the payload in the JSON parameter of the request.</p><p>The code is very messy sorry<br><a href="https://github.com/kr-b/netflixparty_exploit">https://github.com/kr-b/netflixparty_exploit</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec92ed1d7e18" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>