<?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 Nathan Mahdavi on Medium]]></title>
        <description><![CDATA[Stories by Nathan Mahdavi on Medium]]></description>
        <link>https://medium.com/@nathanmahdavi?source=rss-73c2ea093fb4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*aFrft8O1B-HBPU_n.</url>
            <title>Stories by Nathan Mahdavi on Medium</title>
            <link>https://medium.com/@nathanmahdavi?source=rss-73c2ea093fb4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:04:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nathanmahdavi/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[Google “inadvertently stored” plain text passwords of G Suite registrations]]></title>
            <link>https://medium.com/@nathanmahdavi/google-inadvertently-stored-plain-text-passwords-of-g-suite-registrations-bada34b35c8d?source=rss-73c2ea093fb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/bada34b35c8d</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Nathan Mahdavi]]></dc:creator>
            <pubDate>Tue, 21 May 2019 21:45:30 GMT</pubDate>
            <atom:updated>2019-05-21T21:45:30.591Z</atom:updated>
            <content:encoded><![CDATA[<p>G Suite users have who have been affected between the dates of January 13th, 2019 and May 9th, 2019 have been contacted to inform them that their passwords have been logged “unhashed” in Google’s “encrypted systems”.</p><p>The full email can be found below:</p><p>Dear G Suite Administrator,</p><p>We are writing to inform you that between January 13, 2019 and May 9, 2019, an internal system that logged account signup information for diagnostic purposes, inadvertently stored one of your user account passwords in our encrypted systems in an unhashed format. This impacted the user account password provided during the initial account signup process. The log information was retained for 14 days following the signup process, and then was deleted according to our normal retention policies.</p><p>We have reviewed the login information for the account and have found no evidence that the unhashed password was misused.</p><p>The following is the user account impacted in your domain(s):</p><p>[my@email.com]</p><p>Google Planned Action: for your security, starting tomorrow <strong>Wednesday, May 22, 2019 PT</strong> we will force a password change unless it has already been changed prior to that time.</p><p>Our password update methodology is as follows:</p><ul><li>We will terminate the impacted user’s session and prompt the user to change their password at their next login.</li><li>In addition, starting <strong>Wednesday, May 29, 2019 PT</strong> we will reset the password for the user if they have not yet selected a new password or have not had a password reset. This user will need to follow your organization’s password recovery process. However, Super Admins will not be impacted. For information on password recovery options please refer to the following <a href="https://www.google.com/appserve/mkt/p/AFnwnKV1MTGihOspJCdemSUFz_UN4EFdQqFW7hhNZNkRNh5KC5x4pmjI0IlmpjQyviwPfuVe6Yhu-LUm-_sBz6ZOZSKwh3xCzVuLT2sleCo">Help Center Article</a>.</li></ul><p>For further questions please contact <a href="https://www.google.com/appserve/mkt/p/AFnwnKU9iui25cEZyh-YPjLrFeiWpdBbCBX9xlAbKGovr6wFdCRRHbOfXHHbObCMeUd4t-nhuBdx1kcIqbmgCHR5-y_XC-2j4l2nqlC_FV7Mjw">Google Support</a> and reference issue number 133116569.</p><p>Sincerely,</p><p>The G Suite Team</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bada34b35c8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Exploit via BBC News]]></title>
            <link>https://medium.com/@nathanmahdavi/my-first-exploit-via-bbc-news-87e80bf63a9a?source=rss-73c2ea093fb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/87e80bf63a9a</guid>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[bbc]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Nathan Mahdavi]]></dc:creator>
            <pubDate>Fri, 05 Apr 2019 07:38:01 GMT</pubDate>
            <atom:updated>2019-04-05T07:41:37.869Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Disclosure: I worked at the BBC for two years so I have some prior domain knowledge on the network, stack, etc, but only for a specific team. I purposely chose an area of the company I had no knowledge of to make sure I didn’t have a head start from anyone else who might be poking around.</em></p><p>Out of sheer boredom, risk of catching pneumonia over the drab winter weekend and my new religion, teetotalism, I decided I would follow through on one of my personal goals of finding a noteworthy security issue on a highly trafficked or popular website. Out of pure ❤ for the BBC (honestly), I decided I would take a look at their news website. What follows is a short explanation of how I discovered a reflected XSS bug with a little twist.</p><p>I started poking around their public network with help from censys — this allowed me to map out their various environments, get an understanding of the different places they host their services and make notes on various pieces of potentially useful information. You might find it interesting to know that I found some development API’s that were publicly exposed (and potentially susceptible to remote code execution), these were reported separately and are no longer accessible.</p><p>During the initial discovery process, I stumbled upon an ex-BBC employee who had a few gists available online. One of them caught my eye; it contained a custom header:</p><pre>page.customHeaders = {<br>  &#39;X-Candy-OVERRIDE&#39;: &#39;https://api.live.bbc.co.uk/&#39;<br>};</pre><p>The word override got me excited. So I did some more searching in the public BBC-News GitHub account (as this looked like it belonged to the news website based off of the gists around it), this lead me to the <a href="https://i.imgur.com/QYJgdZ2.jpg">following github file</a> (since deleted so here’s a cache) which gives us the following URL to hit:</p><pre><a href="https://www.test.bbc.co.uk/news/uk-23216047">https://www.test.bbc.co.uk/news/uk-23216047</a> \<br>  ?<strong>_x_candy_override</strong>=https://api.test.bbc.co.uk</pre><p>Great! A test environment that allows us to override the endpoint which I assume is used to display the dummy data in the page as removing that param gives us a 404. I span up a local http server and exposed it to the internet through ngrok to see what endpoint was being hit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8GBa0mOjv57W46sbue_DLg.jpeg" /></figure><p>There we go. So we know we need to create an /assets/news/uk-2321607 endpoint, that was the easy bit. I then spent quite a bit of time trying to work out the schema and format that was required by this endpoint, but to no avail.</p><p>As I continued to search for an example response for this magical endpoint I stumbled upon <a href="https://github.com/BBC-News/idt-test/blob/0fd3edf914236ecafef7ed49c092d4ec37f73873/features/support/helpers.rb#L6">another</a> query parameter, _x_smallprox_override. So now our full URL looks like this:</p><pre><a href="https://www.test.bbc.co.uk/news/uk-23216047?">https://www.test.bbc.co.uk/news/uk-23216047?</a> \<br>  ?<strong>_x_candy_override</strong>=https://api.test.bbc.co.uk \<br>  &amp;<strong>_x_smallprox_override</strong>=https://smallprox.vj.test.tools.bbc.co.uk</pre><p>We do the same as before and change the _x_smallprox_override value to be our local server to see what endpoint it’s hitting, and we get back a few requests:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9EfbdO89wbCysKyXJhxcg.jpeg" /></figure><p>I figured I may as well try and hit this new endpoint, although I wasn’t overly optimistic. As it turns out, this new endpoint is open and returns HTML! So we re-create this endpoint locally, dump in some markup, and refresh the BBC’s web page…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5XZTn72-f6Pu5g3ntoZ0og.gif" /></figure><p>Or more dangerously…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecLbS00k7KvB2lSI7timmA.png" /></figure><p>At this point, it’s obvious what we have and I wont lie, I was giddy with excitement at what I was seeing. We can run JS in users browsers and although directly accessing the users auth tokens are not possible to the httpOnly flag on the cookies, I imagine with enough persistence we could hop through another service to get the users details. There <em>is</em> a session.bbc.co.uk sub-domain which can be used to retrieve user details, refresh tokens etc. which we could probably call, although CORS isn’t allowing it. I didn’t really want to dig any further, at this point though, being able to XSS and inject HTML is enough for me to know that it should be reported. Lets be honest though, even if the whole thing was locked down with all of the security measures possible, we could simply add an overlay with a email &amp; password box and get users to simply submit their plain text details to an external server (adding a <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy">CSP</a> <em>should</em> protect against this in modern browsers).</p><p>What was interesting about this XSS exploit was that it was the server fetching and rendered, meaning the browser had no way to know that the javascript it was running was malicious. Additionally, depending on how the web server was doing the rendering, we may have been able further the exploit to include other files from the server, or at a push, remotely running commands on the box.</p><p>Finally, out of pure curiosity, I wanted to try one final thing. We know the web server we’re dealing with is able to call the original api.test.bbc.co.uk sub-domain, so I though I would try using the second query parameter to call our first endpoint in an attempt to work out what the response was for our initial URL. Our final url looked like:</p><pre><a href="https://www.test.bbc.co.uk/news/uk-23216047">https://www.test.bbc.co.uk/news/uk-23216047</a> \<br>  ?<strong>_x_candy_override</strong>=https://api.test.bbc.co.uk \<br>  &amp;<strong>_x_smallprox_override</strong>=https://api.test.bbc.co.uk/asset/news/uk-23216047</pre><p>Obviously, whatever calls the second URL is going to add its path onto the end, so I attempted to add something to escape any further reading of that URL but no luck. I guess I’ll never know what the winning combination was for that initial URL.</p><h3>My takeaways</h3><ol><li>Be careful about things you post online (especially in gists)</li><li>Validate everything, even if it’s just for your test/stage environment.</li><li>In most instances, publicly exposing your test/stage environments is not required, especially if you have code specially designed to run on these environments.</li><li>Implement a CSP, it should block any requests trying to leave your permitted domains.</li><li>Be strict with your CORS headers.</li><li>Avoid writing and shipping code of which the only purpose is to enable testing.</li><li>(this one‘s for me) Don’t stop poking things, it’s how you learn.</li></ol><p>Hopefully this writeup was somewhat educational or interesting. This is the first time I’ve looked into this sort of thing so I welcome constructive feedback.</p><h3>Reward</h3><ul><li>Acknowledgment on <a href="https://www.bbc.com/backstage/security-disclosure-policy/acknowledgements/">https://www.bbc.com/backstage/security-disclosure-policy/acknowledgements/</a></li><li>And this t-shirt:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MHTSOmtEaCa4P7dH__bHLg.jpeg" /></figure><p><strong>Disclosure timeline:</strong></p><ul><li><strong>Reported:</strong> 27 January 2019</li><li><strong>Follow up email to confirm:</strong> 30 January 2019</li><li><strong>Confirmation:</strong> 31 January 2019</li><li><strong>Resolution: </strong>3rd April 2019</li><li><strong>Published: </strong>5th April 2019</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87e80bf63a9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TaskRabbit: How not to handle a data breach.]]></title>
            <link>https://medium.com/@nathanmahdavi/taskrabbit-how-not-to-handle-a-data-breach-4ab62a48f344?source=rss-73c2ea093fb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ab62a48f344</guid>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Nathan Mahdavi]]></dc:creator>
            <pubDate>Sun, 27 Jan 2019 13:23:05 GMT</pubDate>
            <atom:updated>2019-01-27T13:23:05.232Z</atom:updated>
            <content:encoded><![CDATA[<p>Before you read on, you should probably be aware that this article was originally written in June 2018 and only recently published; so whilst the events happen a while ago, the publish date is correct.</p><p>Although not a company a lot of people have heard of, Task Rabbit, owned by Ikea, has been around in one name or another, for ten years. For those who don’t know, <strong>Task Rabbit is a website that allows you to pay “taskers” to carry out various jobs for you</strong>. They operate in 18 American cities and London. Unfortunately I’m unable to find a reliable source for the number of users that are registered with them so cannot supply a number of users they have.</p><p>This month, <strong>I received an email that a </strong><a href="https://www.taskrabbit.co.uk/notice-of-data-breach"><strong>data breach</strong></a><strong> had taken place</strong>. Unknown to me and many other users, this had occurred on the 16th of April 2018;</p><h3>TaskRabbit on Twitter</h3><p>We&#39;re investigating a cybersecurity incident, and our app and site are down while the team works on this. Thank you for your patience while we look into this matter.</p><p>My first knowledge of this was when I noticed an email in my inbox from their CEO, Stacy Brown-Philpot, which had been sent to all users. <strong>Considering I’d never actually <em>used </em>their service I wanted to know more about what had happened to my personal information.</strong></p><p>Whilst their <a href="https://www.taskrabbit.co.uk/press">press</a> section understandably quiet, there was at least a <a href="https://www.taskrabbit.co.uk/notice-of-data-breach">dedicated page</a> which serves to inform users of their service as to what happened; from this, the key takeaway was:</p><blockquote>Your name, username, password, date of birth, and truncated payment card information may have been compromised as a result of this incident.</blockquote><p>It goes on to say,</p><blockquote>If you used the same password on other websites or apps as you did for TaskRabbit, we recommend you change those passwords and monitor your accounts for any suspicious activity.</blockquote><p>When a companies user data is stolen, you can appreciate that it is in their best interest to not give further information as to the nature of the data to ensure they don’t further assist the attackers, or damage their own reputation.</p><p>When looking into this breach, a few issues became clear. <strong>The first of the issues I came across were that nearly a whole month had gone by between the time Task Rabbit first reported their data breach on Twitter to the day that users affected received an email in their inbox.</strong></p><p>As you’ve seen from the quote above, if their recommendation was for their users to change any other accounts that may have shared the same email/password pair, they informed the affected far too late. At that point, how can a user feel confident that that other accounts haven’t already been compromised using the data that had already been taken by the attackers.</p><p><strong>The second issue was when they took the decision to reset ever users passwords, whilst on the surface this sounds like a great idea the execution was not — wiping everyones passwords means users are unable to authenticate with Task Rabbit.</strong> Any email and password combination you enter will give you the same prompt:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*vlCA-2NCUlxGd9_DiRGo6g.gif" /></figure><p>This now means users have <strong>no idea <em>which</em> password they used with Task Rabbit</strong>. This makes the task of knowing if the password was used elsewhere, much harder.</p><p><strong>The third issue is not providing transparency in the way in which their users data was stored (in this instance, hashed).</strong></p><p>Shortly after I received the email from Task Rabbit’s CEO, Stacy Brown-Philpot, I attempted to find out what level of hashing they had used on their users data. I searched through all of the information I could find on the breach but found nothing. I then decided to email their support (I did try to phone, but more on that later):</p><blockquote>Hey,</blockquote><blockquote>What type of hashing did you use on the passwords that you stored, please let me know now that that hash is in the wild.</blockquote><blockquote>Nathan</blockquote><p>Their response:</p><blockquote>Hi Mail,</blockquote><blockquote>Thank you for contacting about TaskRabbit, and I am truly sorry for any worry.</blockquote><blockquote>We have an outside forensics team working diligently to determine what information may have been compromised, and will notify every affected individual. As an immediate precaution, Taskers and Clients should monitor their accounts for any suspicious activity. Also, anyone who uses their TaskRabbit password on other websites and apps should change them.</blockquote><blockquote>Thank you for your patience and understanding while we investigate this issue.<br>Have an amazing day!</blockquote><blockquote>Best Regards,<br>Daniel</blockquote><p>My reply:</p><blockquote>You already know that users passwords were compromised — your CEO has already said that, what I want to know is what level of hashing / encryption did these passwords have, this wasn’t mentioned in the press release.</blockquote><blockquote>Nathan</blockquote><p>Their final response:</p><blockquote>Hi Mail,</blockquote><blockquote>Thank you for contacting TaskRabbit, and I’m sorry but I’m unable to confirm any level of hashing/encryption.</blockquote><blockquote>[…]</blockquote><p>The problem with the above is that nowhere do Task Rabbit‘s CEO or their support agents suggest how secure the lost data was.</p><p>For a simplistic argument, most of us can agree there is a big difference between losing a password that’s hashed with an algorithm that can be quickly broken vs. losing a bcrypt’d (password+ salt).</p><p>The email conversation above left me feeling that Task Rabbit were worried to reveal the extent of the breach, instead of filling me with reassurances.</p><p>The final point I’m going to make is just a pure lack of operational awareness and planning. <strong>Support, or in this case an abundant lack of, is shocking.</strong> Initially when trying to find out information on my personal data, I trawled their support site and <a href="https://support.taskrabbit.com/hc/en-us/articles/204411480-How-To-Contact-TaskRabbit">found</a> a phone number that I was able to call, unfortunately, when calling this number you’re greeted with the following:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttp%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F450167604%26show_artwork%3Dtrue%26secret_token%3Ds-tNUSG&amp;url=https%3A%2F%2Fsoundcloud.com%2Fuser-383329684-458962173%2Ftask-rabbit-phone-support%2Fs-tNUSG&amp;image=http%3A%2F%2Fa1.sndcdn.com%2Fimages%2Ffb_placeholder.png%3F1527236103&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/0727e8345e7ea823e69279f309c7847e/href">https://medium.com/media/0727e8345e7ea823e69279f309c7847e/href</a></iframe><p><em>View a transcript </em><a href="https://gist.githubusercontent.com/scripter-co/62d30a362b4cabe893785c5fffc5c588/raw/f080a1d553ec523b6a908188d96cff7b0a8c246b/gistfile1.txt"><em>here</em></a><em>.</em></p><p>On top of this, the original email from the current CEO, which went out to all Task Rabbit users affected, was signed off with the following:</p><blockquote>If you have questions or concerns, please call Experian on 0800 953 3006 between the hours of 08:00 and 22:00 London time (GMT), Monday — Friday.</blockquote><p>with no other information.</p><p><strong>Days would go by between emails with their support agents</strong>. This alone wouldn’t be too much of an issue had all of their other channels not been closed.</p><p>All of the above, in conclusion, leaves me with the following feelings. Considering Task Rabbits motto is:</p><blockquote>Trust and safety are our top priority. Always have peace of mind.</blockquote><p><strong>I feel like they have handled this situation awfully. Informing users this late after a breach has become a normality, but that doesn’t make it acceptable. This, coupled with providing zero support and transparency to their users has arguably done more damage to their reputation than the breach itself.</strong></p><p>As a final note, the majority reading this will be using a password manager of some description. There will be people saying “you shouldn’t be using the same password for the different account anyways”, “you shouldn’t be able to remember your password” along with a lot of other arguments. Just remember, the majority of people don’t use unique passwords. On top of that, I’m heavily focusing on the password / hashing / support issues that I <em>personally </em>encountered — it doesn’t even touch on the fact that emails, date of births and additional data was lost.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ab62a48f344" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>