# 49 - Pentesting TACACS+ {% hint style="success" %} Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks * Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! * **Join the** ๐Ÿ’ฌ [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ๐Ÿฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %} **Try Hard Security Group**
{% embed url="https://discord.gg/tryhardsecurity" %} *** ## ๊ธฐ๋ณธ ์ •๋ณด **Terminal Access Controller Access Control System (TACACS)** ํ”„๋กœํ† ์ฝœ์€ ๋ผ์šฐํ„ฐ๋‚˜ ๋„คํŠธ์›Œํฌ ์ ‘๊ทผ ์„œ๋ฒ„(NAS)์— ์ ‘๊ทผํ•˜๋ ค๋Š” ์‚ฌ์šฉ์ž๋ฅผ ์ค‘์•™์—์„œ ๊ฒ€์ฆํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์—…๊ทธ๋ ˆ์ด๋“œ๋œ ๋ฒ„์ „์ธ **TACACS+**๋Š” ์„œ๋น„์Šค๋ฅผ ์ธ์ฆ, ๊ถŒํ•œ ๋ถ€์—ฌ ๋ฐ ํšŒ๊ณ„(AAA)๋กœ ๋ถ„๋ฆฌํ•ฉ๋‹ˆ๋‹ค. ``` PORT STATE SERVICE 49/tcp open tacacs ``` **๊ธฐ๋ณธ ํฌํŠธ:** 49 ## ์ธ์ฆ ํ‚ค ๊ฐ€๋กœ์ฑ„๊ธฐ ํด๋ผ์ด์–ธํŠธ์™€ TACACS ์„œ๋ฒ„ ๊ฐ„์˜ ํ†ต์‹ ์ด ๊ณต๊ฒฉ์ž์— ์˜ํ•ด ๊ฐ€๋กœ์ฑ„์–ด์ง€๋ฉด, **์•”ํ˜ธํ™”๋œ ์ธ์ฆ ํ‚ค๋ฅผ ๊ฐ€๋กœ์ฑŒ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค**. ๊ณต๊ฒฉ์ž๋Š” **๋กœ๊ทธ์— ๊ฐ์ง€๋˜์ง€ ์•Š๊ณ  ํ‚ค์— ๋Œ€ํ•ด ๋กœ์ปฌ ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ์„ ์‹œ๋„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค**. ํ‚ค๋ฅผ ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ์œผ๋กœ ์„ฑ๊ณต์ ์œผ๋กœ ํ•ด๋…ํ•˜๋ฉด, ๊ณต๊ฒฉ์ž๋Š” ๋„คํŠธ์›Œํฌ ์žฅ๋น„์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ Wireshark์™€ ๊ฐ™์€ ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠธ๋ž˜ํ”ฝ์„ ๋ณตํ˜ธํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ### MitM ๊ณต๊ฒฉ ์ˆ˜ํ–‰ **ARP ์Šคํ‘ธํ•‘ ๊ณต๊ฒฉ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ค‘๊ฐ„์ž(MitM) ๊ณต๊ฒฉ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค**. ### ํ‚ค ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ [Loki](https://c0decafe.de/svn/codename\_loki/trunk/)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ‚ค๋ฅผ ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ``` sudo loki_gtk.py ``` If the key is successfully **bruteforced** (**usually in MD5 encrypted format)**, **we can access the equipment and decrypt the TACACS-encrypted traffic.** ### Decrypting Traffic Once the key is successfully cracked, the next step is to **decrypt the TACACS-encrypted traffic**. Wireshark can handle encrypted TACACS traffic if the key is provided. By analyzing the decrypted traffic, information such as the **๋ฐฐ๋„ˆ์™€ ๊ด€๋ฆฌ์ž ์‚ฌ์šฉ์ž ์ด๋ฆ„**์„ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. By gaining access to the control panel of network equipment using the obtained credentials, the attacker can exert control over the network. It's important to note that these actions are strictly for educational purposes and should not be used without proper authorization. ## References * [https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9](https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9) **Try Hard Security Group**
{% embed url="https://discord.gg/tryhardsecurity" %} {% hint style="success" %} Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks * Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! * **Join the** ๐Ÿ’ฌ [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ๐Ÿฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %}