SMB
Nmap discovered a Microsoft Directory service on the target port 139
and 445
┌──(kali㉿kali)-[~/archive/htb/labs/legacy]
└─$ nmap -Pn --script smb-enum-shares -sV -p139,445 $IP
starting nmap 7.93 ( https://nmap.org ) at 2023-04-05 17:52 CEST
Nmap scan report for 10.10.10.4
Host is up (0.13s latency).
PORT STATE SERVICE VERSION
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds Microsoft Windows XP microsoft-ds
service info: OSs: Windows, Windows XP; CPE: cpe:/o:microsoft:windows, cpe:/o:microsoft:windows_xp
host script results:
| smb-enum-shares:
| note: ERROR: Enumerating shares failed, guessing at common ones (NT_STATUS_ACCESS_DENIED)
| account_used: <blank>
| \\10.10.10.4\admin$:
| warning: Couldn't get details for share: NT_STATUS_ACCESS_DENIED
| anonymous access: <none>
| \\10.10.10.4\c$:
| warning: Couldn't get details for share: NT_STATUS_ACCESS_DENIED
| anonymous access: <none>
| \\10.10.10.4\ipc$:
| warning: Couldn't get details for share: NT_STATUS_ACCESS_DENIED
|_ anonymous access: READ
service detection performed. please report any incorrect results at https://nmap.org/submit/ .
nmap done: 1 IP address (1 host up) scanned in 108.69 seconds
Attempting to map the SMB shares fail due to lack of privileges
Null Session
┌──(kali㉿kali)-[~/archive/htb/labs/legacy]
└─$ smbclient -L //$IP/
Password for [WORKGROUP\kali]:
session setup failed: NT_STATUS_INVALID_PARAMETER
That’s a very different error message than what I usually get. Nevertheless, I don’t seem to be able to enumerate the SMB server
Vulnerability
┌──(kali㉿kali)-[~/archive/htb/labs/legacy]
└─$ nmap -Pn --script smb-vuln-* -p139,445 $IP
starting nmap 7.93 ( https://nmap.org ) at 2023-04-05 18:01 CEST
Nmap scan report for 10.10.10.4
Host is up (0.14s latency).
PORT STATE SERVICE
139/tcp open netbios-ssn
445/tcp open microsoft-ds
host script results:
| smb-vuln-ms08-067:
| vulnerable:
| Microsoft Windows system vulnerable to remote code execution (MS08-067)
| state: VULNERABLE
| ids: CVE:CVE-2008-4250
| The Server service in Microsoft Windows 2000 SP4, XP SP2 and SP3, Server 2003 SP1 and SP2,
| Vista Gold and SP1, Server 2008, and 7 Pre-Beta allows remote attackers to execute arbitrary
| code via a crafted RPC request that triggers the overflow during path canonicalization.
|
| disclosure date: 2008-10-23
| references:
| https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4250
|_ https://technet.microsoft.com/en-us/library/security/ms08-067.aspx
| smb-vuln-ms17-010:
| vulnerable:
| Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010)
| state: VULNERABLE
| 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://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143
| https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/
|_ https://technet.microsoft.com/en-us/library/security/ms17-010.aspx
|_smb-vuln-ms10-054: false
|_smb-vuln-ms10-061: ERROR: Script execution failed (use -d to debug)
nmap done: 1 IP address (1 host up) scanned in 5.95 seconds
Scanning the SMB server for vulnerability returned 2 results;
ms08-067
ms17-10
while i believe that ms17-10 is not going to work since i am unable to even attempt to access it let alone enumerating it, [[legacy_cve-2008-4250#cve-2008-4250 / MS08-067|ms08-067]] may works as it works through the MSRPC service.