TFTP Brute Forcer - Metasploit


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

Module Overview


Name: TFTP Brute Forcer
Module: auxiliary/scanner/tftp/tftpbrute
Source code: modules/auxiliary/scanner/tftp/tftpbrute.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 69
List of CVEs: -

This module uses a dictionary to brute force valid TFTP image names from a TFTP server.

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/tftp/tftpbrute
msf auxiliary(tftpbrute) > show options
    ... show and set options ...
msf auxiliary(tftpbrute) > set RHOSTS ip-range
msf auxiliary(tftpbrute) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(tftpbrute) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(tftpbrute) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(tftpbrute) > 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


This module attempts to find files on a TFTP server. The default wordlist is tftp.txt. This module will NOT attempt to download the entire file, it simply pulls the first 3 bytes to verify the file exists.

Install

On Kali 2019.4 (rolling) one of the TFTP server is the package tftpd-hpa. This can be installed as follows:

apt-get install tftpd-hpa
systemctl start tftpd-hpa

This creates the root tftp directory in /srv/tftp.

Verification Steps


  1. Install the application
  2. Start msfconsole
  3. Do: use auxiliary/scanner/tftp/tftpbrute
  4. Do: run

Options


DICTIONARY

The newline separated list of files to find. Default depends on install location, however it will be within metasploit-framework/data/wordlists/tftp.txt.

Scenarios


tftpd-hpa on Kali linux

First, create a file to find:

echo "hello world" > /srv/tftp/test.txt

Now we can find the file:

msf5 > use auxiliary/scanner/tftp/tftpbrute 
msf5 auxiliary(scanner/tftp/tftpbrute) > set rhosts 1.1.1.1
rhosts => 1.1.1.1
msf5 auxiliary(scanner/tftp/tftpbrute) > set verbose true
verbose => true
msf5 auxiliary(scanner/tftp/tftpbrute) > run

[+] Found test.txt on 1.1.1.1
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/tftp/tftpbrute) > 

Go back to menu.

Msfconsole Usage


Here is how the scanner/tftp/tftpbrute auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/tftp/tftpbrute

msf6 auxiliary(scanner/tftp/tftpbrute) > show info

       Name: TFTP Brute Forcer
     Module: auxiliary/scanner/tftp/tftpbrute
    License: BSD License
       Rank: Normal

Provided by:
  antoine

Check supported:
  No

Basic options:
  Name        Current Setting                                                       Required  Description
  ----        ---------------                                                       --------  -----------
  CHOST                                                                             no        The local client address
  DICTIONARY  /opt/metasploit-framework/embedded/framework/data/wordlists/tftp.txt  yes       The list of filenames
  RHOSTS                                                                            yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT       69                                                                    yes       The target port
  THREADS     1                                                                     yes       The number of concurrent threads (max one per host)

Description:
  This module uses a dictionary to brute force valid TFTP image names 
  from a TFTP server.

Module Options


This is a complete list of options available in the scanner/tftp/tftpbrute auxiliary module:

msf6 auxiliary(scanner/tftp/tftpbrute) > show options

Module options (auxiliary/scanner/tftp/tftpbrute):

   Name        Current Setting                                                       Required  Description
   ----        ---------------                                                       --------  -----------
   CHOST                                                                             no        The local client address
   DICTIONARY  /opt/metasploit-framework/embedded/framework/data/wordlists/tftp.txt  yes       The list of filenames
   RHOSTS                                                                            yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT       69                                                                    yes       The target port
   THREADS     1                                                                     yes       The number of concurrent threads (max one per host)

Advanced Options


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

msf6 auxiliary(scanner/tftp/tftpbrute) > show advanced

Module advanced options (auxiliary/scanner/tftp/tftpbrute):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   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/tftp/tftpbrute module can do:

msf6 auxiliary(scanner/tftp/tftpbrute) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(scanner/tftp/tftpbrute) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


antoine

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.