Cheatsheet de SMB
Madurezreviewed
Última revisión
Publicado
Última actualización
Vuelve al workflow para interpretar permisos y a automatización para comparar herramientas.
Shares y acceso
Sección titulada «Shares y acceso»smbclient -N -L '//TARGET_IP/'smbclient -L '//TARGET_IP/' -U 'DOMAIN/USERNAME'smbclient '//TARGET_IP/SHARE' -U 'DOMAIN/USERNAME'rpcclient -N -U '' TARGET_IPrpcclient -U 'DOMAIN/USERNAME' TARGET_IPsrvinfonetshareenumallquerydominfoenumdomusersenumdomgroupsAutomatización
Sección titulada «Automatización»enum4linux-ng -A TARGET_IP -oA evidence/smbnxc smb TARGETS -u USERNAME -p PASSWORD --sharesimpacket-smbclient 'DOMAIN/USERNAME@TARGET_IP'impacket-lookupsid 'DOMAIN/USERNAME@TARGET_IP'Perfiles controlados
Sección titulada «Perfiles controlados»-d 3 aumenta el debug de Samba sobre una operación. -I TARGET_IP conserva el FQDN para negociación y fija la dirección de red:
smbclient '//FQDN/SHARE' \ -I TARGET_IP \ -U 'DOMAIN/USERNAME' \ -d 3 2>evidence/smbclient-debug.txtNetExec permite comparar una identidad sobre una lista. --threads 10 limita las tareas concurrentes, --timeout 5 acota la espera, --jitter 2-4 espacia acciones por host y --log conserva el resultado:
nxc smb TARGETS -u USERNAME -p PASSWORD \ --threads 10 --timeout 5 --jitter 2-4 \ --dns-server DNS_SERVER \ --shares --log evidence/netexec-smb.logEl primer perfil puede registrar datos de autenticación. El segundo no aplica un límite global de intentos y no debe mezclar varias credenciales. La automatización SMB desarrolla esas diferencias.
sudo nmap -sV -n -Pn -p 139,445 \ --script smb-protocols,smb2-security-mode,smb2-capabilities \ TARGET_IP