Blue
Machine Level: Easy OS: Windows
Scanning
I ran an aggressive NMAP scan to determine OS and versions of some of the services running on host ports.
ajread@aj-ubuntu:~/hackthebox$ nmap -A [TARGET IP]
Starting Nmap 7.80 ( https://nmap.org ) at 2023-01-17 20:23 CST
Nmap scan report for [TARGET IP]
Host is up (0.083s latency).
Not shown: 991 closed ports
PORT STATE SERVICE VERSION
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds Microsoft Windows 7 - 10 microsoft-ds (workgroup: WORKGROUP)
49152/tcp open msrpc Microsoft Windows RPC
49153/tcp open msrpc Microsoft Windows RPC
49154/tcp open msrpc Microsoft Windows RPC
49155/tcp open tcpwrapped
49156/tcp open msrpc Microsoft Windows RPC
49157/tcp open msrpc Microsoft Windows RPC
Service Info: Host: HARIS-PC; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
|_clock-skew: mean: 1s, deviation: 0s, median: 1s
|_ms-sql-info: ERROR: Script execution failed (use -d to debug)
|_smb-os-discovery: ERROR: Script execution failed (use -d to debug)
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
| smb2-security-mode:
| 2.02:
|_ Message signing enabled but not required
| smb2-time:
| date: 2023-01-18T02:25:03
|_ start_date: 2023-01-18T02:23:11
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 111.82 secondsIt looked like this can be exploited using eternalblue or a similar exploit.
Initial Access
I had to look at the service running on port 445 using smbclient.
There wasnt anything in any of the fileshares as guest.
I used the exploit found here since metasploit was not working for me. After successfully prepping my OS with the required dependencies, I was able to create a payload with msfvenom.
I ran the exploit and with a listener on a seperate terminal.
And I dropped into a shell as administrator.
There was no privilege escalation necessary and I was able to get both user and admin flags.
I had a lot of issues running this exploit as metasploit didnt work. I found that AutoBlue was the best route. I had to have the machine reset right before running the exploit to get the cleanest target.
Last updated