# 23 - Pentesting Telnet {% 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 %}
#### Get a hacker's perspective on your web apps, network, and cloud **Trova e segnala vulnerabilità critiche e sfruttabili con un impatto reale sul business.** Usa i nostri oltre 20 strumenti personalizzati per mappare la superficie di attacco, trovare problemi di sicurezza che ti permettano di elevare i privilegi e utilizzare exploit automatizzati per raccogliere prove essenziali, trasformando il tuo duro lavoro in report persuasivi. {% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %} ## **Informazioni di base** Telnet è un protocollo di rete che offre agli utenti un modo NON sicuro per accedere a un computer tramite una rete. **Porta predefinita:** 23 ``` 23/tcp open telnet ``` ## **Enumerazione** ### **Acquisizione del Banner** ```bash nc -vn 23 ``` Tutta l'enumerazione interessante può essere eseguita da **nmap**: ```bash nmap -n -sV -Pn --script "*telnet* and safe" -p 23 ``` Lo script `telnet-ntlm-info.nse` otterrà informazioni NTLM (versioni di Windows). Dalla [RFC telnet](https://datatracker.ietf.org/doc/html/rfc854): Nel Protocollo TELNET ci sono varie "**opzioni**" che saranno sanzionate e possono essere utilizzate con la struttura "**DO, DON'T, WILL, WON'T**" per consentire a un utente e a un server di concordare l'uso di un insieme più elaborato (o forse semplicemente diverso) di convenzioni per la loro connessione TELNET. Tali opzioni potrebbero includere la modifica del set di caratteri, la modalità di eco, ecc. **So che è possibile enumerare queste opzioni ma non so come, quindi fammi sapere se sai come.** ### [Brute force](../generic-methodologies-and-resources/brute-force.md#telnet) ## Config file ```bash /etc/inetd.conf /etc/xinetd.d/telnet /etc/xinetd.d/stelnet ``` ## HackTricks Comandi Automatici ``` Protocol_Name: Telnet #Protocol Abbreviation if there is one. Port_Number: 23 #Comma separated if there is more than one. Protocol_Description: Telnet #Protocol Abbreviation Spelled out Entry_1: Name: Notes Description: Notes for t=Telnet Note: | wireshark to hear creds being passed tcp.port == 23 and ip.addr != myip https://book.hacktricks.xyz/pentesting/pentesting-telnet Entry_2: Name: Banner Grab Description: Grab Telnet Banner Command: nc -vn {IP} 23 Entry_3: Name: Nmap with scripts Description: Run nmap scripts for telnet Command: nmap -n -sV -Pn --script "*telnet*" -p 23 {IP} Entry_4: Name: consoleless mfs enumeration Description: Telnet enumeration without the need to run msfconsole Note: sourced from https://github.com/carlospolop/legion Command: msfconsole -q -x 'use auxiliary/scanner/telnet/telnet_version; set RHOSTS {IP}; set RPORT 23; run; exit' && msfconsole -q -x 'use auxiliary/scanner/telnet/brocade_enable_login; set RHOSTS {IP}; set RPORT 23; run; exit' && msfconsole -q -x 'use auxiliary/scanner/telnet/telnet_encrypt_overflow; set RHOSTS {IP}; set RPORT 23; run; exit' && msfconsole -q -x 'use auxiliary/scanner/telnet/telnet_ruggedcom; set RHOSTS {IP}; set RPORT 23; run; exit' ```
#### Ottieni la prospettiva di un hacker sulle tue app web, rete e cloud **Trova e segnala vulnerabilità critiche ed exploitabili con un impatto reale sul business.** Usa i nostri oltre 20 strumenti personalizzati per mappare la superficie di attacco, trovare problemi di sicurezza che ti permettano di elevare i privilegi e utilizzare exploit automatizzati per raccogliere prove essenziali, trasformando il tuo duro lavoro in report persuasivi. {% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %} {% hint style="success" %} Impara e pratica AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Impara e pratica GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Supporta HackTricks * Controlla i [**piani di abbonamento**](https://github.com/sponsors/carlospolop)! * **Unisciti al** 💬 [**gruppo Discord**](https://discord.gg/hRep4RUj7f) o al [**gruppo telegram**](https://t.me/peass) o **seguici** su **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Condividi trucchi di hacking inviando PR ai** [**HackTricks**](https://github.com/carlospolop/hacktricks) e [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos su github.
{% endhint %}