Stealing credentials for impersonation



Similar documents
Taming the beast : Assess Kerberos-protected networks

NIST PKI 06: Integrating PKI and Kerberos (updated April 2007) Jeffrey Altman

Attacking Kerberos Deployments

Kerberos. Public domain image of Heracles and Cerberus. From an Attic bilingual amphora, BC. From Italy (?).

Storage Cloud Infrastructures

WATCHING THE WATCHDOG: PROTECTING KERBEROS AUTHENTICATION WITH NETWORK MONITORING

Recommended Practices for Deploying & Using Kerberos in Mixed Environments

Enterprise Security: Building On All Your Assets

Enabling Active Directory Authentication with ESX Server 1

How To Use Kerberos

Contents. Supported Platforms. Event Viewer. User Identification Using the Domain Controller Security Log. SonicOS

LEARNING COMPUTER SYSTEMS VULNERABILITIES EXPLOITATION THROUGH PENETRATION TEST EXPERIMENTS

Windows Attack - Gain Enterprise Admin Privileges in 5 Minutes

Potential Targets - Field Devices

The Trivial Cisco IP Phones Compromise

Bypassing Local Windows Authentication to Defeat Full Disk Encryption. Ian Haken

Packet Sniffing on Layer 2 Switched Local Area Networks

WHITE PAPER. Smart Card Authentication for J2EE Applications Using Vintela SSO for Java (VSJ)

Integration with Active Directory. Jeremy Allison Samba Team

4.2: Kerberos Kerberos V4 Kerberos V5. Chapter 5: Security Concepts for Networks. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Managing Local Administrator Passwords with LAPS 10/14/2015 PENN STATE SECURITY CONFERENCE

Enumerating and Breaking VoIP

Active Directory network protocols and traffic

CS 356 Lecture 28 Internet Authentication. Spring 2013

Authentication Application

Implementing a Kerberos Single Sign-on Infrastructure

CYBER ATTACKS EXPLAINED: THE MAN IN THE MIDDLE

iscsi Security (Insecure SCSI) Presenter: Himanshu Dwivedi

Course Content: Session 1. Ethics & Hacking

If you know the enemy and know yourself, you need not fear the result of a hundred battles.

TOPIC HIERARCHY. Distributed Environment. Security. Kerberos

SECURITY TRENDS & VULNERABILITIES REVIEW 2015

System Security Services Daemon

Chapter 4. Authentication Applications. COSC 490 Network Security Annie Lu 1

Medical Device Security Health Imaging Digital Capture. Security Assessment Report for the Kodak CR V4.1

Introduction to Computer Security

Troubleshooting Kerberos Errors

CS 494/594 Computer and Network Security

Kerberos: An Authentication Service for Computer Networks by Clifford Neuman and Theodore Ts o. Presented by: Smitha Sundareswaran Chi Tsong Su

Authentication Applications

Connecting Web and Kerberos Single Sign On

SECURITY IMPLEMENTATION IN HADOOP. By Narsimha Chary( ) Siddalinga K M( ) Rahman( )

Cross-Realm Trust Interoperability, MIT Kerberos and AD

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

Thick Client Application Security

Red vs. Blue: Modern Active Directory Attacks, Detection, and Protection Whitepaper

Where every interaction matters.

Chapter 15 User Authentication

REPORT ON AUDIT OF LOCAL AREA NETWORK OF C-STAR LAB

Authentication Applications

Security Provider Integration Kerberos Authentication

Leverage Active Directory with Kerberos to Eliminate HTTP Password

FreeIPA Cross Forest Trusts

Before deploying SiteAudit it is recommended to review the information below. This will ensure efficient installation and operation of SiteAudit.

WIRELESS SECURITY. Information Security in Systems & Networks Public Development Program. Sanjay Goel University at Albany, SUNY Fall 2006

Identity Management: The authentic & authoritative guide for the modern enterprise

During your session you will have access to the following lab configuration. CLIENT1 (Windows XP Workstation) /24

MS-55096: Securing Data on Microsoft SQL Server 2012

Windows security for n00bs part 2 Authentication

10.2 World Wide Web Security S-HTTP (secure hypertext transfer protocol) SEA (security extension architecture)

