23 - Pentesting Telnet
Reading time: 3 minutes
tip
Apprenez et pratiquez le hacking AWS :HackTricks Training AWS Red Team Expert (ARTE)
Apprenez et pratiquez le hacking GCP : HackTricks Training GCP Red Team Expert (GRTE)
Apprenez et pratiquez le hacking Azure :
HackTricks Training Azure Red Team Expert (AzRTE)
Soutenir HackTricks
- Vérifiez les plans d'abonnement !
- Rejoignez le 💬 groupe Discord ou le groupe telegram ou suivez-nous sur Twitter 🐦 @hacktricks_live.
- Partagez des astuces de hacking en soumettant des PR au HackTricks et HackTricks Cloud dépôts github.
Informations de base
Telnet est un protocole réseau qui offre aux utilisateurs un moyen non sécurisé d'accéder à un ordinateur via un réseau.
Port par défaut : 23
23/tcp open telnet
Énumération
Récupération de bannières
nc -vn <IP> 23
Toute l'énumération intéressante peut être effectuée par nmap :
nmap -n -sV -Pn --script "*telnet* and safe" -p 23 <IP>
Le script telnet-ntlm-info.nse
obtiendra des informations NTLM (versions Windows).
Dans le telnet RFC : Dans le protocole TELNET, il existe diverses "options" qui seront sanctionnées et peuvent être utilisées avec la structure "DO, DON'T, WILL, WON'T" pour permettre à un utilisateur et à un serveur de convenir d'utiliser un ensemble de conventions plus élaboré (ou peut-être juste différent) pour leur connexion TELNET. Ces options pourraient inclure le changement de l'ensemble de caractères, le mode d'écho, etc.
Je sais qu'il est possible d'énumérer ces options, mais je ne sais pas comment, alors faites-moi savoir si vous savez comment.
Brute force
Config file
/etc/inetd.conf
/etc/xinetd.d/telnet
/etc/xinetd.d/stelnet
Commandes Automatiques HackTricks
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.wiki/en/network-services-pentesting/pentesting-telnet.html
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'
tip
Apprenez et pratiquez le hacking AWS :HackTricks Training AWS Red Team Expert (ARTE)
Apprenez et pratiquez le hacking GCP : HackTricks Training GCP Red Team Expert (GRTE)
Apprenez et pratiquez le hacking Azure :
HackTricks Training Azure Red Team Expert (AzRTE)
Soutenir HackTricks
- Vérifiez les plans d'abonnement !
- Rejoignez le 💬 groupe Discord ou le groupe telegram ou suivez-nous sur Twitter 🐦 @hacktricks_live.
- Partagez des astuces de hacking en soumettant des PR au HackTricks et HackTricks Cloud dépôts github.