githubEdit

Exchange services

Theory

Microsoft Exchange Server is a mail serverarrow-up-right and calendaringarrow-up-right server developed by Microsoftarrow-up-right. It runs exclusively on Windows Serverarrow-up-right operating systems.

Practice

Enumeration

Discover Exchange Servers

We can use following commands to discover Exchange servers from a large scope of subdomains:

$ cat subdomains.txt
sub1.example.com
sub2.example.ru
sub3.example.bz

$ for i in `cat subdomains.txt | rev | cut -d. -f1-2 | rev | sort -u`; do echo https://autodiscover.$i; done | httpx -silent -random-agent -fr -t 20 -sc -title -td -ip | grep Outlook | grep -oP '\d+\.\d+\.\d+\.\d+' | dnsx -silent -re -ptr
1.3.3.7 [mx1.example.com]
66.66.66.66 [mx2.example.ru]
123.123.123.123 [mx3.example.bz]

Enumerate Exchange Version

We can use following commands to retreive the Exchange build number and correlate it with the release datesarrow-up-right:

User Enumeration (GAL)

If access to a domain-joined computer or a corporate email account is obtained, the Global Address List (GAL) can be exported, allowing a list of usernames to be retreived.

Ruler

Rulerarrow-up-right (Go) can be used to retreive the GAL using known credentials.

global-address-list-owa

global-address-list-owaarrow-up-right (Python) can also be used to export the Gal using known credentials.

Vulnerabilities

PrivExchangechevron-rightProxyLogonchevron-rightProxyShellchevron-rightProxyNotShellchevron-right

Password Spray

Password spray is an attack that involves using a single password against multiple accounts. This avoids account lockouts when multiple passwords are used on a single account. More details on this page.

Rulerarrow-up-right (Go) can be used to perform password spray attacks

Resources

Last updated