Transport Level Security
Transport Level Security
Security
unit4
Transport Level Security
1. Web Security Considerations
2. Secure Socket layer
3. HTTPS
4. Secure Shell (SSH)
1.Web Security Considerations
• The World Wide Web is fundamentally a client/server application running over
the Internet and TCP/IP intranets.
• Web presents new challenges:
1.The Internet is two-way. Unlike traditional publishing environments—even
electronic publishing systems involving teletext, voice response, or fax-back— the
Web is vulnerable to attacks on the Web servers over the Internet
2. The Web is increasingly serving as a highly visible outlet for corporate and
product information and as the platform for business transactions. Reputations
can be damaged and money can be lost if the Web servers are subverted
3.Although Web browsers are easy to use and Web servers are easy to configure
and manage, and Web content is increasingly easy to develop: the underlying
software is complex which may hide many potential security flaws.
1.Web Security Considerations
4.A Web server can be subverted and an attacker may be able to gain access
to data and systems not part of the Web itself but connected to the server at
the local site.
5. Casual and untrained (in security matters) users are common clients for
Web-based services who are not aware of the security risks that exist and do
not have the tools or knowledge to take effective countermeasures
1.Web Security Considerations
PHASE 4. FINISH
• This phase completes the setting up of a secure connection.
• The client sends a change_cipher_spec message and copies the
pending CipherSpec into the current CipherSpec.
• The client then immediately sends the finished message which
verifies that the key exchange and authentication processes were
successful
5.Handshake Protocol:
Cryptographic Computations
1. MASTER SECRET CREATION :The shared master secret is a one-time 48-byte
value (384 bits) generated for this session by means of secure key exchange.
• The creation is in two stages. First, a pre_master_secret is exchanged. Second,
the master_secret is calculated by both parties.
• For pre_master_secret exchange, there are two possibilities.
• RSA: A 48-byte pre_master_secret is generated by the client, encrypted with
the server’s public RSA key, and sent to the server. The server decrypts the
ciphertext using its private key to recover the pre_master_secret.
• Diffie-Hellman: Both client and server generate a Diffie-Hellman public key.
After these are exchanged, each side performs the Diffie-Hellman calculation to
create the shared pre_master_secret.
5.Handshake Protocol:
Cryptographic Computations
2.GENERATION OF CRYPTOGRAPHIC PARAMETERS
• CipherSpecs require a client write MAC secret, a server write MAC
secret, a client write key, a server write key, a client write IV, and a
server write IV, which are generated from the master secret in that
order.
• These parameters are generated from the master secret by hashing
the master secret into a sequence of secure bytes of sufficient length
for all needed parameters.
3.HTTPS
• HTTPS (HTTP over SSL) refers to the combination of HTTP and SSL to
implement secure communication between a Web browser and a Web
server.
• The HTTPS capability is built into all modern Web browsers.
• Its use depends on the Web server supporting HTTPS communication.
For example, search engines do not support HTTPS.
• The principal difference seen by a user of a Web browser is that URL
(uniform resource locator) addresses begin with https:// rather than
http://. A normal HTTP connection uses port 80. If HTTPS is specified,
port 443 is used, which invokes SSL.
3.HTTPS
• When HTTPS is used, the following elements of the communication
are encrypted:
URL of the requested document
Contents of the document
Contents of browser forms (filled in by browser user)
Cookies sent from browser to server and from server to browser
Contents of HTTP header
3.HTTPS
1.Connection Initiation:For HTTPS, the agent acting as the HTTP client also acts as the TLS client.
The client initiates a connection to the server on the appropriate port and then sends the TLS
ClientHello to begin the TLS handshake.
When the TLS handshake has finished, the client may then initiate the first HTTP request. All
HTTP data is to be sent as TLS application data. Normal HTTP behavior, including retained
connections, should be followed.
We need to be clear that there are three levels of awareness of a connection in HTTPS.
At the HTTP level, an HTTP client requests a connection to an HTTP server by sending a
connection request to the next lowest layer.
Typically, the next lowest layer is TCP, but it also may be TLS/SSL. At the level of TLS, a session is
established between a TLS client and a TLS server.
This session can support one or more connections at any time. As we have seen, a TLS request
to establish a connection begins with the establishment of a TCP connection between the TCP
entity on the client side and the TCP entity on the server side.
3.HTTPS
2.Connection Closure: An HTTP client or server can indicate the closing of a connection .
Connection: close - This indicates that the connection will be closed after this record is
delivered.
The closure of an HTTPS connection requires that TLS close the connection with the peer
TLS entity on the remote side, which will involve closing the underlying TCP connection.
At the TLS level, the proper way to close a connection is for each side to use the TLS alert
protocol to send a close_notify alert.
TLS implementations must initiate an exchange of closure alerts before closing a
connection. A TLS implementation may, after sending a closure alert, close the connection
without waiting for the peer to send its closure alert, generating an “incomplete close”.
HTTP clients also must be able to cope with a situation in which the underlying TCP
connection is terminated without a prior close_notify alert and without a Connection:
close indicator.
4.Secure Shell (SSH)
• Secure Shell (SSH) is a protocol for secure network communications designed to
be relatively simple and inexpensive to implement.
• The initial version, SSH1 was focused on providing a secure remote logon facility to
replace TELNET and other remote logon schemes that provided no security.
• SSH also provides a more general client/server capability and can be used for such
network functions as file transfer and e-mail.
• A new version, SSH2, fixes a number of security flaws in the original scheme.
• SSH client and server applications are widely available for most operating systems.
It has become the method of choice for remote login and X tunneling and is rapidly
becoming one of the most pervasive applications for encryption technology outside
of embedded systems.
• SSH is organized as three protocols that typically run on top of TCP (Figure 16.8):
4.Secure Shell (SSH)
4.Secure Shell (SSH)
1. Transport Layer Protocol: Provides server authentication, data
confidentiality, and data integrity with forward secrecy (i.e., if a key
is compromised during one session, the knowledge does not affect
the security of earlier sessions).The transport layer may optionally
provide compression.
2.User Authentication Protocol: Authenticates the user to the server.
3.Connection Protocol: Multiplexes multiple logical communications
channels over a single, underlying SSH connection.
4.Secure Shell (SSH):Transport
Layer Protocol
HOST KEYS:
• Server authentication occurs at the transport layer, based on the server possessing a
public/private key pair.
• A server may have multiple host keys using multiple different asymmetric encryption
algorithms. Multiple hosts may share the same host key. In any case, the server host
key is used during key exchange to authenticate the identity of the host.
• For this to be possible:
1. The client must have a priori knowledge of the server’s public host key. So The client
has a local database that associates each host name with the corresponding public host
key. This requires no centrally administered infrastructure and no third-party
coordination. The downside is that the database of name-to-key associations may
become burdensome to maintain.
2. The host name-to-key association is certified by a trusted certification authority (CA).
The client only knows the CA root key and can verify the validity of all host keys certified
by accepted CAs. This alternative eases the maintenance problem
4.Secure Shell (SSH):Transport
Layer Protocol
PACKET EXCHANGE :
• Figure 16.9 illustrates the sequence of events in the SSH Transport Layer Protocol.
• First, the client establishes a TCP connection to the server. This is done via the TCP protocol and
is not part of the Transport Layer Protocol.
• Once the connection is established, the client and server exchange data, referred to as packets,
in the data field of a TCP segment. Each packet is in the following format (Figure 16.10).
• Packet length: Length of the packet in bytes, not including the packet length and MAC fields. •
Padding length: Length of the random padding field.
• Payload: Useful contents of the packet. Prior to algorithm negotiation, this field is
uncompressed. If compression is negotiated, then in subsequent packets, this field is compressed.
• Random padding: Once an encryption algorithm has been negotiated, this field is added. It
contains random bytes of padding so that that total length of the packet (excluding the MAC field)
is a multiple of the cipher block size, or 8 bytes for a stream cipher.
• Message authentication code (MAC): If message authentication has been negotiated, this field
contains the MAC value.
4.Secure Shell (SSH):
Transport Layer
Protocol
4.Secure Shell (SSH)
Transport Layer
Protocol
4.Secure Shell (SSH)
Transport Layer
Protocol
4.Secure Shell (SSH):User
Authentication Protocol
The User Authentication Protocol provides the means by which the client is authenticated to the server
Three types of messages are always used in the User Authentication Protocol. Authentication requests
from the client have user name is the authorization identity the client is claiming, service name is the
facility to which the client is requesting access (typically the SSH Connection Protocol), and method
name is the authentication method being used in this request. The first byte has decimal value 50, which
is interpreted as SSH_MSG_USERAUTH_REQUEST. If the server either (1) rejects the authentication
request or (2) accepts the request but requires one or more additional authentication methods, the
server sends a message with the name-list is a list of methods that may productively continue the dialog.
If the server accepts authentication, it sends a single byte message: SSH_MSG_ USERAUTH_SUCCESS
• AUTHENTICATION METHODS: The server may require one or more of the following authentication
methods :publickey,password,hostbased: Authentication is performed on the client’s host rather than
the client itself