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

Post on 24-Mar-2020

5 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

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

Copyright © FireEye, Inc. All rights reserved.3

Targeted Attack Life Cycle

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

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

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

Copyright © FireEye, Inc. All rights reserved.7

Prerequisites

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

Copyright © FireEye, Inc. All rights reserved.9

Steal Seeds

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

Copyright © FireEye, Inc. All rights reserved.11

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

Steal Seeds

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

Copyright © FireEye, Inc. All rights reserved.13

Provision an Emergency Token

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

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

Copyright © FireEye, Inc. All rights reserved.16

Replay Live Tokens

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

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

Copyright © FireEye, Inc. All rights reserved.19

Whitelist Exceptions

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

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

Copyright © FireEye, Inc. All rights reserved.22

Browser Pivot and Concurrent Sessions

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

Copyright © FireEye, Inc. All rights reserved.24

Browser Pivot and Concurrent Sessions

•Prevent•No dual logins

•Detect•GEO alerting

•Respond•Browser history logs???

Copyright © FireEye, Inc. All rights reserved.25

Identify Undocumented Network Rules

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

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

Copyright © FireEye, Inc. All rights reserved.28

Other Methods

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

Copyright © FireEye, Inc. All rights reserved.30

Summary

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

Copyright © FireEye, Inc. All rights reserved.32

Questions?• Jeff Hamm• Technical Director

• jeff.hamm@mandiant.com• hammjd@yahoo.com

• James Hovious• Senior Consultant• james.hovious@mandiant.com

top related