From e50af7761c61cc66cf2e4649dccb0000cacdfcf6 Mon Sep 17 00:00:00 2001 From: Khaotic <6080590+khaoticdude@users.noreply.github.com> Date: Sat, 9 Apr 2022 10:36:53 -0500 Subject: [PATCH] Improve identifying Stack Canaries (#833) --- gef.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gef.py b/gef.py index bd3d3fe59..57b691b86 100644 --- a/gef.py +++ b/gef.py @@ -2045,7 +2045,7 @@ def __check_security_property(opt: str, filename: str, pattern: str) -> bool: return False results = collections.OrderedDict() - results["Canary"] = __check_security_property("-s", filename, r"__stack_chk_fail") is True + results["Canary"] = __check_security_property("-rs", filename, r"__stack_chk_fail") is True has_gnu_stack = __check_security_property("-W -l", filename, r"GNU_STACK") is True if has_gnu_stack: results["NX"] = __check_security_property("-W -l", filename, r"GNU_STACK.*RWE") is False