Tải bản đầy đủ (.pdf) (39 trang)

Báo cáo: "Tìm hiểu giao thức SSL/TLS – Hoạt động, tấn công và phòng chống" doc

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (998.76 KB, 39 trang )

Bài Báo cáo
Môn:An Ninh Internet
K13TMT - Nhóm 4
Đề tài: Tìm hiểu giao thức
SSL/TLS – Hoạt động, tấn công và
phòng chống.
Nhóm 3 – Phân chia công việc
Tên thành viên
Công việc
Dương Thanh Hoài Bão
Tìm và tổng hợp tài liệu
Lê Văn Trọng
Nguyễn Viết Tài
Nguyễn Văn Tân
Viết báo cáo phần 2, 3
Lê Quang Hiển
Lê Nguyễn Quang Minh
Viết báo cáo phần 1,2
Nguyễn Thanh Long
Trình bày slide
Tìm hiểu SSL/TLS
Nội dung trình bày
Tổng quan về giao thức SSL/TLS
Cấu trúc và cách làm việc của SSL/TLS
Phần 1
Phần 2
Phần 3
Tấn công và cách phòng chống
Tìm hiểu SSL/TLS
Tổng quan về giao thức SSL/TLS
Phần 1


SSL/TLS là gì ?
• Secure Sockets Layer (SSL), Transport Layer
Security (TLS) là hai giao thức nổi bật để cung
cấp dịch vụ bảo mật cho lưu lượng dữ liệu trên
kênh truyền.
• Lợi ích khi dùng SSL/TLS :
Strong authentication, message privacy, and integrity.
Interoperability
Algorithm flexibility
Ease of deployment
Ease of use
Lịch sử ra đời SSL/TLS
• SSL được phát triển bởi Netscape Communications Corporation vào
năm 1994 để đảm bảo các giao dịch trên World Wide Web.
• Đến nay đã có 3 phiên bản SSL:
SSL 1.0: Được sử dụng nội bộ chỉ bởi Netscape Communications.
Nó chứa một số khiếm khuyết nghiêm trọng và không bao giờ
được tung ra bên ngoài
SSL 2.0: Ra đời cùng lúc Microsoft giới thiệu giao thức PCT
(Private Communication Technology) , nhằm cạnh tranh trong lần
tung ra Internet Explorer đầu tiên vào năm 1996.
SLL 3.0: Netscape Communications đã phản ứng lại sự thách thức
PCT của Microsoft bằng cách giới thiệu SSL 3.0 vốn giải quyết
các vấn đề trong SSL 2.0 và thêm một số tính năng mới. Vào thời
điểm này, Microsoft nhượng bộ và đồng ý hỗ trợ SSL trong tất cả
các phiên bản phần mềm dựa vào TCP/IP của nó (mặc dù phiên
bản riêng của nó vẫn hỗ trợ PCT cho sự tương thích ngược).
Lịch sử ra đời SSL/TLS
• Ngay sau đó, IETF (Internet Engineering Task
Force) đã bắt đầu làm việc để phát triển một

giao thức chuẩn để cung cấp các chức năng
tương tự  TLS ra đời.
• TLS 1.0 được IETF phát triển dựa trên SSL 3.0
• TLS được thông tin chi tiết trong RFC 2246.
SSL vs TLS
• SSL sử dụng giải thuật MAC (Message Authentication Code)
• TLS sử dụng giải thuật HMAC (Hashing for Message
Authentication Code)
MAC và HMAC là hai phương thức bảo đảm tính toàn vẹn của dữ liệu
khi truyền trong môi trường không tin cậy như Internet. HMAC có thêm
các giải thuật băm.
• TLS được chuẩn hóa trong RFC 2246
• TLS được đính thêm mới một số thông điệp cảnh báo (alert
message)
• TLS bao gồm thêm giải thuật Fortezza (giải thuật này không
được công bố bởi các chính sách của IETF)
Các dịch vụ dùng SSL/TLS sử dụng các số cổng chuyên dụng
được dành riêng bởi IANA - Internet Asigned Numbers
Authority
Dịch vụ
Cổng
Mô tả
Dịch vụ
Cổng
Nsiiop
261
Dịch vụ tên IIOP trên
TLS/SSL
Nsiiop
261

