Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Loic
hbsd-checksec
Commits
1ff54e45
Unverified
Commit
1ff54e45
authored
May 06, 2021
by
slimm609
Committed by
GitHub
May 06, 2021
Browse files
Merge pull request #171 from Tatsh/improve-nx-detection
Check journalctl -k for NX protection
parents
dcde717e
a9113aad
Changes
1
Hide whitespace changes
Inline
Side-by-side
checksec
View file @
1ff54e45
...
...
@@ -787,8 +787,12 @@ kernelcheck() {
fi
echo_message
" NX protection: "
""
""
""
if
(
command_exists dmesg
)
&&
(
root_privs
)
;
then
nx_protection
=
$(
dmesg
-t
2>/dev/null |
grep
-Fw
NX
)
if
(
command_exists journalctl
)
;
then
nx_protection
=
$(
journalctl
-kb
-o
cat
|
grep
-Fw
NX |
head
-n
1
)
elif
(
command_exists dmesg
)
&&
(
root_privs
)
;
then
nx_protection
=
$(
dmesg
-t
2>/dev/null |
grep
-Fw
NX
)
fi
if
[
-n
"
$nx_protection
"
]
;
then
if
[[
"x
${
nx_protection
}
"
==
"xNX (Execute Disable) protection: active"
]]
;
then
echo_message
"
\0
33[32mEnabled
\0
33[m
\n
"
"Enabled,"
" nx_protection='yes'"
', "nx_protection":"yes"'
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment