Dumping Source Code and Accessing Internal Databases via a Phpunit Vulnerability

Finding the vulnerability During routine exploration of vulnerable servers, I discovered the presence of CVE-2017-9841 on a target domain using Nuclei with the http/cves/2017/CVE-2017-9841.yaml template. The scanner flagged an exposed PHPUnit utility script under the /vendor tree. What CVE-2017-9841 is Util/PHP/eval-stdin.php in PHPUnit (before 4.8.28 and 5.x before 5.6.3) allows remote attackers to execute arbitrary PHP code sent in an HTTP POST body beginning with <?php . This is usually exposed when an application leaves its vendor folder web-accessible, so the eval-stdin.php file can be requested directly. Knowing this enabled me to submit PHP payloads via the POST body to the vulnerable endpoint. ...

November 6, 2025 · 11 min

Cracking Linux Hashes and Expanding Access

Initial Entry Point During a routine exploration of vulnerable servers on the internet, I successfully gained root access to several machines. While the specific method used to achieve root access is beyond the scope of this blog, I’ll focus on how I expanded my access to other servers within the same organization. Extracting Linux User Hashes Once inside the compromised machine, I noticed multiple user accounts. With root privileges, I accessed the /etc/shadow file, which stores password hashes for all users on the system. I copied the contents of the shadow file to my local machine and extracted the hashes using the following command: ...

March 21, 2025 · 4 min

Exploiting Unencrypted Private Keys and Misconfigured SSH Settings to Breach Multiple Systems

Discovery of Vulnerable Machines While investigating vulnerable, internet-facing systems, I successfully compromised several devices. Although the specific techniques I used to gain initial access fall outside the scope of this post, the real discovery came during my post-exploitation phase on one of the compromised machines. Discovering Vulnerable SSH Configurations While reviewing the files on the compromised system, I stumbled upon something interesting in the ~/.ssh directory of a particular user account. Within this directory, I found a private key file being used for SSH logins to other systems. My next step was to check whether the private key was encrypted. ...

February 24, 2025 · 3 min

Lateral Movement Through SSH Command Tampering

Understanding Lateral Movement Lateral movement in cybersecurity refers to the techniques used by attackers to move within a compromised network after gaining initial access. This allows them to escalate privileges, exfiltrate data, and reach high-value targets while evading detection. Advanced Persistent Threats (APTs) commonly use this tactic to maintain long-term access, often remaining undetected for extended periods. Entry Point During my exploration of vulnerable and misconfigured internet-facing machines, I was able to gain root access to several devices. The methods I used to gain initial access are beyond the scope of this blog. While analyzing one of the compromised machines during post-exploitation, I noticed in the bash history that the user frequently connected to other devices via SSH. This discovery led me to investigate further, with the goal of capturing credentials to access additional systems. ...

February 19, 2025 · 3 min

Building a Heat Map for IIT Kanpur's Computer Labs

SSH Services at IIT Kanpur IIT Kanpur’s network uses Class B private IP addresses. Within this private network, students, faculty and staff can SSH into various servers using their Computer Center credentials to access different services. Examples of such servers include the GPU server, APP server, and MATH server. Each user has a 2GB directory on the Computer Center’s NFS (Network File System), which is mounted on all servers. This allows users to access their files across multiple servers without needing to copy them to each one, reducing the need for additional storage on individual servers. ...

September 24, 2024 · 3 min