<?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 mohamed metwally on Medium]]></title>
        <description><![CDATA[Stories by mohamed metwally on Medium]]></description>
        <link>https://medium.com/@metwallysec?source=rss-93659957d1ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PPDGU9GgX8yXWAhInlpXhg.png</url>
            <title>Stories by mohamed metwally on Medium</title>
            <link>https://medium.com/@metwallysec?source=rss-93659957d1ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 17:42:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@metwallysec/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 Found a Reflected XSS Using ParamSpider & Kxss]]></title>
            <link>https://medium.com/@metwallysec/how-i-found-a-reflected-xss-using-paramspider-kxss-37a6b3e09ec8?source=rss-93659957d1ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/37a6b3e09ec8</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[mohamed metwally]]></dc:creator>
            <pubDate>Thu, 13 Nov 2025 13:54:55 GMT</pubDate>
            <atom:updated>2025-11-13T13:54:55.704Z</atom:updated>
            <content:encoded><![CDATA[<p>بسم الله الرحمن الرحيم والحمد لله رب العالمين، والصلاة والسلام على أشرف الأنبياء والمرسلين، نبيّنا محمد وعلى آله وصحبه أجمعين.</p><p>Hello</p><p>I’m Mohamed Metwally (metwallysec), I wish you enjoy reading this write-up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qf7Oc2p3Jdzd4n_J-5vkQ.png" /></figure><h4><strong>Quick heads-up before we dive in:</strong></h4><p>The difference between <strong>Reflected</strong> and <strong>DOM XSS</strong> can be tricky sometimes.</p><ul><li><strong>Reflected XSS</strong>: The malicious input comes from the <strong>server</strong> and gets reflected directly into the page. If you do a View Page Source, you’ll actually see the payload there.</li><li><strong>DOM XSS</strong>: The malicious input is <strong>generated by client-side JavaScript</strong> and never touches the server. You won’t see it in View Page Source; it only shows up in the live DOM when you inspect the page.</li></ul><p>So yes — at first glance, this one might <em>look</em> like DOM XSS, but the server is the one reflecting the payload, making it a classic <strong>Reflected XSS</strong>.</p><h4>Let’s talk now about how I got it exactly</h4><p><strong>Tools used:</strong></p><ul><li>ParamSpider — parameter enumeration</li></ul><pre>paramspider -d target.com</pre><ul><li>kxss — quick reflection detection</li></ul><pre>cat urls.txt | kxss | grep -v &quot;\[\]&quot; </pre><h4><strong>Step by step</strong></h4><p><em>Step 1:</em></p><p>I ran ParamSpider to collect endpoints and query parameters across the target host — looking for anything interesting to test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*nl2Wv138pWGXxhHCzALPIw.png" /><figcaption>ParamSpider</figcaption></figure><p><em>Step 2:</em></p><p>I fed the results into kxss to highlight parameters that are echoed back or cause immediate reflections. That process pointed me at the /login?returnUrl entry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*dMBDEdkFsYDrJJFnAS3rWg.png" /><figcaption>kxss</figcaption></figure><p><em>Step 3:</em></p><p>I opened the page that hasreturnUrl and inspected the <strong>page source</strong>. I noticed the value was being reflected into an inline event handler because the page used location.href inside an onclick.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*r4jGTR4N0WQWBDdjIBAS8Q.png" /><figcaption>inspect</figcaption></figure><p><em>Step 4:</em></p><p>I inspected the inline handler and confirmed the reflection point looked like this in the page source:</p><pre>onclick=&quot;location.href = &#39;/signin?returnUrl=&#39;;alert(&#39;mohamed metwally got xss&#39;)//&#39;&quot;</pre><p>To break out of the surrounding JavaScript context I injected a payload that closes the existing string and comments out the rest. Example payload used to exit the context and inject my code:</p><pre>&#39;;alert(&#39;mohamed metwally got xss&#39;)//</pre><p>This payload closes the prior string, inserts &#39;;alert(&#39;mohamed metwally got xss&#39;), and the trailing // comments out any remaining characters so the handler remains syntactically valid.</p><p>I loaded the PoC URL containing that payload, clicked the <strong>Sign in</strong> button, and the alert(&#39;mohamed metwally got xss&#39;) executed — confirming the reflected XSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*u_vigGHZ0nZARUuYvSzL1A.png" /><figcaption>XSS</figcaption></figure><p>After all that — and months of waiting since submission, with the triager stuck in “pending program review” — the company resolved the bug without closing my report or saying any word. 😒 Thanks, HackerOne.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*tevXobDkMUvYaTORyjYhdw.png" /><figcaption>Thanks HackerOne</figcaption></figure><h3>Follow Me</h3><p>If you found this useful, follow me for more:</p><p>my username everywhere: @metwallysec</p><ul><li>🐦 Twitter / X: <a href="https://x.com/metwallysec">https://x.com/metwallysec</a></li><li>💼 LinkedIn: <a href="https://www.linkedin.com/in/metwallysec/">https://www.linkedin.com/in/metwallysec/</a></li><li>📺 YouTube: <a href="https://www.youtube.com/@metwallysec">https://www.youtube.com/@metwallysec</a></li></ul><p>I share practical bug hunting tips, write-ups, and tutorials.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37a6b3e09ec8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I found Critical Bugs Easily on GitHub]]></title>
            <link>https://medium.com/@metwallysec/how-i-found-critical-bugs-easily-on-github-48ee78c9ab3d?source=rss-93659957d1ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/48ee78c9ab3d</guid>
            <category><![CDATA[vulnerability-research]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-disclosure]]></category>
            <category><![CDATA[github-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[mohamed metwally]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 19:49:07 GMT</pubDate>
            <atom:updated>2026-10-10T21:22:51.713Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*129KjdHtqzfN4smLD1FYDw.png" /><figcaption>some of my reports</figcaption></figure><h3>Introduction</h3><p>GitHub sometimes contains a lot of stuff — developers put their work, examples, scripts, and many of them accidentally leave sensitive things inside repos. What you find can be very dangerous depending on the type and privileges. But beware: what you find on GitHub is not always the end of the story — sometimes it is the <strong>DOOR</strong> to bigger problems elsewhere. It might be just a small leak, but if a key or token has wide permissions, you might find yourself facing cloud servers, databases, or pipelines that can perform deploys.<br> Here I’ll tell you, in general, <strong>where to look</strong>, and some organized <strong>tips</strong> you must follow.</p><h3>What to look for (general)</h3><ul><li>Configuration files like .env, config.*, settings.*</li><li>Keys and tokens: API_KEY, AWS_ACCESS_KEY_ID, Authorization: Bearer ...</li><li>CI/CD files and workflows like .github/workflows/*</li><li>SSH keys / .pem files accidentally committed</li><li>Sensitive data about customers or employees (PII)</li><li>Database connection strings (postgres://, mysql://, mongodb+srv://)</li><li>And of course much more — you’re looking for things the company wouldn’t want published or used</li></ul><h3>Dorks (use in GitHub search)</h3><blockquote><strong><em>Note:</em></strong><em> These are not everything — you can add or remove as you like; the important part is the idea.</em></blockquote><h3>Emails</h3><pre>org:(org_name_in_github) &quot;@gmail.com&quot;<br>org:(org_name_in_github) &quot;@yahoo.com&quot;<br>org:(org_name_in_github) &quot;@hotmail.com&quot;<br>org:(org_name_in_github) &quot;@(your_target_email)&quot;</pre><h3>Tokens / Secrets / API Keys</h3><pre>org:(org_name_in_github) &quot;AWS_SECRET_ACCESS_KEY&quot;<br>org:(org_name_in_github) &quot;AWS_ACCESS_KEY_ID&quot;<br>org:(org_name_in_github) &quot;Authorization: Bearer&quot;<br>org:(org_name_in_github) &quot;api_key&quot; language:json<br>org:(org_name_in_github) &quot;secret&quot; language:yaml<br>org:(org_name_in_github) &quot;PRIVATE_KEY&quot;<br>org:(org_name_in_github) &quot;api_key&quot;<br>org:(org_name_in_github) &quot;Token&quot;<br>org:(org_name_in_github) &quot;secret&quot;<br>org:(org_name_in_github) &quot;client_secret&quot;<br>org:(org_name_in_github) &quot;password&quot; language:env<br>org:(org_name_in_github) filename:.env<br>org:(org_name_in_github) filename:.npmrc<br>org:(org_name_in_github) filename:.dockercfg<br>org:(org_name_in_github) filename:.bash_history<br>org:(org_name_in_github) &quot;BEGIN RSA PRIVATE KEY&quot;</pre><h3>Config Files</h3><pre>org:(org_name_in_github) filename:config.js<br>org:(org_name_in_github) filename:settings.py<br>org:(org_name_in_github) filename:application.properties<br>org:(org_name_in_github) filename:credentials.json<br>org:(org_name_in_github) filename:firebase.json<br>org:(org_name_in_github) path:*.env &quot;Password&quot; OR &quot;db_url&quot; OR &quot;db_port&quot;</pre><h3>GitHub Actions</h3><pre>org:(org_name_in_github) filename:.github/workflows<br>org:(org_name_in_github) &quot;secrets.&quot; language:yaml<br>org:(org_name_in_github) &quot;GITHUB_TOKEN&quot;<br>org:(org_name_in_github) &quot;CI_SECRET&quot;</pre><h3>Hardcoded credentials (in code)</h3><pre>org:(org_name_in_github) &quot;username&quot; &quot;password&quot;<br>org:(org_name_in_github) &quot;username&quot;<br>org:(org_name_in_github) &quot;password&quot;<br>org:(org_name_in_github) &quot;db_password&quot;<br>org:(org_name_in_github) &quot;mongodb+srv://&quot;<br>org:(org_name_in_github) &quot;postgres://&quot;<br>org:(org_name_in_github) &quot;mysql://&quot;</pre><h3>If you want to find Admin Panels too</h3><pre>org:(org_name_in_github) &quot;admin&quot;<br>org:(org_name_in_github) &quot;admin&quot; in:url<br>org:(org_name_in_github) &quot;admin&quot; in:path<br>org:(org_name_in_github) &quot;dashboard&quot; in:url<br>org:(org_name_in_github) &quot;control panel&quot;<br>org:(org_name_in_github) &quot;login&quot; filename:config.js<br>org:(org_name_in_github) &quot;admin_url&quot;<br>org:(org_name_in_github) &quot;site_url&quot;</pre><h3>Tips</h3><p>remember: you can get an NA if you don’t pay attention to the tips and verify carefully.</p><h3>1. Check the scope first</h3><p>Look at the program / bounty scope: many companies do not accept reports about things from GitHub if they are outside the org or out of scope.</p><h3>2. Focus on the company’s org</h3><ul><li>Always search inside the target company’s organization.</li><li>Some people search everything — maybe a contractor or private dev uploaded something outside the org (Personally, I don’t work on those).</li></ul><h3>3. Avoid words/segments that indicate it’s an example (could kill your report)</h3><blockquote>If a triager sees the repo looks like an example or local setup, they might mark it as NA without even reading your report.</blockquote><p>Examples:</p><p>test, example, dummy, sample, demo , local (sometimes it&#39;s important so keep focus)</p><ul><li>README or docs containing phrases like:<br> <em>“this is a sample/test project”</em> or <em>“for demo purposes only”</em></li><li>Directories such as: <strong>examples/</strong>, <strong>sandbox/</strong>, <strong>docs/examples/</strong>, etc.</li></ul><h3>4. Check history before reporting</h3><p>If the item is old (a commit from years ago) and the repo looks inactive, and you’re not sure if it’s important — don’t rush to report.</p><h3>5. Verify carefully — avoid sensitive experiments</h3><ul><li>Try to verify non-destructively.</li><li>If it’s too sensitive, don’t experiment — just send a responsible report.</li></ul><h3>6. Be careful with repeated secrets</h3><p>If you find the same credential (password, key, token, etc.) repeated across many repositories, it’s usually not important. In most cases, companies won’t leave a real production secret exposed in 50 different repos. These are often placeholders, examples, or test values. Focus only on unique, production-looking secrets.</p><h3>Practical Scenario (Step by Step How I Found It)</h3><p>I started by exploring the company’s GitHub organization and applied some of the dorks I shared earlier, such as:</p><pre>org:company &quot;password&quot;</pre><p>I kept scrolling through the repos until a few of them caught my eye.<br>I opened those repos in new tabs to review them carefully.</p><p>After collecting everything, I went one by one, following the tips I mentioned earlier (avoiding examples, demo/test projects, or non-production environments).<br> Then I carefully looked at the exposed files and secrets.</p><p>Once I confirmed the repo looked important, I used tools like <strong>ChatGPT</strong> and <strong>Grok</strong> to analyze the whole repository and understand what it was doing.</p><p>When I realized the repo was actually sensitive and relevant, I reported it — and <strong>BOOM </strong>💥<br> I submitted it to multiple companies, and it was accepted.</p><p><strong>Finding Type:</strong> Hardcoded Credentials (exposed in a public repository)<br><strong>Impact:</strong> Critical issue successfully resolved</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*jgJGFDidp3IWj6IwodSTpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*Zm70K_3LsCKd9FIP0vQA0w.png" /></figure><h3>Conclusion</h3><p>This is a useful and easy check and you should look for it in any program that allows it — people really forget secrets inside repos. <strong>I’ll make a video soon </strong>where I do this practically — wait for it and I’ll see you in the video.</p><h3>Follow Me</h3><p>If you found this useful, follow me for more:</p><p>my username everywhere: @metwallysec</p><ul><li>🐦 Twitter / X: <a href="https://x.com/metwallysec">https://x.com/metwallysec</a></li><li>💼 LinkedIn: <a href="https://www.linkedin.com/in/metwallysec/">https://www.linkedin.com/in/metwallysec/</a></li><li>📺 YouTube: <a href="https://www.youtube.com/@metwallysec">https://www.youtube.com/@metwallysec</a></li></ul><p>I share practical bug hunting tips, write-ups, and tutorials.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48ee78c9ab3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>