<?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 Valida on Medium]]></title>
        <description><![CDATA[Stories by Valida on Medium]]></description>
        <link>https://medium.com/@vaniliaa?source=rss-dea95ee5cc3a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eCkkBxKvr34keqcm1OHvFw.jpeg</url>
            <title>Stories by Valida on Medium</title>
            <link>https://medium.com/@vaniliaa?source=rss-dea95ee5cc3a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 13:17:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vaniliaa/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[HTB Academy — Footprinting: Hard Lab]]></title>
            <link>https://medium.com/@vaniliaa/htb-academy-footprinting-hard-lab-d8bd101f00f9?source=rss-dea95ee5cc3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8bd101f00f9</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Valida]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 14:46:20 GMT</pubDate>
            <atom:updated>2026-11-10T14:46:20.718Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*yV_Rbpf32dUVdT-Y_jKe5w.png" /></figure><h3>Introduction</h3><p>The goal of this lab was to enumerate the NIXHARD server and find the username HTB and its password.</p><p>According to the lab description, this server was an MX and management server for the internal network. It also worked as a backup server for internal domain accounts.</p><p>I used these details as clues during enumeration and followed the information I discovered until I found the credentials.</p><h3>1. Initial Nmap Scan</h3><p>I started with a full TCP port scan to identify the running services.</p><pre>sudo nmap -sV -sC -Pn -p- 10.129.185.218</pre><p>The scan revealed several open ports:</p><blockquote>22/tcp — SSH</blockquote><blockquote>110/tcp — POP3</blockquote><blockquote>143/tcp — IMAP</blockquote><blockquote>993/tcp — IMAPS</blockquote><blockquote>995/tcp — POP3S</blockquote><p>The scan helped me identify the available services, but it didn’t reveal any credentials. I needed to investigate further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*R6_EAE7zXVv26szdECMC5A.png" /></figure><h3>2. Checking SNMP</h3><p>When I read the lab description again, I focused on the fact that the server was also described as a management server.</p><p>I remembered SNMP from the Footprinting module, so I decided to check whether it was running on the target.</p><pre>sudo nmap -sU -p 161 -sV -sC 10.129.185.218</pre><p>The scan confirmed that UDP port 161 was running SNMP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*0oVV45HE83OgQmpNZ7tj5g.png" /></figure><h3>3. Finding the Community String</h3><p>Next, I used onesixtyone with the SNMP community string wordlist from SecLists.</p><pre>onesixtyone -c /usr/share/seclists/Discovery/SNMP/snmp.txt 10.129.185.218</pre><p>The scan revealed a valid community string:</p><pre>backup</pre><p>It also showed the hostname NIXHARD.</p><p>Now that I had a valid community string, I could start enumerating SNMP information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*DQB3v7enVNYmbRR9NXEbVg.png" /></figure><h3>4. Enumerating SNMP</h3><p>I used snmpwalk with the community string I had discovered.</p><pre>snmpwalk -v2c -c backup 10.129.185.218</pre><p>While going through the output, I noticed a recovery script:</p><pre>/opt/tom-recovery.sh</pre><p>More importantly, the output revealed credentials for a user named tom:</p><pre>tom:NMds732Js2761</pre><p>This was my first set of credentials. However, the lab specifically asked for the password of the HTB user, so I continued investigating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*BJA3JGgXbsGSq8FzkvVg8Q.png" /></figure><h3>5. Connecting to IMAP</h3><p>Since IMAP was one of the services I found during the initial scan, I decided to try the credentials I had discovered.</p><p>First, I connected to the IMAP service using Netcat:</p><pre>nc -nv 10.129.185.218 143</pre><p>After receiving the Dovecot banner, I logged in:</p><pre>a1 LOGIN tom NMds732Js2761</pre><p>The server confirmed that the login was successful.</p><p>I then listed the available mailboxes:</p><pre>a2 LIST &quot;&quot; &quot;*&quot;</pre><p>There were four mailboxes:</p><ul><li>Notes</li><li>Meetings</li><li>Important</li><li>INBOX</li></ul><p>I checked the mailboxes one by one. The first three were empty, but INBOX contained one message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*cT-1ZaJP8_tKFJI8JYNqBA.png" /></figure><h3>6. Finding an SSH Private Key</h3><p>I wanted to see what was inside that message, so I first fetched its details:</p><pre>a7 FETCH 1 ALL</pre><p>The subject was KEY. That caught my attention, so I retrieved the message body:</p><pre>a8 FETCH 1 BODY[TEXT]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*whrMyeeZPTowqN770y8buw.png" /></figure><p>And there it was — an OpenSSH private key!</p><p>I saved the key locally as id_rsa_tom and changed its permissions before using it.</p><pre>chmod 600 id_rsa_tom</pre><h3>7. Getting SSH Access</h3><p>With the private key ready, I tried connecting to the server as tom.</p><pre>ssh -i id_rsa_tom tom@10.129.185.218</pre><p>The connection worked, and I successfully got access to the server as the tom user.</p><p>Now I could explore the user’s files and look for more clues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*sbUOc_bDhIX4oSqIz5abGA.png" /></figure><h3>8. Checking Bash History</h3><p>I started by listing the files in Tom’s home directory:</p><pre>ls -lah</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*SvZ9k3aq--RLvaIlXnRQeQ.png" /></figure><p>I noticed a .bash_history file, so I decided to check its contents.</p><pre>cat ~/.bash_history</pre><p>The history contained several MySQL commands, including attempts to access a database named users.</p><p>This suggested that the information I needed might be stored in MySQL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*BJJ64WcId3o5570o4yQHuA.png" /></figure><h3>9. Checking MySQL History</h3><p>Before connecting to MySQL, I also checked its command history:</p><pre>cat ~/.mysql_history</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*z8RrSM9U59iK6pbZUw62kg.png" /></figure><p>I found commands such as:</p><pre>SHOW DATABASES;<br>USE users;<br>SHOW TABLES;<br>SELECT * FROM users;</pre><p>This confirmed that there was a database named users containing a table with the same name.</p><p>At this point, I knew where to look next.</p><h3>10. Finding the HTB Password</h3><p>I used the credentials discovered earlier to connect to MySQL:</p><pre>mysql -u tom -p</pre><p>After entering Tom’s password, I listed the available databases:</p><pre>SHOW DATABASES;</pre><p>I found the users database and selected it:</p><pre>USE users;</pre><p>Then, I checked the available tables:</p><pre>SHOW TABLES;</pre><p>Finally, I queried the table for the specific account mentioned in the lab:</p><pre>SELECT * FROM users WHERE username = &#39;HTB&#39;;</pre><p>The query returned the HTB user&#39;s password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*wCYIupXu99RoKZwiCHenSw.png" /></figure><p><strong>With this, I found the required credentials and completed the lab.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*M-zjfzXdqjvi4Wz4PRqAPg.png" /></figure><h3>Conclusion</h3><p>This lab was a good exercise in enumeration and following clues across different services. It reminded me that even small pieces of information can lead to the credentials I need.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8bd101f00f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB Academy — Footprinting: Medium Lab
]]></title>
            <link>https://medium.com/@vaniliaa/htb-academy-footprinting-medium-lab-d673ea6fd840?source=rss-dea95ee5cc3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d673ea6fd840</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Valida]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 21:18:21 GMT</pubDate>
            <atom:updated>2026-11-07T21:18:21.798Z</atom:updated>
            <content:encoded><![CDATA[<h3>HTB Academy — Footprinting: Medium Lab</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*yV_Rbpf32dUVdT-Y_jKe5w.png" /></figure><h3>Introduction</h3><p>The goal of this lab was to enumerate the target server and find the password of the user HTB.</p><p>I started with an Nmap scan and then explored the NFS and SMB shares. During the process, I found two sets of credentials. After some failed login attempts, I managed to access the Windows machine and use SQL Server Management Studio to find the required password.</p><h3>1. Nmap Scan</h3><p>First, I scanned all TCP ports to see which services were running on the target.</p><pre>sudo nmap -sV -sC --open -p- 10.129.156.240</pre><p>The scan showed several open ports. The ones I focused on were:</p><blockquote>111/tcp — RPCbind</blockquote><blockquote>135/tcp — MSRPC</blockquote><blockquote>139/tcp — NetBIOS</blockquote><blockquote>445/tcp — SMB</blockquote><blockquote>2049/tcp — NFS</blockquote><blockquote>3389/tcp — RDP</blockquote><blockquote>5985/tcp — WinRM</blockquote><p>The RDP information also revealed the hostname WINMEDIUM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*XcTL1oOgAinl5qXrNQY-KQ.png" /></figure><h3>2. NFS Enumeration</h3><p>Since NFS was running on port 2049, I checked the available shares.</p><pre>showmount -e 10.129.156.240</pre><p>I found the following share:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*ah-6mQw_d0LNi5w2y1Jkjg.png" /></figure><p>I created a directory and mounted the share:</p><pre>mkdir targetNFS<br>sudo mount -t nfs 10.129.156.240:/TechSupport ./targetNFS/ -o nolock</pre><p>I listed them with elevated privileges:</p><pre>sudo ls -la targetNFS</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*I4Fw0J2PNecDoNZme09lKA.png" /></figure><p>There were many ticket files, but most of them were empty. One file, ticket4238791283782.txt, contained data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*rwnmbiGRAyGKvNkwi8krHA.png" /></figure><p>I opened it:</p><pre>sudo cat targetNFS/ticket4238791283782.txt</pre><p>Inside, I found a support conversation where Alex shared SMTP configuration details. The credentials were:</p><p><strong><em>Username: alex</em></strong><em><br></em><strong><em>Password: lol123!mD</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*0e96ow7nrHYZN78TPsvtJg.png" /></figure><h3>3. SMB Enumeration</h3><p>Next, I used Alex’s credentials to enumerate the SMB shares.</p><pre>smbclient -L //10.129.156.240 -U alex</pre><p>The server listed several shares, including devshare and Users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*Fj9YPp_vg6ClBmDeeS9CZQ.png" /></figure><p>I connected to devshare:</p><pre>smbclient //10.129.156.240/devshare -U alex</pre><p>There was a file named important.txt, so I downloaded it:</p><pre>get important.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*WSek-ewR2b0SYrCTOZaJKg.png" /></figure><p>After reading the file, I found another credential pair:</p><pre>cat important.txt</pre><p><em>sa:87N1ns@slls83</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*q7PAFHFSm_xM_9mY0FXaqA.png" /></figure><p>This was the sa account and its password.</p><p>I also checked the Users share and explored Alex&#39;s folders. On the Desktop, I found a shortcut to Microsoft SQL Server Management Studio 18. This was useful for the next steps.</p><h3>4. Testing the Credentials and RDP Access</h3><p>I first tried the sa credentials with SMB and WinRM, but both login attempts failed.</p><p>I also checked the common SQL Server ports:</p><pre>nmap -p 1433,1434,4022 -sV 10.129.156.240</pre><p>All three ports were closed. So, connecting directly to SQL Server from my Kali machine was not an option.</p><p>I also tested Alex’s credentials with WinRM, but that login failed too.</p><p>Then, I checked RDP:</p><pre>nxc rdp 10.129.156.240 -u alex -p &#39;lol123!mD&#39;</pre><p>This time, the credentials were accepted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*FHz2IRlFz_-t9JHo3v9KFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RgXqxgLpNrHJQ140flVazA.png" /></figure><p>However, although Alex’s credentials were valid for RDP, I could not access SQL Server using this account. I then tried connecting as Administrator using the password found in the SMB share.</p><pre>xfreerdp /v:10.129.156.240 /u:Administrator /p:&#39;87N1ns@slls83&#39; /cert:ignore</pre><p>This allowed me to access the Windows environment with the Administrator account.</p><h3>5. Finding the HTB User’s Password</h3><p>After accessing the Windows machine, I opened SQL Server Management Studio.</p><p>I went to the accounts database and found the devsacc table.</p><p>I clicked <strong>New Query</strong> and ran:</p><pre>SELECT * FROM accounts.dbo.devsacc WHERE name = &#39;HTB&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*f-3yUa8_8c8rU-RCx8NXQg.png" /></figure><p>The query returned the record for HTB, including the id, name, and password columns.</p><p>The value in the password column was the answer to the lab question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*fK1LPgbVfY4v5LiAEn5tSg.png" /></figure><h3>Conclusion</h3><p>From exposed NFS and SMB shares to a password hidden in the SQL database, this lab was a good reminder to follow every lead and make use of the credentials you find.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d673ea6fd840" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB Academy — Footprinting: Easy Lab]]></title>
            <link>https://medium.com/@vaniliaa/htb-academy-footprinting-easy-lab-f9800adaacc8?source=rss-dea95ee5cc3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9800adaacc8</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Valida]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 03:10:49 GMT</pubDate>
            <atom:updated>2026-11-04T03:11:24.557Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ikiEOffObUzl-kP9vJOV7Q.jpeg" /></figure><h3>Introduction</h3><p>This lab was about exploring an internal server, finding useful information, and retrieving the flag.txt file.</p><h3>1. Nmap Scan</h3><p>First, I scanned all TCP ports to identify open ports and running services.</p><pre>sudo nmap -sC -sV -p- -Pn 10.129.145.17</pre><p>The scan revealed four open ports:</p><blockquote>21/tcp – FTP</blockquote><blockquote>22/tcp – SSH</blockquote><blockquote>53/tcp – DNS</blockquote><blockquote>2121/tcp – FTP</blockquote><p>I noticed that another FTP service was running on port 2121, so I decided to investigate it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*JPSr-ibQgACXLzGZkAXePQ.png" /></figure><h3>2. FTP on Port 21</h3><p>I first connected to the FTP service on port 21 using the credentials provided in the lab.</p><pre>ftp 10.129.145.17</pre><p>Credentials:</p><p><em>ceil : qwer1234</em></p><p>I successfully logged in, but the directory listing was empty. I could only see . and ...</p><p>Since I could not find any useful files, I decided to check the other FTP service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*Rqgfix28Xw9IWlFu75HlxQ.png" /></figure><h3>3. FTP on Port 2121</h3><p>Next, I connected to FTP on port 2121:</p><pre>ftp 10.129.145.17 2121</pre><p>After logging in with the same credentials, I explored the directory and found .bash_history and the .ssh directory. I also downloaded the id_rsa private key from the .ssh directory.</p><pre>get .bash_history<br>get id_rsa</pre><p>These files provided useful information for the next steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*Dkmo6PrqKFQCuE4NjVqizQ.png" /></figure><h3>4. Checking Bash History</h3><p>After downloading the file, I checked its contents in my Kali terminal:</p><pre>cat .bash_history</pre><p>The history showed that the user had generated an SSH key pair:</p><pre>ssh-keygen -t rsa -b 4096</pre><p>I also found this command:</p><pre>cat id_rsa.pub &gt;&gt; authorized_keys</pre><p>This indicated that the public key had been added to authorized_keys.</p><p>Another interesting part of the history was related to the flag:</p><pre>mkdir flag<br>cd flag/<br>touch flag.txt<br>vim flag.txt<br>mv flag/flag.txt .</pre><p>These commands provided useful information about the SSH configuration and the location of the flag file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*5SPRzZJ90xr7WkG7jtOJCw.png" /></figure><h3>5. Connecting Through SSH</h3><p>Before connecting, I changed the private key’s permissions:</p><pre>chmod 600 id_rsa</pre><p>SSH requires private keys to have restricted permissions. This prevents other users from accessing the key.</p><p>The 600 permission allows only the file owner to read and write it.</p><p>Then, I connected to the server:</p><pre>ssh -i id_rsa ceil@10.129.145.17</pre><p>The connection was successful, and I gained access as the ceil user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*pRgSwfoZjZSRIjwz2WTg2w.png" /></figure><h3>6. Finding the Flag</h3><p>After logging in, I checked the current user:</p><pre>whoami</pre><p>The output confirmed that I was logged in as ceil.</p><p>Next, I moved to /home and listed its contents:</p><pre>cd /home<br>ls</pre><p>I found a directory named flag. I entered it and read the file:</p><pre>cd flag<br>cat flag.txt</pre><p>I successfully retrieved the flag and completed the lab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*kewgpv3-QV_x5fr-VVmyAA.png" /></figure><h3>Conclusion</h3><p>This lab demonstrated how an exposed FTP service and a recovered SSH private key can be used to gain access to a server and retrieve the flag.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9800adaacc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agent Sudo (TryHackMe) Walkthrough: Steganography, OSINT, and CVE-2019–14287 Privilege Escalation]]></title>
            <link>https://medium.com/@vaniliaa/agent-sudo-tryhackme-walkthrough-steganography-osint-and-cve-2019-14287-privilege-escalation-26d54d34a027?source=rss-dea95ee5cc3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/26d54d34a027</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Valida]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 12:11:48 GMT</pubDate>
            <atom:updated>2026-08-01T12:11:48.107Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C6gcKzvao456NIbnOmfeeg.png" /></figure><blockquote>A full walkthrough of TryHackMe’s Agent Sudo room — from a single HTTP header to root, one hidden file at a time.</blockquote><p>Some CTF rooms just feel like a checklist. Agent Sudo isn’t one of them — it feels like an actual spy story. You start by poking at three open ports, and by the end you’ve cracked a hidden ZIP inside a PNG, decoded a Base64 clue into a steghide passphrase, unlocked a JPEG’s hidden message, matched a suspicious photo to a real-world conspiracy theory, and exploited a real CVE to become root. If you like your privilege escalation with a side of mystery, this one’s for you.</p><p>Below is my complete walkthrough, organized exactly the way the room is structured — Task 1 through Task 5 — with the commands, the reasoning behind each step, and every question answered along the way.</p><p><em>This walkthrough documents the complete exploitation path from initial enumeration to root access, on a legal, self-hosted TryHackMe lab environment, for educational purposes.</em></p><blockquote><strong>~Skills Covered~</strong></blockquote><blockquote>Reconnaissance<br>Nmap Enumeration<br>HTTP Header Fuzzing<br>Burp Suite<br>Hydra<br>FTP<br>Binwalk<br>John the Ripper<br>Base64<br>Steghide<br>SSH<br>OSINT<br>Linux Privilege Escalation<br>CVE-2019–14287</blockquote><h3>Task 1 — Deploy the Machine</h3><p>This part is easy: spin up the TryHackMe AttackBox (or connect through your own OpenVPN config) and deploy the target Lab Machine. Once it’s up, you’ll get an IP address — that’s your only starting point. No hints, no map. Just an IP.</p><h3>Task 2 — Enumerate the Machine</h3><p>Every engagement starts the same way: find out what’s actually running before you start poking at it.</p><h4>Step 1 — Full port scan with Nmap</h4><p><em>nmap -Pn -A -p- — open &lt;IP&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*XzT0Jef4mlrCAgZf9lJNXQ.png" /><figcaption><em>Figure 1 — Full Nmap scan showing three open ports</em></figcaption></figure><p>Three ports came back open:</p><p>• <strong>FTP (21/tcp)</strong><br> Service: vsftpd 3.0.3<br> Notes: Credentials were later discovered with Hydra.</p><p>• <strong>SSH (22/tcp)</strong><br> Service: OpenSSH 7.6p1<br> Notes: Used after recovering James’s password.</p><p>• <strong>HTTP (80/tcp)</strong><br> Service: Apache 2.4.29<br> Notes:<em> </em>Hidden page discovered through User-Agent header fuzzing.</p><p>At this stage, HTTP appeared to be the best initial attack surface, while FTP and SSH suggested that valid credentials would become useful later in the engagement.</p><h4>Step 2 — Testing anonymous FTP</h4><p>Open FTP port with no obvious credentials? Always worth a shot with anonymous login. No luck this time, but it confirmed the service was alive and rejecting weak entry points:</p><p><em>ftp &lt;IP&gt; Name: anonymous → 530 Login incorrect</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*54_HVYHTtp2yx6HkyhaQoA.png" /><figcaption><em>Figure 2 — Anonymous FTP login attempt fails</em></figcaption></figure><h4>Step 3 — The web server’s own hint</h4><p>Port 80 hosted a simple page titled “Announcement.” Instead of a generic welcome message, it addressed the visitor directly with an unusual instruction:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*v_IhtMP3xwNigct0BXfhrQ.png" /><figcaption><em>Figure 3 — The homepage tells visitors to use their own codename as the User-Agent</em></figcaption></figure><p>That’s a direct hint: the server expects a specific User-Agent value, treated as a kind of codename, to unlock further content. Rather than guessing manually, I fuzzed the User-Agent HTTP header using Burp Suite Intruder. One payload produced a 302 Found response instead of the usual 200:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*Ndwc8nK6K77jme5k80WecA.png" /><figcaption><em>Figure 4 — Burp Suite Intruder — fuzzing the User-Agent header</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*ThyRVKapCV0yjFqc7J2W5Q.png" /><figcaption><em>Figure 5 — Intruder results — payload “C” returns a 302 status code</em></figcaption></figure><p><em>HTTP/1.1 302 Found Location: agent_C_attention.php</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*2RHvhyeImawbDNBR_yO1yA.png" /><figcaption><em>Figure 6 — Response detail confirming the redirect target</em></figcaption></figure><p><strong><em>Why this step: </em></strong><em>The homepage explicitly told me what mechanism to attack, so testing single-letter and name-like values against the User-Agent header was a direct, targeted move rather than a blind guess.</em></p><h4>Step 4 — The hidden page</h4><p>Following that redirect led to a page addressed directly to someone named Chris — which, conveniently, also answered the room’s question about the agent’s identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*zDbcnjDNRv228k7JCEF0sg.png" /><figcaption><em>Figure 7 — agent_C_attention.php — the agent’s identity is revealed</em></figcaption></figure><p><strong>→Task 2 Answers:</strong></p><blockquote><strong>Q: </strong><em>How many open ports?</em></blockquote><blockquote><strong>A: 3</strong></blockquote><blockquote><strong>Q: </strong><em>How you redirect yourself to a secret page?</em></blockquote><blockquote><strong>A: </strong>By fuzzing the <strong>User-Agent</strong> HTTP header (via Burp Intruder) — one specific value triggered a 302 redirect to agent_C_attention.php</blockquote><blockquote><strong>Q: </strong><em>What is the agent name?</em></blockquote><blockquote><strong>A: Chris</strong></blockquote><h3>Task 3 — Brute Your Way Out</h3><p>Enumeration gave me a username. Now it was time to turn that into actual access.</p><h4>Step 1 — Cracking the FTP password with Hydra</h4><p><em>hydra -l chris -P /usr/share/wordlists/rockyou.txt ftp://&lt;IP&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*dhOgmtgOAiIFiCVSWFeyOw.png" /><figcaption><em>Figure 8 — Hydra brute-forcing the FTP password</em></figcaption></figure><p>Hydra successfully recovered the FTP credentials:</p><ul><li><em>username: chris</em></li><li><em>password: crystal</em></li></ul><h4>Step 2 — Logging in and grabbing the files</h4><p><em>ftp &lt;IP&gt; # chris / crystal</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*g_n2XW8ptcClsYhSJEAT8Q.png" /><figcaption><em>Figure 9 — FTP login and directory listing, followed by downloading all three files</em></figcaption></figure><p>Three files were sitting in the FTP directory, so I pulled all of them down:</p><p><em>ls</em></p><p><em>get To_agentJ.txt</em></p><p><em>get cute-alien.jpg</em></p><p><em>get cutie.png</em></p><h4>Step 3 — Reading the note to Agent J</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*VB1Ene6Bhu1JEglwJkMwpg.png" /><figcaption><em>Figure 10 — Contents of To_agentJ.txt</em></figcaption></figure><p>The note claimed the “alien” photos were fakes, and that the real picture — with a hidden login password inside it — was stored somewhere in Agent J’s own directory.</p><h4>Step 4 — Cracking cutie.png</h4><p>First, metadata:</p><p><em>exiftool cutie.png</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*M1TlitRXh_d1c5WbqgXERA.png" /><figcaption><em>Figure 11 — exiftool output — a trailer-data warning on cutie.png</em></figcaption></figure><p>A warning about trailer data after the PNG IEND chunk often indicates that additional content has been appended to the image. Binwalk confirmed it:</p><p><em>binwalk cutie.png</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*MiTk0Z5KPBta5cUs6ovZdQ.png" /><figcaption><em>Figure 12 — Binwalk identifies a hidden, encrypted ZIP archive inside cutie.png</em></figcaption></figure><p><strong><em>Why this step: </em></strong><em>Metadata and trailing-data warnings are cheap, fast checks that often reveal whether a file has been used to smuggle extra data — always worth running before reaching for heavier steganalysis tools.</em></p><p>Hidden inside the PNG was a password-protected ZIP archive containing a file called To_agentR.txt. I extracted it, cracked the ZIP hash with John the Ripper, and read the note:</p><p><em>binwalk -e — run-as=root cutie.png</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*GvRHtwSE5pS7W1s3TQHMmQ.png" /><figcaption><em>Figure 13 — Extracting the embedded ZIP archive with binwalk</em></figcaption></figure><p><em>zip2john _cutie.png.extracted/8702.zip &gt; hash.txt</em></p><p><em>john hash.txt — wordlist=/usr/share/wordlists/rockyou.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*JjTjyFzP-D7WrqruTfMPLA.png" /><figcaption><em>Figure 14 — John the Ripper cracks the ZIP password: alien</em></figcaption></figure><p>The ZIP password cracked to: <strong>alien</strong>.</p><p><em>7z x _cutie.png.extracted/8702.zip</em></p><p><em>cat To_agentR.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*-f_U-RaOEzkYBoXNpXhVQQ.png" /><figcaption><em>Figure 15 — Extracting the ZIP and reading To_agentR.txt</em></figcaption></figure><h4>Step 5 — A Base64 clue about Area 51</h4><p>Agent R’s note mentioned sending the picture to a strange string: QXJlYTUx. The string matched the typical format of Base64-encoded text, so I decoded it:</p><p><em>echo “QXJlYTUx” | base64 -d #</em> → <strong>Area51</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*sv4mWc4GVzfBJCiWDk0dRg.png" /><figcaption><em>Figure 16 — Decoding the Base64 string reveals Area51</em></figcaption></figure><p>Area51 turned out to be more than a narrative flourish — it was exactly the passphrase needed for the next step.</p><h4>Step 6 — Steghide on cute-alien.jpg</h4><p>The note to Agent J said the real picture, with the password hidden inside, was in “your directory” — meaning cute-alien.jpg itself. Using the Area51 passphrase decoded in the previous step, steghide extracted the hidden file:</p><p><em>steghide extract -sf cute-alien.jpg </em># Enter passphrase: Area51</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*syI80t4W2K2tAasDNy2mmA.png" /><figcaption><em>Figure 17 — Steghide extracts a hidden file using the Area51 passphrase</em></figcaption></figure><p><em>cat message.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*4PO4s8Qhf9L-r0mWW8FGww.png" /><figcaption><em>Figure 18 — message.txt reveals James’s SSH password</em></figcaption></figure><p>Steghide accepted the Area51 passphrase and extracted the hidden message, revealing the SSH password for James, along with a short message explaining that Agent R had chosen the password.</p><p><strong>→Task 3 Answers:</strong></p><blockquote><strong>Q: </strong><em>FTP password</em></blockquote><blockquote><strong>A: crystal</strong></blockquote><blockquote><strong>Q: </strong><em>Zip file password</em></blockquote><blockquote><strong>A: alien</strong></blockquote><blockquote><strong>Q: </strong><em>steg password</em></blockquote><blockquote><strong>A: Area51</strong></blockquote><blockquote><strong>Q: </strong><em>Who is the other agent (in full name)?</em></blockquote><blockquote><strong>A: james — </strong>revealed as the SSH username once we logged in (Agent J = James)</blockquote><blockquote><strong>Q: </strong><em>SSH password</em></blockquote><blockquote><strong>A: hackerrules!</strong></blockquote><h3>Task 4 — You Know the Drill</h3><h4>Step 1 — Logging in over SSH</h4><p><em>ssh james@&lt;IP&gt; # password: hackerrules!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*YWrZBRnRyySlinnRshe1Kw.png" /><figcaption><em>Figure 19 — SSH login as james</em></figcaption></figure><h4>Step 2 — Grabbing the user flag</h4><p><em>ls -la</em></p><p><em>cat user_flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*JdmBw60pzrOF25Jy_44_hQ.png" /><figcaption><em>Figure 20 — Reading user_flag.txt</em></figcaption></figure><h4>Step 3 — Alien_autospy.jpg and a little OSINT</h4><p>James’s home directory had one more image waiting: Alien_autospy.jpg. I copied it over to my attack machine to take a closer look:</p><p><em>scp james@&lt;IP&gt;:/home/james/Alien_autospy.jpg .</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*EijwOVlXYqKZ4x5PklRJzg.png" /><figcaption><em>Figure 21 — Locating Alien_autospy.jpg in James’s home directory</em></figcaption></figure><p>Exif metadata confirmed the image had been edited in Adobe Photoshop CS5.1, but it did not answer the room question directly — it only proved the photo had been manipulated. A reverse image search associated the image with the famous Roswell alien autopsy hoax, which is what actually answered the question:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*v-H_wErId-dUatmOKjaIWA.png" /><figcaption><em>Figure 22 — Reverse image search links the photo to the Roswell alien autopsy hoax</em></figcaption></figure><p><strong><em>Why this step: </em></strong><em>A CTF box will occasionally hand you a file that has nothing left to extract technically — the next clue is external, real-world context. Treating a suspicious image as an OSINT target, not just a forensics target, is what closes this question out.</em></p><p><strong>→Task 4 Answers</strong></p><blockquote><strong>Q: </strong><em>What is the user flag?</em></blockquote><blockquote><strong>A: b03d975e8c92a7c04146cfa7a5a313c7</strong></blockquote><blockquote><strong>Q: </strong><em>What is the incident of the photo called?</em></blockquote><blockquote><strong>A: Roswell alien autopsy</strong></blockquote><h3>Task 5 — Time to Get Real</h3><p>User access is nice. Root is nicer. Time to check what James can actually run.</p><h4>Step 1 — Checking sudo rights</h4><p><em>sudo -l sudo — version</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*uMVw78DZnglt7NKjyhY5lQ.png" /><figcaption><em>Figure 23 — sudo -l, sudo — version, and the successful exploit</em></figcaption></figure><p>The result looked deceptively locked down:</p><p><em>User james may run the following commands on agent-sudo:</em></p><p><em>(ALL, !root) /bin/bash</em></p><p>On paper, that means James can run /bin/bash as any user — except root. Seems safe… unless the sudo version has a known flaw in how it validates user IDs. Sure enough, this box was running <strong>sudo 1.8.21p2.</strong></p><h4>Step 2 — Finding the right CVE</h4><p>A quick search for that sudo version turned up exactly the bug I was hoping for:</p><p><a href="https://www.exploit-db.com/exploits/47502">Exploit-DB (EDB-ID: 47502)</a></p><p><strong>CVE-2019–14287</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ndKk-iP6vczjYEMkSc_t1A.png" /><figcaption>Figure 24 — Exploit-DB entry for CVE-2019–14287 (EDB-ID: 47502)</figcaption></figure><p>The bug: sudo (before 1.8.28) never checks whether a given user ID actually exists. Passing -1 (or its unsigned equivalent, 4294967295) bypasses the intended root restriction due to the vulnerable UID validation logic in older sudo versions — the value gets treated as 0, which is always root. So a “(ALL, !root)” rule, meant to block exactly this, gets silently bypassed.</p><p><strong><em>Why this step: </em></strong><em>Reading the exact sudo version and searching it against known CVEs, rather than guessing at generic privilege-escalation scripts, is what makes this step fast and precise instead of a shot in the dark.</em></p><h4>Step 3 — Popping root</h4><p><em>sudo -u#-1 /bin/bash</em></p><p>One line, and the flawed UID check does the rest — sudo happily hands over a root shell.</p><h4>Step 4 — Reading the root flag</h4><p><em>whoami</em></p><p><em>cat /root/root.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*cqHswK7UXm4NLAPpGONtNQ.png" /><figcaption><em>Figure 25 — Root shell and the root flag</em></figcaption></figure><p>The root flag came with a signature from the room’s creator, revealing the identity of “Agent R” all along.</p><p><strong>→Task 5 Answers</strong></p><blockquote><strong>Q: </strong><em>CVE number for the escalation (Format: CVE-xxxx-xxxx)</em></blockquote><blockquote><strong>A: CVE-2019–14287</strong></blockquote><blockquote><strong>Q: </strong><em>What is the root flag?</em></blockquote><blockquote><strong>A: b53a02f55b57d4439e3341834d70c062</strong></blockquote><blockquote><strong>Q: </strong><em>(Bonus) Who is Agent R?</em></blockquote><blockquote><strong>A: DesKel — </strong>the room’s creator, credited at the bottom of the root flag message</blockquote><h3>Final Thoughts</h3><p>Agent Sudo packs an unusual amount of variety into one box: HTTP header fuzzing to find a hidden page, FTP/SSH brute-forcing, a layered steganography chain (PNG → ZIP → password, JPG → steghide → password), some genuine OSINT work to identify a photo, and a real, well-documented CVE for the final privilege escalation. It’s a great reminder that recon isn’t just about ports and services — sometimes the most important clue is a weird string of text or a photo that looks a little too familiar.</p><p>Overall, Agent Sudo is an excellent beginner-to-intermediate room that combines enumeration, steganography, OSINT, password cracking, and a real privilege-escalation vulnerability into a single coherent storyline.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26d54d34a027" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>