Add Msf::Post::Linux::Kernel.lkrg_installed? method
parent
f4282bfb56
commit
80d83720df
|
@ -202,6 +202,15 @@ module Kernel
|
|||
raise 'Could not determine system mmap_min_addr'
|
||||
end
|
||||
|
||||
#
|
||||
# Returns true if Linux Kernel Runtime Guard (LKRG) kernel module is installed
|
||||
#
|
||||
def lkrg_installed?
|
||||
cmd_exec('test -d /proc/sys/lkrg && echo true').to_s.strip.include? 'true'
|
||||
rescue
|
||||
raise 'Could not determine LKRG status'
|
||||
end
|
||||
|
||||
#
|
||||
# Returns true if grsecurity is installed
|
||||
#
|
||||
|
|
|
@ -87,6 +87,12 @@ class MetasploitModule < Msf::Post
|
|||
report r
|
||||
end
|
||||
|
||||
if lkrg_installed?
|
||||
r = 'LKRG is installed'
|
||||
print_good r
|
||||
report r
|
||||
end
|
||||
|
||||
if grsec_installed?
|
||||
r = 'grsecurity is installed'
|
||||
print_good r
|
||||
|
|
Loading…
Reference in New Issue