ssl basics and ssl packet analysis using wireshark

31
SSL BASICS AND SSL PACKET ANALYSIS USING WIRESHARK Presented by Md. Al Imran M.Sc in MISS CEH, ISO 27001 LA

Upload: al-imran-cisa

Post on 16-Jan-2017

308 views

Category:

Technology


11 download

TRANSCRIPT

Page 1: SSL basics and SSL packet analysis using wireshark

SSL BASICS AND SSL PACKET ANALYSIS USING

WIRESHARK

Presented byMd. Al ImranM.Sc in MISS

CEH, ISO 27001 LA

Page 2: SSL basics and SSL packet analysis using wireshark

YOU WILL LEARN Definition of SSL Components of SSL How SSL works Packet capturing and analysis using

Wireshark Concepts about Digital Signature, PKI, Digital

Envelope, Digital Certificate

Prepared by Md. Al Im

ran

2

Page 3: SSL basics and SSL packet analysis using wireshark

WHAT IS SSL Secure communication protocol Between client(browser) and server Securing any transmission over TCP HTTPS is an application of SSL We can tell it HTTP over SSL

Prepared by Md. Al Im

ran

3

Page 4: SSL basics and SSL packet analysis using wireshark

SSL PROVIDES Confidentiality Authenticity Integrity Non repudiation

Prepared by Md. Al Im

ran

4

Page 5: SSL basics and SSL packet analysis using wireshark

COMPONENTS OF SSL 4 components/protocol layer Record layer Change cipherspec protocol Alert protocol Handshake protocol

Prepared by Md. Al Im

ran

5

Page 6: SSL basics and SSL packet analysis using wireshark

RECORD LAYERPrepared by M

d. Al Imran

6

Page 7: SSL basics and SSL packet analysis using wireshark

RECORD LAYER (CONTD..) Collects all messages from Alert,

ChangeCipherSpec, Handshake and application protocol messages

Format them, formatting provides a header of each message Add Message Authentication Code(MAC) at the

end Five bytes header Protocol message follow the header no longer

that 16384 bytes

Prepared by Md. Al Im

ran

7

Page 8: SSL basics and SSL packet analysis using wireshark

RECORD LAYER (CONTD..) Header contains

Protocol definition(1 byte): indicated which higher layer protocol is contained

Version(2 byte): SSL protocol version Length(2 byte): length of higher layer protocol

message

Prepared by Md. Al Im

ran

8

Page 9: SSL basics and SSL packet analysis using wireshark

CHANGECIPHERSPEC PROTOCOL Composed of only one message(1 byte) Indicates the beginning of secure

communication

Prepared by Md. Al Im

ran

9

Page 10: SSL basics and SSL packet analysis using wireshark

ALERT PROTOCOL Sends errors, problems, warning about the

connection between client and server Layer is formed with two fields

Severity level: 1 means warning, 2 means fatal error

Alert description: Close notify, no certificate, bad certificate,

BadRecordMAC, handshake failure etc

Prepared by Md. Al Im

ran

10

Page 11: SSL basics and SSL packet analysis using wireshark

HANDSHAKE PROTOCOL Establish a handshake which begins secure

communication between client and server The following steps shows how handshake is

established

Prepared by Md. Al Im

ran

11

Page 12: SSL basics and SSL packet analysis using wireshark

HANDSHAKE PROTOCOL (CONTD..)Prepared by M

d. Al Imran

12

Page 13: SSL basics and SSL packet analysis using wireshark

HANDSHAKE PROTOCOL (CONTD..) ClientHello

5 components of the message Version: which SSL version client supports Random number: 32 byte for cryptographic

calculation, with (4 byte)time & date at the last Session ID: empty Cipher suites: exact algorithm(DES, AES,

3DES,RC4,MD5,SHA-1), key size Compression method: compression before

encryption

Prepared by Md. Al Im

ran

13

Page 14: SSL basics and SSL packet analysis using wireshark

HANDSHAKE PROTOCOL (CONTD..) ServerHello

Server takes the decision Version: determines SSL version to be used Random number: 32 byte for cryptographic

calculation, with (4 byte)time & date at the last, avoid replay attack

Session ID: specific session ID Cipher suites: selects exact, key size to be used Compression method: select exact compression

method

Prepared by Md. Al Im

ran

14

Page 15: SSL basics and SSL packet analysis using wireshark

HANDSHAKE PROTOCOL (CONTD..) ServerkeyExchange

Sends public key information(Digital Certificate) of itself according to selected ciphersuite

ServerHelloDone Has finished negotiation message. Very important for client to move next state

Prepared by Md. Al Im

ran

15

Page 16: SSL basics and SSL packet analysis using wireshark

HANDSHAKE PROTOCOL (CONTD..) ClientkeyExchange

Client sends his key information. Premaster-secret encrypted using servers public

key which is called “Digital Envelope” Server and client generate master-secret and

session key based on premaster-secret Prevent Man-in-the-Middle attack Server decrypt it using his private key that

ensures server authentication

Prepared by Md. Al Im

ran

16

Page 17: SSL basics and SSL packet analysis using wireshark

HANDSHAKE PROTOCOL (CONTD..) ChangeCipherSpec

Both client and server sends this message Begin using agreed upon security services

Finished Both client and server sends this final message Both ends verify negotiation is successful Encrypted and hashed message(ensures intigrity) Ensures 3 points

Key information Contents of all previous SSL handshake messages

exchanged by the systems A special value indicating whether the sender is a client or

server

Prepared by Md. Al Im

ran

17

Page 18: SSL basics and SSL packet analysis using wireshark

CLIENT HELLOPrepared by M

d. Al Imran

18

Page 19: SSL basics and SSL packet analysis using wireshark

SERVER HELLOPrepared by M

d. Al Imran

19

Page 20: SSL basics and SSL packet analysis using wireshark

SERVER KEY EXCHANGEPrepared by M

d. Al Imran

20

Page 21: SSL basics and SSL packet analysis using wireshark

SERVER HELLO DONEPrepared by M

d. Al Imran

21

Page 22: SSL basics and SSL packet analysis using wireshark

CLIENT KEY EXCHANGEPrepared by M

d. Al Imran

22

Page 23: SSL basics and SSL packet analysis using wireshark

DIGITAL CERTIFICATE It’s a component of PKI Why PKI? Electronic passport Allows client to exchange information

securely over the Internet using PKI Contains public key and identity of the public

key holder Contains serial no., valid duration, version,

algorithm, digital signature of the CA to verify that certificate is real

Provides sender authentication Issued by trusted CA

Prepared by Md. Al Im

ran

23

Page 24: SSL basics and SSL packet analysis using wireshark

DIGITAL CERTIFICATEPrepared by M

d. Al Imran

24

Page 25: SSL basics and SSL packet analysis using wireshark

DIGITAL CERTIFICATEPrepared by M

d. Al Imran

25

Page 26: SSL basics and SSL packet analysis using wireshark

SSL CERTIFICATE OF AMAZON.COM

26

Prepared by Md. Al Im

ran

Page 27: SSL basics and SSL packet analysis using wireshark

DIGITAL SIGNATURE Digitally signed document Process of ensuring sender authentication,

message integrity and non-repudiation

Prepared by Md. Al Im

ran

27

Page 28: SSL basics and SSL packet analysis using wireshark

DIGITAL SIGNATUREPrepared by M

d. Al Imran

28

Page 29: SSL basics and SSL packet analysis using wireshark

DIGITAL ENVELOPE Secure data container Message is encrypted using a secret

key(symmetric encryption) Secret key is encrypted using recipients

public key(public key encryption)

Prepared by Md. Al Im

ran

29

Page 30: SSL basics and SSL packet analysis using wireshark

DIGITAL ENVELOPEPrepared by M

d. Al Imran

30