Authentication Capture: Telnet - Metasploit


This page contains detailed information about how to use the auxiliary/server/capture/telnet metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Authentication Capture: Telnet
Module: auxiliary/server/capture/telnet
Source code: modules/auxiliary/server/capture/telnet.rb
Disclosure date: -
Last modification time: 2020-05-12 22:15:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module provides a fake Telnet service that is designed to capture authentication credentials. DONTs and WONTs are sent to the client for all option negotiations, except for ECHO at the time of the password prompt since the server controls that for a bit more realism.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


msf > use auxiliary/server/capture/telnet
msf auxiliary(telnet) > show targets
    ... a list of targets ...
msf auxiliary(telnet) > set TARGET target-id
msf auxiliary(telnet) > show options
    ... show and set options ...
msf auxiliary(telnet) > exploit

Knowledge Base


This module creates a mock telnet server which accepts credentials. Upon receiving a login attempt, a Login failed error is thrown.

Verification Steps


  1. Start msfconsole
  2. Do: use auxiliary/server/capture/telnet
  3. Do: run

Options


BANNER

The Banner which should be displayed. Default is empty, which will display Welcome.

SSL

Boolean if SSL should be used. Default is False.

SSLCert

File path to a combined Private Key and Certificate file. If not provided, a certificate will be automatically generated. Default is ``.

Scenarios


Telnet Server and Client

Server:

msf5 > use auxiliary/server/capture/telnet 
msf5 auxiliary(server/capture/telnet) > run
[*] Auxiliary module running as background job 0.
msf5 auxiliary(server/capture/telnet) > 
[*] Started service listener on 0.0.0.0:23 
[*] Server started.
[+] TELNET LOGIN 127.0.0.1:40016 root / <3@wvu_is_my_hero

Client:

root@kali:~# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Welcome

Login: root
Password: <3@wvu_is_my_hero


Login failed

Connection closed by foreign host.

Go back to menu.

Msfconsole Usage


Here is how the server/capture/telnet auxiliary module looks in the msfconsole:

msf6 > use auxiliary/server/capture/telnet

msf6 auxiliary(server/capture/telnet) > show info

       Name: Authentication Capture: Telnet
     Module: auxiliary/server/capture/telnet
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  kris katterjohn <[email protected]>

Available actions:
  Name     Description
  ----     -----------
  Capture  Run telnet capture server

Check supported:
  No

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  BANNER                    no        The server banner to display when client connects
  SRVHOST  0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
  SRVPORT  23               yes       The local port to listen on.
  SSL      false            no        Negotiate SSL for incoming connections
  SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)

Description:
  This module provides a fake Telnet service that is designed to 
  capture authentication credentials. DONTs and WONTs are sent to the 
  client for all option negotiations, except for ECHO at the time of 
  the password prompt since the server controls that for a bit more 
  realism.

Module Options


This is a complete list of options available in the server/capture/telnet auxiliary module:

msf6 auxiliary(server/capture/telnet) > show options

Module options (auxiliary/server/capture/telnet):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   BANNER                    no        The server banner to display when client connects
   SRVHOST  0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
   SRVPORT  23               yes       The local port to listen on.
   SSL      false            no        Negotiate SSL for incoming connections
   SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)

Auxiliary action:

   Name     Description
   ----     -----------
   Capture  Run telnet capture server

Advanced Options


Here is a complete list of advanced options supported by the server/capture/telnet auxiliary module:

msf6 auxiliary(server/capture/telnet) > show advanced

Module advanced options (auxiliary/server/capture/telnet):

   Name            Current Setting  Required  Description
   ----            ---------------  --------  -----------
   ListenerComm                     no        The specific communication channel to use for this service
   SSLCipher                        no        String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
   SSLCompression  false            no        Enable SSL/TLS-level compression
   VERBOSE         false            no        Enable detailed status messages
   WORKSPACE                        no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the server/capture/telnet module can do:

msf6 auxiliary(server/capture/telnet) > show actions

Auxiliary actions:

   Name     Description
   ----     -----------
   Capture  Run telnet capture server

Evasion Options


Here is the full list of possible evasion options supported by the server/capture/telnet auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(server/capture/telnet) > show evasion

Module evasion options:

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   TCP::max_send_size  0                no        Maximum tcp segment size.  (0 = disable)
   TCP::send_delay     0                no        Delays inserted before every send.  (0 = disable)

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


kris katterjohn

Version


This page has been produced using Metasploit Framework version 6.1.27-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.