<?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 Sahil on Medium]]></title>
        <description><![CDATA[Stories by Sahil on Medium]]></description>
        <link>https://medium.com/@extraterrestrial2342?source=rss-0cc382deac60------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QgftikrOf9P3OoAW4McG6g.jpeg</url>
            <title>Stories by Sahil on Medium</title>
            <link>https://medium.com/@extraterrestrial2342?source=rss-0cc382deac60------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:05:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@extraterrestrial2342/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[Exploiting Insecure Image Handlers: A Deep Dive into Path Traversal]]></title>
            <link>https://medium.com/@extraterrestrial2342/exploiting-insecure-image-handlers-a-deep-dive-into-path-traversal-4b3c072ab4c3?source=rss-0cc382deac60------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b3c072ab4c3</guid>
            <dc:creator><![CDATA[Sahil]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 14:14:49 GMT</pubDate>
            <atom:updated>2026-07-02T14:14:49.717Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>When we think of web application vulnerabilities, we often jump straight to complex database injections or cross-site scripting. However, sometimes the most critical data leaks come from the simplest developer oversights. Recently, while conducting a security assessment in a simulated environment, I uncovered a classic File Path Traversal vulnerability. By manipulating a simple image-loading parameter, I was able to break out of the web directory structure and read arbitrary files directly from the server’s operating system.</p><p>Here is a breakdown of how I discovered the flaw, the exploitation process, and how developers can prevent it.</p><p><strong>1. The Reconnaissance: Spotting the Weakness</strong> Every good hunt starts with basic enumeration. Before running any heavy brute-forcing tools, I manually checked the application’s robots.txt file to see if the developers were trying to hide any sensitive directories from search engine crawlers.</p><p>This manual check paid off. The robots.txt file explicitly disallowed an interesting path that handled product images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*TWS_HS3GMvGyEKl9F53gXw.png" /><figcaption>.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b3c072ab4c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Methodology over Automation: Deconstructing E-commerce Checkout Logic]]></title>
            <link>https://medium.com/@extraterrestrial2342/methodology-over-automation-deconstructing-e-commerce-checkout-logic-449ae6e1d024?source=rss-0cc382deac60------2</link>
            <guid isPermaLink="false">https://medium.com/p/449ae6e1d024</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackerone]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Sahil]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 14:00:04 GMT</pubDate>
            <atom:updated>2026-07-02T14:15:08.035Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong> In application security, the most critical vulnerabilities often reside in business logic — flaws that automated scanners completely miss because they lack context. During a recent bug bounty engagement on a major e-commerce platform (target redacted), I completely bypassed automated recon tools. My goal was to map the application’s state machine manually and identify where the application places trust in user-controlled input.</p><p>This article breaks down my methodology for mapping an e-commerce checkout flow to identify potential vectors for BOLA (Broken Object Level Authorization), Parameter Tampering, and Business Logic abuse.</p><p><strong>Phase 1: Traffic Interception and State Mapping</strong> Using Burp Suite, I proxied all traffic while performing a standard user journey: browsing products, adding to cart, initiating checkout, and generating a payment prompt. My objective was to observe how state is passed between these discrete steps.</p><p>I categorized the attack surface into three distinct API groups:</p><ol><li><strong>Catalog/Navigation APIs:</strong> Endpoints handling page_id and product_id.</li><li><strong>Cart APIs:</strong> Endpoints managing the cart_session.</li><li><strong>Checkout/Payment APIs:</strong> Endpoints processing the final order total, applying offers, and initiating the payment gateway.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*yIhtIyJYCYsAugL2fU465A.png" /></figure><p><strong>Phase 2: Identifying Trust Boundaries &amp; Injection Points</strong> By analyzing the JSON payloads, I identified several critical parameters that warrant deep-dive testing. Finding these parameters isn’t the vulnerability, the vulnerability is if the server fails to validate them.</p><ul><li><strong>BOLA / IDOR Candidates:</strong> In the checkout API, I observed explicit user_id and address_id parameters being passed in the JSON body.</li><li><em>The Test:</em> Can I swap my user_id with another user&#39;s ID to view their cart or force an order onto their account? Does the server validate that the authenticated session token matches the user_id in the payload?</li><li><strong>Parameter Tampering &amp; Price Manipulation:</strong> The payload to the payment gateway included a customer_amount key (e.g., &quot;customer_amount&quot;: 3514).</li><li><em>The Test:</em> If this value is modified to 1 or a negative integer, does the server recalculate the cart total server-side, or does it blindly pass the user-supplied amount to the payment gateway?</li><li><strong>State Manipulation:</strong> I noted interesting boolean flags such as is_headless_enabled and enable_price_unbundling: false.</li><li><em>The Test:</em> Toggling these states to true. Can unbundling the price bypass minimum order thresholds or alter the discount logic?</li></ul><p><strong>Phase 3: Next Steps</strong> Manual mapping creates a roadmap. The next phase of this engagement involves systematically sending these requests to Burp Repeater and testing the server’s response to manipulated logic.</p><p><strong>Conclusion</strong> Building custom automation and scaling recon (like the Python VAPT toolkit I am currently developing) is highly effective, but it must be built on top of a solid understanding of application logic. You cannot automate the detection of a business logic flaw if you don’t know how to find the trust boundaries manually.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=449ae6e1d024" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shell Shocked: Achieving RCE via OS Command Injection in a Stock Checker]]></title>
            <link>https://medium.com/@extraterrestrial2342/shell-shocked-achieving-rce-via-os-command-injection-in-a-stock-checker-e3fdfc1595ae?source=rss-0cc382deac60------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3fdfc1595ae</guid>
            <category><![CDATA[cod]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[portswigger]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sahil]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 17:19:35 GMT</pubDate>
            <atom:updated>2026-04-11T17:19:35.112Z</atom:updated>
            <content:encoded><![CDATA[<p>OS Command Injection is a critical vulnerability that allows an attacker to execute arbitrary operating system commands on the server running an application. While many vulnerabilities allow you to manipulate database records or bypass application logic, command injection hands you direct control over the underlying infrastructure.</p><p>In this walkthrough, I’ll break down how I exploited a seemingly harmless e-commerce “Check stock” feature to bypass input validation and execute system-level commands.</p><h3>2. The Reconnaissance</h3><p>The methodology begins with mapping the application’s functionality. The target featured a standard e-commerce utility: checking the inventory level for a specific product at a specific retail location.</p><p>I fired up Burp Suite to intercept the traffic and see what was happening under the hood. When I clicked the “Check stock” button for the London store, the HTTP request revealed a simple POST request passing two distinct parameters in the body: productId=1 and storeId=1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*QJ3SmMouYj-TeTaZmynKPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/1*AYUygTq57iLFzEBNfdUb7Q.png" /></figure><p>Thinking about the underlying architecture, how does a backend actually check stock across different locations? It might be querying a database via an API, but it could also be taking those parameter values and passing them directly as arguments to a legacy internal shell script. If the latter is true, and the input isn’t sanitized, we have an injection point.</p><h3>3. The Exploitation</h3><p>To test the hypothesis, I sent the request to Burp Repeater. If the application was blindly appending my input to a system command, I could potentially break out of the intended command and chain my own using shell metacharacters.</p><p>I chose the pipe character (|), which in Unix-like systems tells the shell to take the output of the first command and pass it to the next, effectively executing both. I modified the storeId parameter from 1 to 1 |whoami.</p><p>The attack was a success. The backend application failed to sanitize the pipe character. It executed its intended inventory script, hit the pipe, and subsequently executed whoami. The server responded with a 200 OK and returned the name of the current executing user—peter-IfvjeY—directly into the HTTP response, which was then rendered on the front end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*RE6cKkIlEolZ-yff12saxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*6eCDNOdE7IZedxO2GpIJIg.png" /></figure><h3>4. Business Impact &amp; Remediation</h3><p><strong>The Business Impact</strong> This is a worst-case scenario for a business: full Remote Code Execution (RCE). An attacker isn’t just looking at the user name; they can run commands with the privileges of the web server. This allows a threat actor to read sensitive configuration files, exfiltrate environment variables containing API keys, or establish a reverse shell to pivot deeper into the corporate internal network.</p><p><strong>Remediation</strong> To prevent this, the development team needs to rethink how the application interacts with the underlying system:</p><ol><li><strong>Avoid Shell Commands:</strong> The most effective fix is to never call out to OS commands directly from the application layer. Developers should use robust, built-in language APIs or libraries to perform system tasks.</li><li><strong>Strict Input Validation:</strong> If calling a shell command is absolutely unavoidable, the application must implement strict, whitelist-based input validation. Only allow known-good characters (e.g., strictly alphanumeric).</li><li><strong>Escape Metacharacters:</strong> Any user-supplied data passed to a shell must be thoroughly escaped to ensure characters like |, ;, &amp;, and $ are treated as literal strings, not executable operators.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*RV9drXpM-DGh0no_AN0a7g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3fdfc1595ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shattering “Security by Obscurity”: Uncovering Hidden Admin Panels]]></title>
            <link>https://medium.com/@extraterrestrial2342/shattering-security-by-obscurity-uncovering-hidden-admin-panels-c34bd7e74f46?source=rss-0cc382deac60------2</link>
            <guid isPermaLink="false">https://medium.com/p/c34bd7e74f46</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[portswigger]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sahil]]></dc:creator>
            <pubDate>Tue, 07 Apr 2026 15:25:23 GMT</pubDate>
            <atom:updated>2026-04-07T15:25:23.230Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>When building web applications, developers sometimes mistakenly believe that if an attacker can’t easily find a page, they can’t exploit it. In some cases, sensitive functionality is concealed by giving it a less predictable URL. This is a classic example of “security by obscurity”. However, hiding sensitive functionality does not provide effective access control because users might discover the obfuscated URL in a number of ways. Recently, I successfully compromised an administrative panel simply by reading the application’s front-end code.</p><p>Here is how I bypassed the application’s hidden defenses and why true access control is non-negotiable.</p><p><strong>1. The Reconnaissance: Reading the Map</strong> The target application featured an unprotected admin panel located at an unpredictable location, but the location is disclosed somewhere in the application. My goal was to locate this panel and demonstrate impact by removing a user account.</p><p>Instead of blindly brute-forcing directories with tools like ffuf, I started by manually inspecting the application&#39;s front-end source code. Modern web applications heavily rely on JavaScript to render user interfaces dynamically based on roles. I inspected the page source and looked for any logic governing administrative users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*QqrMtZB-nskbcvIBLU-WKg.png" /></figure><p><strong>2. The Discovery: The JavaScript Leak</strong> My manual recon paid off immediately. I found a JavaScript snippet responsible for rendering the navigation bar. The code contained a simple if (isAdmin) check.</p><p>Even though my session was not flagged as an admin (var isAdmin = false;), the JavaScript code explicitly revealed what would happen if I <em>were</em> an admin. The script was designed to dynamically generate a link to the admin panel and append it to the page. Right there in plain text, the code used setAttribute to assign the hidden URL: /admin-9pnlhx.</p><p>The developers tried to hide the admin panel behind a randomized string, but they accidentally hardcoded the secret URL directly into the client-side code delivered to every single visitor.</p><p><strong>3. The Exploitation: Bypassing the Front Door</strong> Since the URL was entirely unprotected and relied solely on obscurity, no actual server-side validation was preventing me from accessing it. I appended the leaked path /admin-9pnlhx to the base URL and navigated directly to the hidden panel. I was instantly granted full administrative access and was able to successfully execute my proof of concept by deleting the target user, carlos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*CnEupBtY-PkUUFVXE3Mreg.png" /></figure><p><strong>4. Business Impact &amp; Remediation</strong> Relying on obfuscation is a critical security failure. An attacker discovering this could delete users, elevate privileges, or compromise the entire database.</p><p><strong>How to fix this:</strong></p><ul><li><strong>Implement Server-Side Access Control:</strong> Never rely on a hidden URL to protect sensitive data. The server must verify the user’s session token and role upon <em>every single request</em> to the admin panel. If a standard user requests the /admin-9pnlhx endpoint, the server should outright reject it with a 403 Forbidden error.</li><li><strong>Clean Client-Side Code:</strong> Do not hardcode sensitive backend routes, API keys, or administrative logic in JavaScript that is shipped to the client’s browser.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c34bd7e74f46" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>