Fake DNS Service - Metasploit
This page contains detailed information about how to use the auxiliary/server/fakedns metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Fake DNS Service
Module: auxiliary/server/fakedns
Source code: modules/auxiliary/server/fakedns.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 provides a DNS service that redirects all queries to a particular address.
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/server/fakedns
msf auxiliary(fakedns) > show targets
... a list of targets ...
msf auxiliary(fakedns) > set TARGET target-id
msf auxiliary(fakedns) > show options
... show and set options ...
msf auxiliary(fakedns) > exploit
Go back to menu.
Msfconsole Usage
Here is how the server/fakedns auxiliary module looks in the msfconsole:
msf6 > use auxiliary/server/fakedns
msf6 auxiliary(server/fakedns) > show info
Name: Fake DNS Service
Module: auxiliary/server/fakedns
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
ddz <[email protected]>
hdm <[email protected]>
fozavci
Available actions:
Name Description
---- -----------
Service Run DNS server
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
SRVHOST 0.0.0.0 yes The local host to listen on.
SRVPORT 53 yes The local port to listen on.
TARGETACTION BYPASS yes Action for TARGETDOMAIN (Accepted: FAKE, BYPASS)
TARGETDOMAIN www.google.com yes The list of target domain names we want to fully resolve (BYPASS) or fake resolve (FAKE). Use '*' for wildcard.
TARGETHOST no The address that all names should resolve to
Description:
This module provides a DNS service that redirects all queries to a
particular address.
Module Options
This is a complete list of options available in the server/fakedns auxiliary module:
msf6 auxiliary(server/fakedns) > show options
Module options (auxiliary/server/fakedns):
Name Current Setting Required Description
---- --------------- -------- -----------
SRVHOST 0.0.0.0 yes The local host to listen on.
SRVPORT 53 yes The local port to listen on.
TARGETACTION BYPASS yes Action for TARGETDOMAIN (Accepted: FAKE, BYPASS)
TARGETDOMAIN www.google.com yes The list of target domain names we want to fully resolve (BYPASS) or fake resolve (FAKE). Use '*' for wildcard.
TARGETHOST no The address that all names should resolve to
Auxiliary action:
Name Description
---- -----------
Service Run DNS server
Advanced Options
Here is a complete list of advanced options supported by the server/fakedns auxiliary module:
msf6 auxiliary(server/fakedns) > show advanced
Module advanced options (auxiliary/server/fakedns):
Name Current Setting Required Description
---- --------------- -------- -----------
LogConsole true no Determines whether to log all request to the console
LogDatabase false no Determines whether to log all request to the database
RR_SRV_PORT 5060 no The port field in the SRV response when FAKE
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 server/fakedns module can do:
msf6 auxiliary(server/fakedns) > show actions
Auxiliary actions:
Name Description
---- -----------
Service Run DNS server
Evasion Options
Here is the full list of possible evasion options supported by the server/fakedns auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(server/fakedns) > 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.
Unable to resolve SRV record for <NAME> -- skipping
Here is a relevant code snippet related to the "Unable to resolve SRV record for <NAME> -- skipping" error message:
191: # if we are in bypass mode or we are in fake mode but the target didn't match,
192: # just return the real response RRs
193: resources = Resolv::DNS.new().getresources(Resolv::DNS::Name.create(name), Resolv::DNS::Resource::IN::SRV)
194: if resources.empty?
195: @error_resolving = true
196: print_error("Unable to resolve SRV record for #{name} -- skipping")
197: next
198: end
199: resources.each do |resource|
200: host = resource.target
201: port = resource.port.to_i
XID <REQUEST.ID> (<VALUE>) - Error resolving
Here is a relevant code snippet related to the "XID <REQUEST.ID> (<VALUE>) - Error resolving" error message:
241: end
242: }
243:
244: if(@log_console)
245: if(@error_resolving)
246: print_error("XID #{request.id} (#{lst.join(", ")}) - Error resolving")
247: else
248: print_status("XID #{request.id} (#{lst.join(", ")})")
249: end
250: end
251:
fakedns: <E.CLASS> <E> <E.BACKTRACE>
Here is a relevant code snippet related to the "fakedns: <E.CLASS> <E> <E.BACKTRACE>" error message:
260:
261: @sock.send(request.encode(), 0, addr[3], addr[1])
262: end
263:
264: rescue ::Exception => e
265: print_error("fakedns: #{e.class} #{e} #{e.backtrace}")
266: # Make sure the socket gets closed on exit
267: ensure
268: @sock.close
269: end
270: end
Go back to menu.
Related Pull Requests
- #13443 Merged Pull Request: Add descriptions to auxiliary modules Actions
- #13404 Merged Pull Request: fakedns: specificy in help the wildcard character
- #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
- #6768 Merged Pull Request: remove more regex-style bool checks
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #2525 Merged Pull Request: Change module boilerplate
- #1228 Merged Pull Request: MSFTIDY cleanup #1 - auxiliary
Go back to menu.
See Also
Check also the following modules related to this module:
- exploit/windows/scada/factorylink_csservice
- auxiliary/admin/http/typo3_sa_2009_001
- auxiliary/admin/http/typo3_sa_2009_002
- auxiliary/dos/windows/browser/ms09_065_eot_integer
- auxiliary/dos/windows/smb/ms09_001_write
- auxiliary/dos/windows/smb/ms09_050_smb2_negotiate_pidhigh
- auxiliary/dos/windows/smb/ms09_050_smb2_session_logoff
- auxiliary/scanner/http/ms09_020_webdav_unicode_bypass
- exploit/windows/browser/ms09_002_memory_corruption
- exploit/windows/browser/ms09_043_owc_htmlurl
- exploit/windows/browser/ms09_043_owc_msdso
- exploit/windows/browser/ms09_072_style_object
- exploit/windows/browser/ms10_090_ie_css_clip
- exploit/windows/browser/ms11_093_ole32
- exploit/windows/browser/ms13_009_ie_slayoutrun_uaf
- exploit/windows/browser/ms13_090_cardspacesigninhelper
- exploit/windows/fileformat/ms09_067_excel_featheader
- exploit/windows/ftp/ms09_053_ftpd_nlst
- exploit/windows/isapi/ms00_094_pbserver
- exploit/windows/local/ms10_092_schelevator
- exploit/windows/local/ms13_097_ie_registry_symlink
- exploit/windows/local/ms14_009_ie_dfsvc
- exploit/windows/mssql/ms09_004_sp_replwritetovarbin
- exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli
- exploit/windows/smb/ms09_050_smb2_negotiate_func_index
Authors
- ddz
- hdm
- fozavci
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.