Land #11081, Add Msf::Post::Linux::Kernel.lkrg_installed? method

master
Brent Cook 2018-12-08 09:14:57 -06:00
commit 733c2f637d
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
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