OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket...

23
OpenSSL and Data Security on the Web Li-Chiou Chen Seidenberg School of Computer Science and Information Systems Pace University March 27 th , 2015

Transcript of OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket...

Page 1: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

OpenSSL and Data Security on the Web

Li-Chiou ChenSeidenberg School of Computer Science and Information SystemsPace UniversityMarch 27th, 2015

Page 2: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Agenda

Web transaction What HTTPS What is a digital certificate What is SSL? What is OpenSSL? OpenSSL Vulnerabilities Cybersecurity awareness resources

© Li-Chiou Chen, Pace University 2

Page 3: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

What are things you do on the web?

© Li-Chiou Chen, Pace University 3

Page 4: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

© Li-Chiou Chen, Pace University 4

Page 5: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

How is my web transactions secured?

© Li-Chiou Chen, Pace University 5

Page 6: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

© Li-Chiou Chen, Pace University 6

How are the web transactions secured?

Page 7: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

What is HTTPS

A protocol for secure communications using HTTP.

HTTP + TLS (Transport Layer Security)

How is this done? We need to talk about digital certificate first.

© Li-Chiou Chen, Pace University 7

Page 8: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Activity I: Explore SSL Server Certificate

Go to https://www.facebook.com Click on the lock on the left of the URL A little dialog box that says “you are connected to

facebook” will show up. Click on More Information on the dialog box. You can then see more information about

Facebook’s certificate.

© Li-Chiou Chen, Pace University 8

Page 9: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Click on View Certificate

© Li-Chiou Chen, Pace University 9

Page 10: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Discuss the information on the certificate; what do they mean?

© Li-Chiou Chen, Pace University 10

Page 11: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

What is a Digital Certificate

Digital proof of who you are verified by a trusted third party

Contain information to achieve encryption and authentication Version Serial number Signature algorithm identifier: hash algorithm Issuer’s name; uniquely identifies issuer Interval of validity Subject’s name; uniquely identifies subject Subject’s public key Signature: enciphered hash

© Li-Chiou Chen, Pace University 11

Page 12: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

© Li-Chiou Chen, CSIS, Pace 12

Certificate Authority

CA

Client Server

Client install a root certificate (CR) => CA

KC issues a certificate (CS) for Facebook

CS => Facebook

Authenticate CS

using CR

Send CS

Who are CA? How do we know which CA to trust?

Page 13: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Activity II: Look for Root Certificates

Open Firefox Click on Options under the Firebox tab on the top Click on Certificate tab Click on View Certificate botton Click on Authorities tab You can then find a list of CA root certificate

installed on your browser Name some of them

© Li-Chiou Chen, Pace University 13

Page 14: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Have you heard about these companies?

© Li-Chiou Chen, Pace University 14

Page 15: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

What is Secure Socket Layer (SSL) or Transport Layer Security (TLS)

A secure communication protocol for

Encryption of web content

Authentication of web server

Authentication of web client is optional and is typically implemented using user login.

© Li-Chiou Chen, Pace University 15

Page 16: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

© Li-Chiou Chen, CSIS, Pace 16

Secure Socket Layer: Handshaking

CA: DigiCert

Alice Facebook

2: DigiCert signs Facebook’s certificate using

its public key in the root certificate)

3: Send Facebook’s certificate

4: Verify Facebook’s certificate using DigiCert’s certificate

1: Install DigitCert’s public key (root certificate) in

Alice’s browser

Page 17: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

© Li-Chiou Chen, CSIS, Pace 17

Secure Socket Layer: Sending Data

Alice Facebook3: Send the encrypted date

(session key)

1: Decide an encryption algorithm

2: Decrypt the encrypted data ( a

session key) using in Facebook’s public key

(in certificate)

4: Decrypt the encrypted data using

Facebook’s private key to obtain the session

key.

5: Alice and Facebook communicated securely by encrypting data using the session key

Page 18: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

What is OpenSSL?

A set of open source libraries to implement the SSL protocol and other crypto algorithms

Generate public key and private key Create digital certificate Testing Communication between server and client …..

More information on https://www.openssl.org/

© Li-Chiou Chen, Pace University 18

Page 19: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Activity III: Use OpenSSL to communicate with a server

Open openssl-0.9.8k_WIN32 folder Open bin folder Click on openssl.exe and an openssl command

prompt should show up We will try to communicate with a server

securely using openssl.

© Li-Chiou Chen, Pace University 19

Page 20: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Communicate with a server securely using openssl

Under openssl command prompt, type s_client -connect www.facebook.com:443

What is your result? Try to explain it. Now type GET / HTTP/1.1

What is your result? Try to explain it. Now, exit openssl command line, type exit

© Li-Chiou Chen, Pace University 20

Page 21: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

So, what is wrong with openssl?

Many companies use openssl to implement their certificates and SSL communications

Used for web server, email security….etc. Recent vulnerabilities; fixed Heartbleed bug CCS Injection ClientHello sigalgs DoS

© Li-Chiou Chen, Pace University 21

Page 22: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Resources: Watch Video

DoD DISA video on cybersecurity awareness

http://iase.disa.mil/eta

© Li-Chiou Chen, Pace University 22

Page 23: OpenSSL and Data Security on the Webcsis.pace.edu/~lchen/pcap15/WebSecurity.pdf · Secure Socket Layer: Sending Data Alice Facebook 3: Send the encrypted date (session key) 1: Decide

Questions / Comments

© Li-Chiou Chen, Pace University 23