Clean up perms and whitespace for owa_login
parent
ba03890004
commit
c37dbd104a
|
@ -30,7 +30,6 @@ class Metasploit3 < Msf::Auxiliary
|
|||
'Brandon Knight',
|
||||
'Pete (Bokojan) Arzamendi, #Outlook 2013 updates'
|
||||
],
|
||||
|
||||
'License' => MSF_LICENSE,
|
||||
'Actions' =>
|
||||
[
|
||||
|
@ -61,7 +60,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
'InboxCheck' => /Inbox|location(\x20*)=(\x20*)"\\\/(\w+)\\\/logoff\.owa|A mailbox couldn\'t be found|\<a .+onclick="return JumpTo\('logoff\.aspx.+\">/
|
||||
}
|
||||
],
|
||||
[
|
||||
[
|
||||
'OWA_2013',
|
||||
{
|
||||
'Description' => 'OWA version 2013',
|
||||
|
@ -72,9 +71,9 @@ class Metasploit3 < Msf::Auxiliary
|
|||
]
|
||||
],
|
||||
'DefaultAction' => 'OWA_2010',
|
||||
'DefaultOptions' => {
|
||||
'SSL' => true
|
||||
}
|
||||
'DefaultOptions' => {
|
||||
'SSL' => true
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
@ -162,8 +161,6 @@ class Metasploit3 < Msf::Auxiliary
|
|||
vhost = opts["vhost"]
|
||||
domain = opts["domain"]
|
||||
|
||||
|
||||
|
||||
user = domain + '\\' + user if domain
|
||||
|
||||
headers = {
|
||||
|
@ -208,8 +205,8 @@ class Metasploit3 < Msf::Auxiliary
|
|||
return :abort
|
||||
end
|
||||
if action.name == "OWA_2013"
|
||||
#Check for a response code to make sure login was valid. Changes from 2010 to 2013.
|
||||
#Check if the password needs to be changed.
|
||||
#Check for a response code to make sure login was valid. Changes from 2010 to 2013.
|
||||
#Check if the password needs to be changed.
|
||||
if res.headers['location'] =~ /expiredpassword/
|
||||
print_good("#{msg} SUCCESSFUL LOGIN. '#{user}' : '#{pass}': NOTE password change required")
|
||||
report_hash = {
|
||||
|
@ -225,13 +222,13 @@ class Metasploit3 < Msf::Auxiliary
|
|||
return :next_user
|
||||
end
|
||||
|
||||
#No password change required moving on.
|
||||
#No password change required moving on.
|
||||
reason = res.headers['location'].split('reason=')[1]
|
||||
if reason == nil
|
||||
if reason == nil
|
||||
headers['Cookie'] = 'PBack=0;' << res.get_cookies
|
||||
else
|
||||
else
|
||||
#Login didn't work. no point on going on.
|
||||
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")
|
||||
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")
|
||||
return :Skip_pass
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue