Skip to content

Commit e78d3d6

Browse files
committed
Fix erroneous cred reporting in SonicWALL exploit
A session ID will be returned in the parsed JSON if the login succeeded. Bad user: {"noldapnouser"=>1, "loginfailed"=>1} Bad password: {"loginfailed"=>1} Good user/password: {"userid"=>"1", "sessionid"=>"4WJ9cNg1TkBrwjzX"}
1 parent 55348d7 commit e78d3d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ def do_login
180180
fail_with(Failure::NoAccess, "Username '#{datastore['USERNAME']}' is incorrect.")
181181
elsif res['loginfailed']
182182
fail_with(Failure::NoAccess, "Password '#{datastore['PASSWORD']}' is incorrect.")
183+
elsif res['sessionid']
184+
report_cred(datastore['USERNAME'], datastore['PASSWORD'])
183185
end
184186

185-
report_cred(datastore['USERNAME'], datastore['PASSWORD'])
186-
187187
res
188188
end
189189

0 commit comments

Comments
 (0)