Learning Network Security with SSL The OpenSSL Way



Similar documents
Communication Systems SSL

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

Chapter 7 Transport-Level Security

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.

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

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

Authenticity of Public Keys

Web Security Considerations

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

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

SSL Secure Socket Layer

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

SSL Protect your users, start with yourself

Network Security Essentials Chapter 5

Security Protocols and Infrastructures. h_da, Winter Term 2011/2012

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

SSL Secure Socket Layer

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

SSL: Secure Socket Layer

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

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

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

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Communication Security for Applications

SECURE SOCKETS LAYER (SSL)

Security Protocols/Standards

TLS/SSL in distributed systems. Eugen Babinciuc

Secure Socket Layer. Security Threat Classifications

Security Protocols HTTPS/ DNSSEC TLS. Internet (IPSEC) Network (802.1x) Application (HTTP,DNS) Transport (TCP/UDP) Transport (TCP/UDP) Internet (IP)

Overview. SSL Cryptography Overview CHAPTER 1

Chapter 17. Transport-Level Security

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

Cryptography and Network Security Sicurezza delle reti e dei sistemi informatici SSL/TSL

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

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

ERserver. iseries. Securing applications with SSL

Network Security Part II: Standards

CSC Network Security

CSC 474 Information Systems Security

SBClient SSL. Ehab AbuShmais

Managing SSL certificates in the ServerView Suite

Information Security

Transport Layer Security Protocols

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

HTTPS: Transport-Layer Security (TLS), aka Secure Sockets Layer (SSL)

Software Engineering 4C03 Research Project. An Overview of Secure Transmission on the World Wide Web. Sean MacDonald

Certificates and network security

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

Transport Level Security

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

Is Your SSL Website and Mobile App Really Secure?

Lecture 31 SSL. SSL: Secure Socket Layer. History SSL SSL. Security April 13, 2005

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

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

Secure Sockets Layer

Lab 7. Answer. Figure 1

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

TLS and SRTP for Skype Connect. Technical Datasheet

SSL/TLS/X.509. Aggelos Kiayias

The Secure Sockets Layer (SSL)

Einführung in SSL mit Wireshark

Apache Security with SSL Using Ubuntu

Cipher Suite Rollback: A Misuse Pattern for the SSL/TLS Client/Server Authentication Handshake Protocol

CS5008: Internet Computing

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Netzwerksicherheit Übung 6 SSL/TLS, OpenSSL

Lecture 4: Transport Layer Security (secure Socket Layer)

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

Network Security - Secure upper layer protocols - Background. Security. Question from last lecture: What s a birthday attack? Dr.

Security & Privacy on the WWW. Topic Outline. Information Security. Briefing for CS4173

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

Using BroadSAFE TM Technology 07/18/05

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

Implementing SSL Security on a PowerExchange Network

Secure Socket Layer. Introduction Overview of SSL What SSL is Useful For

Apache, SSL and Digital Signatures Using FreeBSD

Whitepaper : Using Unsniff Network Analyzer to analyze SSL / TLS

Interested in learning more about security? SSL/TLS: What's Under the Hood. Copyright SANS Institute Author Retains Full Rights

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

SSL A discussion of the Secure Socket Layer

mod_ssl Cryptographic Techniques

ISA 562 Information System Security

Introduction. Haroula Zouridaki Mohammed Bin Abdullah Waheed Qureshi

SSL/TLS: The Ugly Truth

Computer and Network Security

Creation and Management of Certificates

Proto Balance SSL TLS Off-Loading, Load Balancing. User Manual - SSL.

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

Savitribai Phule Pune University

WEB SERVICES CERTIFICATE GUIDE

TLS Specification for Storage Systems

Differences Between SSLv2, SSLv3, and TLS

SSL/TLS. What Layer? History. SSL vs. IPsec. SSL Architecture. SSL Architecture. IT443 Network Security Administration Instructor: Bo Sheng

DRAFT Standard Statement Encryption

The Rabbit Embedded Security Pack

The Beautiful Features of SSL And Why You Want to Use Them?

Secure Sockets Layer (SSL) / Transport Layer Security (TLS)

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

An Introduction to Cryptography as Applied to the Smart Grid

Transcription:

Learning Network Security with SSL The OpenSSL Way Shalendra Chhabra schhabra@cs.ucr.edu. Computer Science and Enginering University of California, Riverside http://www.cs.ucr.edu/ schhabra Slides Available from http://www.cs.ucr.edu/ schhabra/scale05.pdf SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.1/23

Cryptography and Its Goals Confidentiality (secrecy) Integrity (anti-tampering) Authentication Non-repudiation Snooping (passive eavesdropping) Tampering Spoofing Hijacking Capture-replay SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.2/23

Crytographic Algorithms Symmetric Key Encryption: DES, 3DES, AES, IDEA, BLOWFISH: Faster Public Key Encryption: Diffie Hellman (1976, New Directions in Cryptography), RSA, DSA: Slower Cryptographic Hash Functions : MD2, MD5 (16 byte), SHA (20 bytes): One Way, Fixed Output, Collision Free HMAC: Message Authentication Codes based on Hash Functions are called HMAC Digital Signatures: Hash signed with the Private Key SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.3/23

A Glimpse of How Transactions in ECommerce Work (Generally) SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.4/23

http and https - Watch this "Lock"! SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.5/23

Secure Socket Layer and Transport Layer Security History and Versions: SSL/TLS Developed by Netscape, 1996 and then served as a basis for TLS, an IETF standard protocol TLS 1.1 - RFC 2246 12/2004, Expires 06/2005 SSL v 3.0 - Internet Draft Expires 9/96 https : HTTP Over TLS: RFC 2818 Early Weak Keys Earlier a restriction of 40-bit keyspace small enough to be broken by Brute Force Search. Modern implementations use 128-bit (or longer) keys for symmetric key ciphers. SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.6/23

Protocol Stack with TLS SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.7/23

Flow of Application Data Through The Stack SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.8/23

Architecture of TLS v 1.1 TLS Handshake Protocol TLS Record Protocol TLS Change Cipher Spec Protocol TLS Alert Protocol SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.9/23

Message Flow for a Full Handshake SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.10/23

Message Flow for a Full Handshake SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.11/23

Digital Signature SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.12/23

Format of ClientHello and ServerHello struct { ProtocolVersion client_version; Random random; SessionID session_id; CipherSuite cipher_suites<2..2 16 1 >; CompressionMethod compression_methods<1..2 8 1 >; } ClientHello; struct { ProtocolVersion server_version; Random random; SessionID session_id; CipherSuite cipher_suite; CompressionMethod compression_method; } ServerHello; SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.13/23

Format of an X509 certificate SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.14/23

OpenSSL Go to www.openssl.org Click on Source on the left Download the latest version of openssl:oct 25 13:44:48 2004 openssl-0.9.7e.tar.gz As su install $tar -zxvf /usr/local/openssl-0.9.7e.tar.gz $cd /usr/local/openssl-0.9.7e $./configure $make $make install $openssl version SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.15/23

Command Line Interface Configuration Files ca,req, x509 Format of the OpenSSL Configuration File: Organized in Sections and Each section contains a set of keys and each key has an associated value cat /usr/share/ssl/openssl.cnf openssl dgst -sha1 file.txt openssl sha1 -out digst.txt file.txt openssl enc -des3 -salt -in file.txt -out ciphertext.bin openssl bf-cfb -salt -in file.txt -out ciphertext.bin -pass env: HOME openssl base64 -in ciphertext.bin -out base64.txt openssl dhparam -out dhparam.pem -2 1024 openssl dhparam -in dhparam.pem -noout -C openssl dsaparam -out dsaparam.pem 1024 openssl genrsa -out rsaprivatekey.pem -passout pass:test -des3 1024 SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.16/23

Creating a Self-Signed Root Certificate openssl req -x509 -newkey rsa -out cacert.pem -outform PEM cat cacert.pem openssl x509 -in cacert.pem -text -noout SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.17/23

Writing some Client Server Programs using OpenSSL in C $cd /usr/local/openssl-0.9.7e/demos/ssl $ls $serv.cpp cli.cpp Compile Server i.e. serv.cpp $g++ -c serv.cpp or $g++ -I/usr/local/include -c serv.cpp $g++ serv.o -lssl -o servertest or $g++ serv.o /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a -o servertest Compile Client i.e. cli.cpp in the same manner Wait we need Server Certificate and Private Key $openssl req -x509 -newkey rsa -out cert.pem -outform PEM $ cat cert.pem privkey.pem» foo-cert.pem $./servertest $./clientest $ Run SSLDump SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.18/23

SSLDump and SSLSniffer $openssl s_client -connect www.paypal.com:443 $ssldump -i eth0 port 443 New TCP connection 1: 192.168.1.103(32952) <-> 206.65.183.42(443) 1 1 0.0834 (0.0834) C>S Handshake ClientHello Version 3.1 resume [32]= 23 22 00 00 b9 8d c0 23 0e fe 0d cb b4 c8 89 e9 8e 8c 14 da e4 d5 2d 0a 56 ed c5 61 11 48 4a 84 cipher suites Unknown value 0x39 Unknown value 0x38 Unknown value 0x35 Unknown value 0x33 Unknown value 0x32 TLS_RSA_WITH_RC4_128_MD5 TLS_RSA_WITH_RC4_128_SHA 2 3 0.1954 (0.0000) S>C ChangeCipherSpec 2 4 0.1954 (0.0000) S>C Handshake 2 5 0.1984 (0.0029) C>S ChangeCipherSpec 2 6 0.1984 (0.0000) C>S Handshake 2 7 0.1984 (0.0000) C>S application_data SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.19/23

Security Analysis of SSL Protocol Version Rollback Attack Attacks on Handshack Protocol If using Public Key Crytography (Diffie Hellman) Man in the Middle Attack Analysis of the SSL 3.0 Protocol, D. Wagner and B. Schneier The Second USENIX Workshop on Electronic Commerce Proceedings, USENIX Press, November 1996, pp. 29-40. SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.20/23

"Network Security with OpenSSL" SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.21/23

"SSL and TLS: Designing and Building Secure Systems" SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.22/23

References 1. SSL 3.0 Specification: http://wp.netscape.com/eng/ssl3/ 2. OpenSSL: http://www.openssl.org 3. SSLDump: http://www.rtfm.com/ssldump/ 4. Network Security With OpenSSL by John Viega, Matt Messier and Pravir Chandra 5. Slides available from http://www.cs.ucr.edu/ schhabra/scale05.pdf SCALE 05: Southern California Linux Expo 2005, LA, 02-13-2005 p.23/23