Kobold Writeup (HackTheBox Easy Machine)

Overview :
Kobold is an easy-rated HackTheBox machine with insight on modern vulnerabilities and especially the importance of group permission auditing.
Had fun pwning this one.

Reconnaissance
As per usual, naabu scan first for faster port enumeration,

And then nmap :

Added kobold.htb to /etc/hosts and we have access to this platform:

But the nmap was very telling: | Subject Alternative Name: DNS:kobold.htb, DNS:*.kobold.htb
Subdomains definitely exist. Let’s fuzz:
1 | └─$ ffuf -u https://kobold.htb -H "Host: FUZZ.kobold.htb" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -mc 200,301,302,403 -fs 154 |
Added mcp.kobold.htb to /etc/hosts and a dashboard for mcp server management appears :

MCP Jam Inspector ?
MCPJam Inspector is a lightweight debugging and exploration tool used with MCPJam environments to inspect how services, APIs, or components behave during testing. It lets you observe requests, responses, and internal interactions in real time, making it easier to understand data flow, identify misconfigurations, and spot vulnerabilities while working on security challenges or development setups.
CVE-2026-23744
MCP Jam Inspector versions 1.4.2 and earlier are vulnerable to remote code execution (RCE) vulnerability, which allows an attacker to send a crafted HTTP request that triggers the installation of an MCP server, leading to RCE.
Attackers can send a crafted HTTP request to the /api/mcp/connect endpoint with a specific JSON payload. By manipulating the command and args fields, they can execute arbitrary commands on the host machine. Essentially, if you can reach the Inspector, you can own the machine.
You can read more about it : CVE-2026-23744
This is the add server utility and it’s where we’ll be putting our payload :
(Don’t forget to start your listener: nc -nlvp 4444 )

1 | { |

And we got revshell as user Ben !


And that’s it for the user flag .
Privilege Escalation
I got a little lost here because I checked capabilities :
1 | $ /usr/sbin/getcap -r / 2>/dev/null |
and wanted to force the new snapd CVE to gain root.
Then my other go-to was enumerating internal services and that also was kind of a waste of time.
But it was way simpler than that .
I figured there was another user alice and alice had access to one more group “docker” than ben.
The command ps aux | grep dockerd confirms that docker is running with root privileges.
Now simply adding ben to docker group.
Then : docker run -v /:/hostfs –rm mysql:latest bash -c “cp /hostfs/bin/bash /hostfs/tmp/rootbash && chmod 4755 /hostfs/tmp/rootbash” : This abuses Docker to write a SUID root shell onto the host, giving full root access.

And that’s it for this machine.
Rating
This one was tricky but super simple.
5 Stars.
⭐⭐⭐⭐⭐
