Add Msf::Post::Linux::Kernel.lkrg_installed? method

master
Brendan Coles 2018-12-07 14:42:16 +00:00
parent f4282bfb56
commit 80d83720df
2 changed files with 15 additions and 0 deletions

View File

@ -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
#

View File

@ -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