DNS Lookup Result Comparison - Metasploit


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

Module Overview


Name: DNS Lookup Result Comparison
Module: auxiliary/spoof/dns/compare_results
Source code: modules/auxiliary/spoof/dns/compare_results.rb
Disclosure date: 2008-07-21
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module can be used to determine differences in the cache entries between two DNS servers. This is primarily useful for detecting cache poisoning attacks, but can also be used to detect geo-location load balancing.

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

Required Options


  • TARGDNS: The DNS cache server to test

Go back to menu.

Msfconsole Usage


Here is how the spoof/dns/compare_results auxiliary module looks in the msfconsole:

msf6 > use auxiliary/spoof/dns/compare_results

msf6 auxiliary(spoof/dns/compare_results) > show info

       Name: DNS Lookup Result Comparison
     Module: auxiliary/spoof/dns/compare_results
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2008-07-21

Provided by:
  hdm <[email protected]>

Check supported:
  No

Basic options:
  Name              Current Setting                           Required  Description
  ----              ---------------                           --------  -----------
  BASEDNS           4.2.2.3                                   yes       The DNS cache server to use as a baseline
  CHECK_ADDITIONAL  false                                     no        Set this to true to verify additional records
  CHECK_AUTHORITY   false                                     no        Set this to true to verify authority records
  NAMES             www.google.com,www.yahoo.com,www.msn.com  yes       The list of host names that should be tested (comma separated)
  TARGDNS                                                     yes       The DNS cache server to test

Description:
  This module can be used to determine differences in the cache 
  entries between two DNS servers. This is primarily useful for 
  detecting cache poisoning attacks, but can also be used to detect 
  geo-location load balancing.

Module Options


This is a complete list of options available in the spoof/dns/compare_results auxiliary module:

msf6 auxiliary(spoof/dns/compare_results) > show options

Module options (auxiliary/spoof/dns/compare_results):

   Name              Current Setting                           Required  Description
   ----              ---------------                           --------  -----------
   BASEDNS           4.2.2.3                                   yes       The DNS cache server to use as a baseline
   CHECK_ADDITIONAL  false                                     no        Set this to true to verify additional records
   CHECK_AUTHORITY   false                                     no        Set this to true to verify authority records
   NAMES             www.google.com,www.yahoo.com,www.msn.com  yes       The list of host names that should be tested (comma separated)
   TARGDNS                                                     yes       The DNS cache server to test

Advanced Options


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

msf6 auxiliary(spoof/dns/compare_results) > show advanced

Module advanced options (auxiliary/spoof/dns/compare_results):

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

msf6 auxiliary(spoof/dns/compare_results) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(spoof/dns/compare_results) > 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: The baseline server did not respond to our request.


Here is a relevant code snippet related to the "Error: The baseline server did not respond to our request." error message:

74:	
75:	      base_res, base_saddr = base_sock.recvfrom(65535, 3.0)
76:	      targ_res, targ_saddr = targ_sock.recvfrom(65535, 3.0)
77:	
78:	      if !(base_res and targ_res and base_res.length > 0 and targ_res.length > 0)
79:	        print_error("  Error: The baseline server did not respond to our request.") if ! (base_res and base_res.length > 0)
80:	        print_error("  Error: The target server did not respond to our request.") if ! (targ_res and targ_res.length > 0)
81:	        next
82:	      end
83:	
84:	      base_res = Resolv::DNS::Message.decode(base_res)

Error: The target server did not respond to our request.


Here is a relevant code snippet related to the "Error: The target server did not respond to our request." error message:

75:	      base_res, base_saddr = base_sock.recvfrom(65535, 3.0)
76:	      targ_res, targ_saddr = targ_sock.recvfrom(65535, 3.0)
77:	
78:	      if !(base_res and targ_res and base_res.length > 0 and targ_res.length > 0)
79:	        print_error("  Error: The baseline server did not respond to our request.") if ! (base_res and base_res.length > 0)
80:	        print_error("  Error: The target server did not respond to our request.") if ! (targ_res and targ_res.length > 0)
81:	        next
82:	      end
83:	
84:	      base_res = Resolv::DNS::Message.decode(base_res)
85:	      targ_res = Resolv::DNS::Message.decode(targ_res)

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.24-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.