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:
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.
Related Pull Requests
- #13443 Merged Pull Request: Add descriptions to auxiliary modules Actions
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #7166 Merged Pull Request: Fix empty output in nbns_response
- #6875 Merged Pull Request: Update nbns_response.rb description
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #5218 Merged Pull Request: Fix #3816 by deleting print_debug
- #4827 Merged Pull Request: Major bug fixes to the capture mixin and nbns_response module
- #4102 Merged Pull Request: Use correct destination port for NBNS spoofer
- #3187 Merged Pull Request: Changed OptString to OptRegexp
- #2525 Merged Pull Request: Change module boilerplate
- #2464 Merged Pull Request: Various fixes for auxiliary/spoof/llmnr/llmnr_response and related stuff
- #2284 Merged Pull Request: Fix module description
- #1228 Merged Pull Request: MSFTIDY cleanup #1 - auxiliary
- #824 Merged Pull Request: While 1337 is fun and funny, it is easy to spot and the correct port is ...
- #448 Merged Pull Request: Correct emails for aux and exploit modules
References
See Also
Check also the following modules related to this module:
- auxiliary/admin/netbios/netbios_spoof
- auxiliary/server/dns/spoofhelper
- auxiliary/server/netbios_spoof_nat
- auxiliary/spoof/arp/arp_poisoning
- auxiliary/spoof/cisco/cdp
- auxiliary/spoof/cisco/dtp
- auxiliary/spoof/dns/bailiwicked_domain
- auxiliary/spoof/dns/bailiwicked_host
- auxiliary/spoof/dns/compare_results
- auxiliary/spoof/dns/native_spoofer
- auxiliary/spoof/llmnr/llmnr_response
- auxiliary/spoof/mdns/mdns_response
- auxiliary/spoof/replay/pcap_replay
- auxiliary/voip/sip_invite_spoof
- exploit/windows/fileformat/winrar_name_spoofing
- post/linux/manage/dns_spoofing
- post/osx/gather/password_prompt_spoof
- auxiliary/dos/windows/smb/ms10_006_negotiate_response_loop
- exploit/windows/browser/getgodm_http_response_bof
- exploit/windows/misc/apple_quicktime_rtsp_response
- exploit/windows/misc/talkative_response
- exploit/multi/misc/weblogic_deserialize_asyncresponseservice
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.