Chapter 3 Internet
Chapter 3 Internet
1
11/25/2022
Tunnel Mode
In tunnel mode, IPSec protects the entire IP packet. It takes an IP
packet, including the header, applies IPSec security methods to the
entire packet, and then adds a new IP header.
2
11/25/2022
Next header:The 8-bit next header field defines the type of payload
carried by the IP datagram (such as TCP, UDP, ICMP, or OSPF).
Payload length:The name of this 8-bit field is misleading. It does not
define the length of the payload; it defines the length of the
authentication header in 4-byte multiples.
Security parameter index:The 32-bit security parameter index (SPI)
field plays the role of a virtual circuit identifier and is the same for all
packets sent during a connection called a Security Association.
Sequence number: A 32-bit sequence number provides ordering
information for a sequence of datagrams. The sequence numbers
prevent a playback. value is from 0 to 232-1.
Authentication data: The authentication data field is the result of
applying a hash function to the entire IP datagram except for the
fields that are changed during transit (e.g., time-to-live).
3
11/25/2022
4
11/25/2022
5
11/25/2022
Security Association
Security Association is a very important aspect of IPSec.
IPSec requires a logical relationship, called a Security Association
(SA), between two hosts.
A Security Association is a contract between two parties; it creates
a secure channel between them.
6
11/25/2022
Security Policy(SP)
Security Policy (SP) defines the type of security applied to a packet
when it is to be sent or when it has arrived.
Security Policy Database(SPD)
Each host that is using the IPSec protocol needs to keep a Security
Policy Database. Again, there is a need for an inbound SPD and an
outbound SPD.
Outbound processing
7
11/25/2022
Inbound processing
8
11/25/2022
9
11/25/2022
SSL Architecture
• SSL is designed to provide security and compression services to
data generated from the application layer.
• SSL can receive data from any application layer protocol, but
usually the protocol is HTTP.
• The data received from the application is compressed (optional),
signed, and encrypted.
• The data is then passed to a reliable transport layer protocol such
as TCP.
10
11/25/2022
11
11/25/2022
12
11/25/2022
13
11/25/2022
Handshake Protocol
The Handshake Protocol uses messages to negotiate the cipher suite,
to authenticate the server to the client and the client to the server if
needed, and to exchange information for building the cryptographic
secrets. The handshaking is done in four phases
14
11/25/2022
15
11/25/2022
ChangeCipherSpec Protocol
The ChangeCipherSpec protocol exists to signal transitions in
ciphering strategies.
The protocol consists of a single message, which is encrypted and
compressed under the current connection state.
The message consists of a single byte of value 1.
The sole purpose of this message is to cause the pending state to be
copied into the current state, which updates the cipher suite to be
used on this connection.
Alert Protocol
SSL uses the Alert Protocol for reporting errors and abnormal
conditions.
It uses only one message that describes the problem and its level
(warning or fatal).
Record Protocol
SSL Record provides two services to SSL connection.
1. Confidentiality
2. Message Integrity
The Record Protocol carries messages from the upper layer.
The message is fragmented and optionally compressed; a MAC is
added to the compressed message using the negotiated hash
algorithm.
The compressed fragment and the MAC are encrypted using the
negotiated encryption algorithm. Finally, the SSL header is added to
the encrypted message.
16
11/25/2022
17
11/25/2022
Certificates
It is obvious that some public-key algorithms must be used for e-
mail security. To encrypt the secret key, Alice needs Bob’s public
key; to verify a signed message, Bob needs Alice’s public key. So, for
sending a small authenticated and confidential message, two public
keys are needed. How can Alice be assured of Bob’s public key, and
how can Bob be assured of Alice’s public key? Each e-mail security
protocol has a different method of certifying keys.
Pretty Good Privacy (PGP)
PGP was invented by Phil Zimmermann to provide e-mail with
privacy, integrity, and authentication.
PGP can be used to create a secure e-mail messages.
PGP uses:
public keys for encrypting session keys / verifying signatures.
private keys for decrypting session keys / creating signatures.
KS
+ Internet
- KS
KS
+
KB( ). + +
-
KB( ) .
KB(KS ) KB(KS )
+ -
KB
KB
Alice:
generates random symmetric private key, KS.
encrypts message with KS (for efficiency)
also encrypts KS with Bob’s public key.
sends both KS(m) and KB(KS) to Bob.
18
11/25/2022
KS
+ Internet
- KS
KS
+
KB( ). + +
-
KB( ) .
KB(KS ) KB(KS )
+
KB
-
KB
Bob:
uses his private key to decrypt and recover KS
uses KS to decrypt KS(m) to recover m
K-A K+A
. . - - .
- K (H(m)) KA(H(m)) + H(m )
m H( ) KA( ) A KA( )
+ - compare
Internet .
m H( ) H(m )
m
19
11/25/2022
Key Rings
Alice may need to send messages to many people; she needs key
rings.
In this case, Alice needs a ring of public keys, with a key belonging
to each person with whom Alice needs to correspond (send or
receive messages).
In addition, the PGP designers specified a ring of private/public
keys.
One reason is that Alice may wish to change her pair of keys from
time to time.
Another reason is that Alice may need to correspond with
different groups of people (friends, colleagues, and so on).
Alice may wish to use a different key pair for each group.
Therefore, each user needs to have two sets of rings: a ring of
private/public keys and a ring of public keys of other people.
PGP Certificates
In PGP, there is no need for CAs; anyone in the ring can sign a
certificate for anyone else in the ring.
In PGP, there can be multiple paths from fully or partially trusted
authorities to any subject.
In PGP, the issuer of a certificate is usually called an introducer.
The entire operation of PGP is based on introducer trust, the
certificate trust, and the legitimacy of the public keys.
Introducer Trust Levels
PGP allows different levels of trust. The number of levels is mostly
implementation dependent, but for simplicity, let us assign three
levels of trust to any introducer: none, partial, and full .
20
11/25/2022
S/MIME
Another security service designed for electronic mail is
Secure/Multipurpose Internet Mail Extension (S/MIME).
The protocol is an enhancement of the Multipurpose Internet Mail
Extension (MIME) protocol.
Cryptographic Message Syntax (CMS)
To define how security services, such as confidentiality or integrity,
can be added to MIME content types, S/MIME has defined CMS.
The syntax in each case defines the exact encoding scheme for each
content type.
Data Content Type: This is an arbitrary string. The object created is
called Data.
Signed-Data Content Type: This type provides only integrity of data.
It contains any type and zero or more signature values.
The encoded result is an object called signed-Data.
21
11/25/2022
22
11/25/2022
23
11/25/2022
FIREWALLS
All previous security measures cannot prevent Eve from sending a
harmful message to a system. To control access to a system we need
firewalls. A firewall is a device (usually a router or a computer)
installed between the internal network of an organization and the
rest of the Internet. It is designed to forward some packets and filter
(not forward)
24
11/25/2022
Packet-Filter Firewall
A firewall can be used as a packet filter. It can forward or block
packets based on the information in the network layer and transport
layer headers: source and destination IP addresses, source and
destination port addresses, and type of protocol (TCP or UDP).
A packet-filter firewall is a router that uses a filtering table to
decide which packets must be discarded (not forwarded). Figure
30.33 shows an example of a filtering table for this kind of a firewall.
According to the figure, the following packets are filtered:
1. Incoming packets from network 131.34.0.0. are blocked (security
precaution).
2. Incoming packets destined for any internal TELNET server (port 23)
are blocked.
3. Incoming packets destined for internal host 194.78.20.8. are
blocked. The organization wants this host for internal use only.
4. Outgoing packets destined for an HTTP server (port 80) are
blocked. The organization doesn’t want employees to browse the
Internet.
25
11/25/2022
Proxy Firewall
The packet-filter firewall is based on the information available in the
network layer and transport layer headers (IP and TCP/UDP).
However, sometimes we need to filter a message based on the
information available in the message itself (at the application
layer). One solution is to install a proxy computer (sometimes called
an application gate-way ), which stands between the customer
computer and the corporation computer.
When the user client process sends a message, the application
gateway runs a server process to receive the request. The server
opens the packet at the application level and finds out if the request
is legitimate. If it is, the server acts as a client process and sends
the message to the real server in the corporation. If it is not, the
message is dropped and an error message is sent to the external user.
In this way, the requests of the external users are filtered based on
the contents at the application layer.
26
11/25/2022
27
11/25/2022
28
11/25/2022
1. Network-based:- These monitor the network traffic for a segment of the network. It also
analyzes the network & application protocol activity to identify suspicious activity.
Characteristics:
NIDS examine raw packets in the network passively and triggers alerts
-Advantages
Easy deployment
Unobtrusive
Difficult to evade if done at low level of network operation
-Disadvantages
Fail Open
Different hosts process packets differently
NIDS needs to create traffic seen at the end host
Need to have the complete network topology and complete host behavior
2. Host-based :- These IDs monitors the Host & events that occur within the host.
Characteristics:
Runs on single host
Can analyze audit-trails, logs, integrity of files and directories, etc.
Advantages
More accurate than NIDS
Less volume of traffic so less overhead
Disadvantages
Deployment is expensive
29