Cap
A relatively easy Linux box in HackTheBox, you can root it in less than an hour.
nmap
(base) [psdon@arch cap]$ mkdir nmap
(base) [psdon@arch cap]$ sudo rustscan -a 10.10.10.245 --ulimit 5000 -- -T4 -A -oA nmap/all-ports-service-scan A web server is running on port 80.

Web Enumeration

There's an interesting section in the sidebar which is located on /capture and when you go to that URL, you will be redirected to /data/<int>

Every time I visit /capture, the integer parameter in /data/1 was incrementing by 1.

So I change it to /data/0 and I got a pcap file, and I analyze it on wireshark and found a credentials on it.

Initial Shell
I login using that credentials on SSH, and looks like we got an initial shell. Sweet :D
Post Exploitation
First, let's transfer linpeas.sh from our machine to the target machine
You can find the machine IP address by executing the following.
Then transfer the script using wget
Then run linpeas.sh
I noticed python3.8 binary was set a capability.

Privilege Escalation
We can gain root by executing the following command
Last updated
Was this helpful?