https
443
HTTP trên TLS/SSl
https
443
Smtps
465
SMTP trên TLS/SSL
Smtps
465
Nntps
563
NNTP trên TLS/SSL
Nntps
563
Ldaps
636
LDAP trên TLS/SSL
Ldaps
636
Ftps-data
989
FTP (dữ liệu) trên TLS/SSL
Ftps-data
989
Ftps
990
FTP (Điều khiển) trên
TLS/SSL
Ftps

990
Tìm hiểu SSL/TLS
Cấu trúc và cách làm việc của SSL/TLS
Phần 2
Cấu trúc giao thức SSL/TLS
• Gồm 2 phần chính :
The Handshake protocols layer.
Record layer
The Handshake protocols layer
Các giao thức ở lớp này chịu trách nhiệm
establishing hoặc resuming các secure session.
Và các mục tiêu chính là:
• Negotiate cipher suites and compression algorithms.
• Authenticate the server to the client and, optionally,
authenticate the client to the server through certificates
and public or private keys.
• Exchange random numbers and a pre-master secret.
Together with some further data, these values will be
used to create the shared secret key that the Record
Layer will use to hash and encrypt application data. The
shared secret key is called the Master Secret.
The three Handshake sub-protocols
• Handshake : Thương lượng/Thỏa thuận các
thông tin về phiên kết nối.
• Change Cipher Spec : thay đổi bộ khóa đang
dùng hoặc thông báo về việc sử dụng bộ mật
mã mới.
• Alert : Dùng alert message để chỉ ra trạng thái
hoặc cảnh báo lỗi trong phiên truyền.
Handshake Protocol Functions

The Handshake protocol provides a number of
very important security functions. It performs a
set of exchanges that starts authentication and
negotiates the encryption, hash, and
compression algorithms.
Handshake Protocol Functions
Authentication
• A certificate is a digital form of identification that is usually issued by a
certification authority (CA) and contains identification information, a
validity period, a public key, a serial number, and the digital signature of the
issuer.
• For authentication purposes, the Handshake Protocol uses an X.509
certificate to provide strong evidence to a second party that helps prove the
identity of the party that holds the certificate and the corresponding private
key.
• A CA is a mutually trusted third party that confirms the identity of a
certificate requestor (usually a user or computer), and then issues the
requestor a certificate. The certificate binds the requestor’s identity to a
public key. CAs also renew and revoke certificates as necessary. For
example, if a client is presented with a server’s certificate, the client
computer might try to match the server’s CA against the client’s list of
trusted CAs. If the issuing CA is trusted, the client will verify that the
certificate is authentic and has not been tampered with. Finally, the client will
accept the certificate as proof of identity of the server.
Handshake Protocol Functions
Encryption : There are two main types of
encryption:
• Symmetric Key, also known as Private Key.
Typical algorithms include Data Encryption Standard (DES), Triple
DES (3-DES), RC2, RC4, and Advanced Encryption Standard (AES).

• Asymmetric Key, also known as Public Key.
The most common algorithm is Rivest, Shamir, and Adleman (RSA).
 TLS/SSL uses symmetric key for bulk encryption
and public key for authentication and key
exchange.
Handshake Protocol Functions
Hash Algorithms : During the handshake process,
the client and server agree on the hash algorithm.
• A hash is a one-way mapping of values to a smaller
set of representative values, so that the size of the
resulting hash is smaller than the original message
and the hash is unique to the original data.
• A hash is similar to a fingerprint: a fingerprint is
unique to the individual and is much smaller than
the original person.
• Hashing is used to establish data integrity during
transport. Two common hash algorithms are Message Digest 5 (MD5) and
Standard Hash Algorithm 1 (SHA-1). MD5 produces a 128-bit hash value and
SHA-1 produces a 160-bit value.
Record Layer
 The Record Protocol receives and encrypts
