Finger Service User Enumerator - Metasploit


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

Module Overview


Name: Finger Service User Enumerator
Module: auxiliary/scanner/finger/finger_users
Source code: modules/auxiliary/scanner/finger/finger_users.rb
Disclosure date: -
Last modification time: 2018-02-20 15:48:00 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 79
List of CVEs: -

Identify valid users through the finger service using a variety of tricks

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


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/finger/finger_users
msf auxiliary(finger_users) > show options
    ... show and set options ...
msf auxiliary(finger_users) > set RHOSTS ip-range
msf auxiliary(finger_users) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(finger_users) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(finger_users) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(finger_users) > set RHOSTS file:/tmp/ip_list.txt

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Knowledge Base


Vulnerable Application


Finger is an older protocol which displays information about users on a machine. This can be abused to verify if a user is valid on that machine. The protocol itself was designed in the 1970s, and is run in cleartext.

The following was done on Kali linux:

  1. apt-get install inetutils-inetd fingerd
  2. Start the service: /etc/init.d/inetutils-inetd start

Verification Steps


  1. Install fingerd
  2. Start msfconsole
  3. Do: use auxiliary/scanner/finger/finger_users
  4. Do: set rhosts
  5. Do: run

Options


USERS_FILE

The USERS_FILE is a newline delimited list of users and defaults to unix_users.txt included with metasploit.

Scenarios


A run against the configuration from these docs

    msf > use auxiliary/scanner/finger/finger_users
    msf auxiliary(finger_users) > set rhosts 127.0.0.1
    rhosts => 127.0.0.1
    msf auxiliary(finger_users) > run

    [+] 127.0.0.1:79          - 127.0.0.1:79 - Found user: root
    [+] 127.0.0.1:79          - 127.0.0.1:79 Users found: root
    [*] Scanned 1 of 1 hosts (100% complete)
    [*] Auxiliary module execution completed

Confirming using NMAP


Utilizing the finger script

    # nmap -p 79 --script finger 127.0.0.1

    Starting Nmap 7.40 ( https://nmap.org ) at 2017-04-26 19:35 EDT
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.000039s latency).
    PORT   STATE SERVICE
    79/tcp open  finger
    | finger: Login     Name       Tty      Idle  Login Time   Office     Office Phone\x0D
    | root      root       tty2      16d  Apr 10 19:17 (:0)\x0D
    |_root      root      *pts/3      1d  Apr 25 19:11 (192.168.2.175)\x0D

    Nmap done: 1 IP address (1 host up) scanned in 0.42 seconds

Go back to menu.

Msfconsole Usage


Here is how the scanner/finger/finger_users auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/finger/finger_users

msf6 auxiliary(scanner/finger/finger_users) > show info

       Name: Finger Service User Enumerator
     Module: auxiliary/scanner/finger/finger_users
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  hdm <[email protected]>

Check supported:
  No

Basic options:
  Name        Current Setting                                                             Required  Description
  ----        ---------------                                                             --------  -----------
  RHOSTS                                                                                  yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT       79                                                                          yes       The target port (TCP)
  THREADS     1                                                                           yes       The number of concurrent threads (max one per host)
  USERS_FILE  /opt/metasploit-framework/embedded/framework/data/wordlists/unix_users.txt  yes       The file that contains a list of default UNIX accounts.

Description:
  Identify valid users through the finger service using a variety of 
  tricks

Module Options


This is a complete list of options available in the scanner/finger/finger_users auxiliary module:

msf6 auxiliary(scanner/finger/finger_users) > show options

Module options (auxiliary/scanner/finger/finger_users):

   Name        Current Setting                                                             Required  Description
   ----        ---------------                                                             --------  -----------
   RHOSTS                                                                                  yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT       79                                                                          yes       The target port (TCP)
   THREADS     1                                                                           yes       The number of concurrent threads (max one per host)
   USERS_FILE  /opt/metasploit-framework/embedded/framework/data/wordlists/unix_users.txt  yes       The file that contains a list of default UNIX accounts.

Advanced Options


Here is a complete list of advanced options supported by the scanner/finger/finger_users auxiliary module:

msf6 auxiliary(scanner/finger/finger_users) > show advanced

Module advanced options (auxiliary/scanner/finger/finger_users):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   CHOST                                 no        The local client address
   CPORT                                 no        The local client port
   ConnectTimeout       10               yes       Maximum number of seconds to establish a TCP connection
   Proxies                               no        A proxy chain of format type:host:port[,type:host:port][...]
   SSL                  false            no        Negotiate SSL/TLS for outgoing connections
   SSLCipher                             no        String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
   SSLVerifyMode        PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
   SSLVersion           Auto             yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   ShowProgress         true             yes       Display progress messages during a scan
   ShowProgressPercent  10               yes       The interval in percent that progress should be shown
   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 scanner/finger/finger_users module can do:

msf6 auxiliary(scanner/finger/finger_users) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


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

msf6 auxiliary(scanner/finger/finger_users) > show evasion

Module evasion options:

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

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

<IP>:<RPORT> No users found.


Here is a relevant code snippet related to the "<IP>:<RPORT> No users found." error message:

42:	      print_error("#{e} #{e.backtrace}")
43:	    end
44:	    report_service(:host => rhost, :port => rport, :name => "finger")
45:	
46:	    if(@users.empty?)
47:	      print_status("#{ip}:#{rport} No users found.")
48:	    else
49:	      print_good("#{ip}:#{rport} Users found: #{@users.keys.sort.join(", ")}")
50:	      report_note(
51:	        :host => rhost,
52:	        :port => rport,

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


hdm

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.