Rapid7 Vulnerability & Exploit Database

Office 365 User Enumeration

Back to Search

Office 365 User Enumeration

Disclosed
09/05/2018
Created
09/09/2021

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.

Author(s)

  • Oliver Morton (GrimHacker) <grimhacker@grimhacker.com>

Development

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/office365userenum
msf auxiliary(office365userenum) > show actions
    ...actions...
msf auxiliary(office365userenum) > set ACTION < action-name >
msf auxiliary(office365userenum) > show options
    ...show and set options...
msf auxiliary(office365userenum) > run 

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;