add arch check

GSoC/Meterpreter_Web_Console
h00die 2018-04-22 08:30:32 -04:00
parent a60f205ee0
commit e197cb5759
2 changed files with 8 additions and 1 deletions

View File

@ -20,7 +20,7 @@ is thrown by the executable.
1. Start msfconsole
2. Exploit a box via whatever method
3. Do: `use exploit/linux/local/bpf_extension_priv_esc`
3. Do: `use exploit/linux/local/bpf_sign_extension_priv_esc`
4. Do: `set session #`
5. Do: `set verbose true`
6. Do: `exploit`

View File

@ -86,6 +86,13 @@ class MetasploitModule < Msf::Exploit::Local
end
vprint_good "Kernel version #{version} appears to be vulnerable"
arch = kernel_hardware
unless arch.include? 'x86_64'
vprint_error "System architecture #{arch} is not supported"
return CheckCode::Safe
end
vprint_good "System architecture #{arch} is supported"
if session.type.to_s.eql? 'meterpreter'
vprint_error 'Exploit can only be run on command shell sessions (Meterpreter does not work)'
end