Skip to content
AO.GitHub
← All write-ups
FIELD NOTES / PORTFOLIO

Blue

An Easy, retired Hack The Box lab covering SMB enumeration and exploitation.

Platform: Hack The Box · Difficulty: Easy · Status: Retired

Reconnaissance

I used RustScan to identify exposed TCP services. The results included ports 135, 139, and 445, along with other open ports. Ports 139 and 445 made SMB a useful starting point for further investigation.

Initial RustScan results

Service and vulnerability enumeration

I followed up with Nmap to identify services and versions on the open ports. The scan used -O for operating system detection and -T4 as its timing template.

Nmap service scan

Nmap scan details

I then focused the Nmap checks on SMB. An enum4linux run did not produce information that advanced this investigation.

SMB enumeration results

The SMB vulnerability check reported a high-severity, potential remote code execution issue affecting SMBv1. At this stage, the scan was an indication of exposure; exploitation provided the practical confirmation.

Reported SMB vulnerability

Exploitation with Metasploit

I located the corresponding Metasploit module and configured its target and callback settings:

SettingPurpose
RHOSTSTarget address
RPORTTarget SMB port, normally 445
LHOSTAttacker address for the callback
LPORTCallback listener port

Metasploit configuration

Running the module returned a Meterpreter session. I checked the session identity with getuid, which reported NT AUTHORITY\SYSTEM. The session therefore already had system-level privileges; a separate privilege escalation step was unnecessary. I accessed the administrator’s desktop and retrieved the root flag.

Meterpreter session

Privilege check and flag

Alternative public exploit

I also tested the public Win7Blue exploit. After cloning it to the attacker machine, I made the relevant file executable and reviewed its target architecture and network parameters before running it.

Cloned exploit

Executable permission Exploit options

I supplied the target address, attacker address, and listener port, then started a Netcat listener to receive the callback. This route also returned a shell with NT AUTHORITY\SYSTEM privileges.

Target and callback configuration

Netcat listener and resulting shell

Outcome

Both documented approaches yielded system-level access in this retired lab. The SMB scan suggested a vulnerability, while the returned sessions confirmed exploitability on this target.