<?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"><channel><title><![CDATA[ananay.dev]]></title><description><![CDATA[ananay.dev]]></description><link>https://ananay.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 18:24:54 GMT</lastBuildDate><atom:link href="https://ananay.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Facebook Groups Bug Bounty – 2018]]></title><description><![CDATA[This is my second bug bounty - a bug that I discovered while messing around on a Facebook group. It was my freshman year at ASU, and I was administering this Facebook called "The Great Indian Dream, Class of '23" – a group dedicated to Indian high sc...]]></description><link>https://ananay.dev/facebook-groups-bug-bounty-2018</link><guid isPermaLink="true">https://ananay.dev/facebook-groups-bug-bounty-2018</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[Security]]></category><category><![CDATA[Facebook]]></category><category><![CDATA[bugbounty]]></category><dc:creator><![CDATA[Ananay Arora]]></dc:creator><pubDate>Sat, 05 Jan 2019 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1710234394524/6be5f8c3-dfaf-4587-9d3b-e51e6a0da615.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is my second bug bounty - a bug that I discovered while messing around on a Facebook group. It was my freshman year at ASU, and I was administering this Facebook called "The Great Indian Dream, Class of '23" – a group dedicated to Indian high school students seeking admissions in foreign universities.</p>
<p><strong>Background</strong></p>
<p>Facebook has a policy that you can change a group's name only <strong>once</strong> every 28 days if your group is big. This is to prevent abuse and maintain consistency. While joking about this on a post on that group, the conversation quickly turned to bug hunting and eventually triggering this.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1710233059335/26f240b2-8c2c-4f58-93fe-df7dcab488f0.png" alt class="image--center mx-auto" /></p>
<p>My initial instinct to test this actually came from the outdated UI they had, which sort of indicated this thing hadn't been touched in a while. Immediately I headed to Charles Proxy to capture and modify the request this was sending upon changing the name.</p>
<p>I copied the curl command of the request, and kept replaying it again with different group names.</p>
<pre><code class="lang-bash">curl <span class="hljs-string">'https://www.facebook.com/groups/&lt;GROUP_ID&gt;/edit/'</span> \
--data-binary <span class="hljs-string">'jazoest=&lt;REDACTED&gt;fb_dtsg=AQGfx9WwthQl&amp;__a=1&amp;group_purpose=social_learning_landing_tab&amp;group_currency=USD&amp;description=&amp;topics=&amp;name=testgroup0&amp;group_members=&amp;admin_post_approval=1&amp;stories_post_permissions=1&amp;nctr[_mod]=pagelet_group_edit&amp;__user=&lt;REDACTED&gt;'</span> \
--compressed
</code></pre>
<p>And to my surprise, <strong>the group name changed!</strong> A bunch of people on that group saw that happen which sparked quite a lot of laughter and a little bit of shock. To be fair, this bug isn't big - it's not an account takeover.  </p>
<p>However, this gets even more interesting....</p>
<p>I tried sending <code>&lt;br /&gt;</code> as part of the <code>name</code> parameter. Yes, actual HTML tags as the name. And to my surprise, it seemed to not have parsed the HTML quotes but rather break something on the backend! So much so, that once you name a group <code>&lt;br /&gt;</code> without sanitization (that the frontend does), you can make a facebook group <strong>INACCESSIBLE and UNFIXABLE - even through the exploit!</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1710233874763/1f689e0a-eb1e-48f0-b60e-acf81c42779e.png" alt class="image--center mx-auto" /></p>
<p>Again, always sanitize everything on the backend – DO NOT trust your requests!</p>
<p>Anyway, I reported all of this to Facebook Security, and was awarded $500!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1710234013393/2bb4f989-f8e5-4e16-ab12-d3f2f8891e1f.png" alt class="image--center mx-auto" /></p>
<p>Timeline:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Initial Report</td><td>Sun, Nov 25, 2018, 10:30 AM</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Request for more info</strong></td><td><strong>Wed, Nov 28, 2018, 11:19 AM</strong></td></tr>
<tr>
<td><strong>Request for more Info</strong></td><td>Mon, Dec 3, 2018, 11:03 AM</td></tr>
<tr>
<td><strong>Escalated to team for further investigation</strong></td><td><strong>Thu, Dec 13, 2018, 8:23 AM</strong></td></tr>
<tr>
<td><strong>Vulnerability Patched Notification</strong></td><td><strong>Wed, Jan 2, 2019, 12:48 PM</strong></td></tr>
<tr>
<td><strong>Bounty Awarded</strong></td><td><strong>Thu, Jan 3, 2019, 4:28 AM</strong></td></tr>
<tr>
<td><strong>Featured on Facebook Hall of Fame 2018</strong></td><td><strong>Fri, Jan 4, 2019, 10:50 AM</strong></td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[Solving Google CTF’s Mindreader Challenge]]></title><description><![CDATA[The challenge is mainly based on the Path Transversal attack which is a common vulnerability in websites. The Path Transversal attack is a method of using special characters to access directories and files on a server. This method works only when the...]]></description><link>https://ananay.dev/solving-google-ctfs-mindreader-challenge</link><guid isPermaLink="true">https://ananay.dev/solving-google-ctfs-mindreader-challenge</guid><category><![CDATA[CTF]]></category><category><![CDATA[CTF Writeup]]></category><category><![CDATA[Security]]></category><category><![CDATA[#cybersecurity]]></category><category><![CDATA[Flask Framework]]></category><category><![CDATA[Python]]></category><category><![CDATA[Linux]]></category><category><![CDATA[operatingsystems ]]></category><dc:creator><![CDATA[Ananay Arora]]></dc:creator><pubDate>Mon, 19 Jun 2017 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1710231868823/97449673-1fde-4fed-abf9-a40507b7b861.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The challenge is mainly based on the Path Transversal attack which is a common vulnerability in websites. The Path Transversal attack is a method of using special characters to access directories and files on a server. This method works only when the query string variables are used to access files on the server (which was the case here).</p>
<h3 id="heading-finding-the-vulnerability">Finding the Vulnerability</h3>
<p>Let’s start with the challenge now. This was the screen I was presented with.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1150/1*O0bHu-7tzuvtExA1O_az4g.png" alt /></p>
<p>Entering something random got us this.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/1*w8eWiIfmLWldQR21F9j7kw.png" alt /></p>
<p>This takes us to a 404 page, but now we have a parameter <code>f</code> in the field which probably takes in a file. Let's try <code>/etc/passwd</code></p>
<p><a target="_blank" href="http://mindreader.web.ctfcompetition.com/f=/etc/passwd">http://mindreader.web.ctfcompetition.com/f=/etc/passwd</a></p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/1*F-BNwg4TYwj37xNUFiR-vw.png" alt /></p>
<p>Wow, that was a little too easy, but we're quite a bit away from it. The flag was not in <code>flag.txt</code>, <code>../flag</code> or <code>flag</code>.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/1*Zp9koc3CUDrfUG9m_qfQbg.png" alt /></p>
<p>But hold on... if I can read any file, it means I can read the source code too 😏 I tried a few guesses: “<a target="_blank" href="http://main.py">main.py</a>”, “<a target="_blank" href="http://app.py">app.py</a>”, “<a target="_blank" href="http://server.py">server.py</a>” and voila, <a target="_blank" href="http://main.py">main.py</a> was actually a file.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/1*TB6twaaAPUdmW7ThffeM1w.png" alt /></p>
<p>A flask webserver that reads the flag from OS environment. Also a regex that filters out the words proc, random, stdout and stderr so you can't read those. <code>/proc/self/environ</code> is typically the file that shows the environment variables but due to the regex we can't access that.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MJxMF9KMpF6ScVoaAU8VSg.png" alt /></p>
<p>The challenge has now boiled down to finding a way to access that file by bypassing the regex. Let's see if there are any Symbolic Links that map to that. Tried to check this locally on my Mac and eventually, I did notice that <code>/dev/fd</code> links to <code>/proc/self/fd</code>. This means I could try <code>/dev/fd/../environ</code> to access <code>/proc/self/environ</code>.</p>
<p>And boom! Here's our flag.<br /><a target="_blank" href="http://mindreader.web.ctfcompetition.com/?f=%2Fdev%2Ffd%2F..%2Fenviron"><em>http://mindreader.web.ctfcompetition.com/?f=/dev/fd/../environ</em></a></p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/1*ionHIfVpCD_QOVEdHSbTZw.png" alt /></p>
<p><code>FLAG=CTF{ee02d9243ed6dfcf83b8d520af8502e1}</code></p>
]]></content:encoded></item><item><title><![CDATA[Shazam — First Hacking Bug Bounty!]]></title><description><![CDATA[It was the end of my Grade 12th Preboard exams and I needed something to destress, and what better way to destress by bug hunting (atleast after doing something as awful highschool exams).
Typically, I just browse through the apps on my phone and sta...]]></description><link>https://ananay.dev/shazam-first-hacking-bug-bounty</link><guid isPermaLink="true">https://ananay.dev/shazam-first-hacking-bug-bounty</guid><category><![CDATA[hacking]]></category><category><![CDATA[cybersecurity]]></category><category><![CDATA[bugbounty]]></category><category><![CDATA[Security]]></category><category><![CDATA[servers]]></category><category><![CDATA[shazam]]></category><dc:creator><![CDATA[Ananay Arora]]></dc:creator><pubDate>Tue, 21 Mar 2017 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1710226533366/16a6f36d-1c60-4a08-8534-7b74581abf33.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It was the end of my Grade 12th Preboard exams and I needed something to destress, and what better way to destress by bug hunting (atleast after doing something as awful highschool exams).</p>
<p>Typically, I just browse through the apps on my phone and start looking for my next target everytime I bug hunt. This time I thought it should be something different than the Facebook family of apps.</p>
<p>Instead of reverse engineering their app, I took different approach this time. I decided to take a look at their corp servers instead. I recently came across <a target="_blank" href="https://shodan.io">shodan.io</a> which is a database of connected devices.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1710225282058/ed7d4c94-6a1e-4008-bff5-ea4f5d354d6c.png" alt="shodan.io homepage" class="image--center mx-auto" /></p>
<p>That's cool and all, but one of the coolest part about Shodan is that they also let you apply pretty specific filters. These filters even work to search for metadata within SSL certificates. I used this to filter by "Common Name" as <code>*.shazam.com</code> and <code>shazam.com</code> and happened to find a couple servers on their network.</p>
<p>My first instinct was to test these for heartbleed - one of the most trending vulnerabilities from 2014. To my surprise, they turned to be vulnerable to heartbleed - even in 2017!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1710226494604/4458bc2b-47b5-4e87-8d05-187290a0a7d9.png" alt class="image--center mx-auto" /></p>
<p>I sent out this report to Shazam and within a couple days got a response from the team with the bug bounty notification.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1400/1*vgVm0nGIvrr-jKmWT9u6QQ.png" alt /></p>
<p>Incredibly grateful to Shazam for this bug bounty, even though they didn't have an established bounty program at that time (this is all before the Apple acquisition).</p>
<p><strong>Timeline:</strong></p>
<p>Initial Report – Jan 23, 2017</p>
<p>Initial response from Shazam – Jan 24, 2017</p>
<p>Bounty Awarded – Jan 26, 2017</p>
]]></content:encoded></item></channel></rss>