TryHackMe — Blue
Room Summary: Blue is a beginner-friendly Windows exploitation room on TryHackMe. The objective is to exploit a vulnerable Windows 7 machine using the infamous EternalBlue (MS17-010) vulnerability, escalate to SYSTEM, crack a password hash, and retrieve three hidden flags.
Room: https://tryhackme.com/room/blue OS: Windows 7 Professional SP1 x64 Difficulty: Easy
The Exploit — EternalBlue (MS17-010)
EternalBlue is one of the most consequential exploits ever discovered. Originally developed by the NSA and leaked to the public by the Shadow Brokers group in April 2017, it targets a critical vulnerability in Microsoft’s SMBv1 (Server Message Block version 1) protocol.
How It Works
The vulnerability lives in how the Windows SMB server handles certain types of transaction requests. By sending a specially crafted packet, an attacker can trigger a buffer overflow in the kernel’s non-paged pool — essentially overwriting memory in a way that hands over arbitrary code execution at SYSTEM level with no authentication required.
|
|
Real-World Impact: EternalBlue was the backbone of the WannaCry ransomware attack in May 2017, which infected over 200,000 machines in 150 countries, crippling the UK’s NHS, FedEx, Telefonica, and countless others. It was also used in the NotPetya wiper attack shortly after, causing an estimated $10 billion in damages worldwide.
Why It Still Works (in labs)
Microsoft patched MS17-010 in the MS17-010 security bulletin (March 2017), but millions of unpatched machines remained online. The Blue room deliberately runs an unpatched Windows 7 SP1 instance to simulate this exact scenario — the kind of machine that was devastatingly common in enterprise environments at the time.
Attack Flow
|
|
Setup
Connect to TryHackMe VPN
|
|
Verify your tunnel interface is up:
|
|
You should see an IP in the 10.x.x.x / 192.168.x.x range assigned to tun0. This is your attack IP — note it down as LHOST.
Warning: Always confirm the VPN is active before running any exploit. If
tun0is missing, the reverse shell will have nowhere to connect back to and sessions will die instantly.
Step 1 — Reconnaissance
Scan the target to confirm port 445 is open and the machine is vulnerable to MS17-010:
|
|
Expected output:
|
|
You are good to go if you see VULNERABLE next to MS17-010.
Step 2 — Exploitation
Launch Metasploit and configure the EternalBlue exploit:
|
|
|
|
Tip: Use
run -zinstead ofrunto automatically background the session once it opens, keeping the console free for further commands.
What you’ll see on success:
|
|
Step 3 — Privilege Escalation and Post Exploitation
Once inside, confirm your privilege level:
|
|
No escalation needed — EternalBlue lands you directly as SYSTEM, the highest privilege level on Windows.
Dump Password Hashes
|
|
Output:
|
|
The format is username:RID:LM_hash:NT_hash. The LM hash (aad3b435...) is a blank placeholder — the real hash is the NT hash on the right.
Step 4 — Crack Jon’s Password
Save Jon’s hash to a file:
|
|
Crack it with John the Ripper using the rockyou wordlist:
|
|
Result: Jon’s password is alqfna22
Step 5 — Retrieve the Flags
All three flags are hidden in specific locations on the target machine. From your Meterpreter session:
Flag 1 — Root of C:\
|
|
Location: C:\flag1.txt
Flag 2 — SAM Database Directory
|
|
Location: C:\Windows\System32\config\flag2.txt
Why here? The
configdirectory is where Windows stores the SAM (Security Account Manager) database — the file that holds all local password hashes. Hiding a flag here reinforces the lesson: once you have SYSTEM access, even the most sensitive files on the machine are accessible.
Flag 3 — Jon’s Documents
|
|
Location: C:\Users\Jon\Documents\flag3.txt
Why here? Jon’s Documents folder represents what an attacker could access after compromising a user account. With SYSTEM privileges gained via EternalBlue, nothing on the machine is off-limits — including private user files.
Flag Summary
| # | Location | Flag |
|---|---|---|
| 1 | C:\flag1.txt |
flag{access_the_machine} |
| 2 | C:\Windows\System32\config\flag2.txt |
flag{sam_database_elevated_access} |
| 3 | C:\Users\Jon\Documents\flag3.txt |
flag{admin_documents_can_be_valuable} |
Defensive Takeaways
How to Defend Against EternalBlue:
- Patch immediately — Apply MS17-010 (KB4012212). This was available a full 2 months before WannaCry.
- Disable SMBv1 — It is a legacy protocol. Disable it via PowerShell:
Set-SmbServerConfiguration -EnableSMB1Protocol $false- Block port 445 externally — SMB should never be exposed to the internet.
- Network segmentation — Limit lateral movement by isolating workstations from each other.
- Monitor for exploitation patterns — Unusual SMB traffic and sudden SYSTEM-level process spawns are red flags.
Tools Used
| Tool | Purpose |
|---|---|
nmap |
Port scanning and vulnerability detection |
metasploit |
Exploitation framework |
ms17_010_eternalblue |
EternalBlue exploit module |
meterpreter |
Post-exploitation shell |
john |
Password hash cracking |
rockyou.txt |
Wordlist for dictionary attack |
Completed on TryHackMe - Room: Blue - Difficulty: Easy