<?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 0X0mahmoud on Medium]]></title>
        <description><![CDATA[Stories by 0X0mahmoud on Medium]]></description>
        <link>https://medium.com/@0x0mahmoud?source=rss-1e774f770308------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cOsc8R4yygOo7nHlG6yXkA.jpeg</url>
            <title>Stories by 0X0mahmoud on Medium</title>
            <link>https://medium.com/@0x0mahmoud?source=rss-1e774f770308------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:04:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0x0mahmoud/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[TLD Discovery For BugBounty]]></title>
            <link>https://medium.com/@0x0mahmoud/tld-discovery-for-bugbounty-07340cf543ff?source=rss-1e774f770308------2</link>
            <guid isPermaLink="false">https://medium.com/p/07340cf543ff</guid>
            <category><![CDATA[reconnaissance]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[0X0mahmoud]]></dc:creator>
            <pubDate>Sun, 07 Dec 2025 23:35:44 GMT</pubDate>
            <atom:updated>2025-12-07T23:35:44.551Z</atom:updated>
            <content:encoded><![CDATA[<p>Identifying all top-level domains (TLDs) associated with a target is a critical part of recon in bug bounty hunting. Many organizations operate across multiple regions, brands, and environments, which often leads to the registration of dozens of domain variations under different TLDs. Missing these domains means missing potential vulnerabilities, exposed services, and shadow infrastructure that could expand your attack surface.</p><h3>Google Dorking</h3><blockquote>site:*-example.com<br>site:example-*.com<br>site:*.example-*.com<br>site:*.*.example.*<br>site:example.*.*<br>site:example-*.*<br>site:*-example.*.*<br>site:*.*-example.*<br>site:*-*-example.*<br>site:*-*-example.*.*<br>site:*-<a href="http://www.example.*/">www.example.*</a><br>site:*-<a href="http://www.example.*.*/">www.example.*.*</a><br>site:*-*.example.*<br>site:*-*.example.*.*<br>site:example-*-*.*<br>site:*-<a href="http://www.example.*/">www.example.*</a></blockquote><p>these dork patterns can uncover a wide range of overlooked assets, including:</p><ul><li>Recently created domains using different TLDs</li><li>Regional or country‑based versions of the website</li><li>Alternative domain formats used for branding, localization, or older infrastructure</li></ul><p>Before using any discovered domain in your recon process, it’s essential to verify that the domain actually belongs to the target’s authorized scope. Many TLD variations may look similar but are owned by third parties, so confirming ownership through program scope, WHOIS records, certificate transparency logs, or official documentation is a necessary step to stay compliant with bug bounty rules.</p><h3>Domain Database Lookups using DotDB</h3><p><a href="https://dotdb.com/">DotDb</a> dotDB is a global domain search engine that lets you discover all registered domain names related to a specific keyword, with filters for extensions, status, or position in the name. It also supports bulk searches and an API for automated integration.</p><h3>ASN Enumeration</h3><p>Enumerating an organization’s ASNs can reveal multiple domains hosted within the same network, including regional sites and legacy systems. Inspecting the ASN’s IP ranges helps uncover TLDs not visible through WHOIS or CT logs, giving a fuller view of the company’s external assets.</p><p>i use <a href="https://bgp.he.net/">BGP</a> to look up the organization’s ASN and collect its associated IP ranges, then search the ASN directly in Shodan to identify all domains hosted within that network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x51VxPmhXpA_R8VEP1HTiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xGGL7kDG84yr5jFLXkpxug.png" /></figure><p>notic: if you student you can get a free shodan membership by using your edu email</p><h3>WHOIS Lookups</h3><p>WHOIS data is a valuable source for discovering additional TLDs owned by the target organization. Many companies register multiple domain variations under the same registrant name, email, or organization ID. By checking WHOIS records, you can trace patterns in ownership and uncover domains that may not appear in regular recon tools.</p><p>For WHOIS lookups, using tools like <a href="https://iqwhois.com/">IQWHOIS </a>&amp;<a href="https://whois.whoisxmlapi.com/">whoisxmlapi</a> can simplify the process and provide structured information about domain ownership, registrant details, and registration history. It helps quickly identify TLDs that belong to the target organization while making it easier to cross-check multiple domains at once.</p><h3>BuiltWith / Technology Footprint Analysis</h3><p><a href="https://builtwith.com/">BuiltWith </a>and similar tools can uncover domains used for marketing, testing, or regional deployments by analyzing consistent technology patterns. This helps detect related TLDs even when they operate under different names or extensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PNRg5nmDg1FMfSNv_nxdtQ.png" /></figure><h3>Reverse IP Lookup</h3><p><a href="https://viewdns.info/reverseip/">Reverse IP lookup</a> identifies all domains hosted on a specific server, which often reveals additional TLDs related to the organization. Domains sharing the same IP may indicate hidden or regional environments, and verifying their scope ensures safe testing.</p><h3>Favicon Hashing</h3><p>Favicon hashing is a technique used to identify domains or environments that share the same favicon by generating a hash of the favicon.ico file. Since many organizations use the same favicon across multiple TLDs, subdomains, and environments, matching hashes can reveal related assets that are not directly linked or indexed. I use <a href="https://favicons.teamtailor-cdn.com/"><strong>F</strong>aviconFinder</a> to quickly extract the favicon of any website, then generate its hash using <a href="https://favicon-hash.kmsec.uk/">Favicon Hash Generator</a>, which also offers the ability to search that hash directly across platforms like Shodan, Censys, and VirusTotal. This makes it easy to find other domains using the same favicon and potentially uncover additional TLDs or hidden infrastructure belonging to the same organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XGcJe0SpZtP7E0KilEJDuA.png" /></figure><p>only copy the url then</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*4GwXhDUpLrmPuJvsDcvFcg.png" /></figure><h3>Business Recon</h3><p>In many cases, large organizations operate smaller subsidiaries or partner brands that function under different names, making them difficult to identify through standard WHOIS lookups. Some subsidiaries may use completely different branding, while others share similar naming patterns but do not appear in public registration records. Because of this, relying solely on WHOIS data is not enough; business recon helps uncover these hidden entities by analyzing corporate structures, acquisitions, regional branches, and affiliated companies that may maintain their own TLDs but still belong to the same parent organization.</p><p>To uncover these hidden subsidiaries or affiliated brands, I rely on business‑intelligence platforms such as <a href="https://opencorporates.com/"><strong>OpenCorporates</strong></a>, <a href="https://www.aihitdata.com/"><strong>AIHIT Data</strong></a>, and <a href="https://www.crunchbase.com/"><strong>Crunchbase</strong></a>, which provide detailed records of corporate groups, ownership structures, acquisitions, and related legal entities. These sources make it possible to identify smaller companies operating under the same parent organization — even when they use different names, separate branding, or domains that do not appear in WHOIS records — allowing a clearer understanding of all potential TLDs that may legitimately fall under the main organization’s scope.</p><h3>Conclusion:</h3><p>Building a complete and accurate map of an organization’s online footprint is one of the most important steps in bug bounty reconnaissance. By combining multiple passive techniques — such as Google Dorking, WHOIS analysis, DNS enumeration, CT logs, favicon hashing, ASN research, business recon, and technology fingerprinting — you significantly increase your chances of finding hidden assets and uncovering overlooked attack surfaces.</p><h4>thank you and wait for another part!</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07340cf543ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[how i found 2ato in mobile application in private vdb in bugcrowd]]></title>
            <link>https://medium.com/@0x0mahmoud/how-i-found-2ato-in-mobile-application-in-private-vdb-in-bugcrowd-f0672b45e873?source=rss-1e774f770308------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0672b45e873</guid>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[0X0mahmoud]]></dc:creator>
            <pubDate>Tue, 02 Dec 2025 13:51:04 GMT</pubDate>
            <atom:updated>2025-12-02T15:00:25.106Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*8IhtjnOSlmVHW-L920JdlA.jpeg" /></figure><p>During the assessment of the mobile application, I discovered two separate vulnerabilities that allow an attacker to take over user accounts without valid credentials. This writup summarizes each issue, explains how it can be exploited, and highlights the overall security impact on the platform.</p><h3>the first one</h3><h3>Step 1 — Static Analysis of the Mobile Application</h3><p>After downloading the mobile application, I began with static analysis using <a href="https://github.com/skylot/jadx/releases/tag/v1.5.3"><strong>JADX-GUI</strong></a>. During the decompilation process, I identified an interface file that contains all the API endpoints used by the app. This provided a clear view of the backend functionality and helped in mapping the attack surface for further testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*o8jF-X7fZdq73Pr_cykPAg.png" /></figure><p>After logging in using a social account, the application returns a parameter called <strong>SocialLoginId</strong>. While reviewing the app’s traffic, I also confirmed that the mobile application <strong>does not implement SSL pinning</strong>, which allowed me to intercept and analyze all network requests.</p><p>During static analysis, I identified an API endpoint named <strong>GetUserBySocialLoginId</strong>, which accepts this identifier and returns the full user data. Further testing showed that the endpoint also exposes a valid <strong>JWT access token</strong> belonging to the target user. This behavior enables an attacker to obtain sensitive information and directly take over user accounts by abusing this identifier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8bTo898YstVSIt9qr5wYtQ.png" /></figure><p>To verify the impact, I replicated the request made by the mobile application to the <strong>GetUserBySocialLoginId</strong> endpoint, as shown in the intercepted traffic. I then modified the <em>SocialLoginId</em> parameter to another valid value belonging to a different user. The server responded successfully and returned the full profile of that user, including their <strong>JWT access token</strong>. This confirmed that the endpoint performs no authorization checks and that simply changing the identifier is enough to obtain another user’s token and fully compromise their account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jrr0eWK59yx43ghWzP701Q.jpeg" /></figure><h3>2 — Account Takeover via Missing Authorization in ActivateAccount Endpoint</h3><p>During further testing, I identified another critical flaw in the <strong>/api/AccountManagement/ActivateAccount</strong> endpoint. Similar to the previous issue, this endpoint does not enforce any authorization controls. An attacker — whether authenticated or unauthenticated — can trigger this endpoint using only a victim’s email address.</p><p>By supplying a known or guessed email, the server responds with the <strong>entire user profile</strong>, including sensitive personal information and a <strong>valid, long‑lived JWT access token</strong>. This token provides full access to the victim’s account, effectively allowing an attacker to assume complete control without requiring any password, verification code, or user interaction.</p><p>This behavior demonstrates a total breakdown of access control and exposes all user accounts to trivial exploitation through simple enumeration of email addresses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*Hakuh8acFBQSxCDkKdQztA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*4x7oLKmsizTxA8c9PtdQug.jpeg" /></figure><p>During the security assessment of the target mobile application, multiple critical vulnerabilities were identified that allow full Account Takeover (ATO) without requiring valid user credentials. Two core API endpoints — <strong>GetUserBySocialLoginId</strong> and <strong>ActivateAccount</strong> — were found to expose sensitive user information and long‑lived JWT access tokens without implementing any authentication or authorization checks.</p><h3>Thanks &amp; Stay Tuned</h3><p>Thanks for checking out this write-up! I hope it was insightful and easy to follow. More write-ups are on the way with new findings and cool exploits — stay tuned for the next ones!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0672b45e873" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reflected XSS on Starbucks]]></title>
            <link>https://medium.com/@0x0mahmoud/reflected-xss-on-starbucks-1bcd07aa53f5?source=rss-1e774f770308------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bcd07aa53f5</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[0X0mahmoud]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 20:23:21 GMT</pubDate>
            <atom:updated>2025-08-21T20:23:21.835Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Hello everyone!</strong></p><p>“Welcome back. Today, our <strong>writupe</strong> is about a vulnerability I found: a <strong>reflected cross-site scripting</strong> (XSS) bug on the Starbucks online store.”</p><h3>The Scope</h3><p>Before I started looking for a bug, my first step was to understand Starbucks’ business from a security perspective. I knew Starbucks wasn’t just a coffee company; it’s a massive technology brand that relies heavily on its online presence and customer trust.</p><p>With this in mind, I decided to focus my attention on their <strong>online store</strong>. I knew this is where they handle customer information, payments, and shipping details, making it a critical part of their business.</p><p>So, I began searching for all of Starbucks’ online stores using a variety of methods. For this <strong>writupe</strong>, I’ll focus on the specific technique I used to find the exact domain where the vulnerability was located.</p><p>The method I used to find the host was <strong>dorking</strong>. This is a technique where you use advanced search queries to find very specific information on a website.</p><p>I used a simple but powerful query: site:onlinestore.starbucks.com.*. My goal was to find a domain that was still in active use.</p><p>That’s when I found <strong>onlinestore.starbucks.com.hk</strong> — the Hong Kong online store. I focused my attention on this specific host, and it wasn’t long before I found what I was looking for.</p><h3><strong>The Hunting Ground:</strong></h3><p>I wanted to find every corner of the website to search for weaknesses. I used a tool called <a href="https://github.com/lc/gau"><strong>Gau</strong></a>, which stands for “Get All URLs.” This tool scours public sources to find every old and forgotten link associated with the website. It’s like a digital archaeologist, helping me dig up old pathways on the site that nobody might be using anymore.</p><p>Next, I used another tool called <a href="https://github.com/s0md3v/uro"><strong>uro</strong></a>. As you know, a list of URLs from a tool like Gau can be full of duplicates or uninteresting pages. <strong>uro</strong> aims to solve that problem. It analyzes the list of URLs without sending any HTTP requests and removes all the irrelevant links, leaving me with a clean, unique list of pages to test. This saved me a huge amount of time.</p><p>Thanks to these tools, a massive list of potential links was transformed into a small, focused list. I then began testing each URL on the list, one by one.</p><h3>The Missing Safety Feature:</h3><p>I began my search using a <strong>Burp Suite</strong>. While examining the website’s responses, I immediately noticed a crucial detail: a lack of security headers.</p><p>These headers are like the built-in safety features on a website, designed to protect users from common attacks. Not only was the site missing the <strong>X-XSS-Protection</strong> header, a basic defense against XSS, but it was also missing the <strong>Content-Security-Policy (CSP)</strong> header.</p><p>Finding both of these major defenses missing was a huge red flag and a strong reason to continue looking for a XSS.</p><h3>The Proof of Concept:</h3><p>So, I began searching for a <strong>reflected parameter</strong>. This is an input on the website that “reflects” back to the page what you type into it, like an echo.</p><p>After testing several inputs, I found a parameter named namespaces. This was my target. The first thing I did was test for proper <strong>parameter sanitization</strong>. Think of sanitization as a security filter; a well-built website should automatically remove or neutralize any dangerous characters you try to input.</p><p>I used a simple payload to test this. I inserted the following code into the namespaces parameter: %3Cscript%3Econfirm(1)%3C/script%3E. This is the URL-encoded version of &lt;script&gt;confirm(1)&lt;/script&gt;. All this code does is make a small pop-up box appear on the screen with the number &#39;1&#39; inside it.</p><p>The website was not properly filtering my input. The code was executed, and the pop-up box appeared, confirming that the site was vulnerable to reflected cross-site scripting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*EtnLhU3_Ep9YrR5wCeDvNw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gAs7_SMO9zjzDBLeAJbJeg.jpeg" /></figure><p>The Resolution and The Bounty 💰</p><p>After a long wait, the time had finally come. On <strong>January 14, 2025</strong>, I received a message from the Starbucks security team. They confirmed they had fixed the vulnerability and asked me to perform a <strong>retest</strong>. This meant I needed to go back to the site and confirm that my exploit no longer worked.</p><p>This was the moment of truth. I retested the namespaces parameter, and to my satisfaction, the payload didn&#39;t work. The fix was in place. The vulnerability was gone. I sent them my confirmation.</p><p>And then, the moment I had been waiting for. For my discovery, Starbucks awarded me a <strong>$$$bounty</strong>. They also gave me an additional $50for completing the retest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OAZYWuHt4b5tdeXhVORiQ.jpeg" /></figure><blockquote><em>Thank you.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bcd07aa53f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uncovering SQL Injection]]></title>
            <link>https://medium.com/@0x0mahmoud/uncovering-sql-injection-db784a309b48?source=rss-1e774f770308------2</link>
            <guid isPermaLink="false">https://medium.com/p/db784a309b48</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[sql-injection-attack]]></category>
            <dc:creator><![CDATA[0X0mahmoud]]></dc:creator>
            <pubDate>Sun, 03 Aug 2025 23:18:08 GMT</pubDate>
            <atom:updated>2025-08-03T23:18:08.707Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*8hvNG3jQX6Zth-sQdJYHWw.jpeg" /></figure><p><strong>Hello everyone!</strong><br>I hope you’re doing great. its my first writup for critical bug i found in The last month of last year</p><h3>Introduction</h3><h4>What is SQL Injection?</h4><p><strong>SQL Injection (SQLi)</strong> is a serious <strong>web security vulnerability</strong> that allows an attacker to manipulate how a website interacts with its <strong>database</strong>. It happens when a web application <strong>does not properly validate user input</strong>, allowing malicious users to inject harmful SQL (Structured Query Language) commands into the system.</p><p>_________________________________________________________________</p><h3>The Reconnaissance Phase: Finding the Attack Surface</h3><p>When I pick a new program to test, my first step, after understanding its scope and policies, is always to search for its “attack surface.” This means looking for all the places where I might be able to interact with the application and potentially find weaknesses.</p><p><strong>A quick note on P1 vulnerabilities and scope: </strong>If you’re specifically hunting for Critical (P1) vulnerabilities, sometimes the “scope” itself becomes less restrictive. In my experience, if a domain clearly belongs to the company you’re testing, a high-impact vulnerability discovered on it is often accepted, even if it wasn’t explicitly listed in the initial in-scope assets. This has certainly been the case for me!</p><h4>Back to the hunt!</h4><p>The first thing I do when starting reconnaissance is to leverage Google Dorking for wide-reaching target discovery.</p><p>This powerful technique allows me to leverage Google’s search capabilities to find specific files, directories, or even related subdomains that might not be immediately obvious.</p><p>In this particular assessment of [Redacted Application], I focused on finding related hosts. I used various search queries, including variations similar to &quot;site:example-*.*.*&quot;. These dorks helped me uncover a number of interesting related domains and, crucially, several login portals. Each of these findings represented a potential new entry point or attack surface for further investigation.</p><p>As I gathered these results, I needed an efficient way to save them. For this, I leveraged a helpful script available for <strong>Tampermonkey</strong>, a popular open-source browser extension. This particular script enabled me to quickly save all the discovered links to a downloadable file with a simple keyboard shortcut. This ensured I wouldn’t miss any valuable leads and could easily refer back to my findings.</p><h4>In an upcoming section — or possibly a dedicated follow-up article — I’ll be sharing some of the most effective search queries I use during reconnaissance</h4><h3>Step 2: Diving Deeper</h3><p>With my list of reconnaissance targets ready, I transitioned into the active testing phase. I began by targeting <strong>login portals</strong>, which are often high-value areas for uncovering security weaknesses.</p><h4>Manual Testing Focus:</h4><ul><li><strong>Authentication Bypass</strong> — Attempted to access accounts without valid credentials.</li><li><strong>Logic Flaws</strong> — Investigated potential design or input-handling weaknesses within the login process.</li></ul><p>The login interface resisted all my attempts — no security issues were discovered.</p><p>I then expanded testing to other input vectors across the application. I looked specifically for <strong>injection vulnerabilities</strong>, including SQLi, XSS, and others.</p><p>To support my manual work, I initiated <strong>automated crawling and fuzzing</strong> using tailored wordlists. This step aimed to uncover:</p><ul><li>Hidden or unlinked pages</li><li>Uncommon directories</li></ul><p>Even after this intensive round of probing, the application remained secure, with no critical vulnerabilities uncovered during this stage.</p><h3>The Turning Point: Discovering Hints From The Web Archive</h3><p>Since live testing hadn’t exposed any vulnerabilities, I shifted my focus to historical data. While reviewing archived versions of the application through the Wayback Machine, I identified <strong>two previously available input points</strong> — parameters that suggested interaction with the backend database, even though they were no longer present in the current live version.</p><p>To assess their security, I tested both using a simple yet effective method: injecting a <strong>single quote (</strong><strong>&#39;)</strong>, a classic way to check for SQL injection. One of the inputs responded normally, with no indication of vulnerability. However, the <strong>second entry point</strong> returned a clear SQL syntax error—an immediate red flag that indicated the input was being processed directly by the database without proper sanitization.</p><p>Sure enough, when I submitted the input, the application returned a clear and revealing error message:</p><blockquote>You have an error in your SQL syntax; check the manual that corresponds to your PostgreSQL server version for the right syntax to use near ‘…’ at line24</blockquote><p>This was the breakthrough I had been looking for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*JbMc6rhDG2rM5naf52B3_Q.jpeg" /></figure><p>The message confirmed two key things:</p><ul><li>The application was using <strong>PostgreSQL</strong> as its backend database.</li><li>The input I submitted was being directly processed by the SQL engine without proper sanitization or validation.</li></ul><p>The inclusion of <em>line 35</em> in the error gave an extra clue — it indicated exactly where my input disrupted the underlying query. This strongly suggested a classic <strong>SQL Injection flaw</strong>, and validated that the parameter I tested was unsafely connected to the database logic.</p><h3>Phase 3: Exploitation — Confirming the SQL Injection</h3><p>After confirming the SQL syntax error with the single quote, it was time to move to the exploitation phase. This is where you figure out exactly what kind of SQL Injection you have and what information or control it allows.</p><p>To do this efficiently, I used an automated SQL Injection tool (like <strong>Ghauri</strong>, as shown in the image). These tools are designed to automatically test for different SQL Injection types and help pull data from the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*jzm3yQ0aB-E43Eg1ZdELIg.jpeg" /></figure><p>The tool quickly confirmed two types of SQL Injection vulnerabilities:</p><blockquote><strong><em>Boolean-based Blind SQL Injection</em></strong></blockquote><blockquote><strong><em>Stacked Queries SQL Injection</em></strong></blockquote><p>The automated tool also successfully identified the backend database system and its version: <strong>PostgreSQL version 12.20 (64-bit)</strong>.</p><p>This confirmation of both Boolean-based blind and, especially, Stacked Queries SQL Injection on a PostgreSQL database pointed to a severe security flaw. This bug could potentially lead to full data theft or even allow an attacker to run their own code on the database server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ITtVMi6YVcvfErWjZg51SQ.jpeg" /></figure><blockquote>Thank you.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db784a309b48" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>