011 1+1 is not always 2 - sans instituteobserved by mandiant incident responders, have bypassed mfa....

32
Copyright © FireEye, Inc. All rights reserved. 1 Copyright © FireEye, Inc. All rights reserved. 1 Copyright © FireEye, Inc. All rights reserved. 1 MANDIANT | SANS Summit Prague 2018 1+1 is Not Always 2: Bypassing Multi-Factor Authentication Jeff Hamm, Technical Director James Hovious, Senior Consultant Mandiant

Upload: others

Post on 24-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.1 Copyright © FireEye, Inc. All rights reserved.1 Copyright © FireEye, Inc. All rights reserved.1

M A N D I A N T | S A N S S u m m i t P r a g u e 2 0 1 8

1+1 is Not Always 2: Bypassing Multi-Factor AuthenticationJeff Hamm, Technical Director

James Hovious, Senior ConsultantMandiant

Page 2: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.2

• Attackers commonly find themselves in situations in which they must access a resource which is guarded by a multi-factor authentication systems. There are multiple ways that attackers can accomplish this goal. This talk will present some ways in which Mandiant’s red team, as well as attackers observed by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

used in the field to bypass MFA and a Mandiant incident response consultant will demonstrate ways to mitigate, detect, and investigate these same techniques.

Introduction

Page 3: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.3

Targeted Attack Life Cycle

Page 4: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.4

• IR consultant with Mandiant since 2010• Technical Director and IR function lead in

Europe since 2014• Adjunct lecturer at NTNU (Norwegian

University of Science and Technology) since 2011

• Deputy Sheriff/Detective/Sergeant at Oakland County Sheriff’s Office, Michigan 1997-2008

• Co-Author “Digital Forensics” 2017, Wiley

Jeff Hamm

Page 5: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.5

• RT consultant with Mandiant since 2015• EMEA Red Team Function lead• Does great things and will do more.• Will write a book in the future• Speaks fluent Italian so please ask lots of

questions in Italian

James Hovious

Page 6: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.6

• Introductions• Prerequisites• Known Methods

• Steal Seeds• Provision an Emergency Token• Replay Live Tokens• Whitelist Exceptions• Browser Pivot and Concurrent Sessions• Identify Undocumented Network Rules

• Other Methods• Summary

Agenda

Page 7: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.7

Prerequisites

Page 8: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.8

• Keystroke Logging• RSA passwords usually include the use of a PIN. • This PIN is periodically changed according to organizational SOP plus a revolving token. • Attackers will typically make use of keyloggers in order to obtain the PIN.

Prerequisites

Page 9: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.9

Steal Seeds

Page 10: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.10

• RSA 2FA soft tokens and mobile tokens use a seed file• .sdtid• Synched with an authentication server• May be reused

• Even on separate devices• Can be encrypted with a password

• Commonly the password is shared • The shared password may be sent over unencrypted email

• Configured with an expiration date• RSA tokens are commonly sent over unencrypted email• May be stored on an SMB file server

Steal Seeds

Page 11: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.11

• Attacker’s can then import the token to their device or local system.

Steal Seeds

Page 12: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.12

Steal Seeds

• Prevent• Do not send .sdtid files via unencrypted email• Do not send passwords in the same medium as RSA tokens• Prevent duplicate tokens from operating• Do not use shared passwords• Do not store on unencrypted file servers

• Detect• Alert on two users logged on simultaneously with MFA

• Respond• Review OWA and exchange logs for “.sdtid” searches

Page 13: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.13

Provision an Emergency Token

Page 14: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.14

•RSA Administration Server • Using active directory credentials for authentication• Domain administrator credentials

• Access the web console• Generate a back up token with single factor credentials

Provision an Emergency Token

Page 15: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.15

• Prevent• Use local credentials for RSA administrators (not AD)• Use one time use and password vaults for RSA administrators• Use a jump box to access RSA servers

• Detect• Alert on domain accounts logging into the RSA servers• Alert on account creation

• Respond• Review of RSA server logs• http logs

Provision an Emergency Token

Page 16: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.16

Replay Live Tokens

Page 17: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.17

Replay Live Tokens

•Replay the full PIN + token combination•Keystroke logging•Automate alerting for opening of an MFA protected resource

Page 18: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.18

Replay Live Tokens

•Prevent• Utilize the “push” functionality versus sending a

passcode• Block simultaneous logins for MFA resources

•Detect• Alert on simultaneous logins for MFA resources

•Respond• Review of authentication logs

Page 19: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.19

Whitelist Exceptions

Page 20: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.20

Whitelist Exceptions

•Some products are configured to require MFA from all hosts except a whitelisted network or host•Gain access to this network•Or configure your network to be whitelisted

Page 21: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.21

Whitelist Exceptions

•Prevent•Protect the whitelist with access controls

•Detect•Alert on any changes to the whitelist document

•Respond•Analyze the whitelist document•Event logs

Page 22: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.22

Browser Pivot and Concurrent Sessions

Page 23: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.23

Browser Pivot and Concurrent Sessions

• Inject into the process of an already authenticated browser session•Requests come from the already authenticated browser

Page 24: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.24

Browser Pivot and Concurrent Sessions

•Prevent•No dual logins

•Detect•GEO alerting

•Respond•Browser history logs???

Page 25: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.25

Identify Undocumented Network Rules

Page 26: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.26

Identify Undocumented Network Rules

•Can you run netstat across multiple devices using:•Your implant?•Configuration management programs?

•Correlate connections to identify single factor routes into your target network

Page 27: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.27

Identify Undocumented Network Rules

• Prevent• Ensure network segmentation

• Host firewalls• Network firewalls

• Audit network segmentation• Penetration testing

• Detect• East-west traffic

• Respond• Network logs• Event logs

Page 28: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.28

Other Methods

Page 29: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.29

Other Methods

•Two factor exceptions•Machine certification as second factor•Attack the MFA service•Direct database access to MFA DB•WebCam Access By MSSP??? WHAT?• https://www.youtube.com/watch?v=AsNwon4fjqY

Page 30: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.30

Summary

Page 31: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.31

• Prerequisites•Methods• Steal Seeds• Provision an Emergency Token• Replay Live Tokens•Whitelist Exceptions• Browser Pivot and Concurrent Sessions• Identify Undocumented Network Rules

•Other Methods

Summary

Page 32: 011 1+1 is Not Always 2 - SANS Instituteobserved by Mandiant incident responders, have bypassed MFA. • In the presentation, a Mandiant red team consultant will present techniques

Copyright © FireEye, Inc. All rights reserved.32

Questions?• Jeff Hamm• Technical Director

[email protected][email protected]

• James Hovious• Senior Consultant• [email protected]