Internal
Gaining Access
Nmap scan:
$ nmap -p- --min-rate 4000 192.168.233.40
Starting Nmap 7.93 ( https://nmap.org ) at 2023-06-30 17:39 +08
Warning: 192.168.233.40 giving up on port because retransmission cap hit (10).
Nmap scan report for 192.168.233.40
Host is up (0.17s latency).
Not shown: 65465 closed tcp ports (conn-refused), 57 filtered tcp ports (no-response)
PORT STATE SERVICE
53/tcp open domain
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3389/tcp open ms-wbt-server
5357/tcp open wsdapi
49152/tcp open unknown
49153/tcp open unknown
49154/tcp open unknown
49155/tcp open unknown
49156/tcp open unknown
49157/tcp open unknown
49158/tcp open unknownLots of ports open. The version scan (which I normally leave out because it contains a lot of irrelevant information) actually had something useful this time:
The first thing we notice is how old the OS of this machine is.
SMB RCE
The SMB services might be vulnerable to stuff like MS17-010 or other exploits because of how old it is, so I ran an nmap scan to enumerate that:
This is vulnerable to CVE-2009-3103. I ran the Metasploit module to exploit this (because I was honestly lazy since I'm re-doing the machines for the writeups) after resetting the machine since the nmap scan apparently crashed it.
This worked in giving us a SYSTEM shell:

Rooted!