Add a check for the linux pkexec module

bug/bundler_fix
Julien (jvoisin) Voisin 2016-10-27 10:27:51 +02:00
parent 9672759be8
commit 2ac54f5028
1 changed files with 14 additions and 0 deletions

View File

@ -66,6 +66,20 @@ class MetasploitModule < Msf::Exploit::Local
@executable_path
end
def check
version = cmd_exec('pkexec --version')
if version.nil?
print_error "Policykit is not installed"
return CheckCode::Safe
end
if version.split('.')[1].to_f <= 0.101
return CheckCode::Vulnerable
end
CheckCode::Unknown
end
def exploit
main = %q^
/*