Two SSO Architectures with a Single Set of Credentials

Kerberos. Guilin Wang. School of Computer Science, University of Birmingham

Medical Device Security Health Imaging Digital Capture. Security Assessment Report for the Kodak Capture Link Server V1.00

VIDEO Intypedia013en LESSON 13: DNS SECURITY. AUTHOR: Javier Osuna García-Malo de Molina. GMV Head of Security and Process Consulting Division

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

6WRUP:DWFK. Policies for Dedicated IIS Web Servers Group. V2.1 policy module to restrict ALL network access

Kerberos authentication made easy on OpenVMS

Password Power 8 Plug-In for Lotus Domino Single Sign-On via Kerberos

: Network Security. Name of Staff: Anusha Linda Kostka Department : MSc SE/CT/IT

OPC UA vs OPC Classic

Secure PostgreSQL Deployments

International Journal of Computer Engineering and Technology (IJCET), ISSN (Print), INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING &

Configuring Integrated Windows Authentication for JBoss with SAS 9.2 Web Applications

Microsoft Auditing Events for Windows 2000/2003 Active Directory. By Ed Ziots Version 1.6 9/20/2005

6WRUP:DWFK. Policies for Dedicated SQL Servers Group

WLAN Attacks. Wireless LAN Attacks and Protection Tools. (Section 3 contd.) Traffic Analysis. Passive Attacks. War Driving. War Driving contd.

Going in production Winbind in large AD domains today. Günther Deschner (Red Hat / Samba Team)

FREQUENTLY ASKED QUESTIONS

Securing Data on Microsoft SQL Server 2012

How Reflection Software Facilitates PCI DSS Compliance

IWA AUTHENTICATION FUNDAMENTALS AND DEPLOYMENT GUIDELINES

What IT Auditors Need to Know About Secure Shell. SSH Communications Security

Wireless Security: Secure and Public Networks Kory Kirk

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

Protection profile of an industrial firewall

Implementing Cisco IOS Network Security

Network Security Fundamentals

Metasploit ing the target machine is a fascinating subject to all security professionals. The rich list of exploit codes and other handy modules of

Active Directory network protocols and traffic

Transcription:

Stealing credentials for impersonation Emmanuel Bouillon manu@veryopenid.net October 29, 2010

Disclaimer Introduction This expresses my own views and does not involve my previous, current and future employers. Presentation and code are provided for educational purpose only.

Outline Introduction 1 Introduction 2 3 4

Outline Introduction 1 Introduction 2 3 4

Introduction What is it about? User impersonation in Windows Active Directory domain Fully updated target Windows Server 2008 R2 / Windows 7 No backward compatibility degrading security level (ex. Forest Functional Level) Practical implementation issues in realistic environments

Introduction Why should you care? Credentials theft for impersonation: key role in persistent intrusion Pervasive protocol in professional environments Kerberos broadly accepted authentication protocol Authentication protocol used by MS Active Directory services Common target moves from WS2003/XP to WS2008/W7 Influences credential theft for impersonation possibilities

Outline Introduction 1 Introduction 2 3 4

Kerberos Just what you need in mind Introduction

Introduction Old school ticket games - 1/2 Building stones for newer tricks KDC spoofing Kerberos protocol precludes impersonation through KDC spoofing Lazy Kerberos based authentications are vulnerable Ex. Badly configured PAM module Easy to be vulnerable (Ex. Unix screen-savers) Windows implementation immune to basic KDC spoofing Properly request a TS for host principal to validate TGT

Introduction Old school ticket games - 2/2 Building stones for newer tricks TS Replay TS and associated authenticator replay Means of mitigation Time-based authenticators Replay caches Make passive network sniffing insufficient Still vulnerable with active MitM attacks Keyed cryptographic checksum can be included using the session key unknown by the attacker Default configuration of MS Windows flavor

Introduction Newer implementation issues KDC spoofing with PKINIT isec Partners - Attacking Kerberos Deployments - BlackHat US 2010 [1] Insider - with legitimate domain account - get the victim logged on under his account Pass the Ticket Impersonate the victim during 10h after sniffing his/her authentication No valid credentials required for the bad guy Works locally and remotely a a if Terminal Server enabled

