smbclient-L \\192.168.1.5EnterWORKGROUP\root's password:# Sharename Type Comment# --------- ---- -------# IPC$ IPC Remote IPC# share Disk# wwwroot Disk# ADMIN$ Disk Remote Admin# C$ Disk Default share# Reconnecting with SMB1 for workgroup listing.#Server Comment# --------- -------#Workgroup Master# --------- -------
NMBLookup
nmblookup-A192.168.0.5# Looking up status of [ip]# [hostname] <00> - M <ACTIVE># [hostname] <20> - M <ACTIVE># WORKGROUP <00> - <GROUP> M <ACTIVE># WORKGROUP <1e> - <GROUP> M <ACTIVE># <03> - M <ACTIVE># INet~Services <1c> - <GROUP> M <ACTIVE># IS~[hostname] <00> - M <ACTIVE># MAC Address = 00-50-56-XX-XX-XX
SMBClient
# use smb1smbclient-L//10.10.10.10--option='client min protocol=NT1'-U"administrator"# no passsmbclient-L//10.10.10.10-N
Nmap Scan
nmap-v-p139,445-oGsmb.txt10.11.24.1-100# smb enum scriptnmap-p139,445--scriptsmb-enum-users<ipaddress_here># Checks for OS of SMBnmap-v-p139,445--scriptsmb-os-discovery10.11.24.85#Checks for smb vulnerabilitynmap-v-p139,445--scriptvuln<ipaddress_here>
NBTScan
nbtscan -r 10.11.24.0/24
RPCClient
Null sessions, In windows NT2000/XP default config for SMB allows for nullsessions to be created. In windows 2003/XP SP2 onwards, this is disabled. Use RPCClient to explore nullsessions.
Rpcclient-U""129.168.1.200#Server info such as OS version, server typesrvinfo#Users informationenumdomusers#Show password policygetdompwinfo#Domain infoquerydomaininfo#find net sharenetshareenum