Overview
This is a basic script I wrote to automate the getuserrealm.srf enumeration trick.
Office 365 provides information to mail clients to be used during setup, including the authentication configuration and SSO url if federated auth is used.
We can take advantage of this by requesting this configuration manually, and extracting useful information from it.
As of now, the tool is completely passive from an opsec perspective, as it only hits login.microsoftonline.com one time.
In the future, I plan to add basic scraping and DNS discovery functionality so that enumeration beyond the O365 configuration is possible.
Requirements
go get github.com/gookit/color
Example Usage