SMB


Nmap discovered a Windows Directory service on the target port 139 and 445

┌──(kali㉿kali)-[~/archive/htb/labs/sauna]
└─$ nmap --script smb-enum-shares -sV -p139,445 $IP
starting nmap 7.93 ( https://nmap.org ) at 2023-03-25 16:48 CET
Nmap scan report for egotistical-bank.local (10.10.10.175)
Host is up (0.027s latency).
 
PORT    STATE SERVICE       VERSION
139/tcp open  netbios-ssn   Microsoft Windows netbios-ssn
445/tcp open  microsoft-ds?
service info: OS: Windows; CPE: cpe:/o:microsoft:windows
 
service detection performed. please report any incorrect results at https://nmap.org/submit/ .
nmap done: 1 IP address (1 host up) scanned in 11.11 seconds

Additional Nmap scan fails likely due to lack of privileges

Null Session


┌──(kali㉿kali)-[~/archive/htb/labs/sauna]
└─$ smbclient -L //sauna.egotistical-bank.local/
Password for [WORKGROUP\kali]:
Anonymous login successful
 
	Sharename       Type      Comment
	---------       ----      -------
Reconnecting with SMB1 for workgroup listing.
do_connect: Connection to sauna.egotistical-bank.local failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Unable to connect with SMB1 -- no workgroup available
 
┌──(kali㉿kali)-[~/archive/htb/labs/sauna]
└─$ smbmap -H sauna.egotistical-bank.local -u '' -p ''                  
[+] IP: sauna.egotistical-bank.local:445	Name: unknown                                           

While the target SMB server allows anonymous access, lack of privileges prevents me from even listing the shares That explains why the additional Nmap scan above failed.

I would need to a valid domain credential to proceed forward

enum4linux


┌──(kali㉿kali)-[~/archive/htb/labs/sauna]
└─$ enum4linux -a -r -o -n -A -U $IP
starting enum4linux v0.9.1 ( http://labs.portcullis.co.uk/application/enum4linux/ ) on Sat Mar 25 16:50:33 2023
 
[...REDACTED...]
 
 ================================( Getting domain SID for 10.10.10.175 )================================
 
domain name: EGOTISTICALBANK
domain sid: S-1-5-21-2966785786-3096785034-1186376766
 
[+] Host is part of a domain (not a workgroup)

enum4linux was able to fetch the domain SID; S-1-5-21-2966785786-3096785034-1186376766

fsmith Session


┌──(kali㉿kali)-[~/archive/htb/labs/sauna]
└─$ smbmap -H sauna.egotistical-bank.local -u 'fsmith' -p 'Thestrokes23'
[+] IP: sauna.egotistical-bank.local:445	Name: unknown                                           
        Disk                                                  	Permissions	Comment
	----                                                  	-----------	-------
	ADMIN$                                            	NO ACCESS	Remote Admin
	C$                                                	NO ACCESS	Default share
	IPC$                                              	READ ONLY	Remote IPC
	NETLOGON                                          	READ ONLY	Logon server share 
	print$                                            	READ ONLY	Printer Drivers
	RICOH Aficio SP 8300DN PCL 6                      	NO ACCESS	We cant print money
	SYSVOL                                            	READ ONLY	Logon server share 

Using the credential of the fsmith user, I can get through the NTLM authenticate and check the SMB server It seems that there is a printer installed; RICOH Aficio SP 8300DN PCL 6

That explains the presence of the Windows Spooler service

hsmith Session


┌──(kali㉿kali)-[~/archive/htb/labs/sauna]
└─$ smbmap -H sauna.egotistical-bank.local -u 'hsmith' -p 'Thestrokes23'
[+] ip: sauna.egotistical-bank.local:445	Name: unknown                                           
        Disk                                                  	Permissions	Comment
	----                                                  	-----------	-------
	ADMIN$                                            	NO ACCESS	Remote Admin
	C$                                                	NO ACCESS	Default share
	IPC$                                              	READ ONLY	Remote IPC
	NETLOGON                                          	READ ONLY	Logon server share 
	print$                                            	READ ONLY	Printer Drivers
	RICOH Aficio SP 8300DN PCL 6                      	NO ACCESS	We cant print money
	SYSVOL                                            	READ ONLY	Logon server share 

Same thing for the hsmith user Speaking of the privileges, there isn’t much difference compared to the fsmith user