data from the application layer and delivers it to
the Transport Layer. Then it takes the data,
fragments it to a size appropriate to the
cryptographic algorithm, optionally compresses
it (or, for data received, decompresses it),
applies a MAC or HMAC and then encrypts (or
decrypts) the data using the information
negotiated during the Handshake Protocol.
Record Layer

Trong mô tả của RFC 2246 thì Record Layer có 4
chức năng sau:
• It fragments the data coming from the application into
manageable blocks (and reassemble incoming data to pass
up to the application).
• It compresses the data and decompresses incoming data.
• It applies a Message Authentication Code (MAC), or
hash/digest, to the data and uses the MAC to verify
incoming data.
• It encrypts the hashed data and decrypts incoming data.
Cách SSL/TLS làm việc
1. The first step in the process is for the client
to send the server a Client Hello message.
This hello message contains the SSL
version and the cipher suites the client can
talk. The client sends its maximum key
length details at this time.
2. The server returns the hello message with
one of its own in which it nominates the
version of SSL and the ciphers and key
lengths to be used in the conversation,
chosen from the choice offered in the client
hello.
3. The server sends its digital certificate to the
client for inspection. Most modern
browsers automatically check the
certificate (depending on configuration)
and warn the user if it's not valid. By valid
we mean if it does not point to a
certification authority that is explicitly

trusted or is out of date, etc.
4. The server sends a server done message
noting it has concluded the initial part of
the setup sequence.
Cách SSL/TLS làm việc
5. The client generates a symmetric key
and encrypts it using the server's public
key (cert). It then sends this message to
the server.
6. The client sends a cipher spec message
telling the server all future
communication should be with the new
key.
7. The client now sends a Finished message
using the new key to determine if the
server is able to decrypt the message and
the negotiation was successful.
8. The server sends a Change Cipher Spec
message telling the client that all future
communications will be encrypted.
9. The server sends its own Finished
message encrypted using the key. If the
client can read this message then the
negotiation is successfully completed.
Mô tả SSL/TLS làm việc
SSL Negotiation with Server Only Authentication
1. The first step in the process is for the client to send the server a Client Hello message. This hello
message contains the SSL version and the cipher suites the client can talk. The client sends its
maximum key length details at this time.
2. The server returns the hello message with one of its own in which it nominates the version of SSL

and the ciphers and key lengths to be used in the conversation, chosen from the choice offered in
the client hello.
3. The server sends its digital certificate to the client for inspection. Most modern browsers
automatically check the certificate (depending on configuration) and warn the user if it's not valid.
By valid we mean if it does not point to a certification authority that is explicitly trusted or is out
of date, etc.
4. The server sends a server done message noting it has concluded the initial part of the setup
sequence.
5. The client generates a symmetric key and encrypts it using the server's public key (cert). It then
sends this message to the server.
6. The client sends a cipher spec message telling the server all future communication should be with
the new key.
7. The client now sends a Finished message using the new key to determine if the server is able to
decrypt the message and the negotiation was successful.
8. The server sends a Change Cipher Spec message telling the client that all future communications
will be encrypted.
9. The server sends its own Finished message encrypted using the key. If the client can read this
message then the negotiation is successfully completed.
SSL with both Client and Server
Authentication
Thêm các bước :
4. The server sends a Certificate
request after sending its own
certificate.
6. The client provides its
Certificate.
8. The client sends a Certificate
verify message in which it
encrypts a known piece of
plaintext using its private key.

The server uses the client
certificate to decrypt, therefore
ascertaining the client has the
private key.
Tìm hiểu SSL/TLS
Tấn công và cách phòng chống
Phần 3

×