nmap -T4 -A -p- 10.10.11.38 -o initial_scan.nmap Starting Nmap 7.95 ( https://nmap.org ) at 2025-03-04 15:18 WET Nmap scan report for 10.10.11.38 Host is up (0.072s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.11 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 b6:fc:20:ae:9d:1d:45:1d:0b:ce:d9:d0:20:f2:6f:dc (RSA) | 256 f1:ae:1c:3e:1d:ea:55:44:6c:2f:f2:56:8d:62:3c:2b (ECDSA) |_ 256 94:42:1b:78:f2:51:87:07:3e:97:26:c9:a2:5c:0a:26 (ED25519) 5000/tcp open http Werkzeug httpd 3.0.3 (Python 3.9.5) |_http-title: Chemistry - Home |_http-server-header: Werkzeug/3.0.3 Python/3.9.5 Device type: general purpose Running: Linux 5.X OS CPE: cpe:/o:linux:linux_kernel:5.0 OS details: Linux 5.0, Linux 5.0 - 5.14 Network Distance: 2 hops Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE (using port 443/tcp) HOP RTT ADDRESS 1 71.91 ms 10.10.14.1 2 72.01 ms 10.10.11.38
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 32.28 seconds
Port
Service
22
SSH
5000
HTTP
HTTP Page
By visiting the http page on port 5000 we can find a CIF Analyzer
After registering, we are able to upload a CIF file
User
CIF Reverse Shell
If we google for vulnerabilities involving CIF files, we come accross this GitHub Page explaining a code execution vulnerability when parsing CIF file
We can change the command in the payload, to start a reverse shell
From all the hashes, we can find the hash for the rosa user, which we know is a user in the machine These are md5 hashes, we can just look for it in crackstation, or manually crack it using hashcat
We can use this to just read the root.txt and call it a day, but we can also use it to get the root user private ssh key Change the file to root/.ssh/id_rsa in exploit.sh
Now if we run the exploit, we get the root user ssh key
Save the key to a file, change the permissions and login as root through ssh