<?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 r9Mody on Medium]]></title>
        <description><![CDATA[Stories by r9Mody on Medium]]></description>
        <link>https://medium.com/@r9mody?source=rss-6848c97b3958------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iAH_oL0-REOukBUZXcok7A.png</url>
            <title>Stories by r9Mody on Medium</title>
            <link>https://medium.com/@r9mody?source=rss-6848c97b3958------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:17:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@r9mody/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[SQL Injection in Numeric Parameter(int) without common special characters]]></title>
            <link>https://medium.com/@r9mody/sql-injection-in-numeric-parameter-int-without-common-special-characters-ae31e15ea3e3?source=rss-6848c97b3958------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae31e15ea3e3</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[r9Mody]]></dc:creator>
            <pubDate>Mon, 18 May 2026 16:52:24 GMT</pubDate>
            <atom:updated>2026-09-17T12:36:49.878Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xv__sTn1MyGmFedHaFhezQ.png" /></figure><p>Hello everyone, today I’ll talk about a real bug that me and my friend <a href="https://medium.com/u/bda44ba73650">Or4nge16</a> discovered in a public Bug Bounty program on the Bugcrowd platform.</p><p>The information and techniques I’m going to explain here are far beyond what was included in the original report, because properly understanding this issue requires a SQL sandbox environment and deeper analysis of the server behavior.</p><p><strong>First, let’s understand the server behaveior:<br>- </strong>parameter works with both “GET” and “POST” requests<br>- parameter is numeric (int type)<br>- server allows: a-z, 0-9, @ . + -<br>- server blocks: Quotes, Parentheses(), Spaces, Semicolons, etc..</p><p><strong>We observed 4 different responses from the application:<br></strong>200 OK with data → “valid syntax” and record found<br>200 OK with custom error → “valid syntax” but <strong>NO </strong>record found<br>200 OK with empty response → syntax error<br>302 Redirect → triggered when blocked characters are used</p><h3>Detection:</h3><p>The vulnerability was identified using arithmetic operations only, since the parameter was strictly numeric.</p><p>The following screenshots demonstrate the detection process.</p><pre>-- Baseline: returns record for id=3773<br>GET /endpoint?id=3773 → 200 with data ✓<br><br>-- Second: 3774, no such record<br>GET /endpoint?id=3774 → 200 with custom error<br><br>-- Arithmetic: 3774-1 = 3773, same result → injection confirmed<br>GET /endpoint?id=3774-1 → 200 with data ✓<br><br>-- Invalid syntax: 3773a <br>GET /endpoint?id=3773a → 200 with empty response </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I9JdxsjMSzG6R49pGhm0Lg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bNu92X7NikcaNBazlcPyQg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDm5Lq8cKO-WsxQLFPTi4Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bOu_j11mkzKlWMi_2cxLrg.jpeg" /></figure><p>The following screenshots demonstrate the detection process, and <br><strong><em>SQl injection confirmed</em></strong></p><h3>Exploitation</h3><blockquote>1) Column enumeration via column-name subtraction (arithmetic operations)</blockquote><p>Now comes the interesting part, This is the core trick. Assume the server runs this query internally LIKE:</p><pre>SELECT * FROM users WHERE id = USER_INPUT;</pre><p>And the “users” table looks like this:</p><pre>| id | Name   |<br>|----|--------|<br>| 1  | Mbappe | <br>| 2  | Vini   | <br>| 3  | Arda   |</pre><p>Now pay attention to the following behavior:</p><pre>SELECT * FROM users WHERE id = 1; --  200 ok with data</pre><pre>SELECT * FROM users WHERE id = 1-fuzz; -- 200 with empty (syntax error)</pre><p>Parser sees “fuzz” and tries to resolve it. It checks all column names in the table: id, Name. No match found. Cannot build a valid expression. SQL parse fails</p><pre>SELECT * FROM users WHERE id = 1-Name;  -- 200 with empty (syntax error)</pre><p>“Name” is a text column — can’t subtract text from int</p><pre>SELECT * FROM users WHERE id = 1-id;   -&gt; 200 with  custom error ⚡</pre><p>“id” is a valid integer column — math succeeds, but result has no record</p><blockquote>SQL sandbox env</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFidRxa8wXTux_XCZPFDMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sFY8PnLZeUoVMErG_jRCDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kePPuGbhriJSovjMJ3e9RQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0JoXW_j7L83PzRUlxPUFuA.png" /></figure><blockquote>In our Case:</blockquote><p>Parser sees “bugcrowd” and tries to resolve it. It checks all column names in the table. No match found. Cannot build a valid expression. SQL parse fails ( 200 with empty (syntax error) )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIZJk-955oWeGzF8ND1SNw.png" /><figcaption>200 with empty (syntax error)</figcaption></figure><p>but “documentid” is a valid integer column math succeeds, but result has no record</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JtGfRI-1hhXqcHsfjYgZTw.png" /><figcaption>200 with custom error ⚡</figcaption></figure><blockquote>2) Table Name Discovery via [Dot Notation]</blockquote><p>Dot notation uses a . to qualify a name with its parent scope, removing ambiguity.</p><p><strong>Basic syntax:</strong> parent.child or schema.table.column</p><pre>&lt;table&gt;.&lt;column&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgTdPkI4-jwjewyxpfaWFg.png" /><figcaption>not valid table name</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wOZsbJ_x3O0_JJmWwDHjuQ.png" /><figcaption>valid table name</figcaption></figure><blockquote>In our Case:</blockquote><p>“images” and “files” are not valid tables</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VxM6aT8DNAhQbYl1e5qV2g.png" /><figcaption>Not valid table return empt ( content-length: 0)</figcaption></figure><ul><li>“document” is valid table</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rjf1mi-7yoTVkiP5w4IFg.png" /><figcaption>valid table return ( content-length: 58) with custom error</figcaption></figure><p>You can also enumerate “schema, database, server”</p><pre>&lt;server&gt;.&lt;database&gt;.&lt;schema&gt;.&lt;table&gt;.&lt;column&gt;</pre><h3>Finally</h3><p>When testing a numeric parameter, first identify two different behaviors:<br>- valid value that returns real data<br>- another value returns no data / record not found</p><p>Example:</p><p><strong>Baseline behavior:</strong></p><pre>id=1        → 200 + data returned  ✅<br>id=2        → 200 + empty response ⚠️</pre><p><strong>Start fuzzing with expressions that equal </strong><strong>1:</strong></p><pre>id=1-test+1           → 200 + empty response  ⚠️<br>id=1-valid_column+1   → 200 + data            ✅</pre><h3>Conclusion</h3><p>Modern filters often focus on blocking traditional SQL injection syntax while overlooking how SQL parsers actually evaluate expressions internally.</p><p>As shown in this research, simple arithmetic operations combined with response comparison can sometimes be enough to perform schema discovery and identify valid columns even in heavily restricted environments.</p><p>Understanding parser behavior is often more powerful than relying on classic payloads alone.</p><h3>Contacts Me</h3><ul><li>X/Twitter: <a href="https://x.com/r9Mody">https://x.com/r9Mody</a></li><li>Linkedin: <a href="http://www.linkedin.com/in/r9mody">https://linkedin.com/in/r9mody</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae31e15ea3e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>