Description
Enumerate valid usernames (email addresses) from Office 365 using ActiveSync. Differences in the HTTP Response code and HTTP Headers can be used to differentiate between: - Valid Username (Response code 401) - Valid Username and Password without 2FA (Response Code 200) - Valid Username and Password with 2FA (Response Code 403) - Invalid Username (Response code 404 with Header X-CasErrorCode: UserNotFound) Note this behaviour appears to be limited to Office365, MS Exchange does not appear to be affected. Microsoft Security Response Center stated on 2017-06-28 that this issue does not "meet the bar for security servicing". As such it is not expected to be fixed any time soon.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use auxiliary/gather/office365userenummsf undefined(office365userenum) > show actions ...actions...msf undefined(office365userenum) > set ACTION < action-name >msf undefined(office365userenum) > show options ...show and set options...msf undefined(office365userenum) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub