Hidden DCERPC Service Discovery - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/dcerpc/hidden metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Hidden DCERPC Service Discovery
Module: auxiliary/scanner/dcerpc/hidden
Source code: modules/auxiliary/scanner/dcerpc/hidden.rb
Disclosure date: -
Last modification time: 2022-01-06 15:45:59 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -
This module will query the endpoint mapper and make a list of all ncacn_tcp RPC services. It will then connect to each of these services and use the management API to list all other RPC services accessible on this port. Any RPC service found attached to a TCP port, but not listed in the endpoint mapper, will be displayed and analyzed to see whether anonymous access is permitted.
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/dcerpc/hidden
msf auxiliary(hidden) > show options
... show and set options ...
msf auxiliary(hidden) > set RHOSTS ip-range
msf auxiliary(hidden) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(hidden) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(hidden) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(hidden) > set RHOSTS file:/tmp/ip_list.txt
Knowledge Base
Description
The hidden scanner connects to a given range of IP addresses and tries to locate any RPC services that are not listed in the Endpoint Mapper and determines if anonymous access to the service is allowed.
Verification Steps
- Do:
use auxiliary/scanner/dcerpc/hidden
- Do:
set RHOSTS [IP]
- Do:
set THREADS [number of threads]
- Do:
run
Scenarios
msf > use auxiliary/scanner/dcerpc/hidden
msf auxiliary(hidden) > set RHOSTS 192.168.1.200-254
RHOSTS => 192.168.1.200-254
msf auxiliary(hidden) > set THREADS 55
THREADS => 55
msf auxiliary(hidden) > run
[*] Connecting to the endpoint mapper service...
[*] Connecting to the endpoint mapper service...
[*] Connecting to the endpoint mapper service...
...snip...
[*] Connecting to the endpoint mapper service...
[*] Connecting to the endpoint mapper service...
[*] Could not obtain the endpoint list: DCERPC FAULT => nca_s_fault_access_denied
[*] Could not contact the endpoint mapper on 192.168.1.203
[*] Could not obtain the endpoint list: DCERPC FAULT => nca_s_fault_access_denied
[*] Could not contact the endpoint mapper on 192.168.1.201
[*] Could not connect to the endpoint mapper service
[*] Could not contact the endpoint mapper on 192.168.1.250
[*] Looking for services on 192.168.1.204:1025...
[*] HIDDEN: UUID 12345778-1234-abcd-ef00-0123456789ab v0.0
[*] Looking for services on 192.168.1.202:49152...
[*] CONN BIND CALL ERROR=DCERPC FAULT => nca_s_fault_ndr
[*]
[*] HIDDEN: UUID c681d488-d850-11d0-8c52-00c04fd90f7e v1.0
[*] CONN BIND CALL ERROR=DCERPC FAULT => nca_s_fault_ndr
[*]
[*] HIDDEN: UUID 11220835-5b26-4d94-ae86-c3e475a809de v1.0
[*] CONN BIND ERROR=DCERPC FAULT => nca_s_fault_access_denied
[*]
[*] HIDDEN: UUID 5cbe92cb-f4be-45c9-9fc9-33e73e557b20 v1.0
[*] CONN BIND ERROR=DCERPC FAULT => nca_s_fault_access_denied
[*]
[*] HIDDEN: UUID 3919286a-b10c-11d0-9ba8-00c04fd92ef5 v0.0
[*] CONN BIND CALL DATA=0000000057000000
[*]
[*] HIDDEN: UUID 1cbcad78-df0b-4934-b558-87839ea501c9 v0.0
[*] CONN BIND ERROR=DCERPC FAULT => nca_s_fault_access_denied
[*]
[*] HIDDEN: UUID c9378ff1-16f7-11d0-a0b2-00aa0061426a v1.0
[*] CONN BIND ERROR=DCERPC FAULT => nca_s_fault_access_denied
[*]
[*] Remote Management Interface Error: The connection timed out (192.168.1.202:49152).
...snip...
[*] Scanned 55 of 55 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(hidden) >
Go back to menu.
Msfconsole Usage
Here is how the scanner/dcerpc/hidden auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/dcerpc/hidden
msf6 auxiliary(scanner/dcerpc/hidden) > show info
Name: Hidden DCERPC Service Discovery
Module: auxiliary/scanner/dcerpc/hidden
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
hdm <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
THREADS 1 yes The number of concurrent threads (max one per host)
Description:
This module will query the endpoint mapper and make a list of all
ncacn_tcp RPC services. It will then connect to each of these
services and use the management API to list all other RPC services
accessible on this port. Any RPC service found attached to a TCP
port, but not listed in the endpoint mapper, will be displayed and
analyzed to see whether anonymous access is permitted.
Module Options
This is a complete list of options available in the scanner/dcerpc/hidden auxiliary module:
msf6 auxiliary(scanner/dcerpc/hidden) > show options
Module options (auxiliary/scanner/dcerpc/hidden):
Name Current Setting Required Description
---- --------------- -------- -----------
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/dcerpc/hidden auxiliary module:
msf6 auxiliary(scanner/dcerpc/hidden) > show advanced
Module advanced options (auxiliary/scanner/dcerpc/hidden):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CPORT no The local client port
ConnectTimeout 10 yes Maximum number of seconds to establish a TCP connection
DCERPC::ReadTimeout 10 yes The number of seconds to wait for DCERPC responses
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
SSL false no Negotiate SSL/TLS for outgoing connections
SSLCipher no String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
SSLVerifyMode PEER no SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
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/dcerpc/hidden module can do:
msf6 auxiliary(scanner/dcerpc/hidden) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/dcerpc/hidden auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/dcerpc/hidden) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
DCERPC::fake_bind_multi true no Use multi-context bind calls
DCERPC::fake_bind_multi_append 0 no Set the number of UUIDs to append the target
DCERPC::fake_bind_multi_prepend 0 no Set the number of UUIDs to prepend before the target
DCERPC::max_frag_size 4096 yes Set the DCERPC packet fragmentation size
DCERPC::smb_pipeio rw no Use a different delivery method for accessing named pipes (Accepted: rw, trans)
TCP::max_send_size 0 no Maxiumum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
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.
Could not contact the endpoint mapper on <IP>
Here is a relevant code snippet related to the "Could not contact the endpoint mapper on <IP>" error message:
35: def run_host(ip)
36: begin
37:
38: epm = dcerpc_endpoint_list()
39: if(not epm)
40: print_status("Could not contact the endpoint mapper on #{ip}")
41: return
42: end
43:
44: eports = {}
45:
ERROR=<ERROR>
Here is a relevant code snippet related to the "ERROR=<ERROR>" error message:
94: status = "\t\t"
95: status << "CONN " if conn
96: status << "BIND " if bind
97: status << "CALL " if call
98: status << "DATA=#{data.unpack("H*")[0]} " if data
99: status << "ERROR=#{error} " if error
100:
101: print_status(status)
102: print_status("")
103:
104: ## Add Report
Error: <E>
Here is a relevant code snippet related to the "Error: <E>" error message:
115: end
116:
117: rescue ::Interrupt
118: raise $!
119: rescue ::Exception => e
120: print_status("Error: #{e}")
121: end
122: end
123:
124:
125: end
Go back to menu.
Related Pull Requests
- #11544 Merged Pull Request: add deregister_tcp/udp_options
- #9359 Merged Pull Request: Fix early termination of auxiliary/scanner/dcerpc/hidden
- #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
- #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:
- auxiliary/scanner/dcerpc/dfscoerce
- auxiliary/scanner/dcerpc/endpoint_mapper
- auxiliary/scanner/dcerpc/management
- auxiliary/scanner/dcerpc/petitpotam
- auxiliary/scanner/dcerpc/tcp_dcerpc_auditor
- auxiliary/scanner/dcerpc/windows_deployment_services
- auxiliary/admin/dcerpc/cve_2020_1472_zerologon
- auxiliary/admin/dcerpc/cve_2021_1675_printnightmare
- auxiliary/admin/dcerpc/icpr_cert
- auxiliary/admin/dcerpc/samr_computer
- exploit/windows/dcerpc/cve_2021_1675_printnightmare
- exploit/windows/dcerpc/ms03_026_dcom
- exploit/windows/dcerpc/ms05_017_msmq
- exploit/windows/dcerpc/ms07_029_msdns_zonename
- exploit/windows/dcerpc/ms07_065_msmq
- auxiliary/scanner/smb/pipe_dcerpc_auditor
Authors
hdm
Version
This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.