Web Application Entity Session Management using the eid Card Frank Cornelis 03/03/2010. Fedict 2010. All rights reserved



Similar documents
The Belgian e-id: hacker vs developer

Security Engineering Part III Network Security. Security Protocols (I): SSL/TLS

Chapter 17. Transport-Level Security

How To Understand And Understand The Security Of A Key Infrastructure

Embedded SSL. Christophe Kiennert, Pascal Urien. Embedded SSL - Christophe Kiennert, Pascal Urien 1

SSL/TLS: The Ugly Truth

Binding Security Tokens to TLS Channels. A. Langley, Google Inc. D. Balfanz, Google Inc. A. Popov, Microsoft Corp.

Web Security. Mahalingam Ramkumar

Public Key Infrastructure (PKI)

SSL Protect your users, start with yourself

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Communication Systems 16 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2009

Authenticity of Public Keys

Outline. Transport Layer Security (TLS) Security Protocols (bmevihim132)

Secure web transactions system

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Certificates and network security

Computer and Network Security. Outline

SSL Secure Socket Layer

SSL Secure Socket Layer

Secure Socket Layer. Security Threat Classifications

TLS-RSA-PSK. Channel Binding using Transport Layer Security with Pre Shared Keys

Computer Systems Security 2013/2014. Single Sign-On. Bruno Maia Pedro Borges

SECURE SOCKETS LAYER (SSL)

Overview. SSL Cryptography Overview CHAPTER 1

Using etoken for SSL Web Authentication. SSL V3.0 Overview

Managing and Securing Computer Networks. Guy Leduc. Chapter 4: Securing TCP. connections. connections. Chapter goals: security in practice:

Chapter 8. Network Security

SBClient SSL. Ehab AbuShmais

Transport Level Security

Real-Time Communication Security: SSL/TLS. Guevara Noubir CSU610

Authentication Types. Password-based Authentication. Off-Line Password Guessing

Communication Security for Applications

SSL: Secure Socket Layer

Communication Systems SSL

Web Payment Security. A discussion of methods providing secure communication on the Internet. Zhao Huang Shahid Kahn

ISA 562 Information System Security

eid Security Frank Cornelis Architect eid fedict All rights reserved

Web Security Considerations

Open Source eid Projects

Certificate Management. PAN-OS Administrator s Guide. Version 7.0

ERserver. iseries. Secure Sockets Layer (SSL)

2.4: Authentication Authentication types Authentication schemes: RSA, Lamport s Hash Mutual Authentication Session Keys Trusted Intermediaries

SSL implementieren aber sicher!

Computer Networks. Secure Systems

Security Protocols/Standards

Security vulnerabilities in the Internet and possible solutions

Network Fundamentals Carnegie Mellon University

Announcement. Final exam: Wed, June 9, 9:30-11:18 Scope: materials after RSA (but you need to know RSA) Open books, open notes. Calculators allowed.

Digital Certificates (Public Key Infrastructure) Reshma Afshar Indiana State University

Attestation and Authentication Protocols Using the TPM

Lecture 7: Transport Level Security SSL/TLS. Course Admin

Configuring Digital Certificates

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

