<?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 Vikram on Medium]]></title>
        <description><![CDATA[Stories by Vikram on Medium]]></description>
        <link>https://medium.com/@v1krammm?source=rss-a15e6c279a03------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uSXrucPajN6hLKIiWKoavQ.jpeg</url>
            <title>Stories by Vikram on Medium</title>
            <link>https://medium.com/@v1krammm?source=rss-a15e6c279a03------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:17:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@v1krammm/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[NahamCon CTF 2025 “The Mission”]]></title>
            <link>https://v1krammm.medium.com/nahamcon-ctf-2025-the-mission-b16d4f3279e4?source=rss-a15e6c279a03------2</link>
            <guid isPermaLink="false">https://medium.com/p/b16d4f3279e4</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Vikram]]></dc:creator>
            <pubDate>Tue, 27 May 2025 13:08:07 GMT</pubDate>
            <atom:updated>2025-05-27T14:03:30.859Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Hi everyone!! I’m Vikram and I’m back with something exciting. This time, my team <strong>0bscuri7y</strong> and I participated in <strong>NahamCon CTF 2025</strong>, and we proudly secured the <strong>13th position</strong> among some of the best players out there!</p><p>Huge shoutout to my awesome teammates — <strong>Bhavya, Shubham, Rishabh, Shivendoo, Vatsal, and Vaibhav</strong> for pulling this off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hwOyGTR4Gs-K9OoO_qh-Zw.png" /><figcaption>Flexingg</figcaption></figure><p><strong>NahamCon CTF 2025</strong> delivered an incredible web challenge titled <em>“The Mission”</em>, blending classic web exploitation techniques with a compelling narrative.</p><p>In this write-up, I walk through my step-by-step approach to solving the challenge . With six cleverly hidden flags, realistic attack surfaces, and plenty of “aha!” moments, this challenge was a masterclass in modern bug bounty tactics. Here’s how I tackled it, one exploit at a time.</p><h4><strong>Challenge Description :</strong></h4><p>Welcome to the BugBounty platform, you’ve submitted a report for Yahoo but oh no!! So has STÖK and it looks like you’re going to get dupped!<br>Hack into the platform and change STÖK’s report to duplicate first so you can grab the bounty!<br>You can login with the following details:<br><em>Username: hacker<br>Password: password123</em></p><p>In this challenge, I take on the role of a bug bounty hunter competing for a payout on a simulated platform. The catch? Another well-known researcher, STÖK, has submitted the same vulnerability report. To make sure I walk away with the bounty, I need to dig into the platform, find a way to tamper with the system, and flag STÖK’s report as a duplicate before mine is.</p><p>There were 6 Flags in total to complete this challenge.<br>The challenge also provided a <em>wordlist.tx</em>t file.</p><h3>The Mission Begins</h3><h3>1. Spoke too soon : )</h3><p>After spinning up an instance you’re given a website which looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B6q-nDPVfrpUpyNx" /></figure><p>The website had sections like Home, Top Hackers and Login Pages . But just like any CTF I checked<em> /robots.txt</em> first and guess what !!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/0*vEl64yfYIn3LiaW1" /></figure><p>Bingoo i got <strong>Flag #1</strong> and an interesting looking endpoint. I was like eh! that easy ??? But maybe I spoke too soon.</p><h3>2. When in Doubt, Wordlist It Out</h3><p>I couldn’t just walk past that <em>/internal-dash</em> login page without poking it.</p><p>So I decided to visit<em> /internal-dash/ </em>that redirected me to a login page titled Internal Dashboard with a form asking for credentials.<br>My inner hacker instincts screamed “Admin Panel!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*thzleca-dezYvY--" /></figure><p>I threw everything I had at it:</p><ul><li>Default creds? Nope.</li><li>SQLi? Naahhh</li><li>Session tampering? I wish!</li></ul><p>Not much more was left to explore in the login page . I remembered the wordlist.txt file provided earlier.</p><p>I loaded it into DirBuster and started brute-forcing directories</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/0*DQReBfCsGMXpVopE" /></figure><h3>3. Made It In….. kinda</h3><p>Soon enough, I found <em>/api/v1</em> — and it threw a stack trace revealing something juicy:<strong> openjdk:19-jdk.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/0*1XNh9FsFN1HJhyuN" /></figure><p>After some research and asking my unpaid intern, ChatGPT i got to know about a endpoint<em> </em><strong><em>/actuator</em></strong></p><p>I got to know about a <strong><em>/actuator</em></strong> endpoint, a part of Spring Boot applications that exposes useful info like system metrics, environment details, and sometimes even configuration data or heap dumps. If misconfigured, it can leak sensitive internal data.</p><p>But i got :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/0*3w8RrhwH0uPB5gNJ" /></figure><p>A WAF ??? Maybe I am on the right track, I quickly used a 403 bypass plugin of Caido.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*urN8G7uG8pi96U4I" /></figure><p>Bypassed that 403 with a sneaky little character encoding and Yes sir! I was in.</p><p>Grabbed the <strong>Flag #2 </strong>, and stumbled upon another juicy file: /heapdump. Looks like we might be dealing with <strong>some memory leaks</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*6Eu0LMCLvO5SVg9U" /></figure><p>I downloaded it and it was like finding a treasure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*CV_XHy0F7fmGwaSY" /></figure><p>Looking closely at the heapdump I realised it was a POST request. I replayed the request and boom got a <strong>valid internal dashboard token</strong> in return.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UgXhRRQC2-Y9phkT" /></figure><p>Can’t be the PHPSESSID right ??</p><p>Initially, I thought the PHPSESSID might be the key to accessing<em> /internal-dash/,</em> but that didn’t work. After checking the <em>/logout</em> endpoint, I noticed a cookie named int-token was being cleared.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IiV7d8gVoLNKJ2lX" /></figure><p>That reminded me of the token I extracted earlier from the <em>/heapdump</em> request. So I took that token and set it as the value of the int-token cookie in my request to <em>/internal-dash/</em> like :</p><p><em>GET /internal-dash/ HTTP/1.1<br>Host: challenge.nahamcon.com:30510<br>Upgrade-Insecure-Requests: 1<br>User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8<br>Sec-GPC: 1<br>Accept-Language: en-GB,en;q=0.6<br>Accept-Encoding: gzip, deflate<br></em><strong><em>Cookie: int-token=a1c2860d05f004f9ac6b0626277b1c36e0d30d66bb168f0a56a53ce12f3f0f7a</em></strong></p><p>This time, it worked — I was successfully logged into the internal dashboard, which was titled <strong>“Bug Bounty Report Lookup”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HINkmsnckAGMbrqk" /></figure><p>That got me <strong>Flag #3</strong>. However, the dashboard required a report_id, which I didn’t have yet, so I had to look further.</p><h3><strong>4. Peeking Where I Shouldn’t (Thanks, GraphQL)</strong></h3><p>Back on the main domain, I found a <em>/login</em> page that led me to this clean login panel :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/0*1NMXI1j9Hq-wiOuw" /></figure><p>Using the creds provided in the challenge description</p><p><strong>Username:</strong> hacker<br><strong>Password:</strong> password123</p><p>I logged in and was greeted with a dashboard and there was my report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yRyhKb6Qv2wQK3F9" /></figure><p><strong>I really wish this was actually my bug bounty report. Lol</strong></p><p>Clicking around the dashboard revealed some juicy-looking endpoints. A quick inspection showed a mix of REST and GraphQL APIs. My eyes locked onto two targets:</p><ul><li><em>/api/v2/graphql</em></li><li><em>/api/v2/reports</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*14iqI6qgeEbTSwQ4" /></figure><p>The first one looked like it might be vulnerable to<strong> GraphQL injection</strong>, and spoiler alert !! <strong>IT WAS.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YOyXGR375DbMQT0P" /></figure><p>So I sent this classic test payload :</p><blockquote>{“query”: “{ users { id username email } }”}</blockquote><p>To my surprise, the server responded without any authentication or authorization checks in place. This meant I was able to retrieve a full list of registered users on the platform — including their IDs, usernames, and email addresses.</p><p>Boom !! the full list of users dropped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/0*aDail-GW_PLzSZAS" /></figure><p>Got the<strong> Flag #4</strong> and Out of all the users, one stood out: <strong>Stok</strong><br>Why? Because his name was all over the mission.</p><p>Not only did I grab Stok’s user ID, but I also used this api</p><p><strong><em>/api/v2/reports?user_id=15ee453d-18c7–419b-a3a6-ef8f2cc1271f</em></strong><em> </em>to get all the reports he had submitted , and yeah there was the report all the mission was for like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/0*OgI-SPVnHa1mAcaP" /></figure><p>Now I have two crucial things :</p><ol><li><strong>Stok’s id : 15ee453d-18c7–419b-a3a6-ef8f2cc1271f</strong></li><li><strong>Stok’s Report id : c03dd42e-d929–4a50–9a8e-1ab6b2dd5e8a</strong></li></ol><p><strong>Let’s jump back to the internal dashboard</strong></p><h3><strong>5. Wait !! there’s more ??</strong></h3><p>Back on the internal dashboard, I entered Stok’s report ID expecting access but got hit with a message :</p><p><strong>“You do not have access to this report.”</strong></p><p>I was like this can’t be real, there’s more to it ???</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*RM4dn3fhwiVZfMoR" /></figure><p>Checking the request in Caido, it returned a 403 Forbidden. So, even with a valid token, I wasn’t authorised to view that report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l2-_08aX9UfzPw6h" /></figure><p>Digging into the dashboard’s source code, I noticed the status update feature required a <em>change_hash</em> parameter which I wasn’t getting due to the 403.</p><p>I tested for Broken Access Control by sending a request to<em> /internal-dash/reports/status</em> with an empty <em>change_hash</em>, but no luck .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7be-rUYn7j9jN9Df" /></figure><p>Next, I started experimenting with the id parameter. When I passed<em> “id” : “..”,</em> the server threw an error that revealed internal endpoints including a reference to the reporting API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M95hPW8Y1hv9H98I" /></figure><p>It said internal Reporting Api so I kept going for it like this <em>“id”:”x/../../search”</em> and Woah to my surprise got a new error this time about a missing query parameter. That looked promising.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gbIf6L_Nidl7X2zb" /></figure><p>So I added a query to the request and yeah I was right, used</p><p><strong><em>{“id”:”x/../../../search?q=c03dd42e-d929–4a50–9a8e-1ab6b2dd5e8a”}</em></strong></p><p>and there was my beautiful looking <em>change_hash</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/0*R5dDa6_Mu2TPNdrj" /></figure><p>With the change_hash, I was able to modify the report’s status by intercepting the request and adding the hash.</p><p>I Quickly grabbed the Stok’s report id and marked his report as Duplicate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/0*mUM1mLjEbETdbUO7" /></figure><p>And updated mine to accepted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/0*rb0J9sv8bn1bfsKT" /></figure><p>After that, I logged back into the main dashboard at <em>/login</em> , and finally there it was, <strong>Flag #5</strong> . A clean finish to a sneaky little privilege escalation chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0q8kR8l7BBj5YR22" /></figure><h3>6. Am I Adam Langley ??</h3><p>Just when I thought I was done, there was still one last <strong>bonus flag </strong>left to uncover. That’s when I noticed a Bug Bounty Assistant bot chilling on the dashboard.</p><p>Could this be hiding one last flag?<br>But the bot wasn’t spilling secrets to just anyone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/0*szvishh9vwZjpM13" /></figure><p>So well then , <strong>What if I am Adam Langley?</strong> Spoofed the name and tricked the bot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/0*2WkhT_GxxsjixbJ3" /></figure><p><strong>Boom</strong> it spilled the final secret and <strong>Flag #6</strong>, secured.</p><h3>Closing Thoughts &amp; Shoutouts</h3><p>Big thanks to <strong>Adam Langley </strong>for crafting such a fun, challenging, and beautifully designed CTF.</p><p>And shout out to <strong>John Hammond</strong> and <strong>Ben Sadeghipour</strong> for organising <strong>NahamCon 2025</strong> and pulling all of this so smoothly.</p><p><strong>Drop some claps, follow and leave a comment</strong> if you found it interesting .</p><p><strong>Happy hacking and See you next time with more cool stuff! 🚀</strong></p><p><strong>Don’t forget to connect on </strong><a href="https://in.linkedin.com/in/vikram-sharma-957513230"><strong>Linkedin</strong></a><strong> and </strong><a href="https://x.com/vikramhere200"><strong>X</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b16d4f3279e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploiting CVE-2025–29927 in Next.js Middleware]]></title>
            <link>https://v1krammm.medium.com/exploiting-cve-2025-29927-in-next-js-middleware-23d6676ca619?source=rss-a15e6c279a03------2</link>
            <guid isPermaLink="false">https://medium.com/p/23d6676ca619</guid>
            <category><![CDATA[cve-2025-29927]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Vikram]]></dc:creator>
            <pubDate>Mon, 19 May 2025 10:43:10 GMT</pubDate>
            <atom:updated>2025-05-19T10:46:48.240Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*3cRSZb7_xtHnJ2Ws.png" /></figure><h3><strong>Introduction</strong></h3><p>Hey Everyone !! I’m Vikram Sharma, and it’s been a while since I last published my write-up. I’m back with something interesting (I know i’m super late to cover this)</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-29927">CVE-2025–29927</a>, a vulnerability that was recently disclosed in the <strong>Next.js middleware</strong>. This flaw allows attackers to bypass authentication by abusing how rewritten URLs are handled.</p><p>In this writeup, I’ll be deep diving into the basics of middleware in Next.js , then we’ll jump on what is this CVE about and how it can be exploited . To show the real world impact i’ll also walk through a challenge from HackingHub based on the same CVE.</p><h4>What is Next.js ?</h4><p><strong>Next.js</strong> is a React framework used to build fast , full stack web apps. It supports server-side rendering, static generation, API routes, and middleware , making it very popular among developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*Im9Bwo2Edao_2Ylw.jpg" /></figure><h4><strong>Middleware in Next.js</strong></h4><p><strong>Middleware in Next.js</strong> allows you to run code before a request is completed. It runs on the server and lets you modify requests, redirect users, handle authentication, or rewrite URLs , all without needing a full API route.</p><blockquote>Think of it as a gatekeeper that processes requests before they reach your pages.</blockquote><h4><strong>What is CVE 2025–29927 ?</strong></h4><p><strong>CVE-2025–29927 </strong>stems from a design flaw in how Next.js processes the<em> x-middleware-subrequest </em>header, which is intended to prevent infinite middleware execution loops. If an attacker includes this header with a specific value in their HTTP request, Next.js skips the middleware execution entirely, forwarding the request to its destination without applying any middleware logic, such as authentication or authorization checks.</p><p>The <em>x-middleware-subrequest</em> header in Next.js is used to tell the middleware when a request is coming from inside the middleware itself, like after a redirect. This helps the middleware avoid running the same code again and again, stopping it from getting stuck in a loop. It’s like a little sign that says,</p><blockquote>Hey, this request is from middleware, don’t run the usual checks again.</blockquote><p>Below, is the vulnerable code that can be exploited with this method :</p><p><strong>Vulnerable <em>middleware.ts</em></strong></p><pre>import { NextResponse } from &#39;next/server&#39;;<br>import type { NextRequest } from &#39;next/server&#39;;<br>export function middleware(request: NextRequest) {<br> // Vulnerability: No check on x-middleware-subrequest header<br> // If user tries to access /admin, check auth token cookie<br> if (request.nextUrl.pathname.startsWith(&#39;/admin&#39;)) {<br> const authToken = request.cookies.get(&#39;authToken&#39;);<br>if (!authToken) {<br> // Redirect to login if no auth token<br> return NextResponse.redirect(new URL(&#39;/login&#39;, request.url));<br> }<br> }<br> // Allow all other requests<br> return NextResponse.next();<br>}</pre><h4><strong>In this vulnerable code:</strong></h4><ol><li>The middleware checks for an <em>authToken </em>cookie when a request targets a route starting with <em>/admin</em>. If the token is absent, it redirects the user to <em>/login</em>.</li><li>There is <strong>no validation or filtering </strong>of the <em>x-middleware-subrequest</em> header, making it susceptible to manipulation.</li><li>If an attacker crafts a request with the <em>x-middleware-subrequest</em> header set to a specific value (e.g., : <em>middleware</em> for modern Next.js versions), the middleware logic (including the <em>authToken</em> check) is bypassed entirely.</li><li>This allows the attacker to access the <em>/admin</em> route without an <em>authToken</em>, as the request proceeds directly to the destination without the middleware redirecting to <em>/login</em>.</li></ol><p><strong>Affected Next.js Versions.</strong></p><p><strong>Vulnerable:</strong> 11.1.4–12.3.4 → <strong>Patched in:</strong> 12.3.5 <br><strong>Vulnerable:</strong> 13.0.0–13.5.8 → <strong>Patched in:</strong> 13.5.9 <br><strong>Vulnerable: </strong>14.0.0–14.2.24 → <strong>Patched in:</strong> 14.2.25 <br><strong>Vulnerable: </strong>15.0.0–15.2.2 → <strong>Patched in:</strong> 15.2.3.</p><h4>Lab Walkthrough</h4><p>In this last section, I’ll demonstrate how <strong>CVE-2025–29927</strong> can be exploited in a real-world-like scenario using a lab from <a href="https://app.hackinghub.io/hubs/"><strong>HackingHub</strong></a>. The goal is to bypass middleware-based authentication by exploiting the logic just as explained earlier.</p><p>This lab demonstrates how the misconfiguration can be exploited in practice and highlights the importance of proper header validation.</p><h4>1st flag:</h4><p><strong>Here’s our first web app</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5TGNO0qUk9yzIVdg5Quj4w.jpeg" /><figcaption>Simple Login page</figcaption></figure><p>To bypass this login page</p><p><strong>Step -1 : Intercept the http request using any any proxy eg Caido/Burp<br>Step-2: Add the header <em>x-middleware-subrequest</em> with the value middleware to the request.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cb0Dt9rjFoYPAC1ZKLO02Q.png" /></figure><p><strong>After bypassing the login page i used the same header to check the event endpoint</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xKNJfcbBwhrOO6uuwPLmnQ.png" /></figure><p><strong>Got the first flag !!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhZoQWK13WydLW5ZuxhpdQ.jpeg" /><figcaption>First flag</figcaption></figure><h4>2nd flag :</h4><p>The second target was a subdomain that had the same login page but after checking the JavaScript i got some interesting endpoints <strong>/events/create,</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pBAwXa7VuC-TgxpfI97LoA.png" /><figcaption>Some endpoints</figcaption></figure><p><strong>and after trying the same approach to bypass the authentication</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G6sQSYlWqAKjqDnwPizTmA.png" /></figure><p><strong>Got the 2nd flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BhQX_hgE58VvJWGngU5DpA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*ovnhK8HUDVrWA-mGQW5NiA.jpeg" /></figure><p>There can be different bypass scenarios (eg : only getting the front end bypass without any permissions to perform action on the application) according to the web app you are working on. you can check Nahamsec’s video <a href="https://youtu.be/7hqBePL0C_I">here</a> to understand some basic scenarios.</p><h4>CONCLUSION</h4><p>In this write-up, we explored <strong>CVE-2025–29927 </strong>, a critical auth bypass in <strong>Next.js middleware</strong> caused by mishandling the <em>x-middleware-subrequest</em> header. We broke down how middleware works, saw the vulnerable code in action, and walked through a real-world-style lab on <strong>HackingHub</strong> to exploit the flaw and grab two flags.</p><p>If you wanna try this lab , check it <a href="https://app.hackinghub.io/hubs/cve-2025-29927">here</a></p><p>This CVE is a reminder that even small trust assumptions — like internal headers — can lead to big security holes. Always validate what you expose, and update to the latest patched versions to stay safe.</p><p>I tried to make this as interesting and clear as possible — <strong>drop a like and leave a comment</strong> if you found it helpful. <br><strong>Happy hacking and See you next time with more cool stuff! 🚀</strong></p><p><strong>Don’t forget to connect on </strong><a href="https://in.linkedin.com/in/vikram-sharma-957513230">Linkedin</a> and <a href="https://www.instagram.com/vikr.am121/">Instagram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23d6676ca619" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Hacked NASA]]></title>
            <link>https://v1krammm.medium.com/how-i-hacked-nasa-74f4ada6e90c?source=rss-a15e6c279a03------2</link>
            <guid isPermaLink="false">https://medium.com/p/74f4ada6e90c</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[nasa]]></category>
            <dc:creator><![CDATA[Vikram]]></dc:creator>
            <pubDate>Tue, 26 Nov 2024 20:11:47 GMT</pubDate>
            <atom:updated>2025-03-27T02:52:07.799Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone!! I’m Vikram, and welcome back to another interesting write-up. Today, I’m excited to share my experience of discovering a stored + blind xss on one of NASA’s subdomains. This journey has been a mix of learning, perseverance, and, of course, a bit of adrenaline. Let’s dive into it.</p><p>PS: I’ve included an introduction sharing my thoughts, motivation behind hunting on this program. If you’re more interested in the technical details and the vulnerability discovery process, feel free to skip ahead to “<strong>Vulnerability Hunt” </strong>section!</p><h4>Why did I start?</h4><p>It all started a few months ago when I kept seeing people proudly sharing NASA appreciation letters on LinkedIn, Instagram, and other platforms. To be honest, seeing them “flex” sparked an urge in me — I wanted one too! I reached out to seniors and friends to ask how to get it and how challenging it might be. Huge thanks to them for motivating me, assuring me that I could do it. While I had reported bugs before, tackling a Vulnerability Disclosure Program (VDP) like NASA’s was an entirely new and exciting experience for me.</p><p><strong>Enough of my story lets get down to hacking.</strong></p><h3>The Vulnerability Hunt</h3><p>NASA has four main domains in scope for its Vulnerability Disclosure Program (VDP). To begin my assessment, I collected all the subdomains using tools like <strong>Subfinder</strong>, <strong>Sublist3r</strong>, and <strong>Amass</strong>. Once I compiled the list of subdomains, I started manually exploring some of the unique ones to understand their functionality and structure.</p><p>While inspecting these subdomains, I came across one of particular interest:<br><strong>https://mcl-labcas.jpl.nasa.gov/labcas-ui/s/index.html?search=*</strong></p><p>The website appeared to be tailored for users accessing scientific or research data, with a clean and functional design. During my exploration, I noticed a <strong>custom search functionality</strong> that caught my attention. I was curious to see how it handled input, especially since the search queries were not only reflected on the page but were also stored permanently on the server and reloaded on the interface.</p><p>To test for vulnerabilities, I attempted to save an XSS payload by entering &lt;script&gt;alert(&quot;Hello&quot;)&lt;/script&gt;. However, the input was sanitized on the client side, preventing the special characters from being saved.</p><p>As any pentester or bug hunter would do, I intercepted the request using Caido and manipulated the payload to bypass the client-side filters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*dxGwFJSO6c596HP5n2eqVA.png" /></figure><p>I tried injecting &lt;script&gt;al\u0065rt(&#39;hello&#39;)&lt;/script&gt;, and boom !! i found out that it wasn&#39;t just reflected in my browser but stored on the server. It executed on every browser or device visiting the affected page, confirming it as a <strong>Stored XSS</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jdkGeBnQ4eV6p7A4sdB1VA.png" /><figcaption>Entered the payload with my name to “flex” while reporting hahaha.</figcaption></figure><p><strong>Buzz lightyear was right haha.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*BJ4qlheNDwJmQRiq.jpeg" /></figure><p>To demonstrate the impact further, I deployed a <strong>blind XSS</strong> payload via <a href="https://xss.report/">xss.report</a>. The payload successfully triggered, capturing sensitive information such as user cookies, IP addresses, and session details, effectively showing how this could be exploited to hijack user accounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*69gn9NdAYxpEkAriNtEhgQ.png" /><figcaption>xss.report dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8dcykEC0cifSjcJ0YbkAig.png" /><figcaption>User’s cookies</figcaption></figure><h4><strong>Chaos</strong></h4><p>After gathering all the necessary information, I compiled a detailed report explaining the vulnerability’s impact, along with a clear proof of concept (PoC). but guess what !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*AX4bvqB417H4uBM-DlXyxw.png" /></figure><p>Despite providing a detailed report with a clear PoC, the Bugcrowd triager marked my submission as <strong>P5 (Informational)</strong>, dismissing it as self-XSS. What’s frustrating is that they didn’t even visit the vulnerable page to verify the issue.</p><blockquote>It’s concerning to see a significant vulnerability capable of compromising user data and affecting the organization’s reputation being misclassified. Accurate triaging is essential to ensure impactful vulnerabilities are recognized and properly addressed.</blockquote><p>but then one of my friend which really helped me through the whole process suggested to re report the vulnerability as they dont even check the reply of their sent message.</p><p><strong>After reporting it again, the vulnerability was finally triaged! It was later fixed, and the affected search-saving functionality was removed entirely.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*y3G9qyWaRtsb1L5ittkvvw.png" /><figcaption>Finally tiraged</figcaption></figure><p>Getting my first triaged report felt like a dream come true. After a month of reading writeups, watching PoCs on YouTube, and hunting persistently despite moments of doubt, it all paid off. <strong>Receiving that appreciation letter was everything I had worked for.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*lPrQJ7CC5sLeS9bbFRCS-g.png" /></figure><p>At the end. To anyone reading this: never lose hope. Keep learning, keep pushing, and trust that your hard work will pay off one day.</p><p>Thank you soo much for reading my writeup, Hope ya’ll liked it, i tried my best to share my experience and keep it insightful.</p><p>Untill next time.Happy hacking !!</p><p>Don’t forget to follow my socials : <a href="https://github.com/Ricktor0">Github</a>, <a href="https://www.instagram.com/vikr.am121/">Instagram</a> and <a href="https://www.linkedin.com/in/vikram-sharma-957513230?originalSubdomain=in">Linkedin</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74f4ada6e90c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ignite | Tryhackme]]></title>
            <link>https://v1krammm.medium.com/ignite-tryhackme-3c41e413e282?source=rss-a15e6c279a03------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c41e413e282</guid>
            <category><![CDATA[cve]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Vikram]]></dc:creator>
            <pubDate>Thu, 04 Jul 2024 06:02:51 GMT</pubDate>
            <atom:updated>2024-11-26T20:25:46.132Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*K09FnF_bJQKBBbLbJZVk9A.png" /></figure><p><a href="https://tryhackme.com/r/room/ignite">Ignite</a> is an easy machine on <a href="https://tryhackme.com/">Tryhackme</a> that focuses on vulnerability discovery and exploitation in <a href="https://www.getfuelcms.com/">FuelCMS</a>, a popular open-source content management system (CMS).It is a PHP-based CMS that provides a flexible and modular framework for building custom web applications.</p><p>We’ll be performing basic enumeration and privilege escalation to solve this machine.</p><h3><strong>Task 1 User.txt</strong></h3><p>First of all let’s use <a href="https://github.com/RustScan/RustScan">Rustscan</a> and <a href="https://nmap.org/">Nmap</a> for basic port scanning</p><pre>rustscan --ulimit 100000 -a 10.10.145.64  -- -sV -sC -v -oN ignite</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*kHC74a4lau6IW0Tb3xYiZA.png" /><figcaption>Rustscan output</figcaption></figure><p>I personally prefer rustscan because RustScan is significantly faster than Nmap, especially when scanning large networks or performing multiple scans simultaneously, you can use rustscan to identify open ports and then nmap for detailed scanning</p><p><strong>Result of the Nmap scan</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*JeETCDbW4oHMDvP1HnpIDg.png" /><figcaption>Nmap scan</figcaption></figure><p>It says port 80 is open and running fuel cms on it, let’s check what we can find there on web browser :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*bNHIN_N4dHlROp_eOBM0Aw.png" /></figure><p>We are welcomed with the <a href="https://www.getfuelcms.com/">Fuelcms</a> default landing page.</p><p>Fuel <a href="https://www.getfuelcms.com/">CMS</a> is built on top of the CodeIgniter framework and uses a modular architecture, which allows developers to easily add or remove features and functionality as needed.</p><p>On the default page, some things caught my attention.</p><ol><li>The version of the CMS, we can search for the potential exploits with this info later.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*C03JLbnuZZiJq7Ky0HxqHg.png" /></figure><p>2. DEFAULT CREDENTIALSS!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*F92u_YJ8ca8Cv6TMlReQgg.png" /></figure><blockquote>The /fuel directory leads to the login form, and that can be accessed by default credentials.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*ZvjUtgWUQh7C1jTVaBVjZA.png" /></figure><p>However after logging in i wasn’t able to upload a reverse shell for some reason.</p><p>So i decided to check if any potential exploit was there for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*quEzBPg4WgcLKXjiyMAQfA.png" /><figcaption>Google search for exploit</figcaption></figure><p>HMM… Got some interesting results</p><p>After surfing a bit, got to know that the Fuelcms ver 1.4 got a RCE vulnerability (<a href="https://www.exploit-db.com/exploits/47138">CVE-2018–16763</a>).</p><p>I used <a href="https://github.com/ice-wzl/Fuel-1.4.1-RCE-Updated">this</a> Python exploit for the Reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*IONVa0Wyd17n70MOlN-g3A.png" /><figcaption>Got the initial foothold</figcaption></figure><p>Got the initial foothold by that python exploit ,Now we can look around the directories and find flag.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*21Q0R2EZplwNWjmUieaGtQ.jpeg" /><figcaption>Flag.txt</figcaption></figure><h3>Task 2 Root.txt</h3><p><strong>I attempted privilege escalation by exploiting SUID and SGID binaries and conducting a system scan with </strong><strong>linpeas, but I did not uncover any useful information.</strong></p><p>So decided to take a look at the default web page again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHEwgsQJzi4z4YxIN_A4Pg.png" /></figure><blockquote>Checking the php file at fuel/application/config/database.php, i got :</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*VgWpUUg2EbQI8h2e53-KSQ.jpeg" /><figcaption>fuel/application/config/database.php</figcaption></figure><p>We can try and see if this password is the same for the root user:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*NRkySWpoIx6Q-fPsN9NRIg.jpeg" /></figure><p>PREVILEGE ESCALATEDD,Now we can read the root.txt</p><blockquote>cat /root/root.txt</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*_Cj86Zjqkj6OUD0mctOqZQ.png" /><figcaption>MACHINE PWNED</figcaption></figure><h3>Conclusion</h3><p>Exploiting this machine was a valuable experience, highlighting that the answer can often be obvious. Whenever we’re stuck, it’s essential to re-examine what we already understand.</p><p>Hope y’all liked my first write-up. I tried to keep it concise and insightful. Feedback would be much appreciated.</p><p><strong>SEE YOU NEXT TIMEE ^_^</strong></p><p><em>Follow my socials: </em><a href="https://github.com/Ricktor0"><em>GITHUB</em></a><em> , </em><a href="https://www.instagram.com/vikr.am121/"><em>INSTAGRAM</em></a><em>, </em><a href="https://in.linkedin.com/in/vikram-sharma-957513230"><em>LINKEDIN</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c41e413e282" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>