NetBIOS Name Service Spoofer - Metasploit


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

Module Overview


Name: NetBIOS Name Service Spoofer
Module: auxiliary/spoof/nbns/nbns_response
Source code: modules/auxiliary/spoof/nbns/nbns_response.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 forges NetBIOS Name Service (NBNS) responses. It will listen for NBNS requests sent to the local subnet's broadcast address and spoof a response, redirecting the querying machine to an IP of the attacker's choosing. Combined with auxiliary/server/capture/smb or auxiliary/server/capture/http_ntlm it is a highly effective means of collecting crackable hashes on common networks. This module must be run as root and will bind to udp/137 on all interfaces.

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/spoof/nbns/nbns_response
msf auxiliary(nbns_response) > show targets
    ... a list of targets ...
msf auxiliary(nbns_response) > set TARGET target-id
msf auxiliary(nbns_response) > show options
    ... show and set options ...
msf auxiliary(nbns_response) > exploit

Go back to menu.

Msfconsole Usage


Here is how the spoof/nbns/nbns_response auxiliary module looks in the msfconsole:

msf6 > use auxiliary/spoof/nbns/nbns_response

msf6 auxiliary(spoof/nbns/nbns_response) > show info

       Name: NetBIOS Name Service Spoofer
     Module: auxiliary/spoof/nbns/nbns_response
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Tim Medin <[email protected]>

Available actions:
  Name     Description
  ----     -----------
  Service  Run NBNS spoofing service

Check supported:
  No

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  INTERFACE                   no        The name of the interface
  REGEX      .*               yes       Regex applied to the NB Name to determine if spoofed reply is sent
  SPOOFIP    127.0.0.1        yes       IP address with which to poison responses
  TIMEOUT    500              yes       The number of seconds to wait for new data

Description:
  This module forges NetBIOS Name Service (NBNS) responses. It will 
  listen for NBNS requests sent to the local subnet's broadcast 
  address and spoof a response, redirecting the querying machine to an 
  IP of the attacker's choosing. Combined with 
  auxiliary/server/capture/smb or auxiliary/server/capture/http_ntlm 
  it is a highly effective means of collecting crackable hashes on 
  common networks. This module must be run as root and will bind to 
  udp/137 on all interfaces.

References:
  http://www.packetstan.com/2011/03/nbns-spoofing-on-your-way-to-world.html

Module Options


This is a complete list of options available in the spoof/nbns/nbns_response auxiliary module:

msf6 auxiliary(spoof/nbns/nbns_response) > show options

Module options (auxiliary/spoof/nbns/nbns_response):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   INTERFACE                   no        The name of the interface
   REGEX      .*               yes       Regex applied to the NB Name to determine if spoofed reply is sent
   SPOOFIP    127.0.0.1        yes       IP address with which to poison responses
   TIMEOUT    500              yes       The number of seconds to wait for new data

Auxiliary action:

   Name     Description
   ----     -----------
   Service  Run NBNS spoofing service

Advanced Options


Here is a complete list of advanced options supported by the spoof/nbns/nbns_response auxiliary module:

msf6 auxiliary(spoof/nbns/nbns_response) > show advanced

Module advanced options (auxiliary/spoof/nbns/nbns_response):

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   GATEWAY_PROBE_HOST  8.8.8.8          yes       Send a TTL=1 random UDP datagram to this host to discover the default gateway's MAC
   GATEWAY_PROBE_PORT                   no        The port on GATEWAY_PROBE_HOST to send a random UDP probe to (random if 0 or unset)
   SECRET              1297303073       yes       A 32-bit cookie for probe requests.
   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 spoof/nbns/nbns_response module can do:

msf6 auxiliary(spoof/nbns/nbns_response) > show actions

Auxiliary actions:

   Name     Description
   ----     -----------
   Service  Run NBNS spoofing service

Evasion Options


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

msf6 auxiliary(spoof/nbns/nbns_response) > show evasion

Module evasion options:

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

Go back to menu.

Error Messages


This module may fail with the following error messages:

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.

Error


Here is a relevant code snippet related to the "Error" error message:

156:	      begin
157:	        monitor_socket
158:	      rescue ::Interrupt
159:	        raise $!
160:	      rescue ::Exception
161:	        print_error("Error: #{$!.class} #{$!} #{$!.backtrace}")
162:	      end
163:	    }
164:	
165:	    print_status("NBNS Spoofer started. Listening for NBNS requests with REGEX \"#{datastore['REGEX'].source}\" ...")
166:	

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Tim Medin <tim[at]securitywhole.com>

Version


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

Go back to menu.