How To Understand And Understand The Ssl Protocol ( And Its Security Features (Protocol)

History of the TLS Authentication Gap Bug. Marsh Ray Steve Dispensa PhoneFactor

Network Automation 9.22 Features: RIM and PKI Authentication July 31, 2013

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Secure Sockets Layer (SSL ) / Transport Layer Security (TLS) Network Security Products S31213

Enhancing Web Application Security

Apache Security with SSL Using Ubuntu

TLS and SRTP for Skype Connect. Technical Datasheet

Security: Focus of Control. Authentication

Lecture 13. Public Key Distribution (certification) PK-based Needham-Schroeder TTP. 3. [N a, A] PKb 6. [N a, N b ] PKa. 7.

Security. Learning Objectives. This module will help you...

TLS/SSL in distributed systems. Eugen Babinciuc

7.1. Remote Access Connection

Three attacks in SSL protocol and their solutions

Cisco AnyConnect Secure Mobility Client VPN User Messages, Release 3.1

SSL BEST PRACTICES OVERVIEW

Server based signature service. Overview

Digital Signature Service. e-contract.be BVBA 2 september 2015

Apache Security with SSL Using Linux

A PKI case study: Implementing the Server-based Certificate Validation Protocol

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

Applying Cryptography as a Service to Mobile Applications

Chapter 7 Transport-Level Security

mod_ssl Cryptographic Techniques

Network Security Standards. Key distribution Kerberos SSL/TLS

CS 665: Computer System Security. Network Security. Usage environment. Sources of vulnerabilities. Information Assurance Module

Network Security Web Security and SSL/TLS. Angelos Keromytis Columbia University

Using EMC Unisphere in a Web Browsing Environment: Browser and Security Settings to Improve the Experience

Client Server Registration Protocol

WEB Security & SET. Outline. Web Security Considerations. Web Security Considerations. Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Secure Socket Layer. Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

Chapter 10. Network Security

Secure Sockets Layer

Extensible Authentication Protocol Transport Layer Security Deployment Guide for Wireless LAN Networks

Security Policy Revision Date: 23 April 2009

How To Use Kerberos

Vidder PrecisionAccess

SECURE SOCKETS LAYER (SSL) SECURE SOCKETS LAYER (SSL) SSL ARCHITECTURE SSL/TLS DIFFERENCES SSL ARCHITECTURE. INFS 766 Internet Security Protocols

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

Key Management (Distribution and Certification) (1)

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Key Management. CSC 490 Special Topics Computer and Network Security. Dr. Xiao Qin. Auburn University

Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Introduction to Network Security Key Management and Distribution

Security Guide. BlackBerry Enterprise Service 12. for ios, Android, and Windows Phone. Version 12.0

Transcription:

Web Application Entity Session Management using the eid Card Frank Cornelis 03/03/2010 Fedict 2010. All rights reserved

What is Entity Authentication? Entity authentication is the process whereby one party is assured of the identity of a second party involved in a protocol, and that the second has actually participated (i.e., is active at, or immediately prior to, the time the evidence is acquired) Formal definition (A authenticated B if): Alice A, Bob B A believes freshness challenge_a A believes (B recently said challenge_a) Authentication vs. Session Key Establishment How to achieve this using an eid card? Fedict 2010. All rights reserved p. 2

eid Card Authentication Private Key (1024 bit RSA) PKCS1-RSA PIN authorization for Authn Key usage Card caches the authn PIN authorizations Log-off instruction to reset PIN authorization Creation of a signature: Set APDU: select the key. 0x82 = authn key Prepare DigestInfo PKCS1 DER sequence Verify PIN APDU: (PIN BCD encoded) Compute Digital Signature APDU Retrieve signature data eid can only sign (RSA decryption of DigestInfo) Fedict 2010. All rights reserved p. 3

eid Certificate Validation Authentication Certificate Chain GlobalSign CA Cert Root CA Cert same key Root CA Cert CRL Citizen CA Cert Gov CA Cert OCSP Responder CRL CRL Authn Cert SSL Cert Fedict 2010. All rights reserved p. 4

eid Certificate Validation (cont'd) jtrust: eid PKI Validation for Java http://code.google.com/p/jtrust/ Not using the Java Certification Path API (sucks) Flexible Architecture (eid Trust Service ready) Root CA CRL Set of Trust Points Public Key Trust Linker Certificate Repository CRL Trust Linker CRL Repo Trust Validator List of Trust Linkers OCSP Trust Linker OCSP Repo List of Cert Constraints Fallback Trust Linker eid Trust Service CRL Cache Trust Linker OCSP Responder Fedict 2010. All rights reserved p. 5

eid Entity Authentication eid Card authentication by itself is useless Remote Entities, e.g. web application context. We need an Authentication Protocol Different Authentication Protocols are possible Each Entity Authentication Protocol yields its own cryptographic goals. Of course Entity Authentication Session key via combined Key Agreement (SSL) DO NOT TRY TO INVENT YOUR OWN PROTOCOL! Needham-Schroeder protocol: replay attack Creativity is great for non-critical applications, like music. Fedict 2010. All rights reserved p. 6

Authentication Protocols Mutual SSL Browser initiated SSL handshake Relies on eid PIN authorization caching feature Tunneled Entity Authentication Uses unilateral SSL to authenticate the server Based on ISO/IEC 9798-3 Authentication SASL Mechanism (RFC 3163) Cryptographic channel binding to secure the channel (RFC 5056) Requires an eid Applet (or browser extension) Explicit eid card management possible Sequential eid card access possible Fedict 2010. All rights reserved p. 7

Validate cert chain Unilateral SSL (RFC 2246) Alice HelloClient(ciphers,Ra) HelloServer(cipher,Rb) Certificate(cert chain) ServerHelloDone ClientKeyExchange {pre_master_secret}kb+ ChangeCipherSpec Bob Ra: random by A Rb: random by B Kb+: public key of B pre_master_secret: random by A PRF: pseudo-random function ClientFinish (encrypted) PRF(master_secret,handshake_msgs) ChangeCipherSpec ServerFinish (encrypted) PRF(master_secret,handshake_msgs) master_secret=prf(pre_master_secret, Ra, Rb) Entity Authentication A believes freshness Ra A believes B recently said Ra session_key=f(master_secret) Fedict 2010. All rights reserved p. 8

Unilateral SSL features Resuming a TLS connection HelloClient(session_id) Reusing the same master_secret Reduces load due to a full TLS handshake Renegotiating the SSL handshake Over an already established SSL connection Useful when client authentication is required Both client and server can initiate a renegotiation Not all SSL stacks support this (Java does not) Security flaws in implementations Fedict 2010. All rights reserved p. 9

Mutual SSL using the eid Card Alice HelloClient(ciphers,Ra) HelloServer(cipher,Rb) Certificate(cert chain) CertificateRequest,ServerHelloDone Certificate(cert chain) ClientKeyExchange {pre_master_secret}kb+ Bob Ra: random by A Rb: random by B Kb+: public key of B pre_master_secret: random by A Ka-: private key of A PRF: pseudo-random function CertificateVerify sign_ka-(handshake_msgs) ChangeCipherSpec ClientFinish (encrypted) PRF(master_secret,handshake_msgs) ChangeCipherSpec ServerFinish (encrypted) PRF(master_secret,handshake_msgs) Entity Authentication A believes freshness Ra A believes (B recently said Ra) B believes freshness Rb B believes (A recently said Rb) Fedict 2010. All rights reserved p. 10

Tunneled Entity Authentication Alice Bob A trusts B Unilateral SSL Challenge sign_ka-(ra,challenge), Ra, cert A At this point B still doubts A What can B believe at this point? ISO/IEC 9798-3 Authentication SASL Mechanism RFC 3163 Unilateral client authentication: server already authenticated via unilateral SSL connection Did we achieve the same effect as mutual SSL? What if challenge actually is SHA1(contract)? B can abuse A's challenge signature. Fedict 2010. All rights reserved p. 11

Man-in-the-middle attack on SASL Alice Mallory Bob Unilateral SSL Unilateral SSL Challenge Challenge sign_ka-(ra,challenge), Ra, cert A sign_ka-(ra,challenge),ra,cert A Mallory can abuse the authentication token of Alice Why is this going wrong? SSL: sign_ka-(handshake_msgs) so the signature digests parts of the secure channel's identity SASL: sign_ka-(ra,challenge) does not digest any part of the secure channel's identity Fedict 2010. All rights reserved p. 12

Channel Binding to Secure Channels Alice Bob Unilateral SSL SSL context Challenge Sign_Ka-(Ra,challenge,channel_binding), Ra, cert A RFC 5056: cryptographic binding channel_binding = Hostname B (nice try) Inet address B (nice try) SSL certificate B (OK) SHA1(master_key) (even better) A channel binding should really digest part of the channel's identity. SSL stack must support this. Fedict 2010. All rights reserved p. 13

Web Applications Uses HTTP over TCP/IP HTTP is a stateless protocol How to create an HTTP session context? Via cookies: Set-Cookie, Cookie HTTP headers Via tokens: request token, response token in forms Via transport layer (SSL) How does an application session context correspond with the user eid login/logout experience? Vulnerable to remote attacks due to the evolutionary nature of the web protocol stack. Fedict 2010. All rights reserved p. 14

The Webshop Web Application Welcome Item list Add to Cart View Cart eid login pay eid logout We need a stateful protocol for the shopping cart We need to be able to trust the web application We want privacy during all steps We want eid authentication during payment Machine could be shared between users Different solutions are possible! Fedict 2010. All rights reserved p. 15

The Webshop: Trust and Privacy Using unilateral SSL using a trusted server cert. Different network topologies are possible. Internet firewall SSL Terminator Hardware or HTTPD Application Server Everything behind SSL to prevent session cookie stealing. AJP preferred between HTTPD and AS Fedict 2010. All rights reserved p. 16

The Webshop: Statefulness Using a session cookie initiated by the Application Server, protected by SSL. A B SSL connection GET index.html index.html GET list.jsf SSL session Browser Cookie Lifecycle list.jsf POST add_item.jsf Set-Cookie: 123456, success.jsf Cookie: 123456, GET list.jsf list.jsf Cookie: 123456, GET cart.jsf cart.jsf App Server HTTP Session context Fedict 2010. All rights reserved p. 17

The Webshop: eid SSL authentication First we try out the mutual SSL scheme Application Server driven SSL renegotiation to instantly enable mutual SSL is tricky, especially for hardware SSL termination. Internet firewall SSL Terminator Hardware or HTTPD SSL reneg? Application Server We don't want to enable mutual SSL during the entire web application user session. Fedict 2010. All rights reserved p. 18

The Webshop: eid SSL authentication So we need two SSL terminations: One for unilateral SSL One for the mutual SSL using eid Requires 2 IP addresses (+ DNS names), or at least 2 different ports. Internet firewall SSL Terminator eid SSL Terminator Application Server Problem: how to properly link the SSL sessions? If same IP address, via session cookies If different IP address, via signed SAML tickets Fedict 2010. All rights reserved p. 19

The Webshop: eid SSL authentication How about session life cycles? The Application Server cannot inform SSL to terminate that easily... A Unilaternal SSL B eid Login Magical SSL Session Linking Mutual SSL Handshake Server SSL eid SSL eid PIN authz caching Show profile, payments Logout index.html eid Login Show profile What if the web application wants to sign a contract with eid of citizen C??? eid SSL session still alive!!! Short SSL sessions? :) Fedict 2010. All rights reserved p. 20

The Webshop: eid authentication eid authentication using a tunneled solution. It just works as expected. No more SSL session life cycle issues No more SSL handshake exceptions due to missing eid card Can reuse the eid card for signing within webapp Can explicitly logoff the eid card Fedict 2010. All rights reserved p. 21

eid Applet Architecture Web Browser Web Container Web Page 1 eid Applet 2 eid Applet Service 3 SPI 5 4 3 Target Page HTTP Session Service Implementation 6 jtrust Fedict 2010. All rights reserved p. 22

Fedict cannot be held liable for any direct or indirect damages arising from the usage of the information provided by this presentation. The views expressed in this presentation can change over time due to new evolutions and/or new insights. Thank you Fedict Maria-Theresiastraat 1/3 Rue Marie-Thérèse Brussel 1000 Bruxelles TEL. +32 2 212 96 00 FAX +32 2 212 96 99 info@fedict.belgium.be www.fedict.belgium.be Fedict 2010. All rights reserved