Skip to content

Commit ea5fe9e

Browse files
committed
Updated to use get_cookie
1 parent 9e52a10 commit ea5fe9e

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

modules/auxiliary/scanner/http/owa_login.rb

100644100755
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def initialize
2828
'SecureState R&D Team',
2929
'sinn3r',
3030
'Brandon Knight',
31-
'Pete Arzamendi -> Outlook 2013 updates'
31+
'Pete (Bokojan) Arzamendi, #Outlook 2013 updates'
3232
],
3333

3434
'License' => MSF_LICENSE,
@@ -71,16 +71,18 @@ def initialize
7171
}
7272
]
7373
],
74-
'DefaultAction' => 'OWA_2010'
74+
'DefaultAction' => 'OWA_2010',
75+
'DefaultOptions' => {
76+
'SSL' => true
77+
}
7578
)
7679

77-
'DefaultOptions' => { 'SSL' => true }
7880

7981
register_options(
8082
[
8183
OptInt.new('RPORT', [ true, "The target port", 443]),
8284
OptAddress.new('RHOST', [ true, "The target address", true]),
83-
OptBool.new('ENUM_DOMAIN', [ true, "Automatically enumerate AD domain using NTLM authentication", false]),
85+
OptBool.new('ENUM_DOMAIN', [ true, "Automatically enumerate AD domain using NTLM authentication", true]),
8486
], self.class)
8587

8688

@@ -225,14 +227,8 @@ def try_user_pass(opts)
225227

226228
#No password change required moving on.
227229
reason = res.headers['location'].split('reason=')[1]
228-
if reason == nil
229-
#Get cdata auth cookies from headers. Wookie
230-
cadata_cookies = res.headers['set-cookie'].scan(/cadata.*?=.*?;/)
231-
cookieMonster = ""
232-
cadata_cookies.each do | cookie |
233-
cookieMonster += cookie.to_s
234-
end
235-
headers['Cookie'] = 'PBack=0;' << cookieMonster
230+
if reason == nil
231+
headers['Cookie'] = 'PBack=0;' << res.get_cookies
236232
else
237233
#Login didn't work. no point on going on.
238234
vprint_error("#{msg} FAILED LOGIN. '#{user}' : '#{pass}'")

0 commit comments

Comments
 (0)