Add check for Exec-Shield

GSoC/Meterpreter_Web_Console
Brendan Coles 2018-12-03 03:51:14 +00:00
parent d87fef5ee3
commit 0481cbffe6
1 changed files with 12 additions and 0 deletions

View File

@ -123,6 +123,18 @@ module Kernel
raise 'Could not determine ASLR status'
end
#
# Returns true if Exec-Shield is enabled
#
# @return [Boolean]
#
def exec_shield_enabled?
exec_shield = cmd_exec('cat /proc/sys/kernel/exec-shield').to_s.strip
(exec_shield.eql?('1') || exec_shield.eql?('2'))
rescue
raise 'Could not determine exec-shield status'
end
#
# Returns true if unprivileged bpf is disabled
#