<?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 Matt Metzger on Medium]]></title>
        <description><![CDATA[Stories by Matt Metzger on Medium]]></description>
        <link>https://medium.com/@AlmostWhiteHat?source=rss-a2dd10694bf5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7hsVbrwfuCNOILi8.jpeg</url>
            <title>Stories by Matt Metzger on Medium</title>
            <link>https://medium.com/@AlmostWhiteHat?source=rss-a2dd10694bf5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 02:23:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@AlmostWhiteHat/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[GTFO CTF]]></title>
            <link>https://medium.com/@AlmostWhiteHat/gtfo-ctf-9186b8f4e743?source=rss-a2dd10694bf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9186b8f4e743</guid>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[crypto]]></category>
            <dc:creator><![CDATA[Matt Metzger]]></dc:creator>
            <pubDate>Wed, 18 Apr 2018 03:26:36 GMT</pubDate>
            <atom:updated>2021-07-15T20:48:33.875Z</atom:updated>
            <content:encoded><![CDATA[<p>After being at my last job for almost three years, it was hard to walk away from such an awesome group of engineers. I wanted to leave them something interesting — so I secretly built a Capture The Flag which kicked off after my last day ended.</p><p>The only thing I told the team is that there’s a ~$200 prize waiting for the first person to finish a CTF that I had built, and eventually they would find out how to start it.</p><p>With permission from the CTO (thanks <a href="https://medium.com/u/ae2c5d4e3041">Aaron Higbee</a>!) my goal was to build something that required spelunking through our codebases, applications, and maybe learning something new along the way.</p><h3>The Starting Line</h3><p>To kick off the whole process, I scheduled a Cofense PhishMe scenario to deliver to the engineers after my company email account had been deactivated. I made the email appear to come from my corporate email address (my account was deactivated by this point.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14Plv6G6RiTGauF68dO9mg.png" /></figure><p>I built this as a <em>Double Barrel Scenario</em>, which means after the phishing email (above) delivered, it waited a predetermined amount of time, then delivered a followup <em>lure</em>. I built the lure to appear as if it came from the same email address. I wanted to be sure people didn’t miss the start of the CTF, so I tipped them off in the lure:</p><blockquote>Wait nevermind. My email isn’t working, that was just a phishing email. Or maybe it was the start of the CTF?</blockquote><p>By this point, hopefully everyone understood the first email was the lead-in to the CTF they were waiting for.</p><p>To get started, they had to go back and click the dinosaur — which took them to the <em>education</em> for the scenario. The education was just a trollface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*cGVGV_cjvscfDN2SS1iR6g.png" /></figure><p>Viewing the source for the education told them they were on the right track.</p><pre>&lt;body&gt;<br>  &lt;!-- You&#39;re on the right track! --&gt;<br>  &lt;img alt=&quot;Could it be a clue?&quot; src=&quot;<a href="http://nottherealdomain.com/check_out_index2.html.jpg">http://nottherealdomain.com/check_out_index2.html.jpg</a>&quot; style=&quot;height: 100%;&quot;&gt;<br>&lt;/body&gt;</pre><p>The image was hotlinked from an external site, with the name <strong>check_out_index2.html.jpg</strong> — leading users to visit <strong>index2.html</strong> at the host.</p><p>A handful of people missed that clue and tried visiting the root of the domain, which clued them into going back and paying better attention:</p><blockquote>Nope. Nothing here. Maybe you need more Education.</blockquote><p>Education being capitalized here was an extra clue — the content they were viewing comes from the Education rails model. Visiting <strong>index2.html</strong> finally brought users to the start of the CTF:</p><pre>You found the beginning of the CTF!</pre><pre>Your goal is to keep finding tokens until you reach the end. Each time you find a token, navigate to /TOKEN.html on this domain for a clue to the next token.</pre><pre>Keep track of how you found each token - you&#39;ll need to submit a writeup to claim the prize. Please don&#39;t try to brute force them!</pre><pre>Most of the tokens will look like a UUID. The first one is <strong>f9f69912-6347-4c69-94e7-b1e742c9c6c4</strong> - go ahead and try it when you&#39;re ready to get started.</pre><p>The first token is right there, but a surprising number of people still tried visiting /TOKEN.html first, which would give them another nudge.</p><blockquote>Woah there. Slow down. Go back and read the whole thing, alright? Your next token is not TOKEN.</blockquote><p><strong>f9f69912–6347–4c69–94e7-b1e742c9c6c4.html </strong>takes us to Stage 1.</p><h3>Stage 1</h3><blockquote>You made it to <strong>Stage 1</strong> already. Go you!</blockquote><blockquote>Hey, remember that dinosaur? Now that I think about it, I am pretty sure it was a <strong>stegano</strong>saurus. You can tell by its <strong>tail</strong>. If you were hungry, you could probably take <strong>56 bytes</strong> out of that thing.</blockquote><p>This clue leads users to find that the dinosaur picture has some sort of <a href="https://en.wikipedia.org/wiki/Steganography"><strong>Stegano</strong>graphy</a>. Saving the image from the email and extracting the <strong>tail</strong>ing <strong>56 bytes</strong> yields the next token.</p><pre>$ tail -c 56 stegosaurus.jpg<br>Your next token is d4138880-918b-4300-ba61-b21453a3e4f8</pre><p><strong>d4138880–918b-4300-ba61-b21453a3e4f8.html</strong> leads us to Stage 2</p><h3>Stage 2</h3><blockquote>You made it to <strong>Stage 2</strong>. You’re almost there! Actually… you have a long way to go.</blockquote><blockquote>I thought about being nice and just giving you the next token, but I broke it somehow. Here it is: 6s3ss094–32r6–450r-o0q2–1180618rn2q1</blockquote><p>If users tried that UUID as the next token, they were presented with a reminder that the token is broken:</p><blockquote>I said that token was broken. Why did you try it anyway? Go back and try again.</blockquote><p>Going back and viewing the source, we see a JavaScript function named <strong>fixTheBrokenToken </strong>(a simple ROT13).</p><pre>&lt;script&gt;<br>  function fixTheBrokenToken(s) {<br>    return (s ? s : this).split(&#39;&#39;).map(function(_)<br>      {<br>        if (!_.match(/[A-Za-z]/)) return _;<br>        c = Math.floor(_.charCodeAt(0) / 97);<br>        k = (_.toLowerCase().charCodeAt(0) - 83) % 26 || 26;<br>        return String.fromCharCode(k + ((c == 0) ? 64 : 96));<br>      }).join(&#39;&#39;);<br>  }<br>&lt;/script&gt;</pre><p>Passing our broken token to the function fixes it for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*YPzcQJQaqN3z7YpU2DcgBQ.png" /></figure><p>6f3ff094–32e6–450e-b0d2–1180618ea2d1.html leads us to Stage 3.</p><h3>Stage 3</h3><blockquote>You made it to <strong>Stage 3</strong>. Impressive, I guess.</blockquote><blockquote>I’m sorry to disappoint you, but the next token is not a UUID. It’s some other interesting string. I could only remember the beginning of it “8342lA” — you’ll have to find the rest. Good luck <strong>landing</strong> on the next stage!</blockquote><p>The clue here lead to grepping the codebase for our <strong>landing</strong> application to complete the rest of the string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3pjgpYEaltGEEUtopRKe8g.png" /></figure><p>8342lAS3KIH425DFJE39.html takes us to Stage 4</p><h3>Stage 4</h3><blockquote>You made it to <strong>Stage 4</strong>. Not bad. Not great either, but not bad.</blockquote><blockquote>I left the next token in Slack. I tried to put it in <strong>#7e47db2037c937d77f3b38ed47c868bc</strong> but it turns out that is too long for a channel name. I guess I’ll have to find some other name for the channel.</blockquote><p>This also came with a picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*6IEcDZoC36degwcWufgitA.png" /></figure><p>The clue lead users to search rainbow tables (or google, because who needs rainbow tables any more?) for 7e47db2037c937d77f3b38ed47c868bc — discovering that it is an MD5 hash of <strong>happyeaster</strong></p><p>Upon joining the #happyeaster slack channel, users would see that I had pinned the next token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*XwEAmXqTrvPhliebsUstRw.png" /></figure><p>eda2c850-e5b0–426c-b067-b0d77280207c.html takes us to Stage 5</p><h3><strong>Stage 5</strong></h3><blockquote>You made it to <strong>Stage 5</strong>?! Maybe I should have made this harder.</blockquote><blockquote>You’re going to have to do a little work to get the next token. It’s a thing_env Terraform workspace name in Thing Cloud Resources.</blockquote><p>To find this token, users had to look at the list of <a href="https://www.terraform.io/docs/state/workspaces.html">Terraform Workspaces</a> for a specific terraform configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_q2trkfw-0MGh1q7oOLH_w.png" /></figure><p>72b58724-bbef-4ea9–9c6b-4ecc5f2257fb.html takes us to Stage 6</p><h3>Stage 6</h3><blockquote>You made it to <strong>Stage 36</strong> of 43. Actually you only made it to 6, and I dont know how many there are.</blockquote><blockquote>Remember when you started this whole thing from a phishing email, and then you got a lure? Or maybe I have that backwards…. either way, one of those might have your next token…. or maybe I got that backwards too…</blockquote><p>This sent users back to the original emails they received when they started. Viewing the source of the lure email yields a token hidden in an HTML comment.</p><pre>&lt;!--<br>  The token is a545103f-8aba-4942-82c9-14059a67d144<br>--&gt;Wait nevermind. My email isn&#39;t working, that was just a phishing email. Or maybe it was the start of the CTF?</pre><p>If users tried to use that token as-is, they were presented with an error:</p><blockquote>You didn’t quite get that right. Go back and read the clue again.</blockquote><p>The clue alluded to the fact that maybe the token was backwards too. Reversing the token yielded 441d76a95041–9c28–2494-aba8-f301545a</p><p>441d76a95041–9c28–2494-aba8-f301545a.html takes us to Stage 7</p><h3>Stage 7</h3><blockquote>Yay, you made it! Not all the way to the end, but <strong>Stage 7</strong> is pretty impressive.</blockquote><blockquote>Where did the phishing emails even come from? Maybe there’s a <strong>description</strong> that would help you find the next token…</blockquote><p>This clue leads users to log into the PhishMe application where the emails came from. Then they had to find the scenario I launched these emails from, which took some digging because I launched it under a fake company, and flagged it as a test scenario so it wouldn’t show on the default dashboard views. Once they found it, they had to look at the description:</p><blockquote>Hey, you found me! The next token is: d0b8503a-52c7–4ff8-a3d6-fd211505c6ad</blockquote><p>d0b8503a-52c7–4ff8-a3d6-fd211505c6ad.html takes us to Stage 8</p><h3>Stage 8</h3><blockquote>Now that you’ve made it to <strong>Stage 8</strong> you probably wonder how many more stages there are. Me too.</blockquote><blockquote>One time there was a Great Jira Fire. I still remember the first ticket I created after we got a new Jira instance.</blockquote><p>A couple years ago, there was a hardware failure which took down Jira for some time — it has been known as the Great Jira Fire ever since. While that was being recovered, we stood up a new instance.</p><p>To find this token, users had to query Jira for the first ticket I created in this new instance. They had to write the JQL from scratch because once an account is deactivated, Jira won’t pre-populate it in dropdowns.</p><pre>reporter = &quot;<a href="/service/mailto:matt.metzger@cofense.com">matt.metzger@phishme.com</a>&quot; ORDER BY createdDate ASC</pre><p>This took them to a ticket that was closed about two years ago — with a recent edit on the comment, adding the token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*JI0pz-l5G0_GMEtRedRMLQ.png" /></figure><p>efa4b6eb-42fd-4b75–85e2-ef067344a564.html takes us to Stage 9</p><h3>Stage 9</h3><blockquote>Hooray, you made it to <strong>Stage 9</strong>.</blockquote><p>The text wasn’t much help here, but there was a picture. Not just any picture — my Slack avatar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*Q8_cFngZgfR6nM6waJDz2w.png" /><figcaption>In case you’re wondering, this is how my daughter draws me.</figcaption></figure><p>The source for this page gave another hint that the answer might be on Slack (my username has been @deprecated for the past few weeks)</p><pre>&lt;p&gt;Hooray, you made it to &lt;b&gt;Stage 9&lt;/b&gt;.&lt;/p&gt;<br>&lt;img alt=&quot;@deprecated&quot; src=&quot;<a href="http://level3communicationsinc.com/slack_profile.jpg">slack_profile.jpg</a>&quot;&gt;</pre><p>Viewing my profile in Slack reveals the next token</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*L99Eyn8rczrRPbc94eI83Q.png" /></figure><p>I was worried that users might find this token early (they did) so I required another transform here. If they tried using this token directly, they were presented with an error.</p><blockquote>Well this is awkward. You came here because you thought you found a token in my slack profile. Did you think it would be that easy?</blockquote><p>To correct the token, there was also an HTML comment on the page</p><pre>&lt;!-- token_when_you_find_it.gsub(/[aeiou]/,&#39;x&#39;) --&gt;</pre><p>After replacing vowels with <strong>x</strong>, they got ended up with the right token. I’m not sure why I put the whole set of vowels in there, since UUIDs are hexadecimal ¯\_(ツ)_/¯</p><p>x46f8x7d-fb1d-4xc6-x3xx-c1x35bd0f15f.html takes us to Stage 10</p><h3>Stage 10</h3><blockquote>Wait, you made it to <strong>Stage 10</strong> just by looking at my profile picture? That’s creepy.</blockquote><blockquote>Anyway, you should probably take a look at the <strong>Company</strong> that launched this whole scenario. Be sure to take <strong>Note</strong>s.</blockquote><p>This was a fairly low hanging stage. Users had already found the Scenario I had launched for this — now they just needed to look at the Company I created to launch it.</p><p>To make this slightly more difficult, I flagged it as a Trial company so it wouldn’t appear on most dashboards.</p><p>The token could be found In the Notes field for that Company.</p><blockquote>Oh man, will you ever stop looking for those tokens? Here’s the next one:<br>a41a75783–32b9–4648-bb53–7f7ce5d433bf</blockquote><p>If users tried to use that as their next token, they were presented with another error. Once again I was afraid that they might stumble upon this before reaching the stage.</p><blockquote>You did something wrong. It’s okay. Go back and look a little bit harder.</blockquote><p>Hidden in the HTML again was a comment, letting users know they need to upcase the token (hooray for case sensitive nginx)</p><pre>&lt;!-- Also, upcase it for good measure. --&gt;</pre><p>A41A75783–32B9–4648-BB53–7F7CE5D433BF.html takes us to Stage 11</p><h3>Stage 11</h3><blockquote>That one was tricky, but you made it to <strong>Stage 11</strong>!</blockquote><blockquote>VGhlIG5leHQgdG9rZW4gaXM6IGNjYjAzODRmLWU4MGUtNDMzNi1iMjkzLWNmMzgwOGVmYjk4MQ==</blockquote><p>This was another easy one — it’s just a base64 encoded string. Decoding it yields the token.</p><pre>The next token is: ccb0384f-e80e-4336-b293-cf3808efb981</pre><p>ccb0384f-e80e-4336-b293-cf3808efb981.html leads us to Stage 12</p><h3>Stage 12</h3><blockquote>You figured that one out too? Good job on making it to <strong>Stage 12</strong></blockquote><blockquote>Your next token is the SHA of when we <strong>Added Trololo guy</strong> to mgmt.</blockquote><p><strong>Mgmt</strong> is another one of our application repositories. A simple git search finds the commit we are looking for. I never did check to see what Trololo guy is, I wonder if he’s still around.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*x1mxx_wy8f-XMV4k5JEYOA.png" /></figure><p>9d78bbdf9c50821d07533d85239cc4c415d24571.html takes us to Stage 13</p><h3>Stage 13</h3><blockquote>You made it to <strong>Stage 13</strong>. You should stop to take a moment and pat yourself on the back.</blockquote><blockquote>Have you ever sat outside and spent the day <strong>cloud watch</strong>ing?</blockquote><blockquote>There sure are a lot of them… you might want to watch them from a <strong>stage</strong>. I wonder if any of them will ever <strong>land</strong>?</blockquote><blockquote>If you were watching them between <strong>29/3/2018</strong> and <strong>30/3/2018</strong> you might have seen your <strong>level13token</strong></blockquote><p>This one had a whole bunch of clues. Users had to search the <strong>cloudwatch</strong> logs from the <strong>staging</strong> instance of our <strong>landing</strong> application, looking for the <strong>level13token </strong>keyword, between those two dates. When they did that, they would see HTTP requests that I made with the token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iXNrYQP24RdutM5-KxtY3A.png" /></figure><p>Parsing the UUID out of that request yields our next token.</p><p>b76d2743-f9b4–44a1–853e-522450ba37d1.html takes us to Stage 14</p><h3>Stage 14</h3><blockquote>That one probably took some work, but you did it! You made it to <strong>Stage 14</strong></blockquote><blockquote>You know what they say… “Give a bot a fish and it <strong>score</strong>s for a day, teach a phishbot the level14token and it gives it away.” Or something like that.</blockquote><p>One of our Slack bots is named <strong>phishbot</strong>. It has the common PlusPlus / Karma script (ie. <strong>@user++ for being awesome</strong>) and you can retrieve scores with the <strong>score</strong> command.</p><p>It doesn’t limit you to incrementing / decrementing scores for slack users, so prior to launching the CTF, I privately messaged it to increment the score for <strong>level14token</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ij0tPXnKa8CQIQnGam7x_Q.png" /></figure><p>When a user messaged the bot <strong>score level14token</strong> to get the score, they would see the token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*J7U3WQEW2R_JILD1_TgjPg.png" /><figcaption>I don’t know why the bot talks about raisins.</figcaption></figure><p>52a6ed56–5575–4656-aee3-d50a84031f22.html leads to Stage 15</p><h3>Stage 15</h3><blockquote>You made it to <strong>Stage 15</strong>! Yay!</blockquote><blockquote>Did you know there’s two halves to a <strong>brick</strong>? If you ask nicely, each half might give you half of the next token.</blockquote><p>Our team has two engineering managers — Brian and Rick. Or <strong>Brick</strong>, if you want to address them together. I gave Brian and Rick a heads up that people might be asking for tokens (thanks for playing along, Brian and Rick!). Each one of them received half of the token to give out.</p><ul><li>Rick had <strong>85-b92a-06d35358a095</strong></li><li>Brian had <strong>662c19ef-c71a-48</strong></li></ul><p>Putting them together yields the next token.</p><p>662c19ef-c71a-4885-b92a-06d35358a095.html leads to Stage 16</p><h3>Stage 16</h3><blockquote>Good job, you got the brick tokens and made it to <strong>Stage 16</strong>!</blockquote><blockquote>My <strong>robot</strong> name is 31115c3b-d3d0–44ad-ace5–42165f0a0f91. I’m sad because I am Disallowed from seeing the next stage.</blockquote><p>If users tried using the UUID in the clue as a token, they were given an error.</p><blockquote>Try harder, agent.</blockquote><p>To find the token, users had to look at the domain’s <strong>robot</strong>s.txt file. It contained hundreds of directives, all with random UUIDs.</p><pre>[about 100 directives truncated]</pre><pre>...</pre><pre>User-agent: c9b936b7-243a-4dac-a705-c949f97bfa9b<br>Disallow:  5b97f687-7657-4f22-a87e-82996a32f1bd.html</pre><pre>User-agent: 18eaaf58-b5ea-4b62-8ee8-04c3efd8d59e<br>Disallow:  cc057112-2cb0-4eb3-a707-1dd5d270a22e.html</pre><pre>User-agent: 31115c3b-d3d0-44ad-ace5-42165f0a0f91<br>Disallow:  2ba43e40-b053-4314-ba19-57942a361631.html</pre><pre>User-agent: e5b5a996-ebbb-4bb4-a83d-f42ee7c9b09b<br>Disallow:  05fdd41b-bdc6-4480-bca6-a8dff5f217df.html</pre><pre>User-agent: 7b28988e-1d1a-44bf-910f-28dd1d4e0aab<br>Disallow:  f08e562b-d157-49f6-8361-337e694468d8.html</pre><pre>...</pre><pre>[about 100 directives truncated]</pre><p>One directive is for the 31115c3b-d3d0–44ad-ace5–42165f0a0f91 useragent — and it disallowed access to the 804d6a5f-fcce-43d3-b706–84909760bc30.html</p><p>804d6a5f-fcce-43d3-b706–84909760bc30.html leads to Stage 17</p><h3>Stage 17</h3><blockquote>Congratulations, you’re not a robot! You made it to <strong>Stage 17</strong>. Maybe I made this too easy…</blockquote><p>This one also had two buttons and one picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6dilrbuRvgdiA6nxIKHoQ.png" /></figure><p>The source for it was not a lot of help</p><pre>&lt;p&gt;Congratulations, you&#39;re not a robot! You made it to &lt;b&gt;Stage 17&lt;/b&gt;. Maybe I made this too easy...&lt;/p&gt;<br>&lt;script&gt;<br>function eatCookies() {<br>  alert(&#39;Who is this guy? I bet if you asked him, he could give you a sequence of stages to follow and come back.&#39;);<br>}</pre><pre>function maybeYouDidItRight() {<br>  if (document.cookie.length == 36) {<br>    alert(&#39;Your token might be &#39; + document.cookie);<br>  } else {<br>    alert(&#39;You probably did something wrong.&#39;);<br>  }<br>}<br>&lt;/script&gt;<br>&lt;p&gt;&lt;button onclick=&quot;eatCookies()&quot;&gt;Help.&lt;/button&gt;&lt;/p&gt;<br>&lt;p&gt;&lt;button onclick=&quot;maybeYouDidItRight()&quot;&gt;I think I figured it out?&lt;/button&gt;&lt;/p&gt;<br>&lt;p&gt;i&lt;img src=&quot;who_is_this_guy.jpg&quot;&gt;&lt;/p&gt;</pre><p>This one was tricky for a few reasons. If users landed here after the previous step, their document.cookie contained a 36 character UUID. When they clicked the “I think I figured it out?” button, they would get an alert:</p><blockquote>Your token might be ec9be1b4–56bd-41c1–9be7-a75dcfcad9e8</blockquote><p>When users tried that as their next token, they would get an error message</p><blockquote>Nope, that’s not the right token. Did you really think I would just put it in the cookie like that?</blockquote><p>The reason that didn’t work is because Stage 16 (immediately before this one) set document.cookie to a <em>fake</em> token:</p><pre>&lt;script&gt;document.cookie = &#39;ec9be1b4–56bd-41c1–9be7-a75dcfcad9e8&#39;;&lt;/script&gt;</pre><p>Clicking the <strong>Help</strong> button gave users a different alert</p><blockquote>Who is this guy? I bet if you asked him, he could give you a sequence of stages to follow and come back.</blockquote><p>Users had to perform a reverse image search (ie. via Google Images) to discover that this guy was Fibonacci (or I guess they could just know that?)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HE0HRDL9ypvUhjUg4kMWsg.png" /></figure><p>Once users figured out who it was, they would then have to visit each of the previous stages exactly following the Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13</p><p>I made it so they <em>had</em> to visit Stage 1 twice in a row by having it initialize <strong>document.cookie</strong> with an incorrect value on the first request, then conditionally set it to the correct value on the second request.</p><pre>&lt;script&gt;<br>  if (document.cookie == &#39;1fb567d0&#39;) {<br>    document.cookie = &#39;1b6f5241&#39;;<br>  } else {<br>    document.cookie = &#39;1fb567d0&#39;;<br>  }<br>&lt;/script&gt;</pre><p>Note <strong>1b6f5241</strong> is the correct beginning of the token, <strong>1fb567d0</strong> is not.</p><p>After visiting that twice to get the correct start of the token, the next stages in the fibonacci sequence each appended to the existing cookie. 2, 3, 5, 8, and 13 had scripts similar to the following:</p><pre>&lt;script&gt;document.cookie += &#39;-f281&#39;;&lt;/script&gt;</pre><p>Someone spotted these scripts before reaching this stage and <a href="https://twitter.com/cmaggard/status/979811495478546432">thought it was a bug</a>.</p><p>Additionally, visiting stages which were <em>not</em> in the sequence (ie. Stage 4) would cause the whole cookie to be cleared:</p><pre>&lt;script&gt;document.cookie = &#39;&#39;;&lt;/script&gt;</pre><p>After users managed to go through each of those stages in the exact order, building the correct cookie, and then came back to Stage 17, the alert would show them their correct token.</p><blockquote>Your token might be 1b6f5241-f281–4e00–9c82-e1e105dec126</blockquote><p>1b6f5241-f281–4e00–9c82-e1e105dec126.html leads to Stage 18</p><h3>Stage 18</h3><blockquote>You’re seriously almost there now. You made it all the way to <strong>Stage 18</strong>, and theres probably only 20 stages.</blockquote><blockquote>Wouldn’t it be funny if after all this work, the next token is just something I randomly tweeted? But maybe it needs to be downcased.</blockquote><p>I figured after going through all that work, I would make an easy one. I <a href="https://twitter.com/AlmostWhiteHat/status/979567987421339648">tweeted</a> the token for this stage. I tweeted it in uppercase, and specified it needed to be downcased in the clue, just in case anyone saw it on my feed before reaching this stage.</p><p>5d8121a9–1a6c-4909–8626–56557e601253 leads to Stage 19</p><h3>Stage 19</h3><blockquote>I’m sorry. I lied. There’s not really 20 stages. I spent the money on a cake instead. Thanks for playing along!</blockquote><p>And another picture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*n6JDGda9pd35JIhOusBUvg.png" /></figure><p>It turns out I didn’t actually spend that money. The picture was named a108f414–7ecc-42d3-a7c4–301b9ac9bd50.jpg, which looks like another UUID.</p><p>a108f414–7ecc-42d3-a7c4–301b9ac9bd50.html leads to Stage 20</p><h3>Stage 20</h3><p>This was finally the end — nothing more to solve. I gave the users an email address to send their writeup to, so I could send the reward to the first person to complete it.</p><h3>Conclusion</h3><p>Overall I had a lot of fun building this — I’ve never built a CTF before, but in the future I will probably give myself a little more than three days to think of the challenges.</p><p><a href="https://twitter.com/cmaggard">One of the developers</a> made it through these in exactly two hours — I was hoping it would at least take people through the weekend to solve everything. Next time I will probably build one or two challenges that are time gates (ie. adding yourself to an email distribution list which receives the next clue after 24 hours) to give others a chance to catch up.</p><p><em>P.S. Most of the challenges are no longer functional, and obviously required internal access — so please don’t bother trying to poke around and solve them.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9186b8f4e743" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Samsung Leaking Customer Information]]></title>
            <link>https://medium.com/hackernoon/samsung-leaking-customer-information-9b7e2dcb006d?source=rss-a2dd10694bf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b7e2dcb006d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[samsung]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Matt Metzger]]></dc:creator>
            <pubDate>Wed, 15 Mar 2017 21:52:09 GMT</pubDate>
            <atom:updated>2019-04-27T05:40:30.474Z</atom:updated>
            <content:encoded><![CDATA[<p>About four months ago, I ordered a new TV directly from Samsung’s <a href="http://www.samsung.com/us/">online store</a>. A few days later, I received a tracking link via email.</p><pre>http://www.agsystems.com/listhawb.asp?searchtype=hawb&amp;searchvalue=1138977</pre><h3>Reusing Tracking Numbers</h3><p>When I first received the link, it showed an order that wasn’t my own. I assumed there was some sort of clerical error, but I was too busy at the time to contact Samsung about it. When I checked back later in the day, there were now <em>two</em> orders showing at the link Samsung sent me — my own, and the other order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gn9mf8PtGfMXg3pxk5qBjg.png" /><figcaption>Example tracking results showing multiple orders. Order numbers obscured because these are not my orders — not that it makes much of a difference (you’ll find out why below)</figcaption></figure><p>I was a little concerned by the fact that my tracking number showed two orders, so I contacted Samsung to find out what was going on. I received the following reply.</p><blockquote>I understand you are concerned with your tracking. AGS recycles their tracking numbers every year which is why you see more than one orders under the same tracking number. Your tracking has been updated and is the first listed. We apologize for any inconveniences that may have impacted your experience with Samsung. We at Samsung appreciate your business, and we sincerely hope that this situation doesn’t deter you from continuing to purchase products of the Samsung brand. If you have any other questions or concerns please email me back.</blockquote><p>This already seemed a bit odd — Samsung is telling me not to worry about this, their shipper just happens to reuse tracking numbers annually. These orders were clearly shipped days apart.</p><h3>Leaking Order Information</h3><p>When I clicked one of the HAWB (House Airway Bill) links, it took me to the tracking details for my own order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VjXh5SVY7PbJh79ss-a7dA.png" /><figcaption>There sure is a lot of information about me there…</figcaption></figure><p>This is indeed my order . A <strong>60&quot; SAMSUNG TV</strong> shipping to <strong>Orchard Park, NY</strong>, POD (Proof Of Delivery) <strong>Metzger</strong>. It even has my order number from the Samsung website (<strong>11109231971</strong>). That seems like an awful lot of <a href="https://hackernoon.com/tagged/information">information</a> to expose to an unauthenticated user.</p><p>Wait a minute… weren’t there <em>two</em> links on that page? I went back to the page (which Samsung <em>sent me a link to</em>) and clicked the other HAWB link. Now I’m looking at all of the same order information for someone else’s order. (<em>I’m a little jealous, they ordered a bigger TV.</em>)</p><p>If Samsung sent me a link to view someone else’s order, then surely that guy can also see my order.</p><h3>Enumerable Tracking IDs</h3><p>This was already rather disappointing. All someone needs is the tracking URL that Samsung sent me, and they can see a lot of my order details (and someone else’s order details).</p><p>In some cases, applications use secret URLs for sensitive functions (ie. password reset URLs delivered via email.) This is not one of those cases. My tracking URL was surely delivered to someone else with the same ID — it has already lost any notion of secrecy.</p><p>Even if someone else hadn’t received the same tracking URL, this link still cannot be considered secret. Notice the only special part about the link is a relatively low integer (1138977). That, coupled with the fact that Samsung told me that the shipper “<em>recycles their tracking numbers every year” </em>makes it obvious that these IDs are sequentially assigned.</p><p>All it takes is knowledge of <em>one</em> tracking URL and you can walk through all of the tracking IDs sequentially. With about five minutes of scripting, someone could scrape the data of every Samsung shipment, yielding:</p><ul><li>Orderer’s Last Name</li><li>Orderer’s City</li><li>Item Ordered</li><li>Order Number</li></ul><h3>Exploiting The Data</h3><p>Let’s think about how dangerous it is just to leak these four pieces of information to someone with malicious intent. Since we have a last name and city, a quick internet search would yield possible phone numbers for the orderer.</p><p>Once we have a list of potential phone numbers, we put on our social engineering hat and call each one.</p><pre>Hello, this is Bob from Samsung. Can I please speak with Mr. <strong>Metzger </strong>regarding his recent order for a <strong>60&quot; Samsung TV</strong>.</pre><p>If they say they didn’t order anything, hang up and move on to the next phone number. If it sounds like like they know what we’re talking about, give a little more information so they know this call is legit.</p><pre>Just to make sure I&#39;m looking at the right order - would you mind confirming that your order number is <strong>1138977</strong>?</pre><p>We have our <a href="https://en.wikipedia.org/wiki/Foot-in-the-door_technique">foot in the door</a> and we’ve made it clear that we are legitimately calling from Samsung (surely a scammer wouldn’t know their order number and what they ordered?)</p><p>It’s time to exploit this trust and extract payment details with an offer that can’t be passed up.</p><pre><strong>-&gt; If they ordered a small tv:<br></strong>We&#39;re sorry for the inconvenience - there has been an accident at our shipper&#39;s facility, damaging an entire shipment of <strong>50&quot; TVs</strong>. It will be approximately two weeks before we have more of this model in stock. As a consolation, we would like to offer you an upgrade to a 65&quot; TV - which we currently have in stock - for $49.</pre><pre><strong>-&gt; If they ordered a large tv:</strong><br>We&#39;re sorry for the inconvenience - due to a glitch in our online store, our promotional warranty prices weren&#39;t showing for your model when you made your purchase. Your model is eligible for a 3 Year Accidental Damage Plan for only $29. </pre><pre><strong>-&gt; If they took the bait:</strong><br>Great! Sorry again about the inconvenience. We&#39;ll just need your payment information again - we don&#39;t keep records of it when you order because PCI compliance.</pre><p>You get the idea — it’s seriously easy to turn these four pieces of information into a rather convincing social engineering attack.</p><h3>The Leak Gets Bigger</h3><p>After my TV was delivered, I went back to check the tracking status — hoping that this was just a ephemeral leak while the shipment was en route, disappearing after I received the delivery.</p><p>I found the exact opposite. Not only was the order information still there — but now there was a link to a TIFF file too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rnlkX5cEuHO1CQ4l_y7NQw.png" /><figcaption>Hmm… they added a link to a TIFF file…</figcaption></figure><p>That TIFF file turned out to be a scanned copy of the <em>signed</em> waybill for the delivery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAisgRjOBTzVT4U5ZuvwVw.png" /><figcaption>Oh wow, there’s even more information about me.</figcaption></figure><p>They were already leaking enough information for a social engineering attack — now they’re leaking even more pieces.</p><ul><li>My <em>Full</em> Name</li><li>My <em>Full</em> Address</li><li>My Signature (well, actually my wife’s)</li></ul><h3>Visibility</h3><p>All of this information was obtained directly from a link that Samsung sent to me— but you don’t <em>have</em> to buy something from Samsung to find a link to the tracking system. It turns out Google has already indexed some queries for airway bills.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMgeXPlpdlpcHq4QYCkGng.png" /><figcaption>Note: This method of finding tracking links is much cheaper than buying a TV and waiting for it to ship</figcaption></figure><p>Even if the shipping company gets these removed from Google, it’s still not too difficult to find these items. They have <a href="http://www.agsystems.com/tracking_main.html">a form</a> to search for tracking numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*kxAQ8clg_M9bXOVIXrePCw.png" /><figcaption>This convenient</figcaption></figure><p>The form makes it obvious this should be a seven digit number. Starting with <strong>0000001</strong> takes us to familiar search results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQWHI9EnWGcMH01yS12e1w.png" /></figure><p>At this point, there is no question about it — information in this system is <em>not</em> secret. Links are sent directly to consumers, links are indexed in google, and there is an open form on the website for performing searches.</p><h3>Samsung’s Response</h3><p>I didn’t like the fact that all of this information was freely available to anyone willing to spend a couple minutes to scrape data, so I responded back to Samsung again. I informed them that my personal information was being shared via their shipper’s website. I included descriptions of each piece of information, with direct links to it. I also informed them that the data was easily enumerable because it uses sequential IDs — and I requested that they loop in their information <a href="https://hackernoon.com/tagged/security">security</a> team.</p><p>Two weeks later, I received a response from Samsung:</p><blockquote>I understand you would like this forward to our security team. Your request will need to be taken up with AGS. You will need to remove your information through AGS. We apologize for any inconveniences that may have impacted your experience with Samsung. We at Samsung appreciate your business, and we sincerely hope that this situation doesn’t deter you from continuing to purchase products of the Samsung brand.</blockquote><p>That’s it. Samsung says I need to take it up with their shipper.</p><p>That is not going to happen. I entrusted <em>Samsung</em> with my data, and that is who I hold solely responsible for safeguarding it. If Samsung’s business partner is leaking that information, Samsung needs to remedy the situation.</p><p>As I was writing this up, I was going to redact some of my information (or at least my wife’s signature) but it wouldn’t make much of a difference. Four months after I disclosed this to Samsung, the information is <em>still</em> there for anyone to retrieve. Please don’t try to sell me a warranty for my tv.</p><figure><a href="http://bit.ly/HackernoonFB"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hqOaABQ7XGPT-OYNgiUBg.png" /></a></figure><figure><a href="https://goo.gl/k7XYbx"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vgw1jkA6hgnvwzTsfMlnpg.png" /></a></figure><figure><a href="https://goo.gl/4ofytp"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKBpq1ruUi0FVK2UM_I4tQ.png" /></a></figure><blockquote><a href="http://bit.ly/Hackernoon">Hacker Noon</a> is how hackers start their afternoons. We’re a part of the <a href="http://bit.ly/atAMIatAMI">@AMI</a> family. We are now <a href="http://bit.ly/hackernoonsubmission">accepting submissions</a> and happy to <a href="/service/mailto:partners@amipublications.com">discuss advertising &amp; sponsorship</a> opportunities.</blockquote><blockquote>If you enjoyed this story, we recommend reading our <a href="http://bit.ly/hackernoonlatestt">latest tech stories</a> and <a href="https://hackernoon.com/trending">trending tech stories</a>. Until next time, don’t take the realities of the world for granted!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35tCjoPcvq6LbB3I6Wegqw.jpeg" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b7e2dcb006d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/samsung-leaking-customer-information-9b7e2dcb006d">Samsung Leaking Customer Information</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>