Outline Introduction 1 Introduction 2 3 4

Pass the ticket Principle Introduction Approach: sort of best effort, KDCspoof & Replay mix Sniff a valid TGS REP for host/target machine, save TS AS-REP: classical KDCspoofing TGS-REP: spoofed TGS-REP (based on AS-REP TGT) with a previously sniffed TS Can t get sniffed TS session key Can t generate a valid authenticator PAC = Privilege Attribute Certificate

Pass the ticket Principle Introduction Approach: sort of best effort, KDCspoof & Replay mix Sniff a valid TGS REP for host/target machine, save TS AS-REP: classical KDCspoofing TGS-REP: spoofed TGS-REP (based on AS-REP TGT) with a previously sniffed TS Can t get sniffed TS session key Can t generate a valid authenticator PAC = Privilege Attribute Certificate

Pass the ticket Principle Introduction Approach: sort of best effort, KDCspoof & Replay mix Sniff a valid TGS REP for host/target machine, save TS AS-REP: classical KDCspoofing TGS-REP: spoofed TGS-REP (based on AS-REP TGT) with a previously sniffed TS Can t get sniffed TS session key Can t generate a valid authenticator PAC = Privilege Attribute Certificate

Pass the ticket Principle Introduction Approach: sort of best effort, KDCspoof & Replay mix Sniff a valid TGS REP for host/target machine, save TS AS-REP: classical KDCspoofing TGS-REP: spoofed TGS-REP (based on AS-REP TGT) with a previously sniffed TS Can t get sniffed TS session key Can t generate a valid authenticator PAC = Privilege Attribute Certificate

Attacks steps 1. Sniff a legitimate connection Introduction

Attacks steps 1. Sniff a legitimate connection Introduction

Attacks steps 1. Sniff a legitimate connection Introduction

Attacks steps 1. Sniff a legitimate connection Introduction

Introduction Attacks steps 2. Combine KDCspoof and replay

Introduction Attacks steps 2. Combine KDCspoof and replay

Introduction Attacks steps 2. Combine KDCspoof and replay

Introduction Attacks steps 2. Combine KDCspoof and replay

Demo Introduction Kerberos realm: VERYOPENID.NET Victim s account: Paul (real password: VeryG00dPwd!)

Introduction Implementation WS2003/XP > WS2008/W7: Changes in defaults DES disabled Defaults to TCP not UDP Already the case in realistic WS2003/XP environments Possible to force UDP to TCP by sending a RESPONSE TOO BIG error message Not possible to force TCP to UDP RC4-HMAC-MD5 changed to AES256-HMAC-SHA1 as default cryptosystem More robust against ARP cache poisoning?

Tools Introduction Building blocks ASN.1: pyasn1 MitM: ettercap Selective TCP connections spoofing: scapy automaton Simulate just enough of a TCP/IP connection Changes in crypto: heimdal Sample code at http://code.google.com/p/krb5pyasn1

Introduction What can be done Protect your layer 2 Shorten service tickets lifetime Activate logs on Kerberos related events (both AD and Workstation) And look at the logs Think twice before implementing cross domain trust relationships Probably better use claims based authentication and ADFS

Introduction Digression on disclosure time line June 2008: MSRC informed with documentation (XP) Normal Kerberos behavior December 2008: PacSec Japan, demo to MS security expert October 2009: Thibault s security ad Windows7 was his idea [2] December 2009: Windows 7 POC code June 2010: MSRC provided demo and source code and docs This is a valid issue, however we do not consider this a vulnerability. No CVE August 2010: Researchers (Venice University) release code [3] based on [4] harmless in most realistic situations No sign that this is going to be solved quickly

Introduction Digression on disclosure time line June 2008: MSRC informed with documentation (XP) Normal Kerberos behavior December 2008: PacSec Japan, demo to MS security expert October 2009: Thibault s security ad Windows7 was his idea [2] December 2009: Windows 7 POC code June 2010: MSRC provided demo and source code and docs This is a valid issue, however we do not consider this a vulnerability. No CVE August 2010: Researchers (Venice University) release code [3] based on [4] harmless in most realistic situations No sign that this is going to be solved quickly

Introduction Digression on disclosure time line June 2008: MSRC informed with documentation (XP) Normal Kerberos behavior December 2008: PacSec Japan, demo to MS security expert October 2009: Thibault s security ad Windows7 was his idea [2] December 2009: Windows 7 POC code June 2010: MSRC provided demo and source code and docs This is a valid issue, however we do not consider this a vulnerability. No CVE August 2010: Researchers (Venice University) release code [3] based on [4] harmless in most realistic situations No sign that this is going to be solved quickly

Introduction Digression on disclosure time line June 2008: MSRC informed with documentation (XP) Normal Kerberos behavior December 2008: PacSec Japan, demo to MS security expert October 2009: Thibault s security ad Windows7 was his idea [2] December 2009: Windows 7 POC code June 2010: MSRC provided demo and source code and docs This is a valid issue, however we do not consider this a vulnerability. No CVE August 2010: Researchers (Venice University) release code [3] based on [4] harmless in most realistic situations No sign that this is going to be solved quickly

Introduction Digression on disclosure time line June 2008: MSRC informed with documentation (XP) Normal Kerberos behavior December 2008: PacSec Japan, demo to MS security expert October 2009: Thibault s security ad Windows7 was his idea [2] December 2009: Windows 7 POC code June 2010: MSRC provided demo and source code and docs This is a valid issue, however we do not consider this a vulnerability. No CVE August 2010: Researchers (Venice University) release code [3] based on [4] harmless in most realistic situations No sign that this is going to be solved quickly

Introduction Digression on disclosure time line June 2008: MSRC informed with documentation (XP) Normal Kerberos behavior December 2008: PacSec Japan, demo to MS security expert October 2009: Thibault s security ad Windows7 was his idea [2] December 2009: Windows 7 POC code June 2010: MSRC provided demo and source code and docs This is a valid issue, however we do not consider this a vulnerability. No CVE August 2010: Researchers (Venice University) release code [3] based on [4] harmless in most realistic situations No sign that this is going to be solved quickly

Introduction Digression on disclosure time line June 2008: MSRC informed with documentation (XP) Normal Kerberos behavior December 2008: PacSec Japan, demo to MS security expert October 2009: Thibault s security ad Windows7 was his idea [2] December 2009: Windows 7 POC code June 2010: MSRC provided demo and source code and docs This is a valid issue, however we do not consider this a vulnerability. No CVE August 2010: Researchers (Venice University) release code [3] based on [4] harmless in most realistic situations No sign that this is going to be solved quickly

Outline Introduction 1 Introduction 2 3 4

Introduction Since W2000, MS implements Kerberos as its default domain authentication protocol Greatly improves security compared to previous mechanism Default settings still more secure than the default Unixes implementation settings If no clue on tuning a KDC, use AD Please, Unixes guys, check if you can get a TS for your users! BUT... Implementation issue allows to bypass authentication Recent changes in default Kerberos implementation do not prevent s Not considered as a vulnerability by MSRC Better activate and monitor your logs

Introduction Since W2000, MS implements Kerberos as its default domain authentication protocol Greatly improves security compared to previous mechanism Default settings still more secure than the default Unixes implementation settings If no clue on tuning a KDC, use AD Please, Unixes guys, check if you can get a TS for your users! BUT... Implementation issue allows to bypass authentication Recent changes in default Kerberos implementation do not prevent s Not considered as a vulnerability by MSRC Better activate and monitor your logs

Introduction Thanks for your attention Q & possibly A KRB5 pyasn1 module and sample code at http://code.google.com/p/krb5pyasn1

References I Introduction [1] isec Partners, Inc. - Attacking Kerberos Deployments - https://www.isecpartners.com/files/isec_bh2010_ PKINIT_Preadvisory.pdf [2] Thibault s security ad - http://www.microsoft.com/showcase/en/us/details/ 8d75503e-068b-4f19-98dc-792094be9203 [3] T. Malgherini and R. Focardi - http://secgroup.ext.dsi.unive.it/wp-content/ uploads/2010/08/m0t-krb5-08-2010.pdf [4] E. Bouillon - Taming the beast - Assess Kerberos-protected networks - http://www.blackhat.com/html/ bh-europe-09/bh-eu-09-archives.html