2.5 KiB
Raw Blame History

23 - Pentesting Telnet

{{#include ../banners/hacktricks-training.md}}

Temel Bilgiler

Telnet, kullanıcılara bir ağ üzerinden bir bilgisayara erişim sağlamak için güvensiz bir yol sunan bir ağ protokolüdür.

Varsayılan port: 23

23/tcp open  telnet

Enumeration

Banner Grabbing

nc -vn <IP> 23

Tüm ilginç numaralandırmalar nmap ile gerçekleştirilebilir:

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

telnet-ntlm-info.nse betiği NTLM bilgilerini (Windows sürümleri) alacaktır.

telnet RFC'deki TELNET Protokolünde, kullanıcı ve sunucunun TELNET bağlantıları için daha karmaşık (veya belki sadece farklı) bir dizi kural kullanmayı kabul etmesine olanak tanıyan çeşitli "seçenekler" bulunmaktadır. Bu seçenekler karakter setini değiştirmek, yankı modunu ayarlamak vb. içerebilir.

Bu seçenekleri sıralamanın mümkün olduğunu biliyorum ama nasıl yapıldığını bilmiyorum, eğer biliyorsanız lütfen bana bildirin.

Brute force

Config file

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

HackTricks Otomatik Komutlar

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'

{{#include ../banners/hacktricks-training.md}}