Skip to content

Commit 7d8eada

Browse files
committed
Fix rapid7#3974 - Validate and normalize URI for axis_login
1 parent a535d23 commit 7d8eada

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/auxiliary/scanner/http/axis_login.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,23 @@ def initialize
4040

4141
register_options( [
4242
Opt::RPORT(8080),
43-
OptString.new('URI', [false, 'Path to the Apache Axis Administration page', '/axis2/axis2-admin/login']),
43+
OptString.new('TARGETURI', [false, 'Path to the Apache Axis Administration page', '/axis2/axis2-admin/login']),
4444
], self.class)
4545
end
4646

47+
# For print_* methods
4748
def target_url
4849
"http://#{vhost}:#{rport}#{datastore['URI']}"
4950
end
5051

5152
def run_host(ip)
53+
uri = normalize_uri(target_uri.path)
5254

5355
print_status("Verifying login exists at #{target_url}")
5456
begin
5557
send_request_cgi({
5658
'method' => 'GET',
57-
'uri' => datastore['URI']
59+
'uri' => uri
5860
}, 20)
5961
rescue
6062
print_error("The Axis2 login page does not exist at #{target_url}")
@@ -78,7 +80,7 @@ def run_host(ip)
7880
scanner = Metasploit::Framework::LoginScanner::Axis2.new(
7981
host: ip,
8082
port: rport,
81-
uri: datastore['URI'],
83+
uri: uri,
8284
proxies: datastore["PROXIES"],
8385
cred_details: cred_collection,
8486
stop_on_success: datastore['STOP_ON_SUCCESS'],

0 commit comments

Comments
 (0)