Add a check for the linux pkexec module
parent
9672759be8
commit
2ac54f5028
|
@ -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^
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue