23 - Pentesting Telnet

Reading time: 3 minutes

tip

Leer & oefen AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Leer & oefen GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Ondersteun HackTricks

Basiese Inligting

Telnet is 'n netwerkprotokol wat gebruikers 'n ONveilige manier bied om toegang tot 'n rekenaar oor 'n netwerk te verkry.

Standaard poort: 23

23/tcp open  telnet

Enumerasie

bash
nc -vn <IP> 23

Alle interessante enumerasie kan deur nmap uitgevoer word:

bash
nmap -n -sV -Pn --script "*telnet* and safe" -p 23 <IP>

Die skrip telnet-ntlm-info.nse sal NTLM-inligting verkry (Windows weergawes).

Van die telnet RFC: In die TELNET-protokol is daar verskeie "opsies" wat goedgekeur sal word en gebruik kan word met die "DO, DON'T, WILL, WON'T" struktuur om 'n gebruiker en bediener in staat te stel om saam te stem om 'n meer uitgebreide (of dalk net ander) stel konvensies vir hul TELNET-verbinding te gebruik. Sulke opsies kan insluit die verandering van die karakterstel, die echo-modus, ens.

Ek weet dit is moontlik om hierdie opsies te tel, maar ek weet nie hoe nie, so laat weet my as jy weet hoe.

Brute force

Konfigurasie-lêer

bash
/etc/inetd.conf
/etc/xinetd.d/telnet
/etc/xinetd.d/stelnet

HackTricks Outomatiese Opdragte

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'

tip

Leer & oefen AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Leer & oefen GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Ondersteun HackTricks