5. Step 2
The residents of the Faraway Islands usually travel from one
island to another by using a
public transport system such as a ferry. However, they have no
control over the route or
schedule.
In addition, although the public ferry is cheap, it does not offer
the islanders any privacy.
Fellow travelers can easily guess where people are headed and
see what cargo is being
carried.
Similarly, companies with remote offices and remote workers
usually use Web servers to
connect with each other. Internet users have no control over the
wires and routers of
public servers.
Also, even though using the Internet is cheap, it offers little
privacy. Other users can
often see which users are connected and what data is being
transmitted between them.
Step 3
To overcome the disadvantages of using a public ferry, the
residents can build a bridge
connecting the islands.
However, building a bridge is practical only if the distance
between the islands is short,
the traffic is frequent, and the cost is not too high.
Similarly, although networks can be connected using wide area
networks (WANs) and
leased lines, the cost of connections is determined by the
9. private local area network (LAN) A can securely communicate
with Host B in another
network as if Host B were located in the private LAN A.
A typical VPN might consist of a main LAN at the headquarters
of a company, other
LANs at the branch offices, and remote users that connect from
the field.
VPN Types
VPNs use two types of VPN architecture to transport data:
remote access VPN, or host-
to-gateway architecture, and site-to-site intranet VPN, or
gateway-to-gateway
architecture.
1. Remote Access VPN Architecture
A remote access VPN is a user-to-LAN connection enabled by
deploying a VPN
router or gateway on the network. A remote access VPN allows
people in remote
geographic locations to establish secure connections with their
company’s network
and work as if they were plugged in directly.
Consider the case of Cohere Auto Spares Manufacturer
(CASM), an organization
with corporate headquarters in Baltimore, Maryland, and 12
branch offices across
North America, Europe, and Asia. In addition, the company has
a sizeable number of
salespeople in the field and an equal number of employees
working from their
homes.
10. CASM uses leased lines and maintains a WAN to connect its
workforce across the
globe. However, maintaining the WAN using leased lines is
expensive because of
the increase in the number of connections to the CASM
network. In addition, the cost
of maintaining the connections increases with the distance
between the offices and
the length of time that the employees stay connected.
Companies such as CASM can deploy a VPN router or gateway
onto their network to
enjoy the benefits of remote access VPN architecture, of which
some are listed
below.
Reduction in Networking Costs
Remote users usually use dial-up access to connect from their
homes or other
remote locations to their company’s network. A dial-up
connection is comparable to a
long-distance carrier that requires payments to be made to the
intermediaries who
have facilitated the connection. However, remote access VPN
users do not have to
pay any intermediaries since they can use the Internet and
therefore achieve
significant reduction in costs.
13. tunneling protocols.
Tunneling Protocols
Layer 2 Tunneling Protocols
Layer 3 Tunneling Protocols
Correspond to the data-link layer. Correspond to the network
layer.
Use frames as the unit of data exchange.
Use packets as the unit of data
exchange.
Encapsulate data in a Point-to-Point
Protocol (PPP) frame before sending it
across a network.
Encapsulate data in the Authentication
Header (AH) and/or Encapsulating
Security Payload (ESP) before sending it
across a network.
Examples: Point to Point Tunneling
Protocol (PPTP), Layer 2 Tunneling
14. Protocol (L2TP), and Layer 2 Forwarding
(L2F)
Example: IPsec
Advantages of Tunneling
Tunneling offers the following advantages.
infrastructure since one
protocol is encapsulated within another. In other words, it is
more efficient to
transport many different protocols, such as Hypertext Transfer
Protocol (HTTP) and
Telnet, over a single VPN tunnel.
though the users had
access to their own private network by routing privately
addressed packets through a
public infrastructure.
confidentiality of routed data.
existing infrastructure.
UMUC Monitoring, Auditing, Intrusion Detection, Intrusion
Prevention, and Penetration Testing
19. Step 4:
The new data packet is transmitted in IPsec transport mode.
Tunnel Mode
Tunnel mode is generally deployed in a site-to-site VPN
architecture. In the tunnel mode,
IPsec encapsulates the full IP header as well as the payload.
Therefore, an original IP
packet becomes the payload of another, new IP packet. The IP
address in the new IP
header is used to route the packet through the Internet.
Once the packet arrives at a destination network, the IP address
in the original IP header
is used to route the packet within the destination network. The
tunnel mode is selected if
IP addresses of hosts in each site are not known or revealed.
Step 1:
The animation shows the data to be transmitted from IPsec Peer
Site 1 to IPsec Peer
Site 2.
UMUC Monitoring, Auditing, Intrusion Detection, Intrusion
Prevention, and Penetration Testing
CSEC
640
24. When confidentiality is not required, an administrator can
deploy an IPsec with the AH
protocol instead of the ESP protocol.
The AH protocol offers data integrity and authentication using
Hash-Based Message
Authentication Code (HMAC). A hash is created on both an IP
packet and a secret key
that is shared by the two communication endpoints. This hash is
then added to the AH.
Authentication cannot be provided over the whole IP header
because some fields in the
IP header may change during transit.
The most important AH fields are the SPI and Sequence Number
fields.
The 32-bit long SPI value is used together with the destination
IP address and IPsec
security protocol number to uniquely identify the Ipsec SA for
an IP packet. The
Ipsec SA is typically chosen by the destination system when the
Ipsec SA is
established.
The sequence number is a sequential number assigned to each
packet. Only
packets within a sliding window of sequence numbers are
accepted. Any packet with
an invalid or out-of-range sequence number is rejected. This
26. e. Type of Service (TOS)
f. Source IP Address
Correct answer: Option F
Feedback:
TTL, fragment offset, fragmentation flag, header checksum, and
TOS are all mutable
fields in the IP header. No mutable IP field can be used as an
input to a hash function.
Therefore, only the source IP address field can be authenticated
by IPsec AH.
The TTL value of an IP header decreases by one every time the
IP packet passes a
routing device. Also, whenever an IP packet takes a path having
different maximum
transmission unit (MTU) links, it gets fragmented into pieces,
and both the fragment
offset and the fragmentation flag fields change. In addition,
with changes in an IP packet,
the header checksum value changes. Moreover, a router can
change TOS value during
transit. Only the source IP address does not change.
UMUC Monitoring, Auditing, Intrusion Detection, Intrusion
Prevention, and Penetration Testing
CSEC
640
29. receiver uses the SPI value, along with the destination IP
address and the IPsec
protocol type, to determine which SA is being used.
Sequence Number 32-bit
As with AH, in ESP the sequence number is a sequential number
assigned to each
packet. Only packets within a sliding window of sequence
numbers are accepted. Any
packet with an invalid or out-of-range sequence number is
rejected. This enables AH to
offer anti-replay protection.
ESP Functions
ESP provides confidentiality, integrity, and authentication of
data.
Data Confidentiality
ESP offers encryption services to translate a readable message
into an unreadable
format in order to hide the contents of the message or make the
message confidential.
The receiver decrypts the message to read the data.
The ESP protocol encrypts the payload using symmetric key
ciphers, such as:
-bit key
-
bit key
-bit
key
UMUC Monitoring, Auditing, Intrusion Detection, Intrusion
31. Topic 5: IPsec Components
Encapsulating Security Payload (ESP) Modes
The ESP protocol can be deployed in transport or tunnel mode.
ESP can be used alone or with AH. ESP alone can provide
authentication services in
addition to encryption, so it is often used without AH. If the
authentication is not applied,
the ESP authentication segment is not appended. When ESP
encryption is applied, all
the fields between the ESP header and the ESP trailer are
encrypted.
ESP Transport Mode
ESP transport mode encrypts the TCP header field, data field,
and ESP trailer field while
leaving the original IP header in open clear text. In addition, in
the ESP transport mode,
all the fields except the IP header are authenticated as shown in
the diagram.
Note that the ESP header is inserted between the original IP
header and TCP header.
ESP Tunnel Mode
ESP tunnel mode encrypts the entire packet except the new IP
header field. In addition,
in the ESP tunnel mode, all the fields except the new IP header
are authenticated as
33. packet formats necessary
to establish, negotiate, modify, and remove SAs at the two IPsec
endpoints.
In addition, ISAKMP defines the framework for key
management between the two VPN
endpoints. In the absence of a proper key-management setup,
IPsec cannot exist.
However, ISAKMP does not offer any actual mechanism to
exchange keys.
The IKE protocol establishes a secure channel over which to
exchange security
parameters. IKE defines a proper key-exchange mechanism for
creating and exchanging
cryptographic keys when two VPN endpoints communicate.
Through IKE, the two
endpoints derive authenticated keying material and negotiate
SAs that are used for ESP
and AH protocols.
IKE Phases
ISAKMP defines two phases in the procedures that two VPN
endpoints go through when
trying to make a secure VPN connection: IKE Phase 1 and IKE
Phase 2.
The main goal of the IKE protocol is to create and negotiate
security associations (SAs).
Note that SA is a term used to refer to a set of values that
define IPsec features and
protection mechanisms applied to an IPsec VPN connection.
IKE Phase 1
The main purpose of IKE Phase 1 is for two IPsec endpoints to
successfully negotiate an
34. IKE SA. The negotiation of the IKE SAs during IKE Phase 1
includes:
-1 or MD5
HMAC algorithm.
Shamir, and Adleman
(RSA) signature, or RSA encryption nonces for authentication.
-Hellman (DH) key group by making a
choice between DH1, DH2,
DH5, or DH7. Note that higher group numbers are more secure,
but require more
computation power to compute the key.
The goal of the IKE SA is to provide bidirectional encryption
and authentication for the
IKE Phase 2. During IKE Phase 2, another SA, known as IPsec
SA, is negotiated.
Step 1: Negotiate Policy
In this step, two VPN entities negotiate and agree upon the
encryption and
authentication algorithms, mode, protocols, HMAC, lifetime,
IPsec value, and DH key
that will be used in subsequent IKE communication.
UMUC Monitoring, Auditing, Intrusion Detection, Intrusion
Prevention, and Penetration Testing
CSEC
640
37. An Enhanced Interior Gateway Routing Protocol (EIGRP) is
running on CASM’s three
routers, R1, R2, and R3. R2 connects R1 and R3.
An IPsec VPN tunnel has been established between R1 and R3.
The goal of this IPsec
tunnel is to achieve authentication. R1 authenticates the traffic
originating from R3 at the
Fairfax, Virginia, office. The R3 gateway router authenticates
the network traffic
originating from CASM’s Baltimore, Maryland, office.
The applications running at both sites cannot tolerate any
significant delay, and
confidentiality is not required. Therefore, the gateway routers
do not encrypt or decrypt
IP packets and quickly process the IP packets.
In the following activity, you will analyze the IP packets
captured during data
transmission between R1 and R3.
Workspace
Analyze the following screenshots and choose the correct
option.
Question 1: Which of the following screenshots shows an IP
packet traveling through
the IPsec tunnel between the Baltimore and Fairfax gateway
routers?
39. AH is used. The correct IP packet has only an AH header. The
first packet has an AH
header inside the packet.
Question 2: In the screenshot below, identify the SPI used in
AH.
Reference: Wireshark product screenshot reprinted with
permission from the Wireshark Foundation.
Options:
a. Next Header: IPIP (0x04)
b. Length: 24
c. AH SPI: 0x5a84fcd1
d. AH Sequence: 8
e. AH ICV: 26fe6bb17f689ab324998216
Correct answer: Option c
Feedback:
The bottom window shows the detail of packet 8. In the AH in
the bottom window, one of
the fields says “AH SPI: 0X5a84fcd1”; it tells you the value of
SPI.
Question 3: The screenshot indicates that a ping packet has been
sent from the
Baltimore LAN (172.16.1.0/24) to the Fairfax LAN
(172.16.3.0/24) using the IPsec
tunnel. Analyze these packets to find which protocol and which
mode each packet has
used.
44. protocols and Layer
3 tunneling protocols. PPTP, L2TP, and L2F are Layer 2
protocols. IPsec is a
Layer 3 protocol.
connections. IPsec
propagates data across a network in tunnel or transport mode.
Encapsulating Security
Protocol (ESP), Internet Security Association and Key
Management Protocol
(ISAKMP), and Internet Key Exchange (IKE) play an important
role in ensuring
data integrity, authentication, and confidentiality.
ide key management
mechanisms without which
an IPsec cannot exist.
for data transfer
between two IPsec peers.
46. identity. A form
of access control, authentication requires users to confirm
their identity before they access the system.
Checksum Checksum is a simple error-detection scheme to
ensure
that a message is not garbled. In checksum, each
transmitted message is accompanied by a numerical value.
The receiver then applies the same formula to the
message and checks to make sure the accompanying
numerical value is the same. If it is not, the receiver can
assume that the message has been garbled.
Confidentiality Confidentiality means allowing only authorized
individuals
or systems to access certain types of information.
Confidentiality is also known as secrecy.
Data Encryption Standard Data Encryption Standard (DES) is an
encryption standard
that uses a simple 56-bit key to encrypt data. Since it is not
very secure, alternatives to DES such as triple DES and
AES have been created.
Diffie-Hellman Key The Diffie-Hellman key is a specific
method of changing
keys in the field of cryptography.
Encryption Encryption is the process of using algorithms to
change
readable text into a format that is unreadable by
unauthorized persons.
Fragmentation Fragmentation is a method in which an IP
datagram is
fragmented into IP packets and reassembled at the
48. Hash Value A hash function mathematically transforms a
variable
length data input into a fixed length, random-character
output called a hash value. Some commonly used hash
functions include Message Digest 5 (MD5) and the Secure
Hash Algorithms (SHA-0, SHA-1, and SHA-256).
Header A header is a temporary set of data that is added at the
beginning of a communication message in order to transfer
it over the network. It contains the source and destination
addresses as well as data that describe the content of the
message.
Identification Identification is part of the access-control
software and
requires users to provide identification in the form of a user
name or account number before they are allowed to
access a system.
Integrity The goal of integrity is to ensure that unauthorized
individuals or systems are unable to modify data.
IP Address An Internet Protocol (IP) address is a numeric label
that
identifies each device within a computer network that
communicates over the Internet.
Key Generation Key generation is the process of creating
cryptographic
keys.
Key Management Key management is the system of controlling
and
managing the generation, exchange, storage, safety,
application, and replacement of encryption keys.
49. Logical Connection A logical connection refers to the
connection between two
systems at the same level of the OSI or TCP/IP model.
Message Authentication
Code
In cryptography, a Message Authentication Code (MAC) is
a short piece of information used to authenticate a
message.
Message-Digest
Algorithm 5
Message-Digest Algorithm 5 (MD5) is a popular
cryptographic hash function that uses a 128-bit hash value.
Nonrepudiation Nonrepudiation refers to giving a guarantee
about the
authenticity of a document or message. The sending
parties cannot deny that they sent data.
Nonce Nonce is an abbreviation of “number used once.” It is
often
a random number issued in an authentication protocol to
ensure that old communications cannot be reused in replay
attacks.
UMUC Monitoring, Auditing, Intrusion Detection, Intrusion
Prevention, and Penetration Testing
CSEC
640
51. Signature A signature is a digital code that can be attached to a
message. Like a written signature, the signature uniquely
identifies the sender and is a guarantee that the individual
sending the message is really who he or she claims to be.
Time to Live Time to Live (TTL) is a field in the Internet
Protocol
(IP) that specifies how many more hops a packet can travel
before being discarded or returned.
Triple DES Triple DES is a symmetric algorithm that involves
repeating
the basic DES algorithm three times, using either two or
three unique keys, for a key size of 112 or 168 bits. This
provides additional resistance to a brute-force attack.
Type of Service Type of Service (TOS) is a field in an IP
packet that is used
for quality of service.
X.509 X.509 is a standard used in cryptography that specifies
formats for public key certificates, certificate revocation
lists, attribute certificates, and a certification path validation
algorithm.