Lab
Objective
- Identify SMB Protocol Dialects:
NTLM 0.12: SMBv1 - Find SMB security level information:
2.02: Message signing enabled but not required. - Enumerate active sessions, shares, Windows users, domains, services, etc.
-
Shares:
oot@attackdefense:~# nmap -p445 --script=smb-enum-shares --script-args smbusername=administrator,smbpassword=smbserver_771 10.4.22.184 Starting Nmap 7.91 ( https://nmap.org ) at 2023-08-20 03:05 IST Nmap scan report for 10.4.22.184 Host is up (0.0086s latency). PORT STATE SERVICE 445/tcp open microsoft-ds Host script results: | smb-enum-shares: | account_used: administrator | \\10.4.22.184\ADMIN$: | Type: STYPE_DISKTREE_HIDDEN | Comment: Remote Admin | Users: 0 | Max Users: <unlimited> | Path: C:\Windows | Anonymous access: <none> | Current user access: READ/WRITE | \\10.4.22.184\C: | Type: STYPE_DISKTREE | Comment: | Users: 0 | Max Users: <unlimited> | Path: C:\ | Anonymous access: <none> | Current user access: READ | \\10.4.22.184\C$: | Type: STYPE_DISKTREE_HIDDEN | Comment: Default share | Users: 0 | Max Users: <unlimited> | Path: C:\ | Anonymous access: <none> | Current user access: READ/WRITE | \\10.4.22.184\D$: | Type: STYPE_DISKTREE_HIDDEN | Comment: Default share | Users: 0 | Max Users: <unlimited> | Path: D:\ | Anonymous access: <none> | Current user access: READ/WRITE | \\10.4.22.184\Documents: | Type: STYPE_DISKTREE | Comment: | Users: 0 | Max Users: <unlimited> | Path: C:\Users\Administrator\Documents | Anonymous access: <none> | Current user access: READ | \\10.4.22.184\Downloads: | Type: STYPE_DISKTREE | Comment: | Users: 0 | Max Users: <unlimited> | Path: C:\Users\Administrator\Downloads | Anonymous access: <none> | Current user access: READ | \\10.4.22.184\IPC$: | Type: STYPE_IPC_HIDDEN | Comment: Remote IPC | Users: 1 | Max Users: <unlimited> | Path: | Anonymous access: <none> | Current user access: READ/WRITE | \\10.4.22.184\print$: | Type: STYPE_DISKTREE | Comment: Printer Drivers | Users: 0 | Max Users: <unlimited> | Path: C:\Windows\system32\spool\drivers | Anonymous access: <none> |_ Current user access: READ/WRITE -
Users:
root@attackdefense:~# nmap -p445 --script=smb-enum-users --script-args smbusername=administrator,smbpassword=smbserver_771 10.4.22.184 Starting Nmap 7.91 ( https://nmap.org ) at 2023-08-20 03:07 IST Nmap scan report for 10.4.22.184 Host is up (0.0085s latency). PORT STATE SERVICE 445/tcp open microsoft-ds Host script results: | smb-enum-users: | WIN-OMCNBKR66MN\Administrator (RID: 500) | Description: Built-in account for administering the computer/domain | Flags: Password does not expire, Normal user account | WIN-OMCNBKR66MN\bob (RID: 1010) | Flags: Password does not expire, Normal user account | WIN-OMCNBKR66MN\Guest (RID: 501) | Description: Built-in account for guest access to the computer/domain |_ Flags: Password does not expire, Password not required, Normal user account -
Domains:
root@attackdefense:~# nmap -p445 --script=smb-enum-domains --script-args smbusername=administrator,smbpassword=smbserver_771 10.4.22.184 Starting Nmap 7.91 ( https://nmap.org ) at 2023-08-20 03:08 IST Nmap scan report for 10.4.22.184 Host is up (0.0086s latency). PORT STATE SERVICE 445/tcp open microsoft-ds Host script results: | smb-enum-domains: | WIN-OMCNBKR66MN | Groups: WinRMRemoteWMIUsers__ | Users: Administrator, bob, Guest | Creation time: 2013-08-22T14:47:57 | Passwords: min length: n/a; min age: n/a days; max age: 42 days; history: n/a passwords | Properties: Complexity requirements exist | Account lockout disabled | Builtin | Groups: Access Control Assistance Operators, Administrators, Backup Operators, Certificate Service DCOM Access, Cryptographic Operators, Distributed COM Users, Event Log Readers, Guests, Hyper-V Administrators, IIS_IUSRS, Network Configuration Operators, Performance Log Users, Performance Monitor Users, Power Users, Print Operators, RDS Endpoint Servers, RDS Management Servers, RDS Remote Access Servers, Remote Desktop Users, Remote Management Users, Replicator, Users | Users: n/a | Creation time: 2013-08-22T14:47:57 | Passwords: min length: n/a; min age: n/a days; max age: 42 days; history: n/a passwords |_ Account lockout disabled -
Services:
root@attackdefense:~# nmap -p445 --script=smb-enum-services --script-args smbusername=administrator,smbpassword=smbserver_771 10.4.22.184 Starting Nmap 7.91 ( https://nmap.org ) at 2023-08-20 03:09 IST Nmap scan report for 10.4.22.184 Host is up (0.0083s latency). PORT STATE SERVICE 445/tcp open microsoft-ds | smb-enum-services: | AmazonSSMAgent: | display_name: Amazon SSM Agent | state: | SERVICE_CONTINUE_PENDING | SERVICE_RUNNING | SERVICE_PAUSED | SERVICE_PAUSE_PENDING | type: | SERVICE_TYPE_WIN32 | SERVICE_TYPE_WIN32_OWN_PROCESS | controls_accepted: | SERVICE_CONTROL_PARAMCHANGE | SERVICE_CONTROL_INTERROGATE | SERVICE_CONTROL_CONTINUE | SERVICE_CONTROL_STOP | SERVICE_CONTROL_NETBINDADD | SERVICE_CONTROL_NETBINDENABLE | DiagTrack: | display_name: Diagnostics Tracking Service | state: | SERVICE_CONTINUE_PENDING | SERVICE_RUNNING | SERVICE_PAUSED | SERVICE_PAUSE_PENDING | type: | SERVICE_TYPE_WIN32 | SERVICE_TYPE_WIN32_OWN_PROCESS | controls_accepted: | SERVICE_CONTROL_PARAMCHANGE | SERVICE_CONTROL_INTERROGATE | SERVICE_CONTROL_CONTINUE | SERVICE_CONTROL_STOP | SERVICE_CONTROL_NETBINDADD | SERVICE_CONTROL_NETBINDENABLE | Ec2Config: | display_name: Ec2Config | state: | SERVICE_CONTINUE_PENDING | SERVICE_RUNNING | SERVICE_PAUSED | SERVICE_PAUSE_PENDING | type: | SERVICE_TYPE_WIN32 | SERVICE_TYPE_WIN32_OWN_PROCESS | controls_accepted: | SERVICE_CONTROL_PARAMCHANGE | SERVICE_CONTROL_INTERROGATE | SERVICE_CONTROL_CONTINUE | SERVICE_CONTROL_STOP | SERVICE_CONTROL_NETBINDADD | SERVICE_CONTROL_NETBINDENABLE | MSDTC: | display_name: Distributed Transaction Coordinator | state: | SERVICE_CONTINUE_PENDING | SERVICE_RUNNING | SERVICE_PAUSED | SERVICE_PAUSE_PENDING | type: | SERVICE_TYPE_WIN32 | SERVICE_TYPE_WIN32_OWN_PROCESS | controls_accepted: | SERVICE_CONTROL_PARAMCHANGE | SERVICE_CONTROL_INTERROGATE | SERVICE_CONTROL_CONTINUE | SERVICE_CONTROL_STOP | SERVICE_CONTROL_NETBINDADD | SERVICE_CONTROL_NETBINDENABLE | Spooler: | display_name: Print Spooler | state: | SERVICE_CONTINUE_PENDING | SERVICE_RUNNING | SERVICE_PAUSED | SERVICE_PAUSE_PENDING | type: | SERVICE_TYPE_WIN32 | SERVICE_TYPE_WIN32_OWN_PROCESS | controls_accepted: | SERVICE_CONTROL_CONTINUE | SERVICE_CONTROL_STOP | SERVICE_CONTROL_NETBINDADD |_ SERVICE_CONTROL_NETBINDENABLE
-
The following username and password may be used to access the service:
| Username | Password | | administrator | smbserver_771 |
Instructions
- Your Kali machine has an interface with IP address 10.10.X.Y. Run “ip addr” to know the values of X and Y.
- The IP address of the target machine is mentioned in the file “/root/Desktop/target”
- Do not attack the gateway located at IP address 192.V.W.1 and 10.10.X.1