<?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 M7moudx22 on Medium]]></title>
        <description><![CDATA[Stories by M7moudx22 on Medium]]></description>
        <link>https://medium.com/@m7moudx22?source=rss-dceea9a3b282------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qFj4XwZQLudKKVYx25GJqA.jpeg</url>
            <title>Stories by M7moudx22 on Medium</title>
            <link>https://medium.com/@m7moudx22?source=rss-dceea9a3b282------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 10:26:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@m7moudx22/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[Basic Authentication Bypassed via Simple Misconfiguration]]></title>
            <link>https://m7moudx22.medium.com/basic-authentication-bypassed-via-simple-misconfiguration-6a19002aef4f?source=rss-dceea9a3b282------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a19002aef4f</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[M7moudx22]]></dc:creator>
            <pubDate>Mon, 19 May 2025 04:31:21 GMT</pubDate>
            <atom:updated>2025-05-19T04:38:01.822Z</atom:updated>
            <content:encoded><![CDATA[<p>Unauthorized access to the (staging) website of redacted.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krxK-QCCYeKlxwlI2nERvw.jpeg" /><figcaption>basic auth that protecting the web app from unautorzied users</figcaption></figure><p>Bismillah al-Rahman al-Rahim<br><strong>H</strong>ello there, this is a <a href="https://x.com/m7moud_mk99">M7moudx22</a>, it’s my first write-up. Enjoy the read!</p><blockquote><strong>I</strong>n the world of web application security, <strong>Basic Authentication</strong> is often the first line of defense. While not inherently secure on its own, it can offer a lightweight layer of protection when configured properly. However, a simple misconfiguration can render it completely useless — and that’s exactly what I encountered during pentesting.</blockquote><p><strong>Here’s how I managed to bypass Basic Auth due to a seemingly minor oversight by the developers…</strong></p><p>My target had a wide scope, after collecting their subs using tools such as (<a href="https://github.com/projectdiscovery/subfinder">subfinder</a>, <a href="https://github.com/owasp-amass/amass">amass</a>, <a href="https://github.com/gwen001/github-subdomains">gihtub-subs</a>) <em>// don’t forget to add your private API_keys in the config file for each tool</em>, Online services such as <a href="https://securitytrails.com/list/apex_domain/target.com">SecurityTrails</a>, <a href="http://crt.sh/?CN=%25.target.com">Crt</a>.sh, and validating them using <a href="https://github.com/projectdiscovery/httpx">Httpx</a>/<a href="https://github.com/tomnomnom/httprobe">Httprobe</a> to get alive hosts.</p><p>I came across a subdomain called <em>(staging).redacted.com</em>, it used for managing some backend processes. The web server prompted for credentials using Basic Auth — the familiar pop-up in the browser requesting a Username and Password.</p><p>After some initial interaction with default creds like (admin:admin, admin: password, demo:demo …) it didn’t work, I decided to test for any misconfiguration. I did a simple <a href="https://curl.se/">Curl</a> request; curl with flags -L (follow redirects), -s (silent), and -k (insecure/ignore SSL).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HGBmq6AuLYaBbvqcLk2_EA.png" /><figcaption>the server response</figcaption></figure><p>Yep !! As you notice..</p><ul><li>CL: indicates there’s an actual HTML served a heavy response page (possibly an error page).</li><li>Status code: <strong>404 </strong>Meaning Not Found =&gt; the attacker can bruteforce the directories, the basic auth is more familiar with <strong>401</strong></li><li>Www-authenicate: Basic realm=realm header is present</li></ul><p><strong>Leaking</strong> Authentication Headers on Invalid Paths; Returning <strong>WWW-Authenticate</strong> For <strong>404</strong>Routes can allow <strong>path discovery attacks</strong>. Attackers can:<br>- Map which paths exist (based on changes in status codes or body length),<br>- Identify what endpoints are protected,<br>- Distinguish between “protected but exists” vs “protected but doesn’t exist.”</p><p>I skipped all those, then I pressed <strong>Ctrl + U</strong> to view the source page. I got only a /<strong>path </strong>I opened it, but it still requires the Credentials, then I cancelled the prompt basic auth box to see what would happen after that, … it reloaded the page; again requires the credentials. cancelled the prompt box for the third time =&gt; then the page reloaded with a surprise to me, I got unauthorized access <strong>inside</strong> the <strong>Target Staging environment</strong></p><p>I submitted the report, and the team accepted it as Critical severity. Then I received the full Bounty</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oglsY4oGtt7jJjjWu84JkA.png" /></figure><p>Thx for reading, <br>Stay tuned for the coming write-ups..</p><p>**Don’t forget to pray for Palestine**</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*X4NwiF_T8S-o4BbaiymrTA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a19002aef4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>