A Technical Guide To IPSec Virtual Private Networks
A Technical Guide To IPSec Virtual Private Networks
Technical Primer
TCP/IP Quickie
TCP/IP is the language of the Internet and it allows all different types of computers
with very different operating systems to communicate seamlessly over an enormous
network. This chapter defines the basics of TCP/IP and builds models that will be
referenced throughout the book to illustrate the various aspects of VPNs. This chapter
is not intended to teach or detail TCP/IP, but rather touch upon points of the protocol
suite to provide a foundation for concepts to be detailed in later chapters.
So, one may be wondering how the client system can access the target if there is
no route to the 10.1.1.0 network and that IP address is not allowed to route through
the primary router. This is where the details of IPSec become reality and provide the
private connection through the Internet to the target. The seemingly simple task of
data from the client to the target is an oversimplification of a very complex truth.
Reference Models
In the early 1960s, government-funded research projects that were tasked with
developing a packet switching network for the Department of Defense (DOD) intro-
duced a fundamental concept in networking technology. They could provide controlled
communications by providing layers of protocols that addressed certain aspects of the
communication. The result was the TCP/IP protocol suite, that is, the combination of
several specifically assigned protocols that work in several layers.
The layers were made up of four levels, with the highest being the application layer,
followed by the transport Layer, network Layer, and finally the link Layer, as shown in
Exhibit 2-3.
The DOD reference model best represents a TCP/IP protocol stack. However, for
overall computer operations, most processes are referenced against the Open Systems
Interconnection (OSI) reference model. The OSI model is a seven-layered international
standard developed under the guidance of the International Organization for Standard-
ization (ISO). This model is used to explain the interactions of computer processes
and how they relate to any set of protocols, applications, and networking technologies.
Note: In this book, the DOD model layers will be referenced by name
(e.g., application, network, etc.) and the OSI model layers will be ref-
erenced by number (e.g., Layer 2, Layer 7, etc.). Unfortunately, both
models must be consulted to express specific concepts and this will
help eliminate any confusion.
The OSI model is illustrated in Exhibit 2-4; a mapping between the OSI and DOD
TCP/IP model is graphically displayed.
As described above, the DOD reference model best represents the TCP/IP protocol.
To understand how TCP/IP operates and the roles of the different layers, the following
gives a brief description of each layer.
Each layer, whether in a four-layered DOD model or a seven-layered ISO model, has
a counterpart layer that is operating in the communication peer. One layer may allow
TCP to communicate (over the transport layer), whereas the IP, or network layer,
provides communication for the IP protocol. Each layer in the protocol stack is only
aware of the communicating peer layer and relies on the other layers to provide their
peer services to maintain the communications. The network layer that allows the IP
protocol to operate is oblivious to the transport layer communications. The network
layer simply accepts packaged data from the transport layer and communicates with its
network layer peer. To do so, the network layer depends on the link layer to support
its communication requirements.
The result is an internal hand-off of data up or down the protocol stack to
accomplish paired layer communications between peer systems. This allows other
specific operations to be added into, or between layers of operation to add function-
ality.
Application Layer. The application layer provides an interface for the applications
wanting service from the IP protocol stack. E-mail, FTP, and Telnet are good examples
of application layer interfaces with networking operations. The application layer
handles the details of the particular application requiring network communications.
It is concerned with the application requirements and not with the actual movement
of data over the network. The application layer simply focuses on the details of the
application and passes the necessary information to the lower layers to be transmitted
to its peer application layer of the communicating partner. The lower layers are
unaware of the application requirements or the activities of the application layer.
Network Layer. The network layer is concerned with taking the predefined data-
grams from the transport layer and sending them in the appropriate direction to get
to the defined destination. The network layer is typically referred to as the Internet
layer because routing protocols that share physical connection information operate at
the network layer. There are several protocols that provide services within the network
layer. The Internet Protocol (IP), the workhorse of the network layer, is responsible for
addressing connectivity. The Internet Control Message Protocol (ICMP) is considered
part of the network layer. It communicates error messages and networking conditions
that require some form of attention, either in the form of a modified configuration or
automatic rectifications such as redirections. It is typical for the transport layer proto-
cols to act upon the messages provided by ICMP, but upper layers as well can glean
information and make adjustments based on the messages provided. Internet Group
Management Protocol (IGMP) provides a service for multicast communications and
messaging. All the hosts and routers on a physical network use IGMP to determine
which systems currently belong to which multicast groups.This information is required
by routers performing multicast functions so they know which multicast datagrams to
forward to which interfaces. Like ICMP, IGMP is considered part of the network layer
and uses IP to transmit its information through a network.
As stated previously, there are several protocols that exist at the transport and
network layers that have not been introduced. Within the IP header, there is an 8-bit
field, called the protocol identifier, which is used to identify the protocol that provided
the information to the IP protocol. The protocol field will typically define the next
header following the IP header. The maximum value is 8-bits, or 255 different values.
Of the available values, there are 128 currently assigned; that is, 128 different protocols!
(See the appendix for a complete list of protocols, their number, and associated RFCs.)
Communication Types
Many protocols have several formats they operate in to accomplish different tasks
required by the applications and systems they support, or for self-management. In short,
TCP/IP has three fundamental communication types that provide different services to
the systems, applications, and network topology that it supports.
1. unicast
2. multicast
3. broadcast
Unicast is simply one host communicating directly with another. When using a Web
browser to access a Web site, one is establishing a connection with that remote machine.
In some cases, one may want to establish connections with other Web servers to obtain
data to complete the final presentation; nevertheless, one has a peer communication
with the other system.
Broadcast is nearly the opposite of unicast. In a broadcast, the originating system
attempts to communicate with any system within reach that will answer. There are
several protocols within TCP/IP that use broadcast messaging to obtain information
about the environment. Even applications can demand the use of broadcasts for discov-
ery purposes. An example is network neighborhood and the listing of other Microsoft-
compliant systems on the network. If not supported by a naming infrastructure, like
WINS (Windows Internet Naming Service), the client systems will broadcast in search
of specific hosts that have a compiled list of other systems. And, of course, the system
that maintains the list must broadcast to obtain the information and keep the list updated
to share with the other systems. Unfortunately, for some networks, broadcasts from
hosts can get out of control and the result is broadcast storms that can flood networks,
rendering them useless. Many of the detrimental effects of broadcasts can be reduced
by proper network design and operating system configuration. In a well-designed
infrastructure, broadcasts can be helpful in communications and increase the usability
of the network from the perspective of a user.
Packet Structure
As data is moved up and down the protocol stack, information that pertains to that
layer is added or removed for processing. As illustrated in Exhibit 2-5, a simple expla-
nation of this process considers an e-mail application sending a message.The application
takes all the necessary steps to ensure that the mail server processes the message
appropriately. This includes items such as a recipient e-mail address, sender identifica-
tion, and attachment encoding that the server handling the message will require.
Header. The headers, provided by the TCP/IP protocol suite, are based on 32-bit
values that are transmitted in a specific order. Each 32-bit section, or word, represents
4 bytes of information sent in 8-bit groups. Bits 0 to 7 are sent, followed by 8 to 15,
Internet Protocol
This section addresses the aspects of IP in greater detail. IP is the final layer that provides
the last line of service to all the upper layer protocols in the TCP/IP protocol stack (see
Exhibit 2-6). All the upper layer protocols, such as TCP and UDP, ultimately get trans-
mitted as IP datagrams.
The intriguing aspect of IP (i.e., the focal point of TCP/IP communications) is that
IP does not provide a guaranteed delivery mechanism. IP is unreliable and connection-
less; that is, IP provides no direct means to verify delivery.
Unreliable is referred to as “best effort” when discussing IP. Each component in the
communication path forwards the datagram based on the best option available to the
system. However, in the event that there is an error in the processing of the IP datagram,
there is little effective error handling available. IP provides a simple process that may
work: if an IP datagram error occurs, the datagram is dropped and an ICMP error
message is generated by the system that detected the error and sends it to the originator
for notification. Unfortunately, ICMP relies on IP; thus, the error message is exposed to
the same vulnerabilities as the original IP datagram.
The term “connectionless” means that IP provides no communication state informa-
tion. As each IP datagram is received or sent, the process is localized and not affected
by any previously received IP datagrams, or ones that might be awaiting transmission.
Every IP datagram is handled independently, without regard to the communication of
the upper layer protocols or the underlying network support. To illustrate the individ-
uality of each datagram, if two messages are configured for the same destination, they
may take completely different paths across the network and arrive in a different order
than they were sent.
TCP UDP
IP ICMP
Hardware
ARP RARP
Interface
Physical
Medium
Routing. The act of providing a best effort for data connectivity displays the assump-
tion made by IP in that the network will ensure the delivery. This assumption places
a great deal of responsibility on the infrastructure to efficiently forward datagrams with
very low failure rates. To accommodate this requirement, many large IP networks have
redundancy and many alternate paths to various destinations (see Exhibit 2-7).
An IP network is broken up into networks that represent a common addressing
environment. For datagrams to travel from one network to another, a device that
operates at Layer 3 is required to forward data based on the network layer attribute.
Attributes can be source and destination addresses, type of service, and time to live.
Routers perform this function and connect IP networks to provide internetworking. To
provide the best effort, routers that have several connections to different networks may
be able to provide an alternate route in the event one path is down or saturated.
Routing protocols are used to share information between routers so they can learn
about the communication environment. Because IP assumes it will get to the destina-
tion, the routers will have to plan the communication to provide IP the service it
requires. Routing protocol can be very simple or intensely complex. The routing
protocols used throughout the Internet to ensure data reaches its destination can be
extremely complicated. The inherent redundancy of alternate paths is one of the many
reasons why IP datagrams can arrive at the destination out of order and at different
intervals. Routing protocols are well beyond the scope of this book, but knowing they
are there will provide an understanding of how network “A” can get to network “Z.”
Structure. The IP header (see Exhibit 2-8) contains information that pertains to the
proper forwarding of the datagram. The header length is the number of words that the
header uses. A typical IP header, without options, has a value of 5 (0101). Five words
equates to 20 bytes of header data. This allows for 40 bytes of options because the
maximum size of an IP header is 60 bytes.
TCP Application Ports. The TCP protocol supports the transmission of data on behalf
of applications. To allow the protocol to address several applications with a single
connection, service ports are identified. The size of the port number field is 16 bits,
which allows the maximum of service ports to reach 65,535.The first 1023 are privileged
ports that represent standard applications. The remaining ports are for the initial con-
nection from the client of the service. Custom applications can, and are encouraged to,
use the upper ports so as not to interfere with standard application ports.
An example of application ports is Simple Mail Transfer Protocol (SMTP), port 25.
A client wishing to communicate with a server providing the SMTP service would create
a TCP header with a destination port of 25 and a random source port over 1024.
Structure. The TCP header (see Exhibit 2-9) contains information that pertains to the
proper handling of the datagram. It is concerned with services support, sequencing,
session maintenance, and flow management.
The TCP header arrives directly after the IP header. The IP header contains a data
portion that contains whatever data is being carried by the IP header. The TCP header
and data reside within the data portion of the IP header.
Structure. The UDP header (see Exhibit 2-10) contains very limited information. Basi-
cally, the header contains data that provides information about the origination and
destination service points, length data, and a checksum to provide integrity checking.
The UDP header arrives directly after the IP header. The IP header contains a data
portion of whatever data is being carried by the IP header. The TCP header and data
reside within the data portion of the IP header.
Pseudo Headers
One of the interesting, unpublicized aspects of TCP/IP is the inclusion of a pseudo
header within TCP and UDP for the computation of the header’s checksum. A checksum
is a calculation, a hash, of the protocol header, options, and the payload (excluding IP)
of the datagram. Therefore, a standard HTTP packet would have an IP header with its
checksum spreading over the IP header, a TCP checksum covering the TCP header, and
the http payload.
However, there is more to the story that will shed some light on IPSec VPN’s role
in certain IP networks and configurations.
In Exhibit 2-11, the TCP header contains a checksum that covers the TCP header
and payload. However, during the checksum computation, a 12-byte pseudo header is
created and discarded once the checksum process is complete. The header contains
the source and destination IP addresses from the IP header. The Time To Live (TTL) is
set to 0 because TCP is transport layer and is not aware of hop count. The TTL sets an
upper limit on the number of routers through which a datagram can pass, limiting the
lifetime of the datagram. The originator of a packet can set the TTL to 32 or 64 and it
is decremented by one for every router in the path. When the TTL reaches 0, the router
discards the packet and sends an ICMP error message to the sender. By setting the TTL
to 0 to create the pseudo header, the calculation of the checksum is free from knowing
the number of hops from the destination.
Note: The manipulation of TTL values and the automatic error reply
provided by ICMP allows such utilities as TRACERT (trace route) to
operate.
The protocol field is directly from the IP header that identifies the protocol that
passed data to the network layer for processing; this value should always be 6 (TCP)
and 17 (UDP) because TCP and UDP are the only protocols that produce a pseudo
header. Finally, the header contains the length of the protocol datagram. This is typically
identical to what was previously calculated for the original header, not including the
pseudo header.To include the pseudo header would be overly complicated, considering
it is not included in the transmitted datagram.
The purpose of the pseudo header is to let TCP or UDP validate that the data has
arrived at the correct destination and, in some cases, from the intended source. If the
checksum is deemed invalid, the packet is silently discarded, as with IP checksum
verifications.
Non-routable IP Addresses
With the worldwide explosion of TCP/IP technology, beyond the Internet itself, an esca-
lating number of non-Internet connected organizations use TCP/IP for internal communi-
cations, without any intention of connecting to the Internet. Until RFC1918 was ratified,
these various organizations using TCP/IP for internal communication addressing were
using address space not assigned or owned by them. As organizations connected to the
Internet, it quickly became clear that conflicts in addressing would complicate or stop
communications through the Internet. To alleviate the use of non-assigned IP addresses,
a group of IP addresses was slated as private and non-routable across the Internet. That
is, if an ISP’s router sees a private IP address, it is dropped immediately.
The Internet Assigned Numbers Authority (IANA) has reserved the following three
blocks of IP address space for private internets:
Note: The translation process can work for any IP address and not just for
the ranges defined in the RFC. The internal private addresses are consis-
tently referred to, allowing simplicity and uniformity in the explanation.
Network Address Translation (NAT) is a method that allows the mapping of one
network of IP addresses to another, differently addressed network.This is not routing —
it is a translation process to get one network to communicate with another. NAT has
been typically associated with providing access to the Internet for networks assigned
with the private addressing scheme.
There are two aspects of IP communications that NAT attempts to answer. The first
is allowing IP address to have valid communications to remote networks that may have
the same IP address domain or would not normally allow communications from the
assigned IP domain. Second, NAT provides anonymity by hiding the originating IP
address from the external peer. The peer simply receives a datagram from the device
performing the NAT for the hidden network.
Within NAT there are two basic states, each having a different name, depending on
who one is talking to at the time; here, the two states are Hide and Static. Hide represents
the state of the NAT device where any number of internal hosts assigned with private
IP addresses can be allowed access to the Internet via a single valid address assigned
to the NAT’ing device.
As shown in Exhibit 2-12, each internal system has its own private IP address.
However, as the communication is forwarded to the Internet, the traffic assumes the
IP address of the router’s external IP address. Any remote system will see traffic
originating from the router and not the internal systems. The router maintains a table
of associations and state information to properly forward incoming packets to the
appropriate internal system. The layers of operation within TCP/IP allow several
instances communications. For example, if three internal users are accessing the same
Web page at the same time, the remote Web server will establish three separate
sessions with the same IP address — that of the router. The robustness of TCP/IP and
the relationships between the layers of operations allow seemingly complicated trans-
action to happen nearly effortlessly.
The other state of NAT is Static. Static is a direct coloration of a single internal IP
address to a single external IP address. This is simply a Hide NAT for a single box and
nearly eliminates the need for a state table.
As shown in Exhibit 2-13, the communication is coming from the external system
wishing to access services on System #1 on the internal network. In the example, the
remote system is attempting to communicate with a virtual address. A virtual address
is an IP address that is not necessarily associated with an interface or MAC address.
However, the router has been configured to accept any packets for that IP address.
Note: It is possible to have Static and Hide NAT at the same time on
the same device performing the NAT operations.
Network Address Translation is responsible for several operations and each depends
on the protocols and communication being established.
upper layers are encapsulated in PPP frames. If the roaming user were to travel to a
remote location and call the home office’s RAS system, the cost could be overwhelm-
ing. If the roaming user dials an ISP, the connection still will not work. The PPP
session to the ISP is terminated at the ISP and the network layer is used for commu-
nication throughout the Internet using an IP address assigned by the ISP, which is
not valid for communications on the home office network that uses IPX/SPX. Ideally,
the roaming user can call a local number that provides access to the home office.
In L2TP, there are two primary systems within the communication. The L2TP Access
Concentrator (LAC) acts as an L2TP peer and provides PPP connectivity. The second
participant is the L2TP Network Server (LNS), which provides the logical termination
point for the PPP session and is the L2TP endpoint.
The LAC can operate in two modes: remote and local. As detailed in Exhibit 2-16,
in a remote configuration, a client uses the phone system to dial an LAC and establish
a PPP session. Through various authentication methods, either by the phone number
used or simple authentication, the provider determines that that the client wishes to
connect to the home office, which houses an LNS.
The LAC then encapsulates the PPP frames into IP packets and forwards them across
an IP network to the corporate LNS. It is important to know that the IP network can
be a Frame Relay cloud, ATM, wireless, Internet, or any IP-based network. The LNS acts
as the new termination point for the PPP frames, allowing the remote client to interact
with the LNS directly within Layer 2. The LNS de-encapsulates the PPP frames from the
IP packet, and then simply operates as if the remote system had dialed directly into the
home office.The PPP frames are processed and the IPX/SPX is injected into the network
and operates as if the client were directly connected. In a local design, the LAC is a
service or client package loaded on the laptop that encapsulates the PPP frames into
IP packets prior to sending them across the Internet. Exhibit 2-17 reveals that in this
case, the client establishes an IP session with an ISP, encapsulates the PPP frames in an
IP packet with the source being the address assigned by the ISP and the destination is
the Internet IP address of the home office’s LNS. The LNS acts as the PPP termination
point, allowing the communication to operate as if the user had dialed directly into the
network.
Understanding the original goals for which L2TP was designed, it is easy to see how
the encapsulation of information can be applied to many scenarios and not just PPP. L2TP
can be used to transport Layer 3 protocols only over networks that the originating
technology could not communicate over under normal conditions. Simply forego the
Layer 2 data, such as PPP, and encapsulate the protocol and forward it as normal.
However, there is one major aspect that is absent from the preceding description:
security. L2TP provides no security services, and any communication that leverages
L2TP over a public network is open to various forms of attack, not the least of which
is a lack of confidentiality resulting in no privacy.
Layer 3
General Routing Encapsulation (GRE) is the process of encapsulating various protocols
into a new protocol packet that can be sent over an environment not traversable by
the originating protocol. A good example is IPX/SPX protocol; it cannot interact with
the Internet, which is TCP/IP based. The answer is to encapsulate the IPX/SPX protocol
into an IP packet and forward it to a destination that can de-capsulate the original
protocol and forward it based on its attributes. This is much like an inter-office letter
that may get placed in a new envelope to be sent by a public service to another office
of the same company. Once the public envelope is removed, the internal office mail
can be routed through to its final recipient via the private addressing scheme.
Layer 3 tunneling operates completely at Layer 3 and does not typically interact with
Layer 2. There are some cases where Layer 2 functions are processed to enhance upper
layer connectivity. IPSec is an example of a Layer 3 virtual network protocol.
Upper Layers
There are several existing security services that have been leveraged to provide a VPN-
quality connection over public networks. These are referred to upper layer VPNs and
typically operate at the application and session layers. There are several examples,
including SSL, SSH, and SOCKS.
Secure Shell (SSH) is a derivative of the remote administration UNIX utility SH. SSH
uses encryption to establish a private TCP/IP session from a host to a server to allow
for secure administration. It soon became clear that any type of data could populate
the data portion of the encrypted packet. Now, several VPN solutions leverage the SSH
protocol to accommodate VPN connectivity.
Aventail SSL VPN Solution. A good example of the new direction of SSL-based VPNs
is Aventail. Aventail is a VPN product that is primarily designed for remote access and
uses a sophisticated client to generate tunnels into the home network. The client
operates low enough in the protocol stack to provide security services to upper layer
applications without requiring changes to those application, exactly what IPSec accom-
plishes. However, many of the technical similarities stop cold at that point.The solution,
at least from the client side, is based on a simple configuration file (.cfg) that can be
generated by a configuration tool on the client and easily distributed via normal com-
munication channels.
Following are some descriptions and exhibits that show how a VPN is configured
using Aventail based on SSL.This book, of course, is about IPSec VPNs, and SSL represents
the furthest from IPSec one can imagine, from a technical perspective. However, by
including discussions about other solutions that are popular and successful in the VPN
market, the reader is exposed to other options and can identify similarities in the aspects
of VPNs regardless of the underlying support protocols. Simply stated, knowing more
is good; understanding commonalities is better.
As with any VPN solution, one must configure servers and networks, the foundation
of a VPN. What to encrypt and where to send it are the building blocks of secured
communications.
First, one must create a secure server object that represents the final destination of
encrypted packets — the security gateway. There can be several VPN gateways defined
that reside on many networks and provide various services to internal networks, systems,
and services — just like IPSec. Exhibit 2-18 depicts the creation of a server by giving it
a common name that can be easily identified in the configuration tool. The actual
identification is provided by an IP address or fully qualified domain name. The port
number should look familiar — 443 is SSL. While other ports can be used, 443 is the
most common, due to the nature of the VPN. There are different versions of proxy
protocols that can be established with the remote VPN gateway by the client. SOCKS
v.5 is the most robust of the available and provides a great deal of flexibility.
Once the VPN device has been identified, configured, and is represented by an
object, a network object can be created. When creating a network object, the VPN
device is not identified. The goal is to define several servers and network objects and
align them at a later point in the configuration. As mentioned before, everything so far
is common among nearly every VPN solution with varying degrees of control and
customization, as one would expect. However, the core components are identical.
As shown in Exhibit 2-19, there is not much to defining an object. This has been
described as a network object because that is how it is used in the example, but a
single host or a range of addresses can be defined to provide granularity. Remember
this aspect of granularity in destination definition because later in the configuration one
will be able to limit the services and ports. In the example, it will have the destination
as networks, but one can configure it to the actual system’s IP address.
The next major step it to associate the network, or system, object with permitted
(or denied) services and the destination VPN system. At the top of Exhibit 2-20 there
is a dropdown list of all the created objects that can be selected for this particular rule.
Once the target is identified, one can define the applications to associate with the rule.
Once the application has been configured, or the option to protect all traffic is
selected, the rule must have an action defined. The three states of action should look
familiar — they are identical to IPSec. If traffic matches the rule, one can configure the
rule to do one of the following: apply protection and forward it to the defined gateway,
deny the packet, or simply pass the data to the Internet as normal.
Once the rule is defined, is can be combined with other rules and placed in a specific
order to define a high state of granularity in the identification and control of traffic.
Exhibit 2-21 provides a list of different rules with varying services being allowed. There
is one added entry at the bottom that would not normally exist, but was added to
convey a point. Of the bottom two entries, only one should exist to capture the
remaining traffic.
The first of the two entries is a very typical addition for many currently installed
implementations. By stating “everything else,” representing all destinations other than
the one defined in other rules, “ALL” represents the services to be identified, and finally
the “NONE” is to specify the VPN gateway. In this case, there is no gateway defined,
resulting in a split tunnel-like solution (which is detailed later).
The last rule states nearly the same thing; however the destination is the VPN
gateway. In this scenario, all traffic will go to the VPN gateway, resulting in a single
tunnel-like solution.
Aventail provides several different types of authentication for remote user access. A
major aspect of SSL VPNs, when compared to IPSec, is that there is a lot more flexibility
available in the authentication process (see Exhibit 2-22). However, it is important to
know that IPSec is designed to be a global protocol that operates regardless of the
implementation, and just as TCP/IP typically works between UNIX, Macintosh,Windows,
among others, IPSec is vendor independent.
Exhibit 2-22 reveals a couple of interesting options. Available ciphers, a fancy word
for encryption, allow the administrator to select DES or RC4 for encryption. Many
people who like Aventail more than IPSec solutions typically forget that many more
keys are used for IPSec, and DES is the lowest encryption supported. Therefore, per-
formance can sometimes be better with SSL-based solutions, but most of the perfor-
mance increase is due to the limited negotiation of policy, limited protection of the
negotiation, and the size of the keys for the encryption. In short, it can be faster than
IPSec due to the reduced communication requirements.
There are several levels of complexity and optional operations supported by IPSec
that are not attainable when using modified upper layer security protocols. Many of
the similarities to IPSec revolve around tunneling and providing remote access solu-
tions that terminate the connection destined for internal resources, much like L2TP.
The differences begin when it is necessary to nest or combine communication
options, or provide identity protection, message integrity, and security levels to
various points along the VPN.
Cryptography
It is impossible to discuss IPSec VPNs without understanding the fundamental con-
cepts of cryptography. IPSec standards currently define several types of encryption
that can be used (DES, 3DES, RC5, IDEA, CAST, BlowFish, 3IDEA, and RC4) to protect
information. However, in implementation, DES and 3DES are predominant, with very
few solutions providing other encryption technology. TimeStep is one of the few
available solutions that provides IDEA, Blowfish, CAST, and RC5.
IPSec also employs message authentication codes (MD5, SHA-1, and TIGER) to
provide message integrity. To add to the several layers of complexity that this book
delves into, IPSec supports several standards for authentication.There are three primary
types of authentication within IPSec: shared secrets, public key cryptography (and a
Encryption
Encryption, simply stated, is the conversion of plaintext into unintelligible ciphertext.
Typically, this is achieved using a key and an algorithm. The key is combined with the
plaintext and computed with a specific algorithm.
There are two primary types of encryption keys: symmetrical and asymmetrical.
Symmetrical. Symmetrical keys are used for both encryption and decryption of the
same data. It is necessary for all the communication participants to have the same key
to perform the encryption and decryption. This is also referred to as a shared secret.
Hash Function
Hash functions are computational functions that take a variable-length input of data and
produce a fixed-length result that can be used as a fingerprint to represent the original
data. Therefore, if the hash of two messages are identical, it can be reasonably assumed
that the messages are identical as well.
type of cryptographic function that can be used in the process is the reason that
HMAC is so popular.The standard treats the hash function as a variable that can consist
of any hash algorithm. The benefits are that legacy, or existing hash implementations
can be used in the process, and the hash function can be easily replaced without
affecting the overall functionality or solution. The latter example represents an enor-
mous security advantage. In the event the hash algorithm is compromised, a new one
can be immediately implemented, eliminating the threat.
IP Security Primer
History
In October 1993, John Ioannidis of Columbia University and Matt Blaze of Bell Labora-
tories presented a case for IP layer security, appropriately entitled, “The Architecture
and Implementation of Network Layer Security in UNIX.” This paper represented a
change in the application of security and communication, and was well ahead of its
time. The paper discussed how to implement security features without altering the IP
structure, and went on to discuss implementations of encapsulating IP datagrams in a
new IP datagram. It also detailed the advantages of encapsulating protocols and authen-
tication processes and the transparency that can be provided to upper layer activities.
Given the massive growth of the Internet, combined with the inherent security
weaknesses of the TCP/IP protocol, the industry was in great need of a technology to
provide security of data on the Internet. In 1994, the Internet Architecture Board (IAB)
issued a report on “Security in the Internet Architecture” (Request for Comment [RFC]
1636).The report stated the general consensus that the Internet needed more and better
security, and it identified key areas for security improvements. The IAB also mandated
that the same security functions become an integral part of the next generation of the
IP, IPv6.
Standards-based VPNs, as known today, started in 1995 with the AIAG (Automotive
Industry Action Group), a nonprofit association of North American vehicle manufactur-
ers and suppliers, and their creation of the ANX (Automotive Network eXchange)
project. The project was spawned to fulfill a need for a TCP/IP network comprised of
trading partners, certified service providers, and network exchange points. The require-
ment demanded efficient and secure electronic communications among participants,
with only a single connection over unsecured channels. As this technology grew, it
quickly became recognized as a solution for any organization wishing to provide secure
communications with partners, clients, or any remote network.
Structure
IPSec is defined by several RFCs that detail the many layers of the technology. Some
RFCs detail specific portions of the protocol, while others address the solution as a
whole. The interrelationship and organization of the documents are necessary for
understanding the development process of the overall standard.
Exhibit 3-1 illustrates the seven groups of documents that allow the separate aspects
of the IPSec protocol suite to be developed independently while providing a functioning
relationship that can be easily managed.
ESP AH
Protocol Protocol
Encryption Authentication
Algorithm Algorithm
DOI
Key Management
1. The architecture is the main description document that covers the overall tech-
nology concepts and security considerations. It is a starting point for an initial
understanding of the IPSec protocol suite and the RFCs that define the standard.
2/3. The encapsulating security payload (ESP) and the authentication header (AH)
protocol documents detail the packet formats and the default standards for
packet structure.
4. The encryption algorithm documents detail the use of various encryption tech-
niques utilized for the ESP.
5. The authentication algorithm documents describe the processes and technolo-
gies used to provide an authentication mechanism for the AH and ESP protocols.
6. All of these documents specify attributes that require a value to be assigned and
consolidated for proper interaction between the RFCs and other IETF-defined
protocols. The domain of interpretation (DOI) specifies the numbers that iden-
tify certain aspects within each RFC. The DOI document is part of the IANA-
assigned numbers mechanism and is constant throughout the standard. It pro-
vides the central repository for values, allowing other documents to relate to
each other. The DOI contains parameters that are required for other portions
of the protocol to ensure that the definitions are consistent.
7. The final group is key management, which details the standards defining key
management protocols.
RFCs
Request for comments (RFCs) are documents that define an accepted technological
form and suggest implementation details. RFCs must first be submitted as a draft to the
Internet Engineering Task Force (IETF) for peer review. The IETF is segmented into
groups that are responsible for certain projects. Although the final conversion of a draft
to an RFC to become a standard is governed by the IETF, anyone can participate in the
review process and provide points of view and comments.
1. client to network
2. network to network
3. client to client
Authentication Header
The authentication header (AH) is used to provide data integrity and origin authentica-
tion for IP datagrams and optional protection against replay attacks. The AH provides
authentication for much of the IP header and for upper level protocol data contained
within the datagram. Not all of the IP header can be authenticated, due to the fact that
some header fields might change in transit and the value when the packet arrives may
not be the same as when sent.
ESP can be used to provide many of the same security services — plus confiden-
tiality service. The primary difference between AH and ESP is the authentication
The first operation is to simply pass the packets unmodified by IPSec. The second
action that can be performed is to apply IPSec to the data stream and forward the
packets according to the IPSec policy configured for that data. Finally, the packets can
be simply dropped. Dropping the packets allows the VPN device to perform minimal
firewall capabilities and reduce vulnerabilities. In many cases, a VPN device will not
accept any packet that is not properly constructed for a VPN.
Internet Key Exchange. Internet Key Exchange (IKE) is the automatic key manage-
ment protocol used for IPSec. IKE was created from several other key management
protocols and is the default for IPSec, but other key management protocols can be used.
In reality, no key management is required for IPSec functions and the keys can be
manually managed. However, manual key management is not desirable for all imple-
mentations due to the administrative overhead and the fact that keys never expire.
Having keys that never expire represents a plethora of security vulnerabilities.
Included in the group of IPSec RFCs is a document defining a key management
process called Internet Security Association Key Management Protocol (ISAKMP).
ISAKMP is not IPSec specific, but provides the framework for creating SAs for any
protocol that can take advantage of them. ISAKMP provides the structure for authenti-
cation and key exchange but does not define the information for using ISAKMP. ISAKMP
is designed to be information exchange independent, allowing support for many differ-
ent key exchanges. ISAKMP is used as part of the IKE process, and along with other
existing key management protocols, defines the keys to support automated key man-
agement.
This can be very confusing because many people use the terminology interchange-
ably. To simplify the definition, the automatic key management provided for IPSec is
IKE and IPSec Relationship. The best way to think about IPSec and IKE is compare
them to PKI and the use of Certificates. Certificates, by themselves, are quite simple
and can be used for encryption, signing, authenticating, and a multitude of other
services. IPSec is similar to the application that uses the Certificate to execute the
desired actions, such as signing an e-mail message. Simply stated, the application is
virtually unaware or concerned about the maze of trusts and policies governing the
entire PKI from which the Certificate was created. IPSec is much like the application
that uses the Certificate, and IKE is much like the PKI that creates and manages the
Certificate. Inevitably, IKE is more complicated and subject to constant functionality
and security concerns. IPSec is more concerned with properly implementing the secu-
rity services and maintaining various forms of communication options.
Cryptography
History
Throughout history, communication methods have been coupled with developments
in the science of cryptography. The evolution of cryptography is interesting to say the
least. Some of the early versions of information confidentiality practices were the Caesar
cipher, a process of substituting a letter in a message with another letter in the alphabet
three places down.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
Other early examples included the Roman stick, a strip of paper wrapped around
a stick of certain diameter and the message written across the wrapping. Once the
paper was unrolled, the letters and symbols were unintelligible. Secure battlefield
communications during World War I were nearly nonexistent. The U.S. Army employed
Choctaws to encrypt voice communications, using their native language, which itself
is encoded. During World War II, the U.S. Marine Corps took the Army’s work and refined
it and only used Navajos to convey field communications. The Native Americans were
referred to as Codetalkers and were an integral part of secure communications. Also in
World War II, the German Enigma was a highly complex device that came in several
forms. It was based on a code that defined the placement of three or five wheels,
depending on the model. The operator would type in the message normally, but elec-
trical circuits were formed, based on the position of the wheels, that produced an
output of different character. Despite the sophistication of the German Enigma, equal
accomplishments in cryptanalysis — the technique of determining the original message
content when only the cipher text was supplied — provided the American and European
forces with access to sensitive enemy information.
Symmetrical Encryption
Symmetrical key encryption occurs when the same key is used for the encryption of
information into unintelligible data (or ciphertext) and the decryption of that ciphertext
into the original information format. Symmetrical keys, as shown in Exhibit 4-1, can be
cumbersome to implement and typically require extensive key management in the
protection of the key. If the key used in symmetrical encryption is not carefully shared
with the participating individuals, an attacker can obtain the key, decrypt the data, view
or alter the information, and encrypt the data with the stolen key and forward it to the
final destination. This type of attack is defined as a man-in-the-middle attack and, if
properly executed, can affect data cnfidentiality and integrity.
AES. In January 1997, NIST announced the initiation of AES development and made a
formal request for proposed algorithms in September of that year. The endeavor stated
that AES would become an unclassified, publicly disclosed encryption algorithm, avail-
able free of charge worldwide. In addition, the algorithms for consideration must be
based on symmetric key cryptography (e.g., DES) as a block cipher, and minimally
support block sizes of 128 bits and key sizes of 128, 192, and 256 bits.
The goal is to develop a FIPS specification that defines an algorithm capable of
protecting sensitive information for the foreseeable future. The algorithm is expected
to be used by government as well as the private community.
In August 1998, NIST announced a group of 15 AES candidate algorithms at the First
AES Candidate Conference (AES1). A Second AES Candidate Conference (AES2) was held
in March 1999 to discuss the results of the analysis conducted by the cryptographic
community on the proposed 15 algorithms. Once all the comments and suggestions
were compiled, NIST identified five final qualifiers for the AES initiative.The AES finalists
were MARS, RC6, Rijndael, Serpent, and Twofish. As the NIST hosts more candidate
conferences, the final five will be reduced to one algorithm that will become AES. If all
steps of the AES development process proceed as planned, it is anticipated that the
standard will be completed by the summer of 2001.
Once AES is made available, the IPSec market will quickly shift to implement the
new algorithm.* The sales aspects will be obvious: increased security and performance.
AES is much faster than DES, and once applied to IPSec, communication issues such as
latency and throughput will be greatly reduced.
MARS. MARS is a candidate developed by IBM and supports 128-bit blocks and
variable key lengths up to 448 bits. As with all the AES candidates, it is designed to take
advantage of current processor designs, whether integrated onto the processor itself
or implemented via software operations.
* In October 2000, NIST selected the Rijndael data encryption algorithm as the new AES. Immediately,
dozens of companies avowed their support for AES and announced products that implemented it.
RC6. RC6 was developed by RSA (Rivest, Shamir, and Adleman) and is an evolution-
ary step from RC5. As with MARS, RC6 employs a second internal round, (or core
round), which is similar to the half-round used in RC5. The AES block size requirement
is 128 bits, and reorganizing RC5 to accommodate the enlarged blocks forces 64-bit
registers because RC5 used two processing registers. The result was to develop a new
algorithm based on RC5 that used four 32-bit registers to support the 128-bit block.
One of the primary factors taken from RC5 was the dependence on data-dependant
rounds to create acceptable diffusion. An added process is integer multiplication used
against the rounds to enhance the diffusion process creating a more robust ciphertext.
Rijndael. This algorithm was created by Joan Daemen and Vencent Rijmen, uses a
128-bit block, and supports keys of 128, 192, and 256 bits. Unfortunately, the algorithm
is highly complex and it is difficult to provide a simple explanation of the foundation
of the process because much of it is newly developed.
The algorithm obtains much of the diffusion from S-box manipulation in several
instances of rounds performed. The process is primarily based on a process called
iterated block cipher.
Serpent. Serpent was developed by Ross Anderson, Eli Biham, and Lars Knudsen,
supports a 128-bit block cipher, and uses a 256-bit key. Serpent is directly based on DES
and employs the well-known S-box process for diffusion.
The inventors decided to use well-tested and known technologies found in DES and
then slightly modify the process to achieve enhanced performance.The greater security
is obtained through a larger key size. The primary changes to DES were a modified S-
box process and key schedule.
For the most part, Serpent is DES with a larger key refined to operate faster on
current technology.
bits would require two instances of an encryption process, making public key ineffi-
cient for bulk data encryption. The advantages are so great with the use of a key pair
that the authentication properties can be obtained while only processing small pieces
of information, such as a hash.
An example of public key cryptography, as shown in Exhibit 4-2, is Alice could
encrypt a message with Bob’s public key and send the ciphertext to Bob. Because Bob
is the only one with the matching private key, he would be the only recipient that could
decrypt the message. However, this interaction only provides confidentiality — and not
authentication — because anyone can use Bob’s public key to encrypt a message and
claim to be Alice.
To provide authentication, Alice can use her private key to encrypt a message digest
generated from the original message, and then use Bob’s public key to encrypt the
original cleartext message and send it with the encrypted message digest.After receiving
the message, Bob can use his private key to decrypt the message. The output can then
be verified by using Alice’s public key to decrypt the message authentication that Alice
encrypted with her private key. The process of encrypting information with a private
key to allow the recipient to authenticate the sender is called a digital signature. An
example of this process is detailed in Exhibit 4-3.
A traditional signed document is difficult to repudiate due to several attributes the
documents has, for example, the document is difficult to forge. However, the ability
to change the verbiage of the document to modify the agreement without consent
of the original person who signed the document is quite feasible. For this reason,
documents are typically copied a great deal and maintained in a secure location.
Unfortunately, the Internet is a very public medium and the exposure to various forms
of forgery, duplicity, and modification abound.
A digital signature must not only be difficult to repudiate, but it must also protect
the integrity of the information being signed. If exposed to the Internet, it is necessary
to protect against any test getting added, changed, or removed.
There are two primary types of digital signatures, one based on encryption and
decryption (e.g., RSA) and the other based on a mathematical validation of generated
information that can only be duplicated by the corresponding key. Digital Signature
Algorithm (DSA) is very similar to RSA in that two keys are generated to allow the
sharing of authenticated information without any preexisting relationship. RSA uses a
private key to encrypt a block of specific data, such as a hash; and the authentication
is solely based on the recipient’s ability to decrypt that hash with the corresponding
public key. The authentication is encryption and decryption based. On the other hand,
DSA is designed just for digital signing of data and performs a mathematical operation
that creates two 160-bit values that become the signature.The authentication is attained
What Is PKI?
The purpose of Public Key Infrastructure (PKI) is to manage asymmetrical keys and
their associated Certificates. PKI provides a variety of capabilities for use in electronic
business and communications. By the use of encryption, PKI provides confidentiality
and access control. By leveraging digital signatures, PKI provides trusted authentication,
data integrity, and non-repudiation.
Trusted authentication is whereby users can securely identify themselves to other
users or systems without sending private information over a network. Data integrity is
provided by message authentication algorithms. This means that the verifier of a digital
signature can easily determine if the data has changed in transit. Non-repudiation is
when the user who signed the data cannot successfully deny signing the data.
PKI is the process of providing transparent security services based on trust and uses
Certificates for secure communications. A Certificate is a public key signed by a third
party, typically a Certificate Authority (CA). A CA maintains several aspects of PKI and
signs an issued public key with its private key, permanently associating the Certificate
and the public key pair to the CA.
Effective PKI
To maintain an effective PKI, there are a number of requirements that must be met to
ensure proper implementation. The most important aspect of PKI is transparency. PKI
users do not need to understand how PKI functions, but they must understand that the
Certificates and keys are available and operate as expected. Other than this basic
requirement, the following chapter sections provide some insight into PKI and Certif-
icates.
Third-party Trust
Third party trust refers to a situation in which two individuals implicitly trust one another,
even though they have not met or shared information. They trust each other because
they each trust a common third party that vouches for the two participants. As illustrated
in Exhibit 4-4, a CA can provide Certificates to two individuals who establish a trusting
relationship based on the relationship they have individually with the CA.
Alice Bob
third-party trust
It is important to understand that the trust the users have in the CA is paramount.
If a CA issues Certificates to anyone who asks, then a user provided with a Certificate
from that CA trusts…, well, anybody. Because the CA is the only person who has access
to the private key, the impersonation of a CA to issue bogus Certificates requires control
over the CA or the private key. It is this very fact that CAs are well-protected physically,
and in some cases taken offline for true protection (explained more later). The use of
the CAs private key also inherently links the CA to the Certificate. Therefore, the issued
Certificate provides non-repudiation of the CA. The CA cannot deny issuing the Certif-
icate.
PKI Requirements
Certificates are associated with PKI, but Certificates are not the end of PKI. PKI is an
enterprise service comprised of several layers of services that conspire to provide a
coherent authentication and protection suite.
Public Key Certificates. Certificates ensure that the keys and identity of the bearer
are valid by means of a third-party trust. CAs are people who and systems that create
Certificates and bind them to the identified user. Certificates are a digitally signed
collection of specific information. That information consists of the distinguished name
of the user, the user’s public key, the lifetime of the Certificate and associated keys,
and what the supported operations of the Certificate are. Certificates can be used to
encrypt data, digitally sign data, or provide both. Given the implementation and support
for Certificates within an organization, nearly anything is possible with Certificates. An
example is W2K PKI and the use of certificates or anything from Encrypted File System
(EFS) control and recovery to authenticating clients, servers, and domain controllers.
The ability to securely align an entity with specific information represents unlimited
possibilities in the information age.
Certificate Revocation (CRL). The most overlooked and underrated aspect of PKI
is the Certificate revocation process. During the verification of a Certificate, there are
several points of interest; of course, one of them is ensuring that the CA has not revoked
the Certificate. If the Certificate has been revoked by the issuer, then trusting the
Certificate should be avoided.
A Certificate revocation list is simply a list of the Certificates that the CA no longer
supports or recognizes. As one can imagine, in the lifetime of a PKI solution, there will
be many revoked Certificates. Managing the list and ensuring it is available for anyone
attempting to validate a Certificate is paramount.
There are several reasons for revoking a Certificate: the validity time expired, the
key was compromised, or employee dismissal.
Key Backup and Recovery. Certificate and key backup and recovery are necessary
in the event the originals are lost or used and disposed. If a user loses a key or Certificate,
and there is data encrypted with information, recovering the key can be very important.
This is also important for a darker purpose. Information security is more than just
fighting vulnerabilities; it includes ensuring the availability of data and ensuring its
integrity. With the advent of encryption, there have been situations in which individuals
have encrypted data and disposed of the keys. At that point, if there is no copy of the
key for decryption, the data is lost. This is a reality that organizations must take into
consideration; and therefore, a proper PKI solution must contain a key backup and
recovery process.
Some people associate key backup with key escrow. A key escrow is where a third
party, which was not involved with the creation of the Certificates or keys, is provided
with a copy. Most people associate this process with the government and encryption
laws and restrictions. A recovery and backup process on the issuing CA is necessary
for proper enterprise security management. For that reason, the CA must maintain a
backup. This is another reason for properly securing the CA system.
However, keys and Certificates used for signing purposes only are not backed up.
The entire premise of digitally signing data is that no one else has a copy of the signing
key. If the key is lost, a new one is simply issued and the user continues with the new
keys. This has no effect on the availability of data, because signing keys cannot be used
for encryption; as a result, there is no threat to the organization’s data.
Non-repudiation. Non-repudiation is when the user who signed the data cannot
successfully deny signing that data. Similarly, a CA cannot deny issuing the CA. Non-
repudiation includes that someone cannot deny involvement in a transaction.The entire
process is established by the privacy of the signing key.
Automatic Update of Certificates and Key Pairs. Keys should not be used for
extended periods of time. The longer the key is in use, the greater the exposure to
Key History. When keys are renewed, the keys that were replaced must be maintained
for a period of time, due to the existence of data associated with the replaced keys.
This is not the same as the backup and recovery of keys, which are geared toward the
current keys being used. Key history is concerned with valid keys that have expired.
Message Authentication
As data is shared across untrusted networks, the opportunities for unauthorized inter-
action with the session are numerous. Of the many attacks that communications are
vulnerable to, message authentication addresses a portion of the vulnerabilities. Message
authentication is used as a tool to combine various communication-specific data that
can be verified by the valid parties for each message received. Message authentication
alone is not an appropriate countermeasure; but when combined with public key
encryption, it can protect against various types of attacks.
Message authentication provides a means to enhance aspects of communication
security. A message “fingerprint,” called a digest, can be created in several ways, ranging
from simple bit parity functions (hash), to utilization of encryption algorithms (DES-
CBC-MAC), to complicated hybrids (HMAC). This fingerprint cannot only be used in to
ensure message integrity, but given the inherent process of message reduction, it lends
itself to signature processes.
Authentication Basis
To authenticate a message, an authenticator must be produced that can be used later
by the recipient to validate the message. An authenticator is a primitive, reduction, or
representation of the primary message to be authenticated.There are two primary types
of authenticators:
g ciphertext
g message digest
Check
certificate Check for
type certificate trust
lists.
No No
Valid type? Certificate
Yes Yes trust lists
exist?
No No
Valid dates? Certification
Yes Yes authority
listed?
No No
Integrity Is this use
checks? Invalid authorized? Invalid
Yes certificate Yes certificate.
No
Certification
authority in
Yes trust chain?
Valid certificate
Consider a very basic encrypted communication example: a message sent from Alice
to Bob encrypted with a shared secret. If the secret’s integrity is maintained, confiden-
tiality is ensured by the fact that no unauthorized entities have the shared secret. Bob
can be reasonably assured that the message is valid because the key used is secret.
Hash Functions
Hashing information to produce a digest will allow verification of the integrity of the
transmitted data. To illustrate the process, Alice creates the message, “Mary runs every
morning.” Alice then hashes it to produce a smaller, fixed-length message digest,
“AF43E7.” Alice transmits the original message and the hash to Bob. Bob hashes the
message from Alice and compares his result with the hash received with the original
message. If the two hashes match, it can be assumed that the message was not altered
in transit. If the message was changed after Alice sent it and before Bob received it,
Bob’s hash will not match, resulting in the loss of message integrity. This example is
further detailed in Exhibit 4-8.
There are several caveats and layers of protection that have not been included. This
simple representation is to explain the concepts of hash functions. It can be easily
argued that an attacker could simply intercept the message, create a new one and
corresponding digest, and forward it to the final destination. It is necessary to remember
that hash is used as part of the overall process of message authentication and verifying
data integrity. By no means can it provide robust security based solely on its own merit.
examples that support the use of message digests, sometimes used in combination with
public key cryptography, over the use of encryption.
Performance. Cryptographic hash functions, such as MD5 and SHA-1, execute much
faster and use less system resources than typical encryption algorithms. In the event
that a message only needs to be authenticated, the process of encrypting the entire
message, such as a document or large file, is not entirely logical and consumes valuable
system resources. By producing a message digest that is exponentially smaller than the
original message and then encrypting the digest, time and effort are saved.
Diffie-Hellman
Symmetrical encryption, as explained earlier, is when the same key is used to encrypt
and decrypt data. To establish communications with a remote system, the key must be
made available to the participants for encryption and decryption purposes. Some inter-
esting security issues include: how does one provide a key to the other systems without
exposing it to unauthorized individuals? Better yet, what if there is no predefined
relationship with desired communication peer? The answer to these questions and the
hundreds that follow is that one can send a representation of the key that can be verified
and used to create the final symmetric key. This action sounds much more simple than
it is, but administrative interaction is limited and user interaction is nonexistent. The
process is integrated into many applications and happens automatically. However, know-
ing the details will allow us to appreciate IPSec operations and the protection it provides
by the intricate message content and timing.
In 1976, two mathematicians, Bailey W. Diffie from Berkeley and Martin E. Hellman
from Stanford (California), defined the Diffie-Hellman Agreement Protocol (also known
as exponential key agreement) and published it in a paper entitled, “New Directions in
Cryptography.” The protocol allows two autonomous systems to exchange a secret key
over an untrusted network without any prior secrets. Diffie and Hellman postulated
that the generation of a key could be accomplished by fundamental relationships
between prime numbers. This allows communication of a symmetrical key without
transmitting the actual key, but rather a mathematical portion or fingerprint.
An example of this process is system A and system B requires keying material for
the DES encryption for the SA. Each system acquires the Diffie-Hellman parameters:
With these three numbers (p, g, X), a new value can be generated that is unique to the
system. The numbers p and g must be hard-coded or retrieved from a remote system
because large prime numbers are difficult to generate.
As shown in Exhibit 4-12, a new public value is generated with these numbers,
g X mod p. The result Y, or fingerprint, is then shared between the systems over the
untrusted network. The formula is then exercised again using the shared data from
the other system and the Diffie-Hellman parameters.The results will be mathematically
equivalent, regardless of the value of the Diffie-Hellmann parameters, and can be used
p p
g g
Random# Random#
Xa Xb
g
Xa
mod p = Ya gXb mod p = Yb
Yb
Ya Mathematical
Deduction
Xa Xb
Yb mod p Ya mod p
to generate a symmetrical key. If each system executes this process successfully, they
will have matching symmetrical keys without transmitting the key itself. The Diffie-
Hellman protocol was finally patented in 1980 (U.S. 4,200,770) and is such a strong
protocol that there are currently 128 other patents that reference Diffie-Hellman.
An added feature of Diffie-Hellman is the Station to Station (STS) protocol that
leverages asymmetrical encryption to further protect the Diffie-Hellman (DH) key.
The Diffie-Hellman process has one primary weakness in the standard protocol: it is
vulnerable to man-in-the-middle attacks.
Assume for a minute that an attacker knew that two individuals were going to
establish communications using symmetrical encryption, and could intercept and
control communications between the two peers. Once again, one can use the ever-
present Alice and Bob to explain the relatively simple process. Alice creates the DH
value and sends it to Bob so that Bob can create the necessary key for the following
encrypted communications. Unfortunately, Alice’s DH key is consumed by the
attacker and denies it from Bob, but sends his own DH key to Bob in place of the
one expected from Alice. Of course, as Bob sends his DH key, the attacker executes
the same process in reverse. The result is that Alice and Bob have established keying
material with the attacker but not with each other. The attacker has become the key
p p
g g
Random# Random#
Xa Xb
Xb
gXa mod p = Ya g mod p = Yb
Pub.B Pub.A
+ Ya = Ya Yb = Yb +
Yb
Ya
Pri.A Pri.B
Yb = + Yb Ya + = Ya
Mathematical
Deduction
Ya = gXa mod p Ya = g
Xa
mod p
Xa Xb
Yb mod p Ya mod p
Exhibit 4-13. Diffie-Hellman Exchange Protocol with the use of public key cryptography
Implementation Theory
10.1.5.0/24
CIR 56k/128k PVC
DLCI 200
DLCI 100
10.1.2.0/24 DLCI 300
WAN Augmentation
In a typical WAN environment, data is routed to the final destination based on the
attributes requested by the communication. If a service is provided in a remote location,
the user application can simply request the service — by providing an IP address and
service port — and the data will be routed across the WAN as if on the same network.
From the point of view of the user, the connection is seamless. VPNs can duplicate this
process and can be much more flexible and, in some cases, cost-effective.
Many organizations start augmenting their WAN environment with VPNs (see
Exhibit 5-4) when the cost of a new PVC to a remote location is simply too expensive.
A good example is a manufacturing company that has several small plants in sparsely
populated, remote locations. To provide Frame Relay service to that location for simple
Exhibit 5-5. VPN providing access to WAN sites utilizing the WAN.
The remote office provided with an Internet connection can be directly accessed
via the VPN using existing services that are currently implemented (see Exhibit 5-6).
Now, as requests from the plant are made for the service, the VPN can automatically
route the data to the office that has the service and alleviate the load on the infrastruc-
ture.
WAN Replacement
The previous example represents one of the many attractive features of VPNs.The ability
to provide new communications, nearly instantly, for no increased financial charge is
an enormous leap over conventional WAN technology.
Compare the previous scenario with a Frame Relay-based topology. All the offices
and the remote plants have Frame Relay connectivity that has some form of cost. Each
plant has a PVC connecting it to the home office. The cost of the PVC is directly related
to the CIR and total port speed allocation. Assume that these costs are equal to the
Internet connection being provided at the sites.
However, a major difference is realized when connection from one plant to another
is required. A new PVC must be purchased and allocated by the provider; this represents
an additional annual cost. Not only are there monetary costs, but there are situations
in which getting a PVC allocated can take excessive time; meanwhile, the existing PVC
is providing a dual purpose by connecting the plants to the home office and commu-
nication between each other. Given the added communication, it can be assumed that
the CIR is being surpassed and the charge of the existing PVC has increased.
For one PVC, this may seem overindulgent and unrealistic. The provisioning of new
PVCs happens everyday for many organizations moving through changes, yet each
scenario represents another PVC. In some organizations, it is necessary to allocate a
PVC for each office connecting it to each of the others. When a PVC exists between
each site, it is called a fully meshed environment (see Exhibit 5-7). In this example,
there are 11 sites that could be fully meshed. A simple formula can be applied to the
number of sites to determine the number of PVCs, n(n – 1)/2, where n is the number
of sites that will participate in the mesh. Therefore, (11 × 10)/2 = 110/2 = 55 PVCs.
This is an extreme example and many organizations have learned how to accom-
modate communications while avoiding a fully meshed environment. However, there
are still many situations in which a partially meshed WAN is necessary.
This example network can illustrate an example of a partially meshed network (see
Exhibit 5-8). The four offices could have a meshed network that consists of six PVCs
that provide connectivity and a form of limited redundancy, while the plants have a
single PVC connecting them to the home office.
Redundancy Concepts. The offices are provided limited redundancy by the fact
there is an alternate route to each of the offices if one were to become unavailable.
In an earlier example, the remote offices maintained connectivity through a single
PVC to the home office. If the home office were to go down, all communications
Reevaluating the WAN. In the above example, the support for a Frame Relay WAN
must be questioned. The plants require very little bandwidth and the cost of providing
a PVC to ten remote locations could become expensive compared to the service usage.
The fully meshed cloud between the offices is required for business information
needs and continuity of service. However, once the Frame Relay PVCs are meshed, each
additional PVC can be considered direct overhead when compared to a VPN. A single
PVC implemented for each site is efficient and cost-effective. VPN connectivity cannot
add much more in the arena of cost and, given the current Internet environment, VPN
does not offer better performance. As the number of PVCs increases, the cost accrued
for each is frivolous when compared to VPNs.
Remote access
Prior to VPN technology, remote access services (RAS) were typically dial-up solutions
that required dedicated equipment and telephones lines for each remotely connected
system. One of the main reasons for the popularity of VPNs is the ability to eliminate
the need to add circuits or equipment to support thousands of remote users.
VPN Revolution
Client-to-network VPNs have eliminated the need for dedicated equipment for each
connection. Now, a single system can support an astounding number of simultaneous
connections. With early VPN products the number of simultaneously supported users
would range from 10 to 50. In a very short time frame, products were developed that
Performance Considerations
There are several discussions that can be waged against the concept of replacing an
entire conventional-based WAN with an Internet-based VPN. Nearly all of them are based
on performance concerns and the ability to support several sites and users through a
single connection to an uncontrolled network.
Of the compelling arguments against VPN, one stands out as the constant: the Internet.
Simply put, the Internet has been labeled as an unreliable, high latency network that
could come or go at anytime. This author can remember in recent history talking with
managers from large organizations who felt that expenditures on a 256K connection to
the Internet were ridiculous due to the uncertainty of the service. As the Internet has
grown, we have become increasingly dependant on the services it provides, but the
thought that the Internet has not grown physically remains.
This is a great irony because the Internet was primarily designed around a concept
of creating a network that has no single point of failure. One can argue that the local
connection to the Internet might fail or be severed, but the same holds true for many
dedicated connections. It is common practice in today’s communication industry to
implement several backup systems or standby connections to provide service if the
primary communication fails. Several organizations spend incredible amounts of money
to simply bury a fiber cable or some form of connectivity on the other side of a building
just to mitigate the risk of digging incidents. Given these two primary, standard practices
and reasoning, why are the same concepts for Internet connections not accepted? For
organizations that rely heavily on the Internet for business, such as ISPs, ASPs, and
DotComs, multiple connections to the Internet are mandatory; but for the enterprise
market, the focus on redundancy communications continues to reside in the WAN.
The reality is that the Internet has grown substantially in reliability and reduced
latency. However, the connection from one ISP to another through many other ISPs
begins to surface as the true straw that is breaking the VPN’s back. The concept of
connecting two sites through a network that is supported by several different vendors
is not a new situation. In some Frame Relay networks, it is necessary for a primary
provider to leverage another to accommodate connectivity to a remote location or a
region not directly supported.This process is sometimes referred to as NNI (or network-
to-network interface), which also represents the protocol for maintaining PVCs between
networks.
Many of the early VPN implementers were not cognizant of the importance of
Internet connections at specific points throughout the design. The result was high
latency and packet loss, ultimately resulting in a major disappointment of VPN perfor-
mance. The importance of selecting a well-designed and established ISP is absolutely
crucial to the success of a VPN. For organizations based in developed countries, the
options are many. Even international long hauls can be realized through Internet-based
VPNs when the relationship between Tier 1 ISPs is properly investigated. Of course,
problems begin to surface when remote locations are identified that do not have
established connectivity to the Internet, and have limited Frame Relay services. Good
examples are South America, Africa, and China, where the environment, economic
status, and vast terrain complicate communications. Getting any form of connectivity
can be challenging in these situations; and when limited bandwidth becomes available,
many companies do not opt to add the complexities and latency associated with low-
tier ISPs and rely on the guarantees of Frame Relay.
An example of the commitment required to fully investigate the Internet connec-
tions and relationships between ISPs can be seen in a client that this author consulted
on an international VPN. The organization is huge; it firmly exists in over 130 different
countries and maintains informational relationships with hundreds of partnering
organizations — including competitors. The Frame Relay costs were unimaginable; a
The Security
It is one thing to blame a network for poor overall performance, as with the Internet.
However, add to the latency of basic communications the overhead of securing data,
and it quickly becomes very clear that performance is impacted by the fundamentals
of VPN. Encryption, authentication, data integrity, key management, and basic protocol
maintenance all add up to create overhead that directly impacts the performance of a
VPN solution.
Throughout this book, there is ongoing discussion of the details of IPSec and the
various operations performed to protect information about the peers, as well as what
information is being shared. Of all the services, encryption is typically the focal point
of many vendors and implementers.
Message authentication usually leverages very fast one-way operations that have been
optimized for performance and have a little overall impact on the VPN. Authentication
and key management have significant associated costs, but operate at the beginning of
the session and intermittently throughout the life of the VPN. It is agreed that encryption
represents the bulk of the performance degradation within a VPN, and there are several
factors that affect this determination and several situational remedies.
When in doubt, throw a processor at it. For many solutions, the addition of dedicated
processors for the sole purpose of encrypting data provides enough cycles to reduce
the load of the required overhead. In many circumstances, the system limitations
become communication hardware and not the processing of data. A VPN gateway that
has a 10/100 Ethernet card on one side and a T3 interface on the Internet side can be
designed to handle 100 Mbs throughput, but one of the interfaces only supports half
the system’s capabilities.
The System
It is the details of hardware support for encryption that leads us into performance
considerations for the three primary implementation types.There are dedicated hardware
Authentication
Authentication as a model is very simple: prove your identity. In
practice, the concept turns into complex protocols and processes
designed to ensure that not only all the authentication information
is valid, but protecting that information as well. This chapter
details the available authentication mechanisms supported by
IPSec and exposes the intense complexity of remote user authen-
tication and the lack of a standard to build upon.
IKE, the automatic key management protocol that supports IPSec SAs, provides several
different types of authentication for the systems that provide the termination points of
the SA. There are four authentication methods within IKE that provide various options
to the peers:
1. pre-shared secret
2. digital signature
3. public key encryption
4. revised public key encryption
Each authentication method provided by IKE has various advantages and disadvan-
tages; but by making options available to the peers on the type of authentication, greater
flexibility is obtained.
The authentication provided by IKE establishes a relationship between the two peer
“systems.” That is, in the case with remote users, there is no explicit option for the user
to be authenticated via IKE — as of yet. Remote user support represents an enormous
area of contention.Collaboration and general discussions have reached such a flurry that
the VPN Consortium (VPNC) has established a separate discussion group to accommo-
date the conversations just about user authentication.
Pre-Shared Secret
A pre-shared secret is nothing more than a password that each peer has configured
and identified with the other. As the VPN is being created, IKE uses the pre-shared
secret to create keying material that is used to build a key for encrypting the
communications. The peers use the other’s IP address to identify the associated secret
to use for the creation of the key. As one system collects the necessary information
from the other, a point in the communication is reached where both systems have
enough information to create the necessary keys. The last attribute — the secret —
Digital Signatures
As described above, certificates are trusted ensembles of specific information that
pertain only to the owner of the certificate and the issuer. Certificates can be used to
authenticate the owner, based on a third-party trust. Furthermore, the certificate is
typically the source of the issued user’s public key. If the user’s private key is employed
to digitally sign a document, the certificate will provide authorization of the private key
that was used by containing the public key and the associated trust with a third party.
Certificates can be used to establish a trust relationship between VPN peers and partic-
ipate in the assignment of security policies. Certificates are a refined implementation
of public key cryptography and can be used for encryption, signing data, and authen-
tication.
As for IKE authentication, various SA state information is hashed together with a
key and the initiator signs the result. The initiator has the opportunity to send its
certificate to the responder, along with the signed hash, allowing the responder to
validate the signature. If the responder already has the initiator’s certificate, it will not
request it; however, the responder can request the certificate to be provided to verify
the signature. When the responder uses a certificate, it must validate it by performing
several steps to ensure that the certificate is valid.
1. Check the type of the certificate. If the certificate is not designed or authorized
to be used for signing, then the process is invalid. There are certificates
As one can see, the validation process can be processor intensive and time-
consuming. However, the administrator can typically mandate if certificates require
validation. Of course, if this method is employed, only the originating Internet IP
address can be used to verify authentication and association to the certificate. Oth-
erwise, anyone can send a signed hash and provide any certificate to the responder
to verify the signature.
Another aspect of using digital signatures for authentication concerns the certifi-
cate payload being sent to the responder encrypted. By encrypting the certificate
payload, identity protection is obtained, which is a feature within IKE.
History
Before VPNs were considered for remote access solutions, companies would invest in
telephone lines, modems, access equipment, and an authentication infrastructure to
allow remote users to dial into their network.
The authentication infrastructure consisted of protocols and applications designed
specifically to authenticate a remote user wishing to gain access. Given that this type
of remote access was the only available technology for many years, the authentication
mechanisms became very robust and ingrained into the remote access solution.
Some examples of these technologies are RADIUS and TACACS, which may leverage
other protocols such as CHAP and PAP. Protocols like CHAP and PAP are used as the
workhorse that performs the authentication. RADIUS is a solution that consists of a
protocol and application that can provide extended information to the client. In
standard remote access solutions, a RADIUS system can provide an IP address, DNS
IP address, or a wide range of information that may be needed by that particular
remote user. In addition to being an authentication application and protocol for
RADIUS operations, it can be used as a protocol to support an even greater range of
authentication types. Security Dynamics (SDI) is a popular two-factor authentication
platform that can use RADIUS to provide interoperability. In this scenario, RADIUS
is used as the protocol from the remote user to the access device, which is acting as
a client to the SDI system. RADIUS is used to employ its capability of providing several
attributes within the communication. Therefore, if an IPSec remote access solution
does not support RADIUS, it is effectively stripping the use of the SDI system. To
Authentication Protocols
Authenticating protocols provide a mechanism to the partnering systems to share secret
information while reducing the opportunity for unauthorized individuals to participate
in the negotiation process. Passwords can be the Achilles’ heel of security procedures.
Without authentication protocols to protect the process of interchanging secret data,
the secret can be discovered and utilized for illegal or unethical activities.
Authentication protocols of the type discussed here originated from a requirement
set forth by the communication standard Point-to-Point Protocol (PPP). PPP provides a
standard method of encapsulating network layer protocol information over point-to-
point links. PPP also defines an extensible Link Control Protocol (LCP), allowing nego-
tiation of an authentication protocol for identifying its peer prior to network layer
protocol transmission.
The PPP communication standard has three main components:
To establish communications over a point-to-point link, the two systems must first
send LCP packets to configure the data link. After the link has been established, PPP
provides for an optional authentication phase before proceeding to the network layer
protocol phase. By default, authentication is not mandatory.
The concept of setting up the connection with a remote system based on its
attributes, and then allowing an authentication protocol to determine the user prior to
allowing data to flow, is being considered by some in the IPSRA.
RADIUS. The Remote Authentication Dial-in User Service (RADIUS) was specifically
designed to manage dispersed serial line and modem pools for large numbers of users.
This relates to the origination of the PPP communication standard, in that common
authentication systems provided authentication but did not address certain variables
associated with remote access service. RADIUS has provided information critical to
establishing communications and has become an intermediary for several types of
authentication methods. RADIUS has support for the authentication protocols defined
earlier, and it is utilized in many scenarios for extended authentication into larger
databases.
One of the key features of RADIUS is the implementation of the client/server
model. A network access system, such as a VPN device or router, operates as a client
of RADIUS. The client is responsible for passing remote user information to its
associated RADIUS server and acting accordingly, depending on the RADIUS server’s
response.
Another feature of RADIUS that sets it apart from other common authentication
systems is its support for configuration information provisioning. During the time
RADIUS was being developed, remote access was limited to serial lines and modems.
RADIUS was developed to provide authentication and configuration information
dependent on the user rights, times of the day, and access port, among other config-
urable attributes.
RADIUS servers receive the user connection requests, authenticate the user, and
then return all configuration information necessary for the client to deliver service
to the remote user. The relationship between the RADIUS server and client is estab-
lished by the use of a shared secret, and all data communications are encrypted. That
shared secret is typically a password that is entered by an administrator on the client
and RADIUS server, and is subsequently used to establish trust and keying material
for encryption purposes.
IPSec Architecture
Security Associations
Security associations are the result of the application of policies that define the encryp-
tion, keys, authentication, and all the services that are to be applied to the data. There
are two basic forms of SAs in an IPSec VPN.
System A System B
SA#1
SA#2
System A SAD System B SAD
INBOUND - SA#1 OUTBOUND - SA#1
ESP-DES ESP-DES
ESP-MD5 ESP-MD5
Destination IP Addr Destination IP Addr
OUTBOUND - SA#2 INBOUND - SA#2
ESP -3DES ESP -3DES
ESP -SHA ESP -SHA
Destination IP Addr Destination IP Addr
AH SA#3
ESP SA#4
level of protection. SAs can be established that provide different levels of protection
between peers for data with varying levels of sensitivity.
IPSec SAs can be defined by three components:
The security protocol identifier is the security protocol being utilized for that SA.
Note that only one security protocol can be used for communications provided by a
single SA. In the event that the communication requires authentication and confidentiality
by use of both the security protocols, as detailed in Exhibit 7-2, two or more SAs must
be created for each direction and added to the traffic stream. Standard communications
between two hosts require two SA, one for each direction of communication.
SAs are simplex, as described above, in that outgoing information has an associated
SA that applies to it. In contrast, incoming packets are assigned an SA to understand
how to handle the information being received. An example is two systems, each with
an inbound and an outbound SA. The sender’s outbound SA must match the properties
defined in the receiver’s inbound SA. These two SAs will share the same cryptographic
information (i.e., keys, algorithm information, authentication information, and commu-
nication variables). Separate databases are maintained for inbound and outbound pro-
cessing of information.
Security associations are groups of information handling the security of data; two
primary management systems are employed to manage them: the Security Association
Selectors
IP traffic is mapped to IPSec policies by selectors. A selector identifies an attribute
of the communications to determine the alignment with an SA, or a group of SAs.
Communications between two hosts can be afforded a single set of SAs for all traffic,
or several SAs can be provided for various traffic attributes that are used to determine
the level of security to be applied. The ability to forward data into specific SAs and
make the appropriate identification association is provided by the information in the
selector.
The selectors can be:
g destination IP address
g source IP address
g data sensitivity level (IPSO/CISPO mandatory access and data classification
labels)
g fully qualified name
g upper layer protocols
g upper layer protocol service ports
Destination and source IP addresses are not that of the outer IP header. The
destination IP address defined in the SA identifier (SPI, destination IP address, Security
Protocol) is used to look up the SA in the SAD upon arrival to determine the security
that was applied. Remember that the SA contains information about the authentica-
Each of these parameters is referenced in the SPD for assignment to policies and
applications.
SA Configurations
With the two basic modes of IPSec communication, there are several valid IPSec VPN
configurations. Hosts must support both tunnel and transport modes of operations,
while security gateways must only support tunnel mode. Depending on the environ-
ment, the combinations can become staggering.
Host-based VPN. Two hosts can establish an IPSec VPN in either tunnel mode or
transport mode; both are supported. As shown in Exhibit 7-3, two hosts can establish
a VPN between each other, regardless of what is in between. As long as a TCP/IP session
can be maintained, a VPN can be created.
It can be argued that transport mode without the use of AH is not secure because
the IP header is not authenticated if ESP is utilized. If AH is not desirable, then ESP
tunnel mode would provide security to the original IP header. Transport mode is used
H1 H2
when end-to-end protection is desired and represents the endpoints of the SAs and the
encryption. Host-based VPNs are not widely used; the reasoning and issues are discussed
in the next section.
Gateway-based VPN. As shown in Exhibit 7-4, two security gateways can establish
a VPN between them to provide connectivity for their respective networks. This imple-
mentation represents the bulk — if not all — of the network-to-network solutions being
utilized. Data created on one network destined for the other gets forwarded to the SGW
to be tunneled to the IPSec partner. Once received by the other SGW, the data is
decrypted and forwarded to the network based on its original properties.
Host to Gateway. In Exhibit 7-5, host to gateway represents how remote access VPNs
are being established. As shown in Exhibit 7-5, a remote system can establish a tunnel
mode VPN to a SGW.
This example represents what is typical among VPN solutions. A remote host estab-
lishes an IP connection to the Internet. As the requirement for connectivity to the
network hosted by the SGW, a tunnel mode VPN is established to allow the remote
system to interact with the internal network.
Hosts and Gateways. There are several configurations of SAs and combinations of
tunnel modes and transport modes beyond the typical gateway-based and host-based.
However, it is necessary to understand that these examples are simply not being
leveraged. There are many implementations that can take advantage of the options, but
very few do so.
Exhibit 7-6 shows an example of when a remote system uses tunnel mode for remote
access, much like the previous example, but extends the security into the internal
network to the final destination.
For many organizations, this is very desirable. It provides end-to-end protection
of the information. Typically, this configuration would employ ESP tunnel mode from
the host to the SGW and create an AH or ESP transport mode to the internal host.
H1 H2
R1
Tunnel H1/R1
Exhibit 7-5. Host-to-gateway VPN using tunnel mode: a typical remote access solution.
R1
Exhibit 7-6. Host-to-gateway VPN using tunnel mode with transport or tunnel mode to inter-
nal host.
Tunnel mode can also be used. Establishing a VPN from a remote host to an SGW in
tunnel mode is common, as discussed earlier. However, nesting a transport, or tun-
neling more SA within the tunnel to the SGW is not typical. This can be categorized
as an extended remote access solution.
In Exhibit 7-7, a network-to-network VPN is augmented with extended protection,
much like the extended remote access solution previously explained. In the event that
two networks are connected via a tunnel mode VPN and two systems require end-to-
end protection, a nested mode is needed. In the example, two SGWs are providing a
tunnel mode for protection of data between the two networks. However, two hosts on
the internal network require protection from prying eyes on the internal networks. For
that reason, a nested transport or tunnel mode SA is established between the two hosts.
In this environment, the internal networks are not entirely trusted.
Exhibit 7-7. Gateway-to-gateway VPN using tunnel mode with transport or tunnel mode
between internal hosts.
There are several cases in which the client may reside on an untrusted network and
need a secured channel to a remote network that already has a VPN established with
the remote network. Exhibit 7-8 details this scenario.
At first glance, this may seem odd; but there are many examples where this has
been very desirable. The following example has presented itself to the author many
times. An organization has established a limited access VPN with another
organization — in a network-to-network configuration — possibly the competition, to
share certain information for payment or the betterment of both organizations. None-
theless, this exists in more environments than expected. Yet an employee from the
Exhibit 7-8. Host-to-gateway VPN using tunnel mode with tunnel mode between internal host
and remote network.
Transport Mode
The concept behind a VPN solution is typically based on tunnels. A tunnel occurs when
the original data is encapsulated into a new packet and forwarded based on the attributes
of the new packet’s protocol. The goal is to provide transparent connectivity for the
underlying protocol. IPSec transport mode is unique in that there is no encapsulation
in a new packet. The original IP header is maintained and the data is forwarded based
on the original attributes set by the protocol.
As datagrams are passed down the TCP/IP protocol stack to the network layer, they
are furnished with the appropriate header information from each layer. At the end of
the network layer operations, IPSec removes the original IP header and encrypts the
upper layer protocol header and data. Once the encryption is complete, IPSec adds the
selected security protocol header before reapplying the original IP header.
As illustrated in Exhibit 7-9, the data is normally processed to the network layer,
where it is ultimately handed to the IPSec operations. IPSec separates the original IP
header from the remaining portions of the packet. The upper layer components are
encrypted, and the authentication protocol header is calculated and added between
the original IP header and the encrypted payloads of the original packet.
Tunnel Mode
Tunnel mode is the most common of VPNs and is heavily used in IPSec implementations.
The use of tunnel mode is typically reserved for gateway services because the encap-
sulation provides the ability to channel several sessions through a single point. This
aspect lends itself to allowing the VPN gateway to de-encapsulate the data and forward
it to the final internal destination.
Tunnel mode is encapsulating a packet designed to communicate on a network and
encapsulating it in another packet for transmission to a counterpart on a remote
network. The process allows for a protocol that is understood at the entry and exit
points, to carry the passenger communication protocol that would normally not be
forwarded across the network.
This process is relatively old technology and is apparent in many communications
solutions. The concept of tunneling is what has now become “VPN.” Many standards
exist to take advantage of tunneling technology to provide extended connectivity, and
therefore qualify as a VPN.
In tunnel mode operations, the entire original packet is encapsulated and encrypted,
and a new IP header and authentication protocol header are added. The result is a new
packet that contains two IP headers that are used for communication services on their
respective networks:
g Inner Header
g Outer Header
The inner IP header applied to the original datagram as it is passed to the network
layer is ultimately encapsulated in a new packet.The new packet gets an outer IP header
that contains information imperative to the operation of the VPN.
As illustrated in Exhibit 7-10, the remote client makes a request to a server
maintained on the internal network across the VPN. The packet is constructed as it
moves down the protocol stack. At the network layer, a standard IP header is applied
with the source and requested destination; in the example the source is 199.16.84.3
and destination is 192.168.13.81. The IPSec function will see the address
192.168.13.81 as part of a VPN-defined network of 192.168.13.0 with the gateway
destination of 202.47.193.7. The policies define the security to assign to the packet.
IPSec encapsulates and encrypts the entire original packet, and the authentication
protocol defined will provide message integrity.The authentication protocol header will
be created and appended to the encrypted data. A new IP header will be constructed
to allow the remote client to send the data to the VPN gateway.
As the gateway receives the packet, the outer header is peeled away and the integrity
is validated. The remaining data is decrypted to reveal the inner IP header that provides
the final destination’s IP address.The VPN gateway sends the packet to the internal server.
As far as the client and server applications are concerned, they have a direct connection
providing communications. As the server sends the response, it is forwarded to the VPN
gateway to be encapsulated and forwarded to the remote system.
As each system is authenticated and a data connection is established, the first available
IP address is allocated to the connection. For each subsequent connection, an IP address
is used from the available pool. Once the remote session is terminated, the address
assigned for that system is released and reinserted into the pool of available IP addresses.
The issue that quickly becomes apparent is: what IP addresses to use? As one might
guess, there are several valid answers to the question, and each is associated with a
type of implementation concept.
Internally Available. There are several VPN solutions that require the pool of IP
addresses to consist of available IP addresses from the internal network to which the
VPN device is attached.
As shown in Exhibit 7-11, the internal network is addressed with an IP network of
192.168.13.0, with a subnet mask of 255.255.255.0.The internal network has 200 hosts,
each with a unique IP address of that network. The VPN device’s pool of addresses will
need to be part of that network and consume the available address space for VPN users.
If in the example the 200 internal systems were addressed from 192.168.13.1 to
192.168.13.200, the VPN device could be configured with a pool that ranged from
192.168.13.201 to 192.168.13.254. Given the amount of addresses allocated to VPN,
the solution could support over 50 users.
Internet
192.168.13.1
192.168.13.200
As datagrams are received from the remote users and passed from the VPN gateway
to an internal server, the server sees the source as if on the same network. Once the
remote user’s request is processed and the server needs to respond, it handles the
packet as if the remote user were on the same network. Normally, this entails the use
of ARP. The server’s ARP request is replied to by the VPN device because it is hosting
the remote user that is assigned with the IP address. As described earlier, this is a form
of proxy ARP to convince the server that it is speaking directly with the remote user
who appears to be on the same network.
Internally Networked. In the previous discussion about IP address pools that consist
of existing IP addresses on the internal network, it became clear that the VPN solution
would be limited by the available IP addresses. An example would be if the VPN device
supported 1000 simultaneous connections. In that event, the internal IP addressing
scheme would work even if there were no other hosts on the internal network. It is
necessary to understand that even the smallest network can conceivably have thousands
of remote users accessing services.Application service providers (ASPs) can place several
services and clients on a small group of systems located on a dedicated segment. The
clients that VPN into the network to access the offsite resources could number in the
thousands. Meanwhile, the resources only consume a small network.
To provide for extended remote capabilities without the reassignment of IP addresses
for an internal network, a router can be introduced.
Exhibit 7-12 displays a possible scenario when the VPN solution supports many more
remote systems than the internal network is designed to address.The router can be used
to create a bypass network that can be used to accommodate the vast number of remote
systems, but only consuming a single IP address on the internal network.
The VPN device supports 10,000 simultaneous users that must have unique IP
addresses provided as they attach. The IP pool consists of an IP address range from
172.16.0.0 to 172.16.254.253, which provides room for ample growth. The router will
have an IP address of 172.16.254.254 on the VPN side and an IP address of
192.168.13.201 on the internal network side. As each user connects, they can access
the internal network by having all the requests forwarded to the router to be sent to
the internal systems.The internal systems can be configured to send all requests coming
from the defined network to the router’s internal interface to be forwarded to the VPN
device, which in turn sends it to the remote user.
192.168.13.200
The address pool cannot duplicate any internal addresses or network throughout
the enterprise that is accessible from the VPN community. If a network in a remote
location is not accessible by VPN users, then it does not need to be aware of the
VPN community network. Therefore, the remote network can have access to other
networks that have the same IP address scheme as the VPN community. However,
172.16.0.0
172.16.254.254
192.168.13.201
192.168.13.0/24
Internet
192.168.13.1
192.168.13.200
Support for All. Each one of the previous examples typically represents a different
product implementation. However, there are a few products that support different
configurations, depending on the environment required.
Compatible Systems is a good candidate to explore one of the products that can be
configured to accommodate varuous configurations.
As shown in Exhibit 7-14, this simple-looking dialog contains a plethora of options.
There are two sections: the upper section has two radio buttons that allow one to
configure a pool of addresses for a virtual network or extend an internal one; and on
the bottom are the accessible networks or hosts provided to the VPN client to determine
which destinations get IPSec applied.
In the example, the upper section has the value 192.168.13.201 (as shown in
Exhibit 7-14) that configures the system to use the internal network, starting from the
IP address 201, and going to the end of the defined network, identified by the mask
value.The IP subnet mask will inherently identify the network number (in this example,
192.168.13.0 is the network number) and the IP address defined will be the starting
point of the sequential assignment until the IP address prior to the broadcast address
is assigned to a client system. The broadcast address in the example is 192.168.13.255,
therefore leaving 54 available addresses for remote users. If one is wondering, the subnet
mask is derived from the internal interface of the VPN system; because the addresses
are considered local to the internal network, they must have the same mask. The result
is that is no opportunity to enter a subnet mask due to possible conflicts.
However, if the lower of the two radio buttons is selected, the system provides the
option of defining a virtual pool of addresses for use.
As illustrated in Exhibit 7-15, the new virtual network is 10.100.0.0/16, immediately
resulting in an increase of remote users from 54 to more than 65,000 and the removal
of a restrictive internal network addressing scheme. These addresses get assigned
sequentially to the clients as they connect and the VPN device simply routes them into
the internal network as if part of a remote network.
Thus far, the discussion has focused on the various options of the upper section of the
dialog box and the effects each option has on the operation of the VPN device.The lower
section of the dialog box provides the ability to define internal hosts and network.
As shown in the previous exhibits, the current internal networks are the 172.16.0.0
range of private addresses and 192.168.0.0/16, which encompasses various internal
networks that use the addressing scheme. As an example, every remote office with
less than 100 users gets a 192.168 address assigned to it. Of course, this assumes that
there are less than 255 of these networks — but that is another issue. The first five
networks installed under this design scheme receive 192.168.1.0, 192.168.2.0, etc.,
until 192.168.5.0. To allow for office additions without reconfiguring the VPN device
each time, a network can be defined that includes all the possibilities. Therefore, as
the network grows, the VPN device can provide access to them as they come online.
This is nothing more than IP summarization techniques applied to a VPN
configuration — another wonderful little detail about TCP/IP that can be leveraged
to enhance the solution.
The result of this configuration is that the list is being provided to the client upon
connection and instructs the client on how to handle requests to the defined values.
Therefore, as the remote client makes a request for 172.16.23.44, it will have IPSec
applied and forwarded to the security gateway.
(
:options (
:default_key_scheme (fwz)
:active_resolver (true)
:slan_enabled (true)
:hide_binding_disorder (true)
:no_policy (true)
:use_cert (false)
:policy (0)
:policy_hash (abcdef21)
:last_policy_server (0.0.0.0)
)
:fwrand_seed1 (“12345678 12345678 12345678”)
:fwrand_seed2 (12345678901234567890123456789012)
:gws (
: (CHKP.IP440
:obj (
: (199.199.199.2)
)
:keymanager (
:type (refobj)
:refname (“#_199.199.199.2”)
)
:ifaddrs (
: (199.199.199.2)
: (10.1.2.10)
: (192.168.1.0)
)
:topology (
: (
:name (CHKP.IP440)
:type (gateway)
:ipaddr (199.199.199.2)
:ipmask (255.255.255.255)
)
: (
:name (CHKP.IP440)
:type (gateway)
:ipaddr (10.1.2.10)
:ipmask (255.255.255.255)
)
: (
:name (CHKP.IP440)
:type (gateway)
:ipaddr (192.168.1.10)
:ipmask (255.255.255.255)
)
(continues)
: (
:name (Net-10-1-2)
:type (network)
:ipaddr (10.1.2.0)
:ipmask (255.255.255.0)
)
: (
:name (vpnftp)
:type (host)
:ipaddr (192.168.1.45
:ipmask (255.255.255.255)
)
)
:fwver (4.1)
:firewall (installed)
:is_fwz (true)
:is_subnet_support (true)
:peers ()
:key (
:public (
:value (keykeykeykey)
)
:dhparams_id ()
:date (12345678)
)
:disable (true)
)
:managers (
: (199.199.199.2
:obj (
:type (node)
: (199.199.199.2)
)
:dnsinfo ()
:last_auth_method (none)
:key (
:public (
:value (keykeykeykey)
)
:modulus (
:value (mod)
)
:date (12345678)
)
:date (12345678)
:disable (true)
:to_expire (false)
:expire (15)
:cache_passwords (false)
:keyid (keyidkeyidkeyid)
)
)
:policy_servers ()
)
example map from a Checkpoint Secure Remote installation. Secure Remote (SR) is
Checkpoint’s current VPN client solution that installs on a system to provide VPN
services for accessing a VPN network hosted by a Checkpoint firewall. Prior to using
SR the user must obtain specific information from the firewall to allow future commu-
nications and discover what networks and hosts are accessible via that particular
gateway.
Typically, an administrator or help desk will provide the firewall’s IP address or Fully
Qualified Domain Name (FQDN) to initiate communications. Once this data is config-
ured, the client software requests a configuration file, or map, that represents the
properties of the firewall.
Map Example Internals. Several parts of this file provide a great deal of information
about the structure of the VPN. However, for this particular exercise, the focus is on
the information in bold.
The first thing in bold faced type is a section labeled gws; this simply defines the
firewall and the necessary attributes that pertain to the VPN support of the gateway.
The initial value is CHKP.IP440, which represents the firewall object defined in the
firewall’s database. This will be used throughout the file to represent the firewall’s
identification. Also, the suffix infers that the firewall is a Nokia IP-440 firewall appliance.
:gws (
: (CHKP.IP440
The next three entries define the firewall’s object IP address, specify the key manager,
and provide the IP addresses assigned to all the defined interfaces within the firewall.
The type “refobj” allows the remainder of the configuration file to reference back to
this object.
:obj (
: (199.199.199.2)
)
:keymanager (
:type (refobj)
:refname ("#_199.199.199.2")
)
:ifaddrs (
: (199.199.199.2)
: (10.1.2.10)
: (192.168.1.0)
)
: (
:name (CHKP.IP440)
:type (gateway)
:ipaddr (199.199.199.2)
:ipmask (255.255.255.255)
)
The name references the original firewall object defined in the beginning statements.
The type assists the client in determining the kind of system that is being defined and
its role in the VPN.The ipaddr and ipmask are standard TCP/IP address identifications.
The all 1s subnetmask signifies a single IP address and not a network. In this example,
there are three gateways defined for each interface.
The next two sections (See Exhibit 7-16) relate directly to destinations that are
supported by the gateway. The firewall has three interfaces, one connected to the
Internet and two others for internal networks. The first entry is a network called
“Net-10-1-2” that is defined with the IP address 10.1.2.0/24. When the client makes a
request for any system that has an IP address of this network, IPSec will intercept the
communication, apply the security defined in the policy, and forward it to the owner
of the object, in this case CHKP.IP440.
: (
:name (Net-10-1-2)
:type (network)
:ipaddr (10.1.2.0)
:ipmask (255.255.255.0)
)
: (
:name (vpnftp)
:type (host)
:ipaddr (192.168.1.45
:ipmask (255.255.255.255)
)
However, in the second entry, a single system is allocated for the second internal
network. If the remote user were to make a request to a system with the IP addresses
of 192.168.1.45, the request will have IPSec applied and be properly forwarded to the
gateway. If the user attempts to access any other system that may be on the 192.168.1.0
network, the request will be sent to the Internet.
The IP address of the destination can be private IP addresses or Internet routable
addresses. This brings up an interesting scenario if a network is not using private IP
addresses for internal use but rather Internet-routable IP addresses that are arbitrary.
The use of Internet-routable IP addresses that are not owned by the operators of the
internal network is becoming increasingly rare. However, of the cases that remain, a
VPN solution will force the change of the internal IP addressing scheme to private
Internet
Exhibit 7-17. VPN providing access to WAN sites utilizing the WAN.
Request for
192.168.1.45
192.168.1.0/
Internet 24
208.16.17.70
192.168.1.45
Request for 199.199.199.2
www.company.com
www.company.com
Exhibit 7-18. VPN providing access to an internal network while allowing access to the
Internet.
192.168.1.0/
Internet 24
208.16.17.70
192.168.1.45
199.199.199.2
Request for
www.company.com
www.company.com
Exhibit 7-19. VPN providing access to the internal network and the Internet through only the VPN.
Single Tunnel
In contrast, single tunnel provides dedicated virtual connection to the VPN gateway,
forcing all requests to the gateway regardless of the destination. Single tunnel does not
directly follow the IPSec standard, and in some ways hinders its capabilities. Single
tunnel was created to address certain security concerns and to enhance the adminis-
tration over the VPN being provided.
As detailed in Exhibit 7-19, a remote user connects to the Internet and receives and
IP address to allow communications over the Internet. When the user establishes a
connection to the remote VPN gateway, a new private IP address is assigned the virtual
adapter or shim operating in the network layer. Once the new IP address is assigned,
all communications are sent to the VPN gateway.
As a remote VPN user makes a request for an internal service, the packet is passed
to IPSec for encryption, regardless of final destination or policies, and is sent to the
gateway. A map, a file, or a configuration providing the association between the desti-
nation network and the IPSec gateway is no longer required of the client for commu-
nication. All data passing out of the upper layers is stripped of the source IP address
previously assigned by the ISP and replaced with the new one obtained from the pool
of addresses configured on the VPN gateway. It is critical to understand that the IP
address of the interface providing access to the Internet did not change. The shim or
virtual adapter has the opportunity to manipulate the packets prior to passing them to
the normal Layer 3 functions.
The process of modifying the address prior to passing it to the normal lower layer
functions allows the system to operate normally and establish communications via a
VPN without any changes to the operating system or applications beyond the VPN client
package. As far as the IP stack is concerned, one has a single IP session with the VPN
gateway.
for each packet to determine whether IPSec is applied and sent to the corresponding
VPN gateway. The next step is to use the map as the routing table for the workstation.
Thus, an entry at the top of the map will state that all traffic out of the stack gets IPSec
applied.
As shown in Exhibit 7-20, the networks available to the remote VPN clients have
been changed to 0.0.0.0/0. An all 0s IP address and subnet mask matches every possible
address and network. What are the results of this configuration? Inherently, this is a
single tunnel.
The first set of 0s will represent any IP address that is requested by the client. The
next set of 0s will cover any network request by providing an empty subnet mask. Finally,
the IP address of the VPN gateway is identified as the ultimate destination for all data. The
simplicity of this hybrid gives the client its strength and flexibility. Now a single-client
install can support either type of tunnel operation and can typically be dynamically
configured based on the authentication from a central administrative location.
Arguments
Several discussions can arise concerning the various options made available by the
different vendor approaches to remote access. Of the previous examples and types of
configurations detailed above, single tunnel mode seems to be the focal point of
arguments because of the direct relationship to vulnerability mitigation.
FOUR-INSTRUCTION
THREE KILL SIX - BLIND ACK
REPEAT - 4-6
As a remote user attaches to a home office through a VPN, that system can provide
a routable loophole to an attacker. Single tunnel was devised to eliminate such vulner-
ability. The vulnerability is thwarted based on the fact that because all packets are
forwarded to the VPN device, an attacker on the Internet would be able to send packets
to the client, but not receive them.
The concept of one-way communication to alleviate the vulnerability is fuel to fire
many debates. Some of the earliest computer hacking was based on a concept called
“spoofing.” Spoofing is the act of appearing as someone or something else to gain access,
based on the previously defined relationship between the target and the system being
emulated.
As depicted in Exhibit 7-21, a client system establishes an authenticated session with
a server that identifies the session by the IP address. An attacker predicts the sequence
of packets and, at the proper time, disables the client while injecting instructions into
the server. The server is under the impression that the request is coming from the
original client and sends the appropriate acknowledgments. However, the attacker will
not receive the acknowledgments because they are destined for the original client.
Therefore, the attacker must intimately understand the operations of the server to
respond to acknowledgments that are not being received to complete the attack.
Meanwhile, the client is helpless because the attacker has disabled it from participating
in the communication.
This example of a spoofing attack proves that system communication interaction
can be predicted. Therefore, the concept of single tunnel is questioned.
The primary argument for the use of single tunnel is against Trojan attacks that use
some form of direct interaction with the attacker. Good examples of these types of
Trojans are Back Orifice, NetCAT, and NetBus. Each of these has server utilities that
operate surreptitiously on a system that allows a remote client to view and interact on
various levels with the server system. If a single tunnel VPN were not being used on a
system that had a Trojan of this type installed, an attacker would obtain the same access
to the internal network through the VPN as the authenticated user.
Data Fragmentation
Fragmentation is the process of breaking a packet into multiple packets to accommodate
transmission technologies/media. The process typically occurs on the host sending the
packet, or the routers transmitting the packet from one environment to another. After
fragmentation, each smaller packet is transmitted separately and reassembled at the
destination.
The network topology being utilized places restrictions on the size of the frame that
can be transmitted. The following are some examples of topologies and their maximum
transmission unit (MTU):
The requirements for fragmenting a packet are based on the inability of the network
layer to control the size of the datagram. Fragmentation can cause some problems with
performance. The simple act of transmitting more frames has an obvious derogation of
performance. However, if a single fragment is lost or damaged during transmission, the
entire original packet must be resubmitted.
When a packet is fragmented, the end of the packet payload is provided a new
IP header with the same attributes of the previous IP header. Lets say that a UDP
packet of 1473 bytes is transmitted over Ethernet. The IP header is 20 bytes, the UDP
header is 8 bytes, and therefore the final packet is 1501, 1 byte larger than Ethernet
can handle in the frame payload. The final byte of information (8 bits) is stripped off
and given a new IP header. The original IP header is provided a fragmentation offset
value (there is a 13-bit fragmentation offset field in the IP header) of 1480. This
number is derived from the end of the original IP header and any options. Thus, it
MTU
1492 MTU 576 MTU 296 RC
VPN
RA RB MTU
4464
H2
1. Send the ICMP MTU message to all the possible hosts that can be associated to
the identified SPI. Depending on the SPD and SAD and the defined networks,
this could include a single host, a range of IP addresses on a network, or every
IP address on a specific network. In reality, there is an even worse scenario,
wherein a wildcard is used to identify all traffic as interesting and to have IPSec
applied, resulting in every possible host within shouting distance receiving an
ICMP message — that could be bad.
2. Save the MTU and SPI information and wait for a host to make a request to the
offending SA. As a packet from an internal host is received that is greater than the
saved MTU associated with the offending SA, drop it, and generate an ICMP
message based on the data collected from RB and the first 64 bits of information
from the dropped packet, and then send it to the host. Basically, RA becomes an
ICMP proxy for RB and notifies internal hosts using the SA — identified by the
SPI that was returned in the original ICMP message — to reduce their MTU.
RESERVED 0
IPCOMP_OUI 1
IPCOMP_DEFLATE 2
IPCOMP_LZS 3
original communication protocol. The elimination of the IPComp header in the event
of an error simplifies the entire process. Rather than providing an error message that
complicates the input of the peer, the recipient of the packet simply ignores the fact
that it was not compressed and processes it as normal. Given that IPComp is a stateless
protocol, because it operates within IP, there is no need to provide errors or acknowl-
edgments, thus liberating the peer to operate in a local state — doing what is necessary
on a packet-by-packet level at any particular moment in the communication.
As the peer receives an IPSec payload, which it identified because the protocol field
in the IP header is AH, or ESP as with this example, it de-encrypts and de-encapsulates
the datagram and inspects the next header field in the ESP header. If the value of 108
is discovered, the IPComp header is inspected to determine the IPCA and the next
header to be expected once decompression is complete. After decompression is com-
plete, the data is processed as normal and all compression information associated with
that datagram is discarded. An interesting aspect of inbound processing, very similar to
outbound, is the lack of errors in the event an IPComp header is not present in the
payload. Of course, this means that the initiator did not perform compression for some
reason — possibly an error — and applied ESP to the datagram normally. Although the
recipient of the datagram has an established IPCA and expects an IPComp header for
each packet, it does not really matter if it is absent.
There are many reasons that IPComp may not choose to compress the datagram.
One aspect is that if the compressed data and the header combine to be equal to or
greater than the original upper layer data, the datagram must not be compressed.
Otherwise, the process will defeat the purpose of implementing compression and result
in performance problems. It will affect performance in not only processor overhead
and inefficient use of available bandwidth, but the expansion of the data causes frag-
mentation given that MTU discovery processes will not take into consideration an
increased datagram. Small datagrams can fall victim to increased size post compression.
The compression-specific data that must be associated with the original data can increase
the size of the final payload. To accommodate this foreseeable event, thresholds can be
implemented to simply ally compression to datagrams with a defined minimum size.
Another example of when compression may not be applied is when the datagram has
already been compressed by another process or application. The first question is: how
Replay Protection
Anti-replay protection and, to a certain extent, origin authentication, are optional
services provided by the ESP and AH security protocols. The ability to implement these
services sits squarely on the shoulders of the recipient. A unique 32-bit sequence
number that is incrementally increased with each packet is included within every
security protocol header. However, the number is useless unless the recipient verifies
the number. It may seem obvious to implement such protection by default, and most
recipients do verify the sequence number, but it is necessary to understand that it is
not mandatory. One of the reasons may be that when replay protection is implemented,
in that the recipient verifies the sequence number, the number can never be duplicated
for that SA. Each system sets the sequence number to zero when an SA is established.
Because the sequence number is 32 bits, and each system must increment it by one
for each packet, the maximum number of packets for an SA with replay protection is 2 32.
The sender is responsible for managing the sequence number. When replay protec-
tion is configured, the sender must ensure that the sequence number does not cycle.
If the sequence number reaches a point where it must be cycled, the sender’s and
receiver’s sequence numbers must be reinitiated and set to 0. To accomplish this, a new
SA is typically created in place of the expired one. It is also the responsibility of the
sender not to send a datagram with a sequence number that, when processed by the
receiver, will result in a number that exceeds the cycle point. An example of this would
be if the number is incremented by 3 and the sender transmits a datagram with a
sequence value only 2 less than the maximum allowable value. The receiver would be
unable to properly increment the sequence for the reply. The result would be the
disintegration of the SA.
Replay protection is implemented by default and the sender assumes the receiver
is processing the sequence numbers unless notified otherwise by the receiver. If the
receiver does not monitor the sequence number and does not notify the sender, the
sender will create a new SA when the sequence number needs to be cycled, which
could cone as a surprise to the receiver.
In the event that replay protection is not implemented, by a notification from the
receiver, the sender need only be concerned with the generation of the sequence
number and not the monitoring of the numbers from the receiver. However, the sender
still increments the sequence number; when it reaches the maximum value, the counter
simply rolls over back to zero.
Security Protocols
This chapter details the foundation of IPSec — the security protocols. IPSec
leverages the se curity protocols to provide useful communication within
the VPN.They are the workhorses that everything else is designed to support.
Security associations are established and maintained by the security protocol imple-
mented. Security protocols are the heart of IPSec operations and their implementation
determines transport or tunnel mode. Security protocols can be used in combination
or nested to extend the VPN and its functionality.
There are two security protocols defined by IPSec — Authentication Header (AH)
and Encapsulating Security Payload (ESP) — that are used to provide authentication,
integrity, and, with ESP, confidentiality.
The Payload is a variable-length field that is directly related to the size of the data
being transmitted from the upper layers. The process of controlling the size lies in the
hands of the MTU process. Various encryption algorithms utilize a value to initialize the
decryption process.The initialization vector (IV), if required by the encryption algorithm
specified, is included in the beginning of the payload. While the payload is considered
encrypted, the IV is a value related to the decryption process and appended to the
ciphertext by the encryption process.Therefore, the encryption and decryption process
is not a concern of IPSec, but rather the defined algorithm. The recipient simply injects
the ciphertext into the algorithm directly, without regard to what is actually ciphertext
and what portion is the IV.
Padding provides limited communication flow confidentiality, but this is more a by-
product of other requirements. Padding is used to maintain encryption boundaries.
Some encryption algorithms, as discussed above, require the original data to be a
multiple of a certain number of bytes to equal the block size of the algorithm. Padding
is also used to ensure that the pad length and next header fields are right-aligned to
the 4-bit boundary. There are some issues with padding and with regard to attacks.
Simply stated, if the padding value is not defined by the encryption algorithm, and it
is needed to meet other requirements, the value should be checked by the recipient.
The Pad Length field (Pad Len. in Exhibit 8-1) is a value that notifies the recipient
of the length, or amount of padding that was added to the ciphertext. Padding is a
requirement to support but, of course, does not mean it has to be used. However, the
length field must exist, even if the pad does not.
The Next Header field can be misleading by name.This value is to notify the recipient
of the header type contained within the encrypted payload. This is required so that after
processing of the payload — decryption — the material is handled properly.
An example would be a value of 6 for a transport mode VPN if the header that
appears first in the decrypted payload were a TCP header. This is assuming a standard
transport mode without nesting and assuming a TCP header is next and not ICMP, UDP,
etc.). Transport mode populates the Next Header field using the original IP header that
is applied to the datagram in the network layer prior to IPSec handling. It is necessary
to read the protocol field of the IP header to properly determine the content. To do
otherwise would cause excessive overhead. It also adds a layer of uncertainty in the
outcome; it is best to assume that the original IP header knows what it is transporting.
This is necessary because the next header could be another transport or tunnel mode
packet, ICMP, UDP, etc.
With tunnel mode, the value could be 4, IP-in-IP specification — once again,
assuming a standard tunnel without nested SAs. This represents the existence of the
inner IP header. In tunnel mode, IPSec inspects the first header of the datagram to
be encapsulated. For many implementations, this is usually IP, but given the vast
options of IPSec VPNs, it could be almost anything.
These numbers are specific to IPv4 and defined by the IANA in RFC 791.
Finally, the authentication data contains the message digest computed against the
ESP packet.The length is determined by the message authentication function employed.
In the event that authentication is not specified or desired, this field is not included.
ESP Placement
As discussed, the placement of the header is dependent on the mode of communication.
In transport mode, the header is inserted after the IP header and options and before
any upper layer protocols, including other IPSec headers. In tunnel mode, the entire
packet is encapsulated and the new IP header and options precede the ESP header; see
Exhibit 8-2. From the perspective of the outer IP header, the ESP placement is the same
as transport mode.
Process Execution
There is a sequence of steps required to properly apply the ESP. The procedures are
directly related to the direction of the data: outbound or inbound.
Outbound Process. There are five general steps in processing the application of ESP.
The steps described here assume that confidentiality and authentication are employed.
1. Encapsulate the upper layer data into the Payload field. If in transport mode,
just the upper layer protocols are encapsulated. If the communication is in
tunnel mode, the upper layer and the original IP header are encapsulated.
2. Add the necessary padding. Populate the Pad Length and Next Header fields.
3. Encrypt the payload, which includes the upper layer data, pad, pad length, and
next header fields. If the encryption algorithm requires an IV, one is created
and applied according to the encryption standard employed.
1. The SPI in the ESP header and the destination outer IP address are used to look
up the SA in the SAD. If this process fails, the packet is dropped.
2. Verify the sequence number if anti-replay is enabled.
3. Use the SA determined in the previous step to authenticate and decrypt the ESP
payload.
4. Once decrypted, use the inner IP header to map to a selector within the SA.
The packet’s inner source address is typically used to match the SA’s selector
for processing. Note: These steps are repeated until the protocol contained
within the payload is not destined for the processing system. The steps must
be repeated until the discovery of a next hop system due to the nesting capa-
bilities within IPSec. As soon as data that is not for the gateway is discovered,
the forwarding process can start.
5. Find the SPD entry that matches the inner packet data to determine that the
packet is valid for the defined SA.
6. Forward the data to the final destination based on the inner IP header informa-
tion in the packet.
The similarities between ESP and AH tend to dissolve as the inner workings of the
AH security protocol are investigated. AH provides authentication out to the outer IP
header. It provides authentication services for the upper layer protocols, just like ESP,
but ESP cannot authenticate the outer IP header. Once the packet is assembled, the AH
process authenticates the entire packet and inserts itself into the packet.
The Next Header field is exactly like it sounds, unlike ESP. It defines the next header
in the packet immediately following the authentication data. Of course, for nested
operations, the Next Header could an IPSec security protocol.
The Payload Length defines the length, in 32-bit words, the amount of authentication
data. The value is determined by subtracting 2 from the 32-bit words. As an example
provided in the AH RFC, in the case of a 96-bit authentication value plus the 3 32-bit
word fixed portion (equals “6”), this length field will be “4.”
The reserved field is always set to zero. This is followed by the SPI for the SA in
which the security protocol is participating. The next value is the 32-bin Sequence
Number. The same issues that existed with the ESP Sequence Number and anti-replay
protection exist with AH Sequence Numbers.
The authentication data is the message digest, or authenticator used to verify the
entire packet. Once again, the size is partially controlled by the message authentication
function selected. However, because the value must a multiple of 32 bits, padding may
be required.
AH Placement
As discussed above with ESP, the placement of the AH header is dependant on the mode
of communication. In transport mode, the header is inserted after the IP header and
options, and before any upper layer protocols, including other IPSec headers. In tunnel
mode, the original packet is placed behind the header, and the new IP header and
options preceed the AH header (see Exhibit 8-4). From the perspective of the outer IP
header, AH placement is the same as in transport mode.
Process Execution
There is a sequence of steps required to properly apply the AH. Much like ESP, the
procedures are directly related to the direction of the data: outbound or inbound.
Outbound Process. There are four general steps to processing the application of AH
to a packet:
1. Determine the associated SA that calls for AH processing by the available infor-
mation in the original packet; for example, IP address (source and destination).
2. Once the communication is determined to have AH applied, the header is
inserted after the IP header and the SPI is implemented.
3. Generate a sequence number for application to the header.
4. Calculate and apply the message integrity, pad the digest, and apply to the end
of the AH and before the upper layer protocols.
— total length
— identification
— protocol (will equal 51 for the AH)
— source address
— destination address
g Mutable (to be set to zero prior to authentication calculation):
— type of service
— all flags
— fragment offset
— time to live (TTL)
— header checksum
1. The SPI in AH and the destination IP address are used to look up the SA in the
SAD. If this process fails, the packet is dropped.
2. Verify the sequence number if anti-replay is enabled.
3. Use the SA determined in the previous step to authenticate the packet.
4. Forward the data to the final destination based on the IP header information.
The Purpose of AH
There have been many questions regarding the existence of two security protocols.
In other words, authentication supported by AH can be implemented with ESP. The
There are several arguments for and against keeping the AH protocol. It is expected
that AH will remain because it is currently being implemented in most IPSec solutions,
and IPv6 leverages the protocol in ways that are unique to IPv6 and not found in IPv4
standards. However, do not be surprised if a hybrid protocol is created.
Key Management
1. ISAKMP
2. Oakley
3. SKEME (Secure Key Exchange Mechanism)
Oakley
Oakley provides examples and processes of an exchange protocol for supporting the
underlying communication for ISAKMP. Developed by Hilarie Orman, a cryptographer
from the University of Arizona, the protocol defines several aspects of authentication
and key creation. It details the process of modes used to enhance the security between
peers, based on the negotiation of those properties.
Within the Oakley protocol definition, there are also Diffie-Hellman groups. Diffie-
Hellman groups define the strength supplied to the Diffie-Hellman calculation for the
later creation of keys by the peers. Richard Schroeppel, of the University of Arizona,
generated the groups and provided the calculations for display in the RFC. There are
currently two primary forms of key groups. Three of the five available groups are
generated from MODP calculations and the leveraging of very large prime numbers.
The other two groups are based on elliptic curves. Each of these groups are EC2N
processes with varying characteristics.
Groups 1 and 2 are MODP based and provide primes at 96 bytes and 128 bytes,
respectively. Groups 3 and 4 are EC2N based and provide 155-byte and 185-byte Diffie-
Hellman values. The last group, group 5, is based on MODP and provides a prime of
192 bytes (1536 bits). Groups 1 and 2 are the most common, for two reasons. The
EC2N process is typically not supported on currently available VPN systems and the
last group is a very large number, and performance is crucial. For example, if using
group 5, the prime to use in several calculations looks like (a lot):
IKE leverages the process of modes and groups from Oakley. IKE uses all the groups
defined within Oakley, but only some of the modes that are available.
SKEME
In 1996, Hugo Krawczyk proposed a key management based on the use of Diffie-Hellman
and public key cryptography. This allows the shared information to be authenticated.
The process can be used to create random values that are shared using the public key
of the peer. These values, once authenticated, can be used to create the keys. Therefore,
the combination of SKEME sharing techniques and Diffie-Hellman provides for PFS.
IKE uses portions of SKEME for authentication with public keys and uses the sharing
mechanisms for PFS.
g Main Mode
g Aggressive Mode
Each of these modes accomplishes a Phase I secure exchange, and these two modes
only exist in Phase I. Within Phase II there are two modes:
g Quick Mode
g New Group Mode
Quick Mode is used to establish SAs on behalf of the underlying security protocol. New
Group Mode is designated as a Phase II mode, but the service provided by New Group
Mode is to benefit Phase I operations. As described earlier, one of the advantages of a
two-phased approach is that the second phase can be used to provide additional ISAs,
which eliminates the reauthorization of the peers.
ISAKMP Header
All Phase I and II operations require an ISAKMP header that can be followed by a variable
length of payloads. The constant existence of the ISAKMP header provides information
required by the protocol to maintain association throughout the communication.
There are currently 13 defined payloads that can be distinctly identified in an ISAKMP
header. Each one of these can be used to generate state information to create, manage,
or delete an SA.
As seen in Exhibit 9-1, the ISAKMP header is 28 bytes and contains general required
information for the relationship.
The initiator and responder cookies are 8 bytes of random numbers that are used
to identify the ISA. The order of the cookies must be maintained, regardless of any
changes in direction within the SA. An example would be a Quick Mode initiated by
the responder of an earlier negotiation. The cookies are provided for the systems to
quickly identify the validity of a particular communication. This reduces, slightly, the
exposure to denial-of-service attacks by allowing the recipient to check a basic number
shared in previous communications prior to processing the entire packet.
0 31
Initiator Cookie
Responder Cookie
NONE 0
Security Association (SA) 1
Proposal (P) 2
Transform (T) 3
Key Exchange (KE) 4
Identification (ID) 5
Certificate (CERT) 6
Certificate Request (CR) 7
Hash (HASH) 8
Signature (SIG) 9
Nonce (NONCE) 10
Notification (N) 11
Delete (D) 12
Vendor ID (VID) 13
RESERVED 14–127
Private USE 128–255
The Major and Minor versions (MJ Ver. and MN Ver., respectively, in Exhibit 9-1) are
to determine the version of ISAKMP that is being employed by the peer. Peers will drop
all communications when the major or minor of a peer is greater than the peer’s.
The exchange type identifies the type of message being transmitted.There are several
messages that can be used within ISAKMP, including:
NONE 0
Base 1
Identity Protection 2
Authentication Only 3
Aggressive 4
Informational 5
ISAKMP Future Use 6–31
DOI Specific Use 32–239
Private Use 240–255
The Flag field allows for the combination of three message states. The encryption
bit is set to 1 if all the payloads following the ISAKMP header are encrypted. The next
bit it the commit bit; this is used by ISAKMP to align key exchange processes. The use,
support, and notification of this bit in implementation are scrutinized. The use of the
commit bit, and other areas of IKE that are up for discussion, are covered in the following
chapters. The authentication bit is intended for use when notify payloads are utilized.
The Message ID field is used to uniquely identify the protocol state in Phase II. The
responder generates the message ID during the beginning of Phase II operations, as
will be seen in the log files presented later in this section.
0 31
Next Pay Reserved Payload Length
The Next Payload and Length fields are identical to the ones found in the ISAKMP
header. Exhibit 9-3 shows the use of this simple header and the chaining process it
provides.
As one can see, the combination of the Next Payload value and the Length field
allow for flexibility in the message creation and reduce the complexity of the ISAKMP
header in having to support all the options.
Sit_Identity_Only 0x01
Sit_Secrecy 0x02
Sit_Integrity 0x04
Sit_Identity_Only states that the SA will be identified based on the identity informa-
tion provided by the peer. Sit_Secrecy identifies that the SA is being implemented with
labeled information. Sit_Integrity specifies that the integrity requires labels for use in
an MLS environment.
Proposal Payload
The proposal payload (see Exhibit 9-5) contains the bulk of the information associated
with the creation of an SA. During the establishment of a secured relationship, each
system must determine the level of authentication and confidentiality, and various
information associated with the security relationship. A proposal payload is populated
with transform payloads that contain the SA information. The initiator sends proposal
Initiator Cookie
ISAKMP Header
Responder Cookie
Message ID
Length
Next Pay=2 0 Payload Length
SA Header
1
Situation
Proposal
Proposal #= 1 Proto ID=ESP SPI Size # of Trsfms= 2
SPI
Transform
Trsfrm #=1 Transform ID 0
SA Attributes (See Attribute Payload
Configuration
payloads with one or more transform payloads within each that define the available
security conditions for the particular communication defined in the SPD.The responder
selects the proposal and associated transform set that best pertains to the communica-
tion, and sends the unchanged information to the initiator in a proposal payload with
the original transform payloads.
The proposal number (Proposal #) represents the number of the proposal within
the message. There can be several proposals for any given SA, and the numbers are
0 31
Next Pay Reserved Payload Length
DOI
Situation
SPI
used to define logical operators. If the proposal numbers match, they are considered
related and represent an AND logical operation; whereas if the numbers do not match,
it simply represents another proposal for consideration, an OR logical operator. As an
example, the SPD specifies that network 10.20.0.0/16 should use ESP with several
optional combinations of encryption and authentication algorithms. However, there is
the option of using AH with ESP, and the several combinations for those as well. The
number of, and the assigned number of proposals are different; the assigned number
simply represents relationships between the various number of proposals (see
Exhibit 9-6).
Proposal 1:
ESP
DES and MD5
DES and SHA
3DES and SHA
Proposal 2:
AH
SHA
MD5
Proposal 2:
ESP
DES and MD5
DES and SHA
3DES and SHA
Notice that there are three proposals and two classifications, 1 and 2. Proposal 1 is
the first and defines that only ESP is to be used and offers three options for use within
ESP. Proposal 2 has two related proposals: one for AH and the other for ESP. The second
set of proposals has the same number and represents an AND logical operation; whereas
the first proposal has a different number that represents an OR operation with the other
proposals numbered 2. This collection states that ESP with any of the offered options is
acceptable; OR AH and ESP must be used with the proposed security suites. This is a
simple example and the proposal process can become extremely complicated.
The Next Payload field must be either a 2 or 0. The next payload following the
proposal must be a transform payload (see Exhibit 9-7). Therefore, the Next Payload
field is designed to notify the recipient that there is more than one proposal.
Protocol ID is the security protocol that the proposals are being negotiated on behalf
of. This is an excellent example of the application of the IPSec DOI. The protocol ID
for ESP is 50; however, the DOI that defines the ESP security protocol is 3.
The SPI size allows for the integration of different underlying protocols other than
IPSec. The SPI is included in the payload.
The number of transforms indicates how many transforms are provided for the
proposal to create a transform set.
Exhibit 9-7. Multiple transform sets that can be prioritized into proposals.
Transform Payload
The Transform Payload (see Exhibit 9-8) contains a single attribute for the entire trans-
form set. The transform number (Transform #) is required if the there is more than one
transform provided within the proposal. It is very common to have more than one. If
using ESP with DES encryption and MD5 authentication, one would have two transform
payloads within the proposal.
Identification Payload
Identification information is communicated between peers using the identification
payload (see Exhibit 9-9). This information is used to determine the peers and the
associated authentication information.
0 31
Next Pay Reserved Payload Length
ID Type Protocol ID Port
Identification Data
The identification types specify the associated information that can be used for
authentication processes.
RESERVED 0
ID_IPV4_ADDR 1
ID_FQDN 2
ID_USER_FQDN 3
ID_IPV4_ADDR_SUBNET 4
ID_IPV6_ADDR 5
ID_IPV6_ADDR_SUBNET 6
ID_IPV4_ADDR_RANGE 7
ID_IPV6_ADDR_RANGE 8
ID_DER_ASN1_DN 9
ID_DER_ASN1_GN 10
ID_KEY_ID 11
This information should look familiar from the discussions on security associations.
Each one of these is associated with selectors in the SPD and SAD alignment and can
be used in the SA selection process for incoming and outbound communications.
The Protocol ID is used to identify the IP protocol represented by the collected
information. This is required to work with the next field, Port. If the protocol is TCP,
port 80 requires different handling than if the protocol is UDP.
Identification data is the collection of attributes defined in the previous portions of
the payload.
Certificate Payload
The Certificate payload (see Exhibit 9-10) is used to provide certificate information to
the peer for authentication.
The certificate encoding indicates the format of the following certificate information.
There are several different types of encoding:
The encoding allows for the certificate data, in the next portion, to be applied.
0 31
Next Pay Reserved Payload Length
Cert Type
Certificate Authority
DOI
SPI
Notification Data
Notification Payload
The notification payload (see Exhibit 9-12) is used to convey informational and status
information between peers. Its primary use is for error messages in the event a payload
is bad, unaccepted, or malformed. It is also used for basic information exchange, such
as lifetime notifications when the SA is coming to an end.
Notification payloads can be used during Phase I or II. Therefore, the information
contained in the payload may vary. As an example, in Phase I, the cookies are used for
ISA identification and not SPIs. Therefore, the ISA information is controlled by the
cookies in the ISAKMP header and the SPI field is set to 0.
The Protocol ID specifies the following protocol based on the DOI versions. In Phase
I, this is set to 1 for ISAKMP. This is followed by the SPI size that is provided for ISAKMP
flexibility for underlying protocols.
The Notify Message Type is used to associate the message contents with the appro-
priate variable data (see Exhibit 9-13).
Delete Payload
The delete payload (see Exhibit 9-14) contains SA and protocol-specific information
so that the recipient can remove the corresponding information from the SPD and
SAD — deleting the SA.
As with other SA establishing payloads, the delete payload includes much of the
same information. The DOI being used, the protocol ID specified in the DOI, and SPI
size are familiar. The number of SPIs is a new field. This allows the identification of
several SAs for deletion at the same time. The only caveat to using multiple SPIs is that
only one protocol can be identified. Therefore, the SPIs included in the SPI payload
must be for an ESP, AH, or ISAKMP SA.
Information Attributes
During ISAKMP Phase I and II messages, various information must be shared within
the payloads (see Exhibit 9-15). For certain payloads, such as a Transform payload,
the attributes are contained within an attribute payload that acts as the data portion
of the carrier payload. An example is a Transform payload; it begins with the generic
header and contains certain transform information, such as ID and number. The actual
INVALID-PAYLOAD-TYPE 1
DOI-NOT-SUPPORTED 2
SITUATION-NOT-SUPPORTED 3
INVALID-COOKIE 4
INVALID-MAJOR-VERSION 5
INVALID-MINOR-VERSION 6
INVALID-EXCHANGE-TYPE 7
INVALID-FLAGS 8
INVALID-MESSAGE-ID 9
INVALID-PROTOCOL-ID 10
INVALID-SPI 11
INVALID-TRANSFORM-ID 12
ATTRIBUTES-NOT-SUPPORTED 13
NO-PROPOSAL-CHOSEN 14
BAD-PROPOSAL-SYNTAX 15
PAYLOAD-MALFORMED 16
INVALID-KEY-INFORMATION 17
INVALID-ID-INFORMATION 18
INVALID-CERT-ENCODING 19
INVALID-CERTIFICATE 20
CERT-TYPE-UNSUPPORTED 21
INVALID-CERT-AUTHORITY 22
INVALID-HASH-INFORMATION 23
AUTHENTICATION-FAILED 24
INVALID-SIGNATURE 25
ADDRESS-NOTIFICATION 26
NOTIFY-SA-LIFETIME 27
CERTIFICATE-UNAVAILABLE 28
UNSUPPORTED-EXCHANGE-TYPE 29
UNEQUAL-PAYLOAD-LENGTHS 30
RESERVED (Future Use) 31–8191
Private Use 8192–16383
CONNECTED 16384
RESERVED (Future Use) 16385–24575
DOI-specific codes 24576–32767
Private Use 32768–40959
RESERVED (Future Use) 40960–65535
detailed transform information contained in the data portion of the payload is format-
ted into an attribute payload. Attribute payloads are based on a format that allows
flexibility in the representation of information.
The attribute format (AF) bit is used to identify the following information contained
within the payload. The data necessary to be shared among peers may require two of
three fields to appropriately convey the attribute. The three attributes are:
1. Type
2. Length
3. Value
Notification Data
Each requires a Type value to properly manage the data contained. The Length is
used if the value has a variable length that needs to be identified. The Value is the
information defined by one or both of the two previous attributes.
There are some types of information that have a fixed length and therefore do not
need a length bit. If the length is known and the length bit is absent, the value can be
contained where the length bit would normally reside. This is to reduce the length of
the payload, and increase efficiency and performance.
If the AF bit is set to 0, the length is included and the value is transmitted in its own
field. If the AF bit is 1, the length is not required and the Length field is populated with
the value, reducing the payload by 4 bytes.
0 31
A AF=0 Att. Length
F Attribute Type
AF=1 Att. Value
Phase I Attributes. In IKE Phase I operations, there are specific transform attributes
for defining the protection of IKE exchanges, as opposed to Phase II attributes that are
used for the creation of IPSec SAs. IKE requires various information, ranging from the
encryption algorithms to the type of authentication for the protection of IKE messages.
The attributes are defined in the IKE RFC and not the IPSec DOI, or ISAKMP RFC, as
one might expect. The following is a list of IKE attributes and their types.
Encryption Algorithm 1
Hash Algorithm 2
Authentication Method 3
Group Description 4
Group Type 5
Group Prime/Irreducible Polynomial 6
Group Generator One 7
Group Generator Two 8
Group Curve A 9
Group Curve B 10
Life Type 11
Attribute type 1, encryption, has six defined values for use within IKE messages. The
encryption algorithm defined will be used to protect various Phase I messages, Phase II
(Quick Mode) messages, and any other messages within IKE requiring protection.
DES-CBC 1
IDEA-CBC 2
Blowfish-CBC 3
RC5-R16-B64-CBC 4
3DES-CBC 5
CAST-CBC 6
Values 7 to 65000 are reserved for IANA’s use, and values 65001 to 65535 are for private
use among mutually consenting parties.
Attribute type 2, hash algorithm, defines the message authentication algorithm to
be utilized for all IKE exchanges.
MD5 1
SHA 2
Tiger 3
Values 4 to 65000 are reserved for IANA’s use, and values 65001 to 65535 are for
private use among mutually consenting parties.
Note: From this point on, the remaining values are typically reserved
for IANA use and the last 534 are for private use.
Pre-shared key 1
DSS signatures 2
RSA signatures 3
Encryption with RSA 4
Revised encryption with RSA 5
In many cases, if the peers wish to define specific parameters of the Diffie-Hellman
group to be utilized, New Group Mode exchange can be used. The values shared can
be conveyed in an attribute payload protected by the IKE SA created in Phase I, and
not exposed in the clear as it would normally be in an SA proposal/transform chain.
Life type, type 11, provides two simple values; and type 12, life duration, is the
amount that represents the valued specified in life type:
seconds 1
kilobytes 2
Type 13, pseudo random function, is currently not used. IPSec and ISAKMP do not
have a defined PRF, and the HMAC portion of the message authentication process is
used as a PRF for IPSec and ISAKMP operations.
Key length is used to define a key length for an encryption algorithm that supports
variable keys. This option is not used for encryption algorithms that have predefined
key lengths.
The field size is for the Diffie-Hellman group. The group order defines the order of
the elliptical curve group.
Phase II Attributes. IKE Phase II messages, such as Quick Mode, are used to define
IPSec SAs and therefore have specific attributes for their creation within IKE. Within
Phase II operations, there are SA payloads that contain proposals and transform sets for
the creation of IPSec SAs that require different identifiers than those available to IKE
Phase I and the creation of an IKE SA. A proposal will exist for each security protocol
configured, and have associated transform payloads. In the proposal payload, the IPSec
security protocol will be identified, and in the transform payload, the transform type
will be defined.
An example is ESP with DES encryption and MD5 authentication in an IPSec VPN.
The proposal will have the protocol ID set to IPSEC-ESP, a transform ID of ESP-DES, and
an attribute payload that can define the remaining details of the SA, such as the HMAC-
MD5 for message authentication. There are nine values available for use in Phase II
messages for the creation of an IPSec SA.
SA Life Type 1
SA Life Duration 2
Group Description 3
Encapsulation Mode 4
Authentication Algorithm 5
Key Length 6
Key Rounds 7
Compress Dictionary Size 8
Compress Private Algorithm 9
Note: The creation of key material for IPSec SAs is based on the key
material created during Phase I of IKE if PFS is not configured. If PFS is
employed, a new Diffie-Hellman exchange is activated in Quick Mode
(Phase II) and allows the peers to share new Diffie-Hellman public
values, resulting in new key material without using material from Phase
I (SKEYID_d and _a). Once the new key material is created (KEYMAT)
for IPSec, the resulting keys used for operations within IPSec will be
discarded when the SA expires. In the event a new SA is created for
continuing communications, it is afforded new keys created from the
material previously agreed upon. Therefore, subsequent IPSec SAs that
do not require a Quick Mode exchange that includes a Diffie-Hellman
public value, as in the case a new SA is created to replace one that will
expire shortly, do not maintain PFS between them.
Tunnel 1
Transport 2
HMAC-MD5 1
HMAC-SHA 2
DES-MAC 3
KPDK 4
The next three available types, 6, 7, and 8, do not currently have values associated
with them and are always set to 0 for IPSec implementations.
Finally, compress private algorithm is a custom algorithm that can be agreed upon
by the participants.The first three octets will be the IEEE-assigned company ID, followed
by the vendor-specific data.
Other Payloads
In the beginning of this section, it was stated that there are 13 payload types. The other
five payloads are simply data with the generic header applied.The remaining payloads are:
Phase One
The security associations that protect ISAKMP messages are negotiated and created
during Phase I exchanges. The Phase I process is responsible for three steps to create
an SA for further ISAKMP messages for the creation of IPSec SAs. Phase I must negotiate
protection suites to be used throughout the communication between the two systems.
Diffie-Hellman properties must be exchanged during Phase I to foster the creation of
keys for encryption and data authentication for the protected communications in the
latter part of Phase I and Phase II operations. Finally, Phase I must provide for authen-
tication of the remote system or user.
Phase I can accomplish the three steps in Main Mode, Aggressive Mode, or —
currently being developed — Base Mode.The most widely accepted modes are the Main
and Aggressive Mode because they are defined in the IKE and ISAKMP RFCs, while Base
Mode exists currently in draft format. Base Mode will be introduced because it appears
to have a great deal of momentum and is suggested throughout the IETF as an acceptable
mode of operation.
The primary difference between the modes is the number of exchanges it takes to
establish an SA. In Main Mode, there are six exchanges, while Aggressive Mode only
requires three; Base Mode falls in the middle with four messages. Other subtle differences
exist as well, such as the ability to negotiate that certain parameters are nonexistent in
Aggressive Mode. An example of this limitation with Aggressive Mode compared to Main
Mode is that the Diffie-Hellman parameters must be exchanged in the first message from
the initiator. Therefore, the responder does not have the opportunity to negotiate which
Diffie-Hellman group to use for the SA. Other parameters are constrained as well, depend-
ing on the type of authentication mechanism being employed. In some cases, the per-
ceived limitations of Aggressive Mode are used to enhance and accelerate the SA creation.
This aspect is most obvious in remote access solutions.
Main Mode
Main Mode uses six messages in three exchanges to create an SA. The steps typically
start with SA negotiations, followed by Diffie-Hellman and nonce exchanges, and then
the authentication of the peer.
First Exchange. The first exchange begins with a message from the initiator to the
responder that contains an ISAKMP header and an SA header (see Exhibit 9-17). Con-
tained within the SA header are the appropriate proposal and transform set payloads
that present the security options to the responder. Included in the original message is
a cookie from the initiator.
The second message is from the responder and contains an ISAKMP header and an
SA header that contains a single proposal and transform set that will define the protec-
tion suite to be applied. Included is the responder’s cookie.
At this point, each system has agreed upon the security suite that will be used to
protect further communications and has exchanged cookies. The cookies reduce the
ability for an attacker to introduce invalid packets into the negotiation of IKE.
Once the first exchange is complete, each system generates the public Diffie-
Hellman values to be shared with the peer, based on the group defined in the agreed-
upon proposal. After the first exchange, each system contains several pieces of infor-
mation (see Exhibit 9-18), that can be used in the remaining exchanges, depending
on the authentication type. Understanding the effect of the first exchange can be very
Initiator Responder
Message #1
ISAKMP Header &
SA Proposal and
Transformsets ISAKMP Header &
Message #2 Accepted SA Proposal and
Transformset (only one)
Initiator/Responder
1 – Initiator’s Cookie
2 – Responder’s Cookie
3 – The proposed security suite
(ESP-DES and ESP MD5-HMAC)
helpful because all Main Mode first exchanges, regardless of the authentication
method, share the same information.
Second Exchange. The next portion of the communication allows the peers to
share the Diffie-Hellman public values and a nonce, as shown in Exhibit 9-19.The nonce
and cookies provide layers of protection and reassure that the peer in the communica-
tions is alive and actively participating, rather than just repeating previously collected
messages or making bogus requests.
Once the public Diffie-Hellman values are shared and the second exchange is com-
plete, each system processes the Diffie-Hellman value to create a primary key. Each
system creates four keys:
1. SKEYID, the secret key upon which all subsequent keys are based. However, if
PFS is enabled, this key is not used for the creation of future keys, and a new
one is created for the generation of new Phase I and II keys.
2. SKEYID_d, used as keying material to create keys for SAs in Phase II operations
(i.e., for IPSec)
3. SKEYID_a, the key used for data authentication and integrity
4. SKEYID_e, the key used to encrypt IKE messages
The root of the keys that are actually used in encryption and authentication are built
from a primary key, SKEYID. The attributes used to create SKEYID are dependant on
the authentication method being utilized. To build keying material, a pseudo-random
function (prf) is employed with a key and various data that is combined to create a
fixed value. This process should sound familiar from the cryptography chapter. A prf is
a keyed hash function used to generate deterministic values that appear to be random,
but are used for data validation. An example of the process is:
Digest = prf (key/seed, data1 | data2 | data3)
This section is detailing pre-shared secret authentication, and SKEYID is defined as:
SKEYID = prf (pre-shared key, Nonce_i | Nonce_r)
Initiator Responder
Message #3
ISAKMP Header,
KE & Nonce
Message #4 ISAKMP Header,
KE & Nonce
The SKEYID created for the other authentication processes will be introduced here
to alleviate confusion, and re-introduced in the section that details the process for that
particular key.
For digital signature-based authentication, the key is defined as follows:
For the SKEYID for digital signatures, the nonces are combined and used as the key
in the message authentication process against the DH_key.
Note: The DH_key is the value derived from the Diffie-Hellman process
and the result from sharing Diffie-Hellman public values. This value is
not made public and is created independently by each peer using the
public value provided by the other.
Next is the process to create the key for public key encryption authentication
methods (standard and revised):
To create the primary keying material for public key encryption authentication, the
nonces are combined and hashed, then used as the key for the message authentication
function against the cookies.
The primary key is used in the creation of the three remaining keys as follows (same
for all authentication types):
Note: The remaining three keys created with the use of the primary
SKEYID are produced by the same method detailed, regardless of the
authentication method selected or the exchange mode employed. That
is, the keys SKEYID_x are created based on the SKEYID that may consist
of different attributes, depending on the chosen authentication method.
Initiator/Responder
1 – Initiator’s cookie
2 – Responder’s cookie
3 – The proposed security suite
(ESP-DES and ESP MD5-HMAC)
SKEYID, SKEYID_d,
SKEYID_a, SKEYID_e,
Nonce, and DH_Key
What does this mean? Main Mode Phase I with pre-shared secret as the authentication
process provides no identity protection and is completely based on the peer’s IP address.
This is an acknowledged limitation of Main Mode with pre-shared secrets, and for many
situations it does not present a problem. However, in scenarios where the IP address is
dynamic, the responder cannot maintain pre-shared secrets indexed by an IP address it
does not know. Remote access solutions are an example where the initiator’s IP address
may be different for each connection. To accommodate these situations, Certificates can
be used for remote access authentication. However, most remote access solutions available
typically use Aggressive Mode because the ID payload is provided in the first exchange.
Initiator Responder
Message #5
ISAKMP Header,
ID_i & HASH
Encrypted Message #6 ISAKMP Header,
ID_r & HASH
Encrypted
Once the sixth message is received by the initiator, Phase II operations can commence.
Initiator Responder
Message #1
ISAKMP Header &
SA Proposal and
Transformsets ISAKMP Header &
Message #2 Accepted SA Proposal and
Transformset (only one)
ISAKMP Header, KE, Message #3
Nonce, & optional
Certificate Request ISAKMP Header, KE,
Message #4 Nonce, & optional
Certificate Request
First Exchange. The first exchange begins with a message from the initiator to the
responder that contains an ISAKMP header and an SA header. All Main Mode first and
second messages are designed the same. The goal is to share cookie information and
agree on a protection suite for the remainder of the IKE SA.
At this point, each system has agreed upon the security suite that will be used to
protect further IKE communications and has exchanged cookies. Once the first
exchange is complete, each system generates the public DH keys to be shared with the
peer, based on the group defined in the agreed-upon proposal. Each system is aware of
the security to be applied (see Exhibit 9-23).
Initiator Responder
Message #1
ISAKMP Header &
SA Proposal and
Transformsets ISAKMP Header &
Message #2 Accepted SA Proposal and
Transformset (only one)
Second Exchange. The next portion of the communication, shown in Exhibit 9-24,
allows the peers to finally communicate the DH keys, a nonce, and optionally a certif-
icate request can be included to obtain the peer’s certificate.
Initiator Responder
ISAKMP Header, KE, Message #3
Nonce, & optional
Certificate Request ISAKMP Header, KE,
Message #4 Nonce, & optional
Certificate Request
Once the DH keys are transmitted and the second exchange is complete, each system
processes the Diffie-Hellman values to create the primary key and ultimately the three
communication keys.
However, the root key for digital signature authentication utilizes different
information:
As with all other operations, the primary key is used to create the remaining three
keys. The process for creating the three keys does not change and uses the same
information regardless of the authentication or mode of the communication.
At the completion of the second exchange, each system has enough information to
begin encrypting communications. One must realize that the keys to be used for
encryption and message authentication have been generated solely based on the peer’s
nonce and Diffie-Hellman key value. For system authentication, a certificate request can
be included to obtain the public key of the peer if the initiator does not already have
it. The peer must have the other’s public key to validate the signature and authenticate
the peer in the third exchange.
Third Exchange. In Exhibit 9-25, the final exchange consists of several values that
include an ISAKMP header, ID payload, a signed HASH payload to provide data origin
authentication, and an optional certificate payload.The final exchange is encrypted with
the SKEYID_e key.
Initiator Responder
ISAKMP Header, Message #5
ID_i, Signature, &
optional Certificate ISAKMP Header,
Encrypted ID_i, Signature, &
Message #6
optional Certificate
Encrypted
The signed HASH combines several components that are the same for Main Mode
with pre-shared secrets:
The HASH is then signed by the system with its private key and transmitted to the
peer. If the peer had included a certificate request payload in the second exchange, the
certificate would be included in the final exchange to allow the peer to validate the
signature. Remember, the final exchange is encrypted and this provides for another
level of protection in the exchange — identity protection.
The use of certificates provides for non-repudiation. If the two systems maintain the
communication state during IKE Phase I operations, the peer would not be able to
successfully deny that the communication took place.
First Exchange. The first exchange begins with a message from the initiator to the
responder that contains an ISAKMP header and an SA header. Once again, all Main Mode
first and second messages are designed the same.
Second Exchange. The second exchange, in Exhibit 9-27, is where a great deal
of information is processed and shared for authentication. Also, there are some
optional payloads that can be included that depend on certain communication prop-
erties.
The third message uses the responder’s public key to encrypt the initiator’s ID
payload and nonce. Of course, this can only be created if the initiator has the
responder’s public key, and vice versa. The method of obtaining the public key is not
defined in the RFCs and must be provided by external means. This apparent limitation
can be worked around in several methods. An example is remote access implemen-
tations where images or client packages are created that contain the responder’s
public key. Once installed, the client has the key necessary to complete the third
message of the second exchange. The key that can be provided to the client can be
in the form of a certificate, which can be hashed and provided by the initiator in the
third message to allow further identification of the public key being used in the
negotiation.
The encryption of the ID payload and the nonce represent the two-memory
intensive encryption operations in dispute. These two areas, the inability of obtaining
the public key of the peer within the negotiation and multiple encryption passes, are
what were modified to create the revised version of public key encryption.
It is necessary to know that only the bodies of the ID and nonce payloads are
encrypted. The generic headers remain in the clear to allow parsing of the data to
properly decrypt.
As with the other two support authentication methods, the root key for public
key cryptography authentication utilizes different information:
Note: The initiator’s nonce and the responder’s nonce are hashed, and
the resulting digest is used as the key in the pseudo-random function
that is applied to the cookies.
As with all other operations, the primary key is used to create the remaining three
keys. Exhibit 9-28 shows that a great deal of information is available to each system
after the second exchange.
The authentication process is primarily based on the peer’s ability to decrypt the
ID and nonce and includes the valid contents in the hash of the final exchange. This
can be loosely compared to pre-shared secret authentication, in that pre-shared
Initiator/Responder
1 – Initiator’s cookie
2 – Responder’s cookie
3 – The proposed security suite
(ESP-DES & ESP MD5-HMAC)
SKEYID, SKEYID_d,
SKEYID_a, SKEYID_e,
Nonce (after decryption),
ID payload (after decryption),
and DH_Key
authentication is based on the ability of the peer to decrypt the data with a key generated
with the correct password. Interestingly enough, with shared secret authentication,
decryption is an issue with IKE and the inability to determine of the correct password
until the data is being sent.
It is worth noting that the ID payload is encrypted and shared in the second
exchange, allowing a great deal of control over whom the responder replies to. Various
information contained within the ID payload can assist in further identifying the initiator
prior to performing the two asymmetrical encryption processes.
Third Exchange. The final exchange contains an ISAKMP header and a HASH that
is identical to the one used for the pre-shared secret authentication exchange. The final
exchange, as shown in Exhibit 9-29, is encrypted with the SKEYID_e key.
Initiator Responder
ISAKMP Header & Message #5
HASH_i
ISAKMP Header &
Encrypted Message #6 HASH_r
Encrypted
Revised Public Key Encryption. The inability to share public keys or certificates in
the original process and the multiple layers of encryption forced the production of a
more efficient method of authentication using public key encryption, as shown in
Exhibit 9-30.
The original process does not provide for the exchange of certificates or public
keys. To exchange certificates without protection would eliminate the identity pro-
tection currently provided by IKE (in certain modes). Therefore, the initiator must
know the identity of the responder prior to the initialization of the exchange. In many
cases, this is not an issue; nevertheless, there is no provisioning for obtaining keying
information within IKE. For a peer to obtain a key or certificate of a peer, some other
protocol must be supported, such as LDAP. However, in revised mode, the initiator
has the option of sending its certificate to the responder, encrypted with the new
symmetrical session key, which is new to the revised public key method.
The original process also requires two encryption steps: the ID and nonce payloads.
Unfortunately, for the original method, there is no way around this limitation. Both must
be encrypted and they cannot be combined in a single encryption process. To encrypt
both the ID and nonce payload together, the generic header of the nonce would be
unidentifiable, and therefore irreversible — remember, only the bodies are encrypted
to allow parsing. To accommodate a single encryption process, several other properties
would have to be calculated to determine and find the second generic header within
the package, which would offset what cycles were saved by eliminating the load of the
second encryption procedure in the first phase.
As mentioned, the revised version of public key encryption does not have the
disadvantages of the original method. The revised method has half as many encryption
processes and allows for the initiator to provide their certificate (public key). However,
the initiator must still support some other protocol to obtain the responder’s certificate.
Once again, the ability of the initiator to obtain the responder’s public key is beyond
the scope of IPSec and IKE, but several other methods exist to accommodate the need.
As mentioned before, with remote client access, the client system can be provided the
responder’s certificate at the install of the actual client software. This is an acceptable
process for many companies because remote uses typically have their system brought
in for maintenance and the installation of new packages.
First Exchange. The first exchange begins with a message from the initiator to the
responder that contains an ISAKMP header and an SA header. Once again, all Main Mode
first and second messages are designed the same.
Second Exchange. The second exchange, as shown in Exhibit 9-31, can be a bit
more complicated with various options. For starters, the nonce is encrypted with the
peer’s public key just as the original method.
However, the Diffie-Hellman calculated key value (KE) and the ID payload are
encrypted with a newly created symmetrical key. Where did the symmetrical key come
from? Much less, where did the algorithm become agreed? The algorithm used for the
encryption is the one agreed upon in the SA proposal for IKE exchanges in the beginning
of the negotiation.The symmetrical encryption process takes much less processing than
the asymmetrical process; therefore, one can encrypt more data for authentication and
protection by using a newly created symmetrical key based on the nonces. For the
initiator, it uses data it has generated for the first exchange, the cookie and nonce.
Ne_i = prf ( Nonce_i, Cookie_i)
The responder creates a key in much the same way:
Ne_r = prf ( Nonce_r, Cookie_r)
When the responder uses its private key to decrypt the nonce it received from the
initiator — which has been encrypted with the responder’s public key — it can then
use the initiator’s nonce to derive the new revised mode key. In other words, the
protection of the new key used to encrypt the ID, DH key, and optional certificate
payloads rests on the shoulders of the public key encryption process that protects the
nonce. Included in the responsibility of public key encryption is authentication; the
fact that the peer can decrypt the message with the corresponding private key is proof
of the system’s identity. If an attacker obtained the nonce, which usually is in the clear
along with the cookies, the creation of the key would be trivial and the authentication
process would break down. Once the private key is used to obtain the nonce, the
initiator’s cookie is pulled from memory to create the Ke_x key, whichever is derived
from Ne_x and required for the operation.
The Ke_x is created by employing a PRF against the Ne_x value as a seed with a
hash value of 0. By using this method, if the Ne_x is not large enough to satisfy the
encryption algorithm, several of these operations can be used to enlarge the key to
satisfy the requirement of the selected algorithm.
For example, if the key is too small, the result of the primary hash is used with
other hash functions to create a larger key by concatenating the results until the required
size is achieved.
The following is used to create the Ke_x to be used in the encryption processes:
Ke_x = prf (Ne_x, 0)
Note: The process is the same for the initiator as for the responder;
therefore, the example does not expressly delineate between the two.
However, in the event that the Ke_x is too big for the selected algorithm, the most
significant bits are taken from the Ne_x to create the KE_x of the desired length.
Another option available to the initiator is to provide its certificate to the responder
in the third message, encrypted with the Ke_i key. By providing encryption services to
the certificate, identity protection is realized. The inability of the initiator to send its
certificate was another limitation of the original method. Even if the original method
provided for the addition of a certificate payload, identity protection of the initiator
would be lost.
Third Exchange. The final exchange contains an ISAKMP header and a HASH that
is identical to the one used for the pre-shared secret authentication exchange. The final
exchange is encrypted with the SKEYID_e key.
Aggressive Mode
The purpose of Aggressive Mode is the same as Main Mode; however, it completes the
transaction in half the time taken by Main Mode. Although Aggressive Mode is a quicker
process than Main Mode, the costs are in the inability to negotiate various options.
Because more payloads are sent in the first two messages, each peer is committed to
the contents and there is no mechanism for the selection or acknowledgment of certain
parameters. As an example, the Diffie-Hellman public key is sent in the same message
as the SA payload, which defines the DH group to be used — sort of the cart before
the horse syndrome. However, once these limitations are known, the selection of
Aggressive Mode versus Main Mode can be easier, for the most part.
Aggressive Mode was not designed for identity protection, which exists in Main
Mode (except for Main mode shared secret) by the encryption of the ID payload. While
the ID payload may be encrypted in Main Mode shared secret, the contents typically
contain the data necessary to identify the shared secret — the IP address — that is
known to the public. Aggressive Mode does not encrypt any ID payloads, and therefore
the information is available to the public.
Although there appear to be several limitations to Aggressive Mode, there are many
advantages as well. First, there are fewer message exchanges, resulting in less network
overhead and quicker response. Given that half the messages are used for the nego-
tiation of an IKE SA, forcing the ID payload into earlier messages unencrypted, the
creation of the keying material can wait until the last authentication message is
Initiator Responder
Message # 1
ISAKMP Header,
SA Proposal & Transformsets, ISAKMP Header,
KE, Nonce, and ID payload SA Proposal & Transformsets, KE,
Message # 2 Nonce, ID payload, and HASH_r
For some in the industry, the exposure of the ID payload represents insecurity to
the protection of the session. The more information made available to an attacker, the
more likely that individual will find enough of the remaining information to obtain
unauthorized access. In Aggressive Mode, the ID payload can contain the fully qualified
username, leaving only the password to be identified by an attacker. If the VPN gateway
does not employ limited failed attempts, or an administrator has disabled it, it is only
a matter of time before the attacker guesses the correct password.
To reduce the exposure of the user name in the ID payload — using the
ID_USER_FQDN type, there is an identity type called ID_KEY_ID. The ID_KEY_ID, as
defined by the IP Security Domain of Interpretation (RFC 2407) is an opaque byte
stream that can be used to pass vendor-specific information necessary to identify which
pre-shared secret should be used. This sounds a bit more complicated than it really is,
and can best be explained, as with most things, with a picture (Exhibit 9-33).
A separate piece of information can be derived by the client package to further
identify the individual or system requesting a VPN. Because this information is totally
ambiguous, an attacker would have many more steps to derive information of any value.
Primary Exchange. As shown in Exhibit 9-34, the first two messages convey what
is normally shared in a Main Mode exchange with four messages. At the end of the first
exchange, each system has enough information to begin encrypting messages. As men-
tioned before, this is not required by the standards to reduce commitment of the peers
in having to perform encryption and decryption prior to receiving the final hash from
the initiator.
Initiator Responder
Message #1
ISAKMP Header,
SA Proposal & Transformsets, ISAKMP Header,
KE, Nonce, and ID payload SA Proposal & Transformsets,KE,
Message #2 Nonce, ID payload, and HASH_r
Final Exchange. As shown in Exhibit 9-35, the final message completes the authen-
tication with the inclusion of HASH_I from the initiator.
Initiator Responder
ISAKMP Header Message #3
and HASH_i
Initiator Responder
Message #1
ISAKMP Header,
SA Proposal & Transformsets, ISAKMP Header,
KE, Nonce, and ID payload SA Proposal & Transformsets,KE,
Message #2 Nonce, ID payload,Signature, and
optional Certificate
ISAKMP Header,
Message #3
optional Certificate,
and Signature
Primary Exchange. As with the Main Mode, Aggressive Mode simply replaces the
authenticator — a HASH — with a signature (see Exhibit 9-37).
Initiator Responder
Message #1
ISAKMP Header,
SA Proposal & Transformsets, ISAKMP Header,
KE, Nonce, and ID payload SA Proposal & Transformsets,KE,
Message #2 Nonce, ID payload,Signature, and
optional Certificate
Final Exchange. The final exchange of Aggressive Mode is simply the header and
the appropriate signature.Although the initiator has the option of sending its certificate,
shown in Exhibit 9-38, the ISAKMP RFC 2408, upon which IKE is based, allows for the
first message from the initiator to include the certificate payload as well.
Initiator Responder
ISAKMP Header, Message #3
optional Certificate,
and Signature
Public Key Encryption. As with Main Mode, Aggressive Mode provides a means of
authentication with public key encryption (see Exhibit 9-39).
Primary Exchange. The first two messages are nearly identical to Main Mode with
public key encryption. However the first two Main Mode messages that contain the
ISAKMP header and SA payload are included. As shown in Exhibit 9-40, the second
message contains the HASH_r that is normally held to the last message of Main Mode.
Initiator Responder
Message #1
ISAKMP Header,
SA Proposal & Transformsets, ISAKMP Header,
Optional Cert_HASH, KE, SA Proposal & Transformsets,
(ID_i)Pub_r, & KE,(ID_r)Pub_i,
(Nonce_i)Pub_r Message #2 (Nonce_r)Pub_i, &
HASH_r
Final Exchange. In the final message from the initiator (see Exhibit 9-41), the
HASH_I is supplied to the responder.
Initiator Responder
ISAKMP Header Message #3
and HASH_i
Public Key Encryption Revised. As with Main Mode, Aggressive Mode provides a
revised edition of public key encryption authentication (see Exhibit 9-42). The process
of creating the new symmetrical keys in Aggressive Mode is identical to that in Main
Mode. As with all Aggressive Mode messages, the ISAKMP header and SA payload are
combined with messages that would typically be seen in the second exchange within
Main Mode.
Base Mode
Base Mode is not an entirely new mode of operation within Phase I.The ISAKMP defines
several exchanges that have been collected to create IKEs Main Mode and Aggressive
Mode. Of the identified exchanges, there exist a Base Exchange designed to allow for
the exchange of keying and authentication information to be transmitted together —
sound familiar? The ISAKMP Base Exchange was slightly modified to allow several
options to surface. By changing the HASH_i and HASH_r contents, depending on the
authentication type being performed, the peers have the option of postponing the
creation of the keys and the calculated Diffie-Hellman value.The reduction in processing
requirements revolves around the responder because responders are the focal point for
denial-of-service attacks. Base Mode provides a means of reducing the exposure to denial-
of-service by limiting the processing of the responder until the final authentication
message is received. Base Mode also provides another solution or remote access solu-
tions because the ID payload is provided in the first message. However, unlike Aggressive
Mode, many options are negotiable given the change to the HASH contents and what
is included in the messages. In short, Base Mode attempts to provide protection against
excessive processing, and reduce the number of messages while not losing negotiation
capabilities.
The value HASH_I is redefined because the initiator must calculate it before receiving
the Diffie-Hellman public value of the responder. HASH_I is calculated differently,
depending on the selected authentication method.
For digital signatures:
The nonces from each peer are hashed and used as the seed in the pseudo-random
function employed to combine several attributes obtained during the exchanges. The
Diffie-Hellman value from the initiator is represented by Ya, the cookies and ID payloads
from each peer are included, and the SA offer is added to ensure SA alignment and
identification.
A new HASH_I is defined for public key encryption and pre-shared keys:
With the changes to HASH_R for digital signatures, there is no need for the responder
to calculate the Diffie-Hellman values, which also relieves the need to create the keys.
The subsequent SKEYIDs (SKEYID_a, _d, and _e) can be created after the final authen-
tication message is received from the initiator because none of the Phase I messages
are encrypted.
Pre-shared Keys/Secret. As with all of Base Mode operations, the ID and nonce
payloads are included in the first message. The sharing of the ID and nonce in the first
exchange is much like Aggressive Mode; however, the option for negotiating the SA
parameters is available (see Exhibit 9-43).
Initiator Responder
Message #1
ISAKMP Header &
SA Proposal and
ISAKMP Header &
Transformsets, ID
Accepted SA Proposal and
payload, and Nonce_i
Message #2 Transformset (only one), ID
payload, and Nonce_r
ISAKMP Header, Message #3
KE & HASH_i
ISAKMP Header,
Message #4
KE & HASH_r
The obvious advantage of Base Mode with pre-shared secrets over Main and Aggres-
sive Modes is the ability to share identification information, such as ID_KEY_ID, while
having the ability to negotiate the Diffie-Hellman group to be used. Given that the
SKEYID and the new HASH_I do not include the calculated Diffie-Hellman parameters,
the responder does not have to perform any costly operations prior to verifying the
initiator’s identity. Once the final packet is received from the initiator, the responder
can confidently commit system resources in creating keying material.
Digital signature with Certificates. The digital signature (see Exhibit 9-44), as with
the other modes of operation within Phase I, is the signing of the HASH payload. The
removal of the Diffie-Hellman values from the creation of the HASH values relieves the
responder from expensive processes.
ISAKMP Header,
KE & Optional Cert_ Message #3 ISAKMP Header,
payload, and KE & Optional Cert_
Signature_i payload, and
Message #4 Signature_r
Public Key Encryption and Revised Public Key Encryption. Using public key
authentication mechanisms (see Exhibit 9-45), the peer is authenticated by the ability
to decrypt the nonce and produce the correct HASH value. As with other modes of
operation, the public key encryption operation provides identity protection because
the ID payload is encrypted. Once again, the peers are assumed to have the other’s
public key, which must be obtained through other protocols.
Initiator Responder
Message #1
ISAKMP Header &
SA Proposal and
Transformsets, Optional ISAKMP Header &
CERT_HASH, SA Proposal and
Message #2 Transformsets,
(ID_i)Pub_r, &
(Nonce_i)Pub_r (ID_r)Pub_i, &
(Nonce_r)Pub_i
ISAKMP Header, Message #3
KE & HASH_i ISAKMP Header,
Message #4 KE & HASH_r
The use of only public keys does not provide for non-repudiation, and each part in
the communication can successfully deny that the communication ever took place.
The standard mode of public key encryption uses two cycles of asymmetrical
encryption with the peer’s public key. As discussed previously, asymmetrical encryption
is far more processor intensive than symmetrical encryption, such as DES. To reduce
some of the overhead of the operation for the peers, especially the responder, the KE
in the second exchange is not encrypted, as it is in the other two modes (see
Exhibit 9-46).
In the revised mode of public key encryption, a new symmetrical key is created
(identical process as in Main Mode) and used to encrypt the ID payload in the first
exchange. Because both systems have reduced much of the public key encryption
process, the symmetrical key is used to protect the KE in the second exchange. This
final operation comes at very small cost to performance, compared to public key
computations, and the added security of protecting the KE is substantial. By protecting
the Diffie-Hellman public value, there is a substantial reduction in man-in-the-middle
attacks on the communication.
Phase Two
The security association created by Phase I operations is used to protect Phase II ISAKMP
messages generated to create multiple SAs for a supported protocol — in this case, IPSec.
The second-phase operations are designed very similar to Phase I exchanges and
modes. However, less emphasis is placed on authentication, given that the messages
are being shared by way of an authenticated IKE SA. There are two primary types of
modes used within Phase II operations to create SAs for IPSec.These SAs are constructed
and implemented using the security protocols ESP and AH. How the security protocols
are implemented, whether in tunnel or transport mode, combined or nested, is depen-
dant on the VPN requirements and the policy defined by the administrator. During the
first phase of IKE, ISAKMP was used as a message foundation to create exchanges to
create a single security association, a relationship of policies and protection suites to
allow further communications to exist in a protected state. Phase II of IKE employs the
message structure of ISAKMP to provide keying material and characteristics for actual
IPSec VPNs.
Quick Mode
Quick Mode is designed only for Phase II and does not exist in any Phase I operations
because all data passed must be under the protection of an IKE SA. The SKEYID_a
generated in the first phase — that is, linked to the primary SKEYID — is used to
authenticate all Quick Mode messages, and SKEYID_e is used to encrypt them. It is this
aspect of using keys created from material presented in the first phase that defines what
is meant by the “protection” of the IKE SA created in Phase I. Phase II will be completely
exposed to the attacker of the first phase, if successful in breaking the first phase.
Exhibit 9-47. Quick Mode with optional KE payload and client ID payloads.
One may notice that there are some identifiers associated with the HASH payloads.
Each message contains different properties to be included in the HASH that are depen-
dant on what options are selected for use. An example of needing different HASH
contents is the implementation PFS and the inclusion of the KE in the message. Also,
if more than one SA must be created, an added SA payload can be included. Therefore,
for each SA payload, two IPSec SAs will be created, based on the properties negotiated
in the original SA payloads in Quick Mode.
Next is an explanation of the different HASH payloads; options are shown in “( )”.
The contents of HASH(1) are exactly as they appear in the message. Simply put, HASH(1)
is the hash of the entire message.
Much like HASH(1), HASH(2) covers the entire contents of the message; however, the
nonce of the initiator is included.
The third type of HASH includes only the nonces and the message ID. This is to
ensure liveliness of the communication prior to commencement of IPSec traffic.Without
proof of participation by the peer, an attacker could use previously obtained packets
identified as Quick Mode and replay them, consuming resources of the responder —
ultimately a denial-of-service attack.
The “M-ID” is the message ID from the ISAKMP header that identifies the Quick
mode exchange for that particular set of SAs. As with Phase I, the KE is the Diffie-
Hellman public key used by the peers to create a symmetrical key for encryption in
the security protocols of IPSec. The CID_I and CID_r are the client ID payloads,
respectively. Notice the use of SKEYID_a as the seed in the HASH, as described earlier
this key was designed for authentication of data.
Key Material. In Phase I, SKEYID_d was created to accommodate keys for non-IKE
operations in Phase II. The creation of key material for the IPSec SAs is based on several
components obtained in the first two phases. In Quick Mode, a single SA is negotiated
and results in two SAs — one for each direction of communication — that have unique
SPIs, which results in unique keys for each SA.
The information used to create the IPSec keys is dependent on the options used in
the original Quick Mode exchange, specifically PFS. If PFS is configured, the KE values
must be shared between the two peers and included in the first two messages of Quick
Mode. Therefore, the addition, or the lack of a Diffie-Hellman public key will determine
the key created. Given that PFS is not required to be implemented, but is required to be
supported, the default is to create a key without KE included, as follows:
Notice the use of SKEYID_d. This was created during Phase I to provide keying
material for non-IKE protocols; hence, it is now used to build the key for IPSec SAs.
If PFS is configured, then the KE has been shared from one device to the other. It
will now be necessary for each peer to calculate the Diffie-Hellman key specific to the
Quick Mode operations (the second one, the first being created for IKE Phase I) and
include it with the previous attributes for the IPSec KEY.
Omega Sigma
Phase 1 Initiator Phase 1 Responder
Message #1
ISAKMP >
Cookie_i = 0x0912 ISAKMP >
Message #2
Cookie_r = 0x1557
Initialization Vectors (IVs) in Quick Mode. As the number of keys increases and
the protection of one phase is provided by another, the process of handling initialization
vectors for the encryption and decryption processes becomes increasingly complicated.
For IKE to accommodate the multiplexing of Quick Mode exchanges, each exchange
maintains its own message ID. The message ID is also used to maintain coordination of
IV while under the protection of a single IKE SA — hence, a single set of keys. The
single set of keys created in Phase I is used to protect Quick Mode messages by
encrypting them. As each message is encrypted and overlaid by other Quick Mode
messages, the IV must be identified to ensure that the two peers remain synchronized
to encrypt and decrypt messages associated with the same Quick Mode exchange.
Note: If the messages from Phase I were not encrypted, as with Aggres-
sive Mode, the IV calculated for Phase I operations is used for Phase
II. Remember that the Phase I IV is calculated from the HASH of the
initiator and responder’s Diffie-Hellman public value — KE — obtained
early in the Phase I exchange.
From this point forward, the IV is determined much like that of Phase I, each
message’s IV is the last block of cyphertext of the previous encrypted message. Once
the Quick Mode exchange is complete, all the state information, such as the nonces,
DH_key, KE, IV, can be discarded.The state information from Phase I must be maintained
to protect future Quick Mode exchanges, until a re-keying process is started.
Initiator Responder
Message #1
ISAKMP Header, HASH(NG1),
and SA Proposal
Message #2 ISAKMP Header, HASH(NG2),
and SA Proposal
The hashes included in the messages are nearly identical; a closer look may reveal
that they basically exactly the same, when the rules of the protocol are applied.
Essentially, the protocol states that a single proposal will be selected and returned. The
hashes are constructed on the protocol concept; however, the initiator’s HASH includes
the entire SA (header, body, and proposal), whereas the responder’s is simply the
standard reply to an SA proposal.
Notice the use of SKEYID_a, as described earlier. This key is generated in Phase I
for the authentication of all IKE exchanges. SKEYID_e is used to encrypt all the mes-
sages, as with Quick Mode in Phase II. Although New Group is an exchange that can
only happen after Phase I, an established IKE SA must exist between the peers, and it
is not considered a Phase II exchange. Phase II is designed for the creation of further
SAs for the underlying protocols, New Group is provided to augment the IKE process
and not create SAs. The reasoning for employing the New Group Mode only after an
IKE SA is established and can provide protection, is that the data can be very sensitive.
An attacker can use the information within to learn more about the process and possibly
employ a man-in-the-middle attack against the Diffie-Hellman process.
Notification Exchanges
As mentioned before, the IKE SA remains in place although IPSec may no longer be
utilizing it, at least for a period of time. During this dormant time, IKE provides an “out-
of-band”-like communication between the peers for various information exchange
issues. The author uses the term “out-of-band” because the IPSec traffic is unaffected
and is not aware of the exchanges. The messages shared are between the two primary
IKE peers, which can be gateways supporting IPSec traffic between their respective
networks.
Initiator Responder
ISAKMP Header, HASH(AK1), Message #1
Nonce_i, and Notification or
Delete Payload ISAKMP Header, HASH(AK2),
Message #2 Nonce_r, and Notification or
Delete Payload
The nonce is used to provide the responder with random information as fodder for a
reflection to prove participation. The message ID is included to ensure that the proper
exchange is being conveyed. This also allows for authentication of the ISAKMP header,
which contains the ID field. Once again, SKEYID_a is being utilized for authentication
processes.
IKE in Action
Router 1 Configuration
Much of the configuration of the routers (see Exhibit 10-1) has been removed for
simplicity’s sake. However, much is left intact to understand placement within the
configuration. Areas of interest are in bold and detailed at the end of the configuration.
Crypto is the Cisco command for interfacing with the IPSec subcommands. Just as
IP can be used to configure many of the IP-related options within a Cisco router, Crypto
is the IPSec interface (all the commands were entered in enable mode).
The first line in this section defines a key management policy of “1.” The only portion
that one must define for the policy is the type of authentication for IKE. In this example,
pre-shared secret is going to be used. Within this section, an administrator can define
lifetime, DH groups, and other aspects; for our purposes, we’ll use the defaults. It is
possible to create several policies to accommodate different key management and
authentication techniques, depending on the desired VPN.
Having stated that one wants to use a pre-shared secret for key management, one
must define it and associate it with the proposed peer. Therefore, this command states
that the authentication key is “MY-SHARED-SECRET” and the only remote system that can
present this password is system 10.1.1.1 (R2). It is crucial to understand that the term
“key” is misleading. This is not the key that will be used for encryption or data
authentication processes. It will be used in the creation of the keys, but is not the key
itself.The IP address used to associate the key to the peer must be the Internet routable
IP address that is the final access point to the Internet of the peer. At first, this statement
seems obvious; however, in some complicated configurations with the combination of
IPSec and other tunneling protocols (i.e., L2TP) controlled by tunnel and loopback
interfaces, the combination of addresses can become complex. When confronted with
the question of which IP address to use to assign the shared secret, it must be the IP
address that provides the Internet connectivity.
This line is another addition to the system’s SPD definition. As mentioned previously,
the transform set defines the security protocols, encryption to be used (if ESP is
Current configuration:
!
version 12.0
!
hostname R1
!
!
ip subnet-zero
!
!
crypto isakmp policy 1
authentication pre-share
crypto isakmp key MY-SHARED-SECRET address 10.1.1.1
!
!
crypto ipsec transform-set SECURITY-SET esp-des esp-md5-hmac
!
!
crypto map VPN-TO-R2 1 ipsec-isakmp
set peer 10.1.1.1
set transform-set SECURITY-SET
match address 101
!
!
!
interface Ethernet0
ip address 10.4.13.5 255.255.255.0
no ip directed-broadcast
media-type 10BaseT
!
!
interface Ethernet1
ip address 10.1.1.2 255.255.255.0
no ip directed-broadcast
media-type 10BaseT
crypto map VPN-TO-R2
!
!
!
no ip classless
no ip http server
!
access-list 101 permit ip 10.4.13.0 0.0.0.255 10.71.1.0 0.0.0.255
!
!
line con 0
transport input none
(continues)
line aux 0
line vty 0 4
privilege level 15
no login
!
end
utilized), and the authentication properties. What is not seen is the type command.
The type of the VPN is tunnel mode, Cisco does not present this information because
it is default. The transform set for the VPN is called “SECURITY-SET”; it is necessary
to have several sets and associate them in various orders to different IKE policies.
A number, in this example 101, identifies the ACL. However, in a real implementation,
an administrator may want to consider the use of more flexible named ACLs. The ACL
in the example is very simple; it allows all IP traffic between the two systems. In
short, traffic that matches the ACL is identified to have IPSec applied. The ACL does
not exist to restrict traffic and this can cause confusion. To restrict traffic, an ACL
must be applied to the interface itself.An ACL associated with a map — that is, assigned
to an interface — is only used to determine sessions that must be afforded the
protection of IPSec. When implementing and testing the ACL to determine that the
proper traffic is being matched to the ACL, the “show access-list” command will
R1#sh access-lists
Extended IP access list 101
permit ip 10.4.13.0 0.0.0.255 10.71.1.0 0.0.0.255
(64 matches)
In this example, it is worth noting that the IP address of the Ethernet 0 interface is
entered in the ACL, forcing all IP traffic to have IPSec applied to data originating from
the Ethernet 0. The flexibility of IPSec is most evident in this simple example. In the
event there are several internal interfaces, not only can maps be constructed to provide
various levels of encryption and authentication then assigned to interfaces, but ACLs
can be constructed to identify specific information to have the different levels of
protection applied. The ACL provides the culmination between the protection suite and
the data that it is responsible for protecting.
In this example, much has been discussed using Cisco as a model, but there are
many other solutions that accomplish the exact same functionality — in some cases,
less complicated.
interface Ethernet1
ip address 10.1.1.2 255.255.255.0
no ip directed-broadcast
media-type 10BaseT
crypto map VPN-TO-R2
Finally, the configuration comes together at the interface level. In this example,
Ethernet interface 1 is assigned the appropriate IP address and map. The assignment of
the map not only provides an SGW discovery mechanism, but the map links back to
all the independent desirable configurations. The map is the SPD for that interface. It
is quite interesting to see the creation of the SPD so clearly and its relationship to an
interface. The previously defined options (i.e., transform set and ISAKMP policy) come
together at the interface by means of the map.
Router 2 Configuration
The configuration of the second router is nearly identical to the first (see Exhibit 10-2).
However, seeing the configuration will assist in the understanding of what is actually
happening. Once again, the interesting parts are in bold and much of the extraneous
information has been removed.
A policy of “1” is defined in the second router as well as in the first. The policy
number is irrelevant to the VPN to be established. All that matters is that a policy
The same password must be defined on both routers, and associated with the
partnering router. In the example, the password is defined and aligned to the IP address
of R1. This is a good example of out-of-band authentication configuration. IPSec proto-
cols utilize authentication data preconfigured into the peers and does not concern itself
with the manipulation of that data. In various situations, IPSec is not even aware of an
incorrect password.
A transform set is created that must be identical to the R1 transform set. If a transform
set is defined that does not match, a VPN cannot be established. A router can have
several transform sets that can contain one that matches. If the matching transform set
is included in the map associated with the interface, it can be utilized for communica-
tion. In the example, the name of the transform set is the same as it was in R1, but this
has no bearing on the communication whatsoever. Duplicate names of maps and
transform sets are not allowed on the same system, but can certainly be duplicated on
separate systems without any effect on the connection. Names of profiles and policies
have only local significance. This allows the administrator of the solution to develop
policies and standards builds for router management for the entire solution. An example
is the creation of standardized named transform sets. A transform set is a grouping of
communication requirements, such as use ESP with DES and MD5 authentication. Given
the available encryption algorithms and authentication codes — combined with being
able to implement ESP or AH — the number of permutations is manageable. In a system
that provides DES and 3DES for encryption and MD5 and SHA for authentication, the
usable matrix can be easily standardized. An example may be:
These standard transform set identifiers can be shared among all the systems in the
organization and provide configurable defaults that can be plugged into the policies as
necessary. In reality, each one can be included in every policy created and the first
matching set will be employed.The concept of matching an entry in a list that is parsed
allows for more control in a diverse environment.
As with R1, a map is created that collects all the information configured thus far so
that it can be associated with an interface. Also, an access list is provided in the map:
The ACL used is nearly the same as in R1 and is used for the exact same purposes.
Once again, the number 101, while identical to the one configured in R1, has only local
significance.
interface Ethernet0
ip address 10.1.1.1 255.255.255.0
no ip directed-broadcast
crypto map VPN-TO-R1
Finally, the map is associated with an interface to combine the information into a
single point of application.
In Operation
Now that the routers have been configured, no SA is created until data is processed by
the SPD. The SPD assigned to the interfaces must determine the appropriate action for
each inbound and outbound packet. If an SA does not exist in the SAD, the SPD will
request one for communications.
In Exhibit 10-3, router R1 sends an ICMP Echo Request to R2, using the ping
command. Because any and all traffic between the routers falls within the map’s ACL,
a single ping will initiate the VPN. The result is the debug information from the two
routers so that one can see IKE and IPSec in action based on the configuration outlined
in the previous section.
Explanation of R1 Debug
The debug information collected from the router is very powerful in showing the actual
process of the IKE protocol. It is one thing to discuss the attributes and messages; it is
another to see the activities being performed. Interpreting log files is a crucial capability
in the troubleshooting of a VPN. Each vendor provides different kinds of logs with their
solution, and understanding the different types may take time. To add to the complexity
of learning how to troubleshoot, many vendors do not follow the standards close enough
for the reviewer to make certain determinations. A good example is when attempting
to determine the problem with a VPN in a lab, the log was complaining about properties
well into the communication.A quick determination was that communication was being
established but somewhere at the beginning of Phase II, the operation was failing. After
hours of work, the problem turned out to be the switch between the devices. The
switch was replaced and the VPN began to operate. Given the results of the log files
and knowledge of the IPSec standard, the final interpretation was wrong. Further
investigation revealed that the log files were simply incorrect and the establishment of
the VPN was not following the standards. The entire escapade was frustrating, but the
lesson learned was that few systems provide logs that accurately reflect the operations.
Much of this is due to the forced reduction of time to market for VPN products. Even
early in Cisco’s implementation, the debug information was very confusing and did not
reflect the internal operations correctly. However, much of that has changed and Cisco
now provides a good platform for sharing logging information about an IKE establish-
ment and IPSec operations.
1 R1#ping 10.1.1.1
2
3 Type escape sequence to abort.
4 Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
5
6 IPSEC(sa_request): ,
7 (key eng. msg.) src = 10.1.1.2, dest = 10.1.1.1,
8 src_proxy = 10.1.0.0/255.255.0.0/0/0 (type = 4),
9 dest_proxy = 10.1.0.0/255.255.0.0/0/0 (type = 4),
10 protocol = ESP, transform = esp-des esp-md5-hmac,
11 lifedur = 3600s and 4608000kb,
12 spi = 0 x 0(0), conn_id = 0, keysize = 0, flags = 0 x 4004
13 ISAKMP (10): beginning Main Mode exchange
14 ISAKMP (10): sending packet to 10.1.1.1 (I) MM_NO_STATE
15 ISAKMP (10): received packet from 10.1.1.1 (I) MM_NO_STATE
16 ISAKMP (10): processing SA payload. message ID = 0
17 ISAKMP (10): Checking ISAKMP transform 1 against priority 1 policy
18 ISAKMP: encryption DES-CBC
19 ISAKMP: hash SHA
20 ISAKMP: default group 1
21 ISAKMP: auth pre-share
22 ISAKMP (10): atts are acceptable. Next payload is 0
23 ISAKMP (10): SA is doing pre-shared key authentication using id type ID_IPV4_ADDR
24 ISAKMP (10): sending packet to 10.1.1.1 (I) MM_SA_SETUP
25 ISAKMP (10): received packet from 10.1.1.1 (I) MM_SA_SETUP
26 ISAKMP (10): processing KE payload. message ID = 0
27 ISAKMP (10): processing NONCE payload. message ID = 0
28 ISAKMP (10): SKEYID state generated
29 ISAKMP (10): processing vendor id payload
30 ISAKMP (10): speaking to another IOS box!
31 ISAKMP (10): ID payload
32 next-payload :8
33 type :1
34 protocol : 17
35 port : 500
36 length :8
37 ISAKMP (10): Total payload length: 12
38 ISAKMP (10): sending packet to 10.1.1.1 (I) MM_KEY_EXCH
39 ISAKMP (10): received packet from 10.1.1.1 (I) MM_KEY_EXCH
40 ISAKMP (10): processing ID payload. message ID = 0
41 ISAKMP (10): processing HASH payload. message ID = 0
42 ISAKMP (10): SA has been authenticated with 10.1.1.1
43 ISAKMP (10): beginning Quick Mode exchange, M-ID of 953616512
44 IPSEC(key_engine) : got a queue event...
45 IPSEC(spi_response): getting spi 413467620 for SA
46 from 10.1.1.1 to 10.1.1.2 for prot 3
47 ISAKMP (10): sending packet to 10.1.1.1 (I) QM_IDLE
48 ISAKMP (10): received packet from 10.1.1.1 (I) QM_IDLE
(continues)
R1#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1,
timeout is 2 seconds:
The first lines show us the entry of the ping command and the message generated to
the operator showing that the operation has been started.
IPSEC(sa_request): ,
(key eng. msg.) src = 10.1.1.2, dest = 10.1.1.1,
src_proxy = 10.1.0.0/255.255.0.0/0/0 (type = 4),
dest_proxy = 10.1.0.0/255.255.0.0/0/0 (type = 4),
protocol = ESP, transform = esp-des esp-md5-hmac,
lifedur = 3600s and 4608000kb,
spi = 0 x 0(0), conn_id = 0, keysize = 0, flags = 0 x 4004
The IPSec SA request portion details the SPD entries for the SA to be included in
the SA payload as the proposal and associated transform sets. The first few lines of this
section display the SPD’s identification of the destination and source that allow it to
define the security to be provided to the packets. Line 10 is informative in that it shows
that a single protocol has been configured, resulting in one proposal that contains two
transform sets —DES encryption and HAMC-MD5 authentication.
Although neither a lifetime limit nor a maximum data transmission was defined, they
are defined by the default settings. Notice that the maximum amount of data is defaulted
at over 4 GB of data. Because the configuration did not define a lifetime value or attribute,
this is assumed as the maximum amount of data possible for the ISA; this value is realized
by setting the 32-bit attribute in the SA transform set to 0 × 0 0 × 46 0 × 50 0 × 0. In
addition, Phase I operations use cookies for IKE SA creation, and the SPI is set to zero.
The connection ID is zero because this is the first packet being generated for the VPN.
No keys are defined because DH has not transpired and the algorithms in the proposal
have not been accepted.
The next section shows the Main Mode packet containing the ISAKMP header and
SA payload information being sent to R2.
The responder replied with a single proposal that existed in the original proposal
from R1. In the event that several proposals were provided to R2, only one can be
selected and returned — unchanged. This section shows that the SA information has
been received from R2. The first step is ensuring the data in the proposal has not
been changed and that the accepted proposal is valid according to the policy
Line 23 shows that the router understands that the ISAKMP is a pre-shared key based
on the peer’s IP address and, therefore, makes the alignment for computation.
Lines 24 thru 28 detail the exchange of the third and fourth IKE payloads that
contain the nonces and public DH values. Once this information is obtained and
verified, the keys can be created. The size and number of keys are known due to the
proposal payload information agreed upon in the first two messages. Notice that the
two systems have assumed that they have initiated a limited relationship, based solely
on the peer’s IP address and the associated policies. Line 28 states that the keys have
been generated.
Another point worth noting is that the SKEYID is generated by the responder
prior to sending its KE and nonce payloads to the initiator. By doing so, the responder
is prepared for future exchanges; however, it has committed to the generation of the
key prior to the initiator and prior to any solid authentication. Hence, this could be
seen as a weakness and a possible denial-of-service against the router. Because the
initiator can send only a few messages to the responder that can result in the creation
of keys on the part of the responder, the initiator is free to flood the responder
consuming system resources.
Next is Cisco taking advantage of the optional vendor ID payload entry to add one
more attribute to the payload chain. It is almost humorous how excited the system gets
when it realizes that it is talking to a cousin.
This section displays the creation of the ID payload to be presented to the responder.
The next payload type of 8 signifies that the HASH_I is to follow. The type of 1 states
The last two exchanges — packets 5 and 6 — are performed and finalize the ISA.
What is not detailed in the debug data from R1 is that this information is encrypted.
The HASH that is included in the payloads is to authenticate the message and the
information gathered to this point. Because the ID payload is included in the exchange,
it is used as part of the HASH. Other information included in the HASH was exchanged
previously.A good example is that cookies are included in the HASH, which were shared
in the original ISAKMP header. Also included in the HASH are the DH public value
created by the initiator and the one received by the responder. Using the HASH
exchanged in the last few packets will validate all the peer information.
It is interesting to note that if the password is incorrect, the key generation will be
based on bad information contained in desperate databases. The result is that the final
exchange will be decrypted into gibberish and several vague errors will arise. Pre-shared
key authentication is very popular, especially with remote access solutions, but there
are several weaknesses to the process.
At this point, IKE Phase I is complete and Phase II can begin to create SAs for IPSec
operations, as can be seen in line 43.
This section reveals that R2 has followed through with VPN establishment and has
initiated Quick Mode. Notice “for prot 3.” Protocol 3 is the IPSec DOI identification for
IPSec ESP. This can get confusing, knowing that the protocol ID for ESP is 50, but this
is strictly the IPSec’s DOI for the Phase II QM negotiation.
What is missing is the SA proposal from R2 that includes the transform sets. In the
beginning of the original IKE exchange, one saw the identification of ESP, the encryption
identification, and the authentication algorithm to utilize. It is necessary to know that
the SA payload is defined, authenticated (HASH’ed), and included in the first QM packet.
The creation of the transform set was not in the R2 debug. Of course, all of this is
encrypted using the keys derived from Phase I.
In the next section, one sees that the QM packets get exchanged and R1 once again
validates the proposal from R2 against the SPD. The line “encap 1” specifies that the SA
will be using IP encapsulation; therefore, it is a tunnel mode ESP SA. Once again, the
lifetime is in seconds and kilobytes — these should look familiar from Phase I. Finally,
the authentication type to be used for the SA is derived.
After the proposals are validated against the SPD, the nonce and ID of the packets
are processed.
This section constitutes a prelude to the creation of the SAs by having the SPD
reflect the policies in the log. It is necessary for the SPD and the SAD to communicate
to ensure that what is required by the policy is created by the SAD. In essence, this is
what we are seeing. Also, notice the two SAs for true communication.
This section has a lot of interesting information to convey. At the top, one sees the
“key_engine” receive an event to initialize an SA. The source and destinations are
verified, and the SA proposals containing the necessary transform sets are compiled.
This is simply words in a log that reflect the creation of the ISAKMP data to be handed
off to the ESP header and associated operations.
One interesting aspect is as the process is completed and the VPN is established,
the results of the original ping command are displayed. The ping used to initiate the
VPN is displayed starting on line 82. The time it took to establish the VPN exceeded
the time for the first ICMP echo request. Therefore, one sees “.!!!!,” telling us that the
first echo reply was not received. It is worth noting that the VPN being created in this
lab experiment is being established on Ethernet, with no other processes running on
the router — including no other data being routed. The routers in the test are simply
establishing a simple VPN over a high-speed connection. Consequently, the establish-
ment may seem very fast, only a 5-ms average round trip that includes the loss of 20
percent of the packets, but in reality the process was surprising slow. In some real-
world implementations, only the second ping command showed any successful packets
and even then the success rate was limited to the last few datagrams.This is an example
showing that key creation and establishment of a VPN can have a significant impact on
system resources.
IPSEC(create_sa): sa created,
(sa) sa_dest = 10.1.1.2, sa_prot = 50,
sa_spi = 0 x 18A503E4(413467620),
sa_trans = esp-des esp-md5-hmac , sa_conn_id = 11
IPSEC(create_sa): sa created,
(sa) sa_dest = 10.1.1.1, sa_prot = 50,
sa_spi = 0 x 3530692(55772818),
sa_trans = esp-des esp-md5-hmac, sa_conn_id = 12
Finally, the router displays the current SA’s status. The SPIs relate to the two SAs and
can be used to identify and track the activities of the respective SAs.
The following is the result of a command to display the ISAKMP SA status that
allows one to verify the actions within the SAs. The command “show crypto isakmp
sa” provides a detailed list of the security association attributes and statistics. It is
interesting to see that the command output not only provides the IKE SA information,
but also the IPSec SA data — for both protocols. This command is very valuable in
troubleshooting and knowing what the system is doing with respect to the configu-
ration. For some implementations, the result of this command can fill hundreds of
pages.
Within the command output, there are four sections that detail the existing inbound
and outbound SAs. Included in the report are the sections to identify the two security
protocols that can exist. However, in this example, there are no AH SAs because only
the ESP security protocol was used .
encrypts the fifth message and sends it to the responder. Unfortunately, the password
is incorrect, resulting in a bad SKEYID_e. The responder receives the message and uses
the symmetrical key created earlier to decrypt the message. The result is nothing more
than a collection of characters and numbers that the responder must assume is correct.
The responder starts to parse the data until the value of the ISAKMP header does not
align, resulting in failure of what Cisco has logged as a sanity check.
Thus, IKE simply assumes the worst and starts the entire process from the
beginning — going through Main Mode again from the first message. Based on the logs,
it almost appears that the roles have reversed; regardless, the results are the same. To
the author’s surprise, this continues for several minutes, the boxes insisting they can
speak to each other but a message keeps going bad.
There has been discussion that this issue represents a fundamental problem with
certain areas of IKE. The SKEYID for pre-shared secrets is basically the password
combined with the nonces from each system. It has been argued that the password
should not be linked to the SKEYID because the authentication technically has little to
do with the encryption process. The SKEYID can be created with valid material, such
as the key for digital signatures, and use the password in the HASH to accommodate
the authentication. See the following example.
First create the primary key from the nonces as normal, but use the more powerful
Diffie-Hellman calculated key instead of the password. This is the exact same process
used to create the SKEYID for digital signatures. Of course, this material is used to
create the SKEYID_e, which is used to encrypt and decrypt the actual messages.
The fifth Main Mode message, or the third Aggressive Mode message (if optionally
encrypted), will contain a HASH that can be calculated with the password. This process
will allow the encryption and decryption processes to remain sound if the password
does not pass. For increased granularity, the password can be hashed on its own to
allow the responder to know if the HASH error is the password or other attribute
contained within the calculation.
Denial of Service
Denial of service (DoS) encompasses many aspects that can range from information
destruction and unavailability to total system failure. Most people align the term DoS
with brining a system down and forcing a reboot or re-initialization. The TearDrop
DoS utility was used to upset the TCP/IP protocol stack that resulted in the system
not accepting future datagrams. Systems that were vulnerable to this type of attack
could easily be shut down and removed from service by sending a barrage of specially
designed datagrams to the target system. This type of attack took advantage of a
weakness in the implementation and was fixed in many systems once discovered. This
attack also represents a situation in which the attacker must do very little to wreak
havoc on another system.
Other types of DoS are not specifically designed to take advantage of a specific
vulnerability, but rather to exploit a communication design flaw. By sending many
valid packets, the target system must respond because there is no way to determine
that the traffic is not a valid attempt to establish a connection. The SYN flood attack
is a perfect example of this type of attack and is inherent in any system running
TCP/IP as the protocol. Simply explained, a SYN flood is the result of an attacker
sending many requests to communicate to a remote system. As the target system
replies with SYN/ACK, acknowledgment to the request, the attacker simply ignores
it and sends more requests to communicate — SYNs. The target system must assume
that the lack of a response is due to network issues or some other problem and
therefore waits and sends several follow-up SYN/ACKs for each received SYN. At this
rate, the attacker can generate many more requests than the target can compute,
ultimately resulting in that the buffer provided to the SYN/ACK history over runs and
a system failure or overload is realized. In this example, the vulnerability exploited
is in the design of the communication protocol. By using the communication setup
process to make the target work more for each packet received, the attacker has to
work to create and send them.
In some cases, the process can be amplified to reduce the load on the attacker
and increase the load on the target. In the past, this was provided by utilities such
as Smurf and PapaSmurf. These utilities took advantage of broadcast properties to
amplify a single packet to thousands that could be directed at a single target. Smurf
provides an excellent example of this process. A broadcast ICMP packet is transmitted
from an attacker’s system with the source address replaced by the address of the
Commit Bit
The use of the commit bit in Quick Mode is to allow the responder to postpone the
commencement of IPSec traffic. During IKE Phase II negotiations, the responder
provides all the necessary data for the creation of the IPSec VPN to the initiator prior
to having all the necessary information from the initiator. In the latter part of the
messaging, the initiator receives attributes from the responder that allow it to create
all the necessary keys and associated information to start sending IPSec protected
communications. However, the initiator is bound by protocol to provide a final
message that contains information that the responder requires to create the corre-
sponding information to participate in the VPN and create the necessary SAs. There-
fore, the initiator can send the final message to the responder, followed immediately
by IPSec communication datagrams.
This communication practice can result in problems for the responder in two
primary ways. The responder may be overburdened with other processes, or simply
outperformed by the initiator, and cannot create the associated SA information before
receiving IPSec communication data from the initiator. If this happens and the
responder is unable to mirror the SA from the initiator, all the packets will be dropped
or packed away in a buffer to provide a limited window of time for the responder
to catch up. Another aspect that can affect the communication is when the packets
from the initiator are received out of order. As an example, the final IKE Phase II
message that contains the last attribute required by the responder is received after
IPSec communication datagrams from the initiator. If the initiator transmits the final
IKE message followed by IPSec communication data, there is an opportunity for the
Because the HMAC functions are hashes, they are restricted to certain block sizes
that will have an effect on the resulting key size. If a hash algorithm has a block size
of 8 bytes, but the requirement of the final key is 30 bytes, the PRF has to be used four
times into itself, combining the results and taking the most significant bits to produce
the necessary key. The following is an example based on the creation of the pre-shared
secret SKEYID, in which each Bx is one resulting block of 8 bytes.
This operation was previously defined as equaling the SKEYID. However, that would
result in a key 4 times too small.
The same process is applicable to other key generation operations. As the three
constant keys are created (_a, _e, and _d), they must be increased to accommodate the
encryption algorithm. For example, the creation of SKEYID_d, the first of the three to
be computed:
Once the blocks are created, one can combine the results and take the first 30 bytes
for a key.
Note: When the certificate is passed from the initiator to the responder,
it is hashed. The first question that seems to quickly follow is, why hash
a public certificate when certificates are designed to be shared in the
open without risk to the integrity of the certificate? The answer is
anonymity — identity protection of the peers. If someone were watch-
ing the communication, they may only get the Internet IP address and
a collection of encrypted data. However, if the certificate is passed in
the clear, the identity of the peer is exposed, ultimately adding to the
knowledge of the attacker. Many aspects of IKE are designed around
the protection of the identity of the peers. As the exchanges are exam-
ined more closely, one can see where the identity is open to the public
for some exchanges (as with all of Aggressive Mode and pre-shared
secret in Main Mode), and not with others.
CRACK
The RFC draft CRACK, IKE Challenge/Response for Authenticated Cryptographic Keys, was
submitted as a new Phase I negotiation to provide for legacy authentication applications.
One of the three authors was Dan Harkins, who was one of the authors of the IKE RFC,
so CRACK was well-written and attempted to accommodate several scenarios.
CRACK defined several changes to various components of IKE and utilized currently
accepted formats. An example of using existing formats is that CRACK uses keys that
are based on the same creation techniques currently defined in IKE for digital signatures.
In short, CRACK is a modified IKE Phase I exchange.
As shown in Exhibit 11-2, CRACK expounds on existing processes and introduces
new ones to accommodate the new protocol.
Message #4
ISAKMP Header & (Signature2 I CHRE)
Message #5
ISAKMP Header & (Signature3 I CHRE)
The first message from the remote user contains an ISAKMP header, security association
attributes, the Diffie-Hellman public key, and a nonce. An optional certificate request can
be made to instruct the responder to include its certificate in the next message to allow
the initiator to validate the signature accompanying the certificate. The signature provides
system authentication, as with normal digital signature authentication methods.
The next message is very similar in nature. The ISAKMP header is included, as with
all IKE negotiations, and an SA payload that contains the agreed-upon security associa-
tion parameters. Next is the certificate payload that is included if the initiator provided
a request. Also included is the Diffie-Hellman public key, signature, and nonce. The
signature in the responder’s message is provided to allow the initiator to authenticate
the responder.
Once the initiator receives the second message, there is enough data available to create
the necessary keying material, and therefore the remaining messages are encrypted.
In the third message, the CHRE represents a challenge/response payload that can
be used by legacy authentication applications to authenticate the user of the system
with which it now maintains a security association. The PK payload is the public key
of the initiator. It is at this very point that the similarities to PPP and CHAP are evident.
As with PPP, once a communication foundation is established, an authentication protocol
can be injected prior to establishing network connectivity (NCP). CRACK represents
much the same concept; it allows a security association to be created, and then the
user authentication can commence. If the user authentication is successful, the VPN is
authenticated and Phase II operations can begin creating IPSec SAs.
The fourth message is from the responder and contains a signature and CHRE
payload. The CHRE payload may contain the challenge from the responder’s internal
RADIUS server. The final message is similar and contains the initiator’s response to the
challenge. Other messages can follow, allowing for several variations of authentication.
By supporting a flexible message structure, the protocol allows for many different types
of legacy authentication.
The following are some examples in which the number of messages can vary,
depending on the authentication method.
In Exhibit 11-3, the responder simply asks for the user name and password. In a
typical situation, this would be a PAP session. However, this exchange is under the
protection of the keys previously created by the first two messages in CRACK.
Exhibit 11-4 is very similar to the CHAP exhibit presented earlier; however, this
shows acknowledgments that can utilize messages added to the CRACK exchange.
Challenge/Response
Initiator Authentication Responder
Message #1 REQ. Name = ""
Password = ""
Challenge = "123"
REQ. Name = "Rain" Message #2
Password = "gkjhg23"
Message #3
Acknowledge Message #4
Status
As shown in Exhibit 11-5, the responder can simply ask for the PIN number to be
included with the password. This does not necessarily enhance the communication;
and in Exhibit 11-6 one sees that the responder can ask for the PIN separately.
Both of these examples are valid, and represent different flavors of obtaining the
PIN. For some solutions that require PIN numbers to be calculated and shared, several
messages are employed (as shown in Exhibit 11-7), to extend the authentication process.
As with the other examples, there are several variations in the process of obtaining user
credentials.
Using CRACK as an example, it has been shown that there is a way to accommodate
legacy authentication systems into IPSec VPNs where there was none before. There are
other examples of drafts that were not detailed but provide a very similar solution. The
primary differences between proposals to the IETF is the phase in which the authen-
tication takes place. Some provide new exchanges within IKE Phase I, such as CRACK,
while others offer new exchanges to occur after normal Phase I operations but before
Phase II operations that are designed to create IPSec security associations.
Challenge/Response
Authentication (two-factor)
Initiator Responder
Message #1 REQ. "Name= "" Password=""
Passcode= ""
REQ. Name = "Rain" Message #2
Password = "catlover"
Passcode = "8967"
Message #3 Status=OK
Acknowledge Message #4
Status
Exhibit 11-6. Authentication with a PIN number Included in the challenge and not associated
with the password.
Challenge/Response
Authentication (two-factor)
Initiator Responder
Message #1
REQ. Name= ""
REQ. Name = "Rain" Password= ""
Message #2
Password = "catlover"
Message #3 REQ. "Enter Password with
Passcode"Name="" Password =""
REQ. Name = "Rain" Message #4
Password = "catlover8967"
Message #5 Status=OK
Acknowledge Message #6
Status
Security Policies
and the Security of VPNs
1. On the hard drive. Typically from being copied over by the user in an attempt
to increase performance while editing the file. However, data that is cached to
the hard drive is vulnerable as well.
2. In memory or in process. As information is accessed, much of it is maintained
in memory, or virtual memory, that can be exposed to certain types of vulner-
abilities. In some cases, information is completely in the clear, but when on
disk or transmitted, it is not.
3. In transit. When data moves from one system to another, it is vulnerable to a
myriad of risks and influences.
As for VPN security, the transit state is what has primarily been addressed. The
security of IPSec and IKE is impressive and when IPSec is employed correctly, the
transmission of data should be the last concern when analyzing the security of the VPN.
It is the other two states that this section addresses.
Implementation
Considerations
Encrypted (ESP)
Authenticated
Set to Zero during
lmmutable Authorization
Fields Only Process
NEW IP AH AH Authentication UDP L2TP PPP IP/IPX Data
Header Header Data Header Header Header Header Payload
Information Security
Information can exist at varying levels of sensitivity. Typically, this is controlled and
managed by a data classification policy that defines the organization, handling, and
identification of various data. Information labels can be employed to identify the data’s
sensitivity as it traverses a network. This process is designed to prevent the unautho-
rized transmission of data from a secured network to an unsecured network or
between unauthorized systems. Because the data itself is identified on the network,
it is irrelevant who or what is attempting to violate policy.
The ability to support data classification and the application of labels is referred
to as multi-level security (MLS). MLS requires access controls that prevent unprivileged
users and systems from transmitting sensitive data. IPSec can be used to facilitate MLS
environments. By operating at the network layer, IPSec has the opportunity to label
data and validate other labels as they traverse the system.
The security protocols provided by IPSec can be leveraged to accommodate many
aspects of employing MLS. An example is the AH security protocol; it can be used to
tie the IP header to the data label through the authentication process. In standard IP-
based networks, data labels are available for implementation; however, there is no
form of authentication associated with the label. The label can be removed, forged,
or modified without discovery. IPSec can be applied to eliminate the vulnerability.
The ESP security protocol can be used to encrypt information exchanges between
systems. When combined with the appropriate key management and algorithms, MLS
can be implemented to accommodate several levels of security. Key management can
use classification labels to accommodate access controls based on several different
attributes. By providing distinction in the key management process, data is only
forwarded to authenticated systems and users. Once IPSec and IKE policies are merged
with MLS policies, the two can be leveraged in many ways to accommodate controlled,
secured communications with several transform sets for layered communications.
SA Provisioning
IPSec is based on the application of security protocols that are implemented in a VPN
based on the policy of the network and defined within the system. The combination
of the security protocols with well-designed policies in the SPD will facilitate MLS.
Normally, an SA is established to provide a secure communication relationship
based on various attributes shared in the creation process. A good example is Main
Mode with pre-shared keys. The VPN is entirely based on the peer’s IP address. Once
the VPN is established, only then does the responder know the provided details of
In this simplified example, HTTP protocol access to the network 10.23.7.0 is pro-
vided AH and ESP security protocols using MD5 and 3DES, respectively. IKE automatic
key management will be invoked, the authentication will use a shared secret for origi-
nation authentication, and the key operations will use DES encryption with SHA message
authentication.
A policy is a combination of management and process. Management is the interface
and the ability to acquire administrative directives and process them into a deliverable
package that can be used to populate the SPD and, ultimately, the entire solution. As
mentioned, there are literally dozens of examples that are currently being deployed in
VPN solutions; every vendor has its own way of doing things. This is the result of the
lack of standards and because the IETF does not mandate a particular representation
of policies. This is a natural position for the IETF, due to a standards board that is not
designed to instruct policy management, however, it may standardize on various foun-
dations, such as protocols and implementation techniques.
A policy implementation is cognizant of security implications as well as traffic flows.
It is easy to say that all HTTP traffic from A to B will be encrypted for security reasons,
but the policy must be aware of the traffic and have the ability to identify it properly,
given the vast options provided by selectors.
There are several requirements placed on IPSec policies to be efficient, functional,
and effective. The policy must be flexible and encompassing without affecting the
integrity of the protocols that it is guiding. A policy implementation should not weaken
an IKE or IPSec implementation, but rather support the protocol and all of its options.
A policy will have to accommodate several environmental constraints, ranging from
policy storage types and size limitations to processing formats. For example, a firewall
may have a hard drive and use Solaris as the operating system, which provides various
opportunities to the developers; whereas, a VPN device may not have a hard drive —
only NVRAM — and use a proprietary operating system. If a policy is in the form of a
file, the size of that file could impact the storage on the VPN device. In addition, the
transmittal of a policy can consume bandwidth, take time, and be prone to errors. The
ability to properly share, protect, and verify policy data can be directly associated with
the platform, which could change from implementation to implementation. One can
only begin to imagine the complexities.
Because IPSec was designed to be transparent and based on TCP/IP, the goal was to
have true interoperability — as found in today’s TCP/IP implementations. Regardless of
the platform, if TCP/IP is implemented correctly and according to the standards, there
is no solid reason why it could not talk to any other device using an equally compliant
protocol stack. Granted, the policy required to support TCP/IP is simple when compared
to IPSec, but existent nevertheless. The IP address, subnet mask, gateway, multicast
domains, etc. are required for TCP/IP operations. For IPSec interoperability, the task of
policy management is far more complicated. Imagine a router establishing an IPSec VPN
with a VPNet VPN gateway, several other routers, a Check Point firewall, and a couple
of remote user clients. Each solution has different system attributes that can affect the
policy interpretation, protection, management — everything.
Policies must support all the capabilities maintained within IPSec and IKE, and
therefore reflect the functions provided by the underlying protocols. The policy must
The ability of a policy to be defined for a network is required. Given this is available
as a selector, the granularity must be able to reach up to include an entire subnet. At
the other end of the granularity spectrum; the policy must be able to control appli-
cation-level implementations. The TCP service ports used for the communications can
typically identify applications that use TCP/IP. The ability to combine application-level
controls with network and host policies is a fundamental requirement of the policy,
as is the ability to implement policy with respect to the security protocols that are
being implemented. Whereas previous requirements focused on what was required
to identify the traffic, this aspect of IPSec policies also concerns how to handle the
traffic. The application of multiple security protocols, AH and ESP, must be supported
by the policy to afford the communication the highest security provided by IPSec.
This is an example of one of the fundamental requirements of a policy — it must not
weaken the supported protocols. These three options — network, application, and
security protocol — are necessary to be combined to form a comprehensive policy
to meet the minimum requirements set forth by th available selectors of IPSec.Another
basic requirement of the policy is to provide basic filtering and control over traffic
based on the three primary requirements of IPSec: drop, forward, or apply IPSec. This
requirement is also related to the policy that enables support of multiple SAs and IKE
SAs.
Each of these stated requirements are intimately related parts that make up the
whole. Each section that needs to be supported must be provided to allow functionality
of the other requirements. Therefore, any weakness in one area will affect many — if
not all — of the others. This is an excellent opportunity to discuss limitations of
existing implementations. Briefly introduced earlier, some vendor implementations do
not necessarily follow the standards, nor do they implement all the features provided
by IPSec; nesting VPNs is a good example. Nearly every solution this author has worked
with, implemented, or tested has intense variations in functionality that can be imme-
diately identified by the policy structure. In some cases, the policy implementation
technique actually limited the entire implementation. This can be realized when the
primary requirement of an IPSec policy is not to limit the underling protocol’s func-
tionality. An example is a VPN device that allows the ability to identify interesting
traffic based on IP source and destination, but not on the transport layer application
service ports. This could be expected if the system simply does not inspect the TCP
header, which would be an understandable reason behind the limitation. However,
the implementation did allow for the blocking of traffic based on application port on
The Microsoft Management Console (MMC) is the access point to AD and is used
as an interface for administration of systems, local and remote. The MMC employs snap-
ins, small management units that can be collected into a single interface for customized
administration. In Exhibit 13-3, the MMC is used and the IP Security snap-in is installed
pointing at the local machine’s AD; therefore, all configurations will be available to the
local system only.
In the right-hand pane of Exhibit 13-3 are the available policies. The ones listed are
defaults that are available for general IPSec protection given common environments. In
the event an administrator has implemented enterprise IPSec policies, they too would
be available in the list to end users.
After opening the MMC, select (right clicked) the snap-in and pick “New” from the
menu that starts a New Policy Wizard. Win2K highly leverages Wizards for the creation
of many optional services. However, unlike some of the other services, IPSec policies
allow one to bypass the Wizard on an interface-by-interface basis, which is a nice feature
when one already knows exactly what one wants to accomplish.
Once the Wizard is complete, one has a generic policy called IPSEC POLICY in the
right-hand window of the MMC. Exhibit 13-4 shows the initial dialog available once
policy is created and edited.
There are several pieces of information available in this dialog. In this we see a list
of filters that the policy is configured with. Each filter can be selected or deselected
depending on the traffic you would like associated with the VPN. These filters are
provided for identifying “interesting traffic” for the IPSec stack. This is exactly what the
ACL in Cisco is providing. A list of traffic identifying filters that allows IPSec to isolate
traffic that should, or should not have IPSec applied. The filters also control the three
states: Pass without IPSec, Apply IPSec and transmit, and Drop packet. By collecting a
list of filters, the exact traffic that is to have IPSec applied is dropped through the filter
from the top down, until the traffic is matched or it reaches the end of the list where
it is finally dropped or passed normally.
Note: The list contains a filter named Citrix Traffic that is explained in
detail below.
The added flexibility of adding and removing filters, and the ability to activate or
deactivate those filters within a policy, allow the administrator to test and troubleshoot
the VPN while providing robust policy management.
Before investigating the filters individually, the Edit button on the IPSEC POLICY
Properties dialog box contains the specific rules about the IPSec implementation itself
according to the default Dynamic filter.
As shown in Exhibit 13-5, there is a list of IPSec transform sets available to the VPN.
This is nothing more than a collection of applied security suites that can be presented
for use in a VPN. During the Quick Mode negotiation, these will appear in the SA payload
for any original traffic that matches the assigned filters.The new traffic will be identified
by the filter and initiate the IKE negotiations, ultimately leading to a Quick Mode
exchange for the creation of an IPSec SA. The list contains the defaults provided by
Microsoft, and is much too long to be managed or properly deployed. In many cases,
the list of transforms will not exceed three options. Once again, Microsoft is attempting
to accommodate everyone and many scenarios — a valiant attempt. Notice the PFS
option at the bottom. This defines the relationship to key material within and between
IPSec SAs. If this is selected, a new Quick Mode exchange ensues that includes Diffie-
Hellman public values for the generation of completely new key material prior to the
creation, or re-creation, of expired IPSec SAs.
If one of the IPSec transforms is selected, you are presented with a simple dialog
that has two preconfigured transform sets and a custom button. Exhibit 13-6 shows
the dialog that appears for the custom button transform set configuration. There are
several interesting details in this dialog. There is the option to employ AH or ESP, or
both, and select the appropriate encryption of authentication algorithm. At the bottom
is the SA Life Type and Duration configuration options that define how long the IPSec
SA will last. One thing to remember is that each configuration affects two SAs and
the options available appear to be for a single security association; however, remain
aware that two SAs are being created for IPSec operations. It is necessary to maintain
an approximate knowledge of the number of SAs being created to provide preliminary
performance considerations for system and network designs and constraints.
For every IPSec operation, there must be key management, and Microsoft is no
exception. Unfortunately, Microsoft presents the IPSec property dialogs before any
IKE configuration. This is not catastrophic because much of IKE is simple and the
defaults integrated will suffice for the majority of the implementations. However,
creating the IKE policy first and assigning IPSec policies to them would be a proper
progression but, unfortunately, not a natural one. When most people think of IPSec
VPNs, they do not immediately think about IKE, and therefore presenting them with
IPSec transforms first is the most obvious answer, albeit slightly backward.
The General tab on the IPSEC POLICY Properties dialog, as shown in Exhibit 13-7,
contains the name and description that can be assigned to the policy. The time option
at the bottom is to inform the system to poll AD on a regular basis in the event of a
change. This option applies mostly to policies stored in AD provided by domain con-
trollers; whereas in this example, using the local AD, this would only affect new traffic
in the event the policy is changed. Finally, inconspicuously hiding at the bottom of the
dialog is a hint to the key management configuration.
As shown in Exhibit 13-8, there are a few very meaningful settings in this dialog.
The master PFS setting affects the PFS from Phase I to Phase II operations. Ironically,
the PFS was more available to IPSec where someone can easily select it, causing a
great deal of processing overhead; whereas PFS for IKE could be considered much
more important to security and use a fraction of the processor. In short, use IKE PFS
and unless moving very private data across a highly vulnerable network; and do not
use PFS within IPSec. Also, to accommodate increased security and only spikes of
performance derogation, implement PFS in IKE and not in IPSec, as suggested, and
reduce the lifetime of IKE to force a shorter cycle on all the IPSec keys.
Once again, there is a tiny button at the bottom, Methods, that contains IKE-specific
configuration properties that can have not only a security impact but a performance
one as well. Exhibit 13-9 provides the acceptable list of IKE transforms.
The list defines the acceptable IKE security parameters for VPN negotiation com-
munications, Phase I and II. Notice that the list starts with the most secure configu-
ration, 3DES, SHA, and Diffie-Hellman group 2, and ends with the least secure, DES,
MD5, and Diffie-Hellman group 1. By leaving the defaults in place, the system is
configured to accept or negotiate communications all the way down to DES and MD5,
and Diffie-Hellman group 1. Therefore, if a higher level of security is what is really
desired, then remove the remaining three policies. By default, Microsoft employs an
IKE policy that will accept nearly any communication.As with any policy or interesting
traffic filter list, the order is paramount, and to accommodate this there is a Move up
or down button to align the policies. An interesting aspect worth noting: Why should
Microsoft not just automatically place the policies in the order from strongest to
weakest and let IKE negotiate down with its peer from a secure beginning? The default
list is just exactly that; it will negotiate an IKE SA presenting the most secure protocol
suite listed with the others following in an IKE exchange. However, there may be
times when a weaker suite may be preferred for performance reasons and increased
security should only be made to those who specifically request it. Therefore, a limited
policy defining DES, MD5, and Diffie-Hellman group 1 may appear first, while a more
secure policy will follow.
Exhibit 13-10 shows the dialog presented when the attribute of an IKE transform
wishes to be modified. As with most IPSec-based VPN solutions, only groups 1 and 2
are supported.
Advanced Configuration of MS VPN. Thus far in the explanation, the policy cre-
ated contains two filters in the list (from the Rules tab in the policy properties). The
General tab provides access to the IKE settings for the entire policy, and the Generic filter
provides access to the default IPSec configurations and transform sets introduced and
detailed above. This chapter section delves into the next level of the policy: the filters.
When the Citrix filter is selected for editing, a filter configuration dialog is presented,
as shown in Exhibit 13-11. From this dialog, one can edit or create a new filter.
Exhibit 13-12 depicts the edit dialog, which allows one to modify the name, description,
and most importantly, the extended filter list.
If one edits the filter shown in the list, one has the opportunity to define the exact
traffic one wants to be identified by IPSec, shown in Exhibit 13-13, under the Addressing
tab. In the example shown, my system is acting as if a Citrix server that wants all Citrix
traffic from network 10.12.32.0/24 to my system (10.12.43.5) on a separate network,
to be protected by IPSec. The option at the bottom to mirror connections is typically
not used.
Under the Protocol tab (Exhibit 13-14), one can extend the IP filter to include
application-specific protocol services ports. In the example, the protocol of interest
within this filter is TCP, protocol number 6. If the protocol required is not listed, one
can specify “Other” and enter the IANA protocol ID on the edit box. If the protocol
defined supports ports, such as TCP and UDP, they can be defined in the filter.
Having defined a filter, other than using the Dynamic one provided by Microsoft,
one must now define the IPSec transform sets to be used in the event the custom filter
identifies traffic. At this point, it is necessary to understand that the IPSec information
discussed earlier was access and associated with the default Dynamic filter included in
the policy filter list. After defining the filter group to be included in the policy, one
must provide the necessary transform information. Another point worth mentioning
again is that the IKE transforms are associated with the policy itself and do not need
further definition.
As illustrated in Exhibit 13-15, the IPSec transforms are referred to as filter actions
that can be collected and assigned to different filters throughout the policy. The action
can be to drop, permit, or apply the defined IPSec policy (Exhibit 13-16). As one can
see, the transform set list is identical to those found in earlier dialog systems. Therefore,
the same editing rules and options apply within the IPSec configuration.
The defined filter, Citrix, has several property tabs other than Filter Lists and Filter
Actions. Exhibit 13-17 shows, the authentication types permitted for the filter, which
in turn affects the authentication IKE uses. Microsoft Win2K’s native authentication is
Kerberos and therefore it can be aligned with VPN authentication. By configuring
Kerberos as the authentication for IPSec, the user’s normal credentials and Ticket will
be passed as authenticating material.
Other forms of authentication can be configured. Certificates can be identified for
use in VPN authentication. A pre-shared secret passphrase can be defined to establish
a VPN based on a static secret known by all parties.
Exhibit 13-18 illustrates the ability to determine the tunnel endpoint of the VPN.
Finally, Exhibit 13-19 shows the dialog that is used to associate a network type to
the policy.
Having defined an IKE policy, interesting traffic filter, and associated actions and
IPSec transforms, one now needs to apply it to an interface, as shown in Exhibit 13-20.
This is the equivalent of the Map command in Cisco at the interface level. The ability
to collect all the necessary information into a single point and associate it with an
interface is the final step in nearly all IPSec solutions.
Policies and Performance. When defining policies, whether for IPSec transform sets
or IKE security suites, if the system is ever the initiator of an IPSec VPN, each method
defined in the entire policy will be presented in an SA payload with multiple proposals
and transforms, resulting in a huge initial packet subject. For the setup of a single VPN,
this does not produce much of an issue; however, if you are a server and 500 network
systems attempt to establish a VPN, offering tons pf proposals, there are system and
network performance issues that must be considered. Therefore, given Microsoft’s
default configuration, one can calculate the overhead, assuming an acceptable config-
uration of a single IKE and IPSec proposal.
There are a total of six IPSec transforms and four within the IKE policy; subtract
one from each to obtain the overhead. It is also worth noting that AH is only configured
for use alone and not in concert with ESP by default, reducing the possible number
of payloads. This is the only good attribute of Microsoft’s default structure; if ESP and
AH are combined, the number of proposals skyrockets, as do the associated trans-
forms.
As depicted in Exhibit 13-21, the IPSec proposals can add up. Not including the
elements that would normally appear, the overhead payload size for the SA payload
would be 88 bytes. The overhead calculated only includes the AH proposal, the new
proposal header for it, and the three transforms detailed in proposal number 1. If
there were a single addition to the IPSec methods list in the policy that simply included
AH with ESP, that number would increase by 56 bytes, nearly half the size of the original.
The default proposals for IKE (Exhibit 13-22) must be presented as well. The result
is 96 bytes of overhead just in defaults.
The policies that define how IPSec and IKE are to base a relationship must be
presented to the responder, who in turn must process each of them, compare against
its policy, and respond with the selected, unchanged proposal. Combining the over-
head of the first Phase I message from the initiator to the responder and the first
Quick Mode message results in 184 bytes of unnecessary overhead if the defaults
remain in the policy and are not used.
Once again, this does not represent a great deal of traffic, but when combined
with other processing, such as the SA payload, the package can ecome excessive.
Given these additional circumstances, the seemingly limited traffic turns out to be the
very thing that brings the system to its knees.
the other but much less expensive. Traditional routing may take the shortest path;
however, an administrator can set costs associated with the connections to force the
data down the less expensive path, ultimately saving communication expenses.
Routing protocols are aware of the communication environment; basically, that is
the definition of their existence. Routing protocols transmit over the same network as
the data.The fundamental difference is that the data is unaware of the network, whereas
the routing protocol is concerned with the network it is traversing. As it travels over
the network and is received at a routed point on the network, the protocol is used to
make determinations based on the experiences of the transmission (i.e., bandwidth,
latency, distance, etc.). Different types of interfaces support different topologies and
therefore affect how the routing protocol will interact and make determinations. In
other words, a router with several serial interfaces and several Ethernet interfaces may
have issues when determining routes based solely on bandwidth. As more and more
routers participate and share the routing tables, they can operate as a group. As changes
occur in the communications, the routers converge and collectively make new deter-
minations to accommodate the change.
As VPNs are introduced into this mix, the interactivity of routing protocols with the
VPN can have an impact on the global routing infrastructure.
Finally, beyond routing protocols are simple routing determinations. For example,
hosts on one network (network A), can communicate with others on a different
network (network B) that is on the other side of a WAN connection provided by two
routers. However, on network A, there is a VPN gateway connected to the Internet.
In some solutions, the hosts will have a default gateway pointing to the core router
that connects A to B. However, the core router on A must be aware of VPN networks
that are available to properly forward traffic to the VPN device when appropriate.
On the surface, this appears quite simple. A static route or a summarization can
be configured on the core router to properly send VPN requests to the VPN device.
Unfortunately, this pristine situation of shear simplicity rarely exists. In reality, there
are several exceptions and, typically, the number of remote networks is so great that
the option of entering static routes is simply not applicable.
In one situation, all the remote sites, over a 1000, were connected by a global WAN
that provided enterprise connectivity. The client wanted to have Internet connectivity
Exhibit 13-19. Configuring which connections (network types) to apply the IPSec policy.
Standard Example
With a standard network topology, routers typically provide the physical access to the
WAN as well as the logical access. This position allows the router to accommodate
several configuration scenarios that includes providing alternate data routes in the event
of a Layer 1, 2, or 3 failure. In many large organizations, there are usually one or more
primary offices that house the bulk of the connection terminations. Within these offices
there are backbone routers that provide the gateway services to all the connected
networks. This is evident in networks that not only employ large Frame Relay networks,
but VLANs as well. To provide access to the Internet, there is usually a firewall between
the internal network and the Internet router. As a request for an Internet destination is
processed, it will reach one of the backbone routers, which will not have an internal
entry in the routing tables for the Internet resource.
In these circumstances, a final route configured in the routers will forward all requests
to foreign systems to the firewall, which in turn will forward the request to the Internet
router to be injected onto the Internet. For many companies, this example reflects what
is currently taking place.As a request for an internal network is made, it gets appropriately
routed to the remote resource supported by routing protocols that provide the direction
for the data. If the destination is unknown, the default gateway finally forwards the data
to the Internet via the firewall or other protection system.
Proposal 3: (8-bytes)
ESP
DES and MD5 (TS header = 8-bytes)
(attribute payload = 16-bytes)
Proposal 3:
AH
SHA (TS header = 8-bytes)
(attribute payload = 8-bytes)
Internal
Networks
Internal
WAN
Internet
In the event a portion of the Frame Relay goes down, or a router failure or remote
network outage occurs, alternate routes are engaged to maintain connectivity. In many
conditions, secondary physical access is provided in the event a primary network
connection fails.
VPN Network
As VPN products became available, they were typically a device that had either two or
more Ethernet interfaces or were a server, such as a Microsoft PPTP server or Novell’s
BorderManager server with two or more interfaces. These systems were installed in
parallel or behind a firewall to provide connectivity to the Internet with one interface,
and used the other to connect to the internal network.
As remote VPNs were established, their network numbers could be added to the
routing table of the backbone routers. This allowed requests for the remote VPN to be
properly forwarded to the VPN device.As the sophistication of VPN devices grew, routing
protocol support was enabled and enhanced to accommodate the automatic updating
of internal routing tables. With the VPN devices interacting with the backbone routers,
they could learn the necessary information to forward a request they received to the
appropriate internal router. In contrast, the internal router could be constantly updated
on any changes to the remote VPNs.
As discussed earlier, there are several methodologies for defining network IP
addressing schemes for VPNs. Nearly all of these situations surround the remote access
solutions. For VPN solutions that are for network-to-network connectivity, there
The Difference
There are two fundamental differences when routing protocols are concerned. In the
first discussion, routing protocols participate in the network as enablers. The protocols
provide information about the network between the devices to accommodate changes
and traffic management. On the other hand, routing protocols are aware of the trans-
mission process and therefore when communicated over a VPN interesting things can
arise.
The difference between the two may not be readily apparent or obvious. In the first
example of a standard network, the connection between the routers, provided by the
Frame Relay in this example, was used to transport the routing protocol information
along with the normal data. The act of being transmitted over the same network as the
data is used as one of the metrics in determining if the route is desirable for the situation.
Another example is a remote site that is accessible from another site either directly, or
indirectly by way of an alternate site. As shown in Exhibit 13-24, for site A to connect
to site C, it can use site B or simply connect to it directly.
A B
The routing protocol can be configured to use a metric that has a preference for
speed over cost or number of hops to the destination. In this example, the link from
A to B and B to C are a 1.44 MB T1s, while the link from A to C is a 56K CIR with a
port speed of 128K.The routing protocol can learn this information from the interaction
with all the routers of the network, and by participating in the communication. Given
our configuration preference, the data stream will take the route through site B. Certain
decisions can be determined automatically by the routing protocol collaborating with
the routers over the same connection the data is using. The connection itself becomes
an attribute in the determination of a route. The various attributes used from the
communication medium are determined by the routing protocol being implemented.
There are two primary types of routing protocols:
Internet
A B
a2 a1
c2
Internet
b1
a3 b2
A B
b3
Exhibit 13-26. Basic VPN network with subordinate networks and routes.
the issues become compounded. Imagine 50 or more countries that encompass 8000
sites, each with subordinate sites that may or may not use the Internet. Combine the
internetworking complexities with partnering and customer VPN access and the asso-
ciated controls and routing concerns they involve.The inclusion of sophisticated routing
techniques becomes evident.
Solution Models
To accommodate the remote networks and the need for the routers to be aware of the
peers on the other side of the VPN, routing protocols must be encapsulated and
forwarded to the other networks. The process of encapsulating the protocol in the VPN
is not to allow the routing protocol to make various decisions based on the VPN
connection. The VPN can be much too dynamic and all the connections will appear
point-to-point. The routing information is forwarded to convey information about rout-
ing between the remote networks.This is apparent in OSPF networks and the application
of areas. OSPF works on a concept of routing areas that represent a domain of common
routing environments. These can be logical, associated with IP addressing, or geograph-
ical. The concept is to provide a hierarchical approach to routing. All OSPF networks
must have an Area 0, with other areas as subsidiaries that provide summarized routing
information to Area 0 routers. These tables are then shared with other areas, allowing
the enterprise to be aware of routing events in remote locations that are not directly
connected or associated.
The complexity occurs when an internal router attempts to communicate with
another router over a VPN. These issues are directly related to the type of routing
protocol implemented. RIP uses a broadcast every 30 seconds to communicate routing
table information. RIP data is contained within a UDP header assigned to port 520, and
an IP header is added to provide connectivity through a network. If the interface
associated with the routing protocol is a point-to-point configuration, such as a Frame
Relay PVC defined on a serial interface, the packet is just sent to the communication
peer. If the interface is connected to a broadcast support medium, such as Ethernet,
the IP datagram is broadcast.
With OSPF, the situation is more complicated. OSPF does not employ UDP or TCP;
it has its own protocol identification to be defined in the IP header. OSPF does not
typically operate well with broadcast mediums and uses unicast and multicast for efficient
communications. The use of multicast and unicast are also needed to determine link-
state attributes; a broadcast could defeat the data contained within the OSPF packet.
1. The IP address of the interface will become part of the assigned area. In the
event that a single area is defined for route summarization, the introduction of
an Internet IP address could be problematic.
2. The tunnel interface can be configured as an OSPF point-to-point network,
eliminating the need for multicasts.
3. By encapsulating the OSPF, along with the data, in generic tunnel (GRE) it is
not affected by the link and, therefore, will not produce routing tables based
on link-state information gained from the VPN. Of course, all this is provided
IPSec security, much like the L2TP description in Chapter 3.
With this configuration, one has the physical connections defined for basic connec-
tivity. The serial interface and internal interface are appropriately configured. Unfortu-
nately, the serial interface’s IP address (if even necessary) is completely worthless to
this network — totally worthless. Here is where the VPN starts to separate from the
norm. One now has a critical interface that would normally have a very specific IP
address configured for foreign connectivity. Thus, one needs to associate the Internet
routable IP address to actually route to the Internet and get data from the Internet. The
loopback interface gives the router an identity it will answer to. Therefore, when the
ISP routes data to the router from the Internet, it will accept it. The final attribute is
the tunnel interface. Here is the virtual interface — somewhat like the loopback, but
functional — which represents what would normally be facing the WAN and participat-
ing in Area 0, the core area.
One might be wondering where IPSec comes into play. In the remainder of the
configuration are all the IPSec configurations that have been detailed in earlier sections.
Finally, a map is associated to the physical interface; in this example, the serial interface
is assigned a map. Next, the tunnel is associated with the serial interface. The map
provides the link to IPSec, and the link between the tunnel and the serial interface
provides the connection between the IP addresses and the areas. The result is a system
that provides VPN connectivity and correctly participates in routing protocols over the
VPN by encapsulating them in GRE and then applying IPSec.
If one needs to provide Internet access from the internal network, in this case
10.1.1.0/24, several NAT statements can be added to accommodate basic Internet access
beyond the confines of the VPN. Finally, access control lists can be implemented to
provide basic firewalling capabilities.
This is a difficult process to convey, but the goal is to show that by employing a
combination of technologies and known router methodologies, a very comprehensive
VPN can be established that very closely reflects a WAN environment.
1. Routing protocol interaction with link information would render the routing
tables useless.
2. The point-to-point configuration of VPNs does not require the use of routing
protocols directly.
In the event that VPN devices are providing VPN connectivity with routers on the
internal networks, the devices would have to be aware of the protocol state to ensure
that the updates are properly forwarded.This would require that the VPN device operate
fully as a router and implement the routing protocol to the fullest degree for interop-
erability (i.e., area support, cost configurations, standard metric support). Examples are
VPN devices that provide all the services necessary to interoperate with internal routers,
but only support OSPF within Area 0.
While Cisco is currently struggling with various aspects of VPN product develop-
ment, their network-to-network solution is in a prime position to take advantage of
IPSec VPN configurations. They already have the full support for nearly any type of
routing protocol, and the existing configuration options available for standard network-
ing application can easily be leveraged for IPSec VPN construction. However, many
other products also provide robust network-to-network solutions that easily provide
routing protocol features and interoperability. Xedia, now owned by Lucent Technolo-
gies, is a highly sophisticated router that support advanced features and implements a
new approach to IPSec VPNs. As the demand for more refined VPN solutions surfaces,
routing protocols will be incorporated deeper into VPN operations.
Client Character
In a remote access VPN solution, there are requirements for client software to be loaded
on the remote system to make a VPN possible. The character and traits of the client can
have an impact on the overall solution and the success of the project in the eyes of the
remote user population. A solution must be selected not only for its capabilities but its
client interface and operability provided to the user community. A solution might have
perfect functionality and provide all the necessary functions for the business require-
ments, but if the client is difficult to use, troubleshoot, operate, or integrate, the overall
impressions of the service will be poor.
System Interaction
Most VPN client packages are quiet and simply provide connectivity, while others
tend to be more vocal about the connection and status. An example is when a client
starts as a Windows NT service and resides quietly in the taskbar, only interacting
with the user during specific points within the communication. On the other hand,
some packages will provide extensive configuration tools, logging tools, and trouble-
shooting utilities to assist the user in establishing or troubleshooting a VPN connec-
tion. The extra tools and utilities allow advanced users and administrators to become
more aware of the status of their communication. This is also true for an attacker. In
the event that a laptop is stolen, an attacker could use error information contained
within the logs to assist in obtaining access. As an example, the user name is correct
Helpdesk Opportunity
The advantage of providing a client that contains several tools and logging capabilities
can be to assist the helpdesk in tackling technical problems that may arise. Many
helpdesks do not have access to or control over the configuration of centralized equip-
ment. In the event of failure, the user can be instructed to exercise the provided tools
to assist the helpdesk in identifying or rectifying the problem. Of course, the disadvan-
tage is made clear when the helpdesk finds that the user has inadvertently changed a
crucial setting. Once again, this is related to the culture and technical knowledge of
the remote user population and the company as a whole.
Centralized Control
For many solutions and organizations, the use of tools and utilities provided by the
client software is not a concern. As the VPN solutions mature, we are seeing more client
packages that have very few options and small system footprints. These small but
functional clients obtain all the communication information from the security gateway
(SGW). Some of these clients can be preconfigured with the vital information, such as
SGW’s IP address and a backup system’s IP address if available, and placed into distri-
bution packages. Users can collect the packages and install them at their leisure. At the
time a remote session is required, the client has the primary data to get to the SGW. As
the connection is initialized, information is fed to the client that allows the user to
advance the interface to a VPN.
For example, VPNet’s current client leverages SSL to provide an encrypted session
from the client to the SGW. It ingeniously uses the encrypted session to feed centrally
administered information on the SGW to the client software running on the remote
system. Usually, authentication will take place using SSL for protection; then data is
passed to the remote client that will allow it to drop the SSL connection and create an
IPSec VPN.
By allowing the client to collect configuration and session information from the
SGW, it releases the client from several administrative tasks, ultimately reducing its size
and complexity. This process also reduces the administration of the remote systems. As
an example, if the configuration must be set on each client to allow remote access
VPNs, those client systems must be returned in the event of a change. Of course, in
various cases, users can be informed of the change or to call the helpdesk for assistance.
Nonetheless, each change option available to distributed configuration solutions will
result in some form of interruption.
Client Deployment
Several client issues focusing on operations and implementation have been discussed
thusfar in this chapter. Now, consider the hurdles that await when putting this technol-
ogy to work. Deploying remote access VPN clients can be directly affected by several
factors, ranging from the vendor product chosen to the number of users that require
connectivity. IPSec is an evolving standard that is open to interpretation by developers.
Consequently, there are many different types of obstacles that are the result of standards
interpretation. The need to categorize and check the product options against the
proposed solution design will assist in determining the best course of action for client
deployment. It is not necessarily a common practice, nor is it typical to determine
rollout procedures based on available products. But there can be so many options to
each product, and each one is very unique.
Vendor-specific Considerations
It will be necessary to qualify all areas of the product that are open to influence and align
them with the solution requirements and goals. An example of this is an implementation
that must support 1500 simultaneous users. All the users are not computer-savvy; and to
avoid a complicated learning curve or to simplify training endeavors, a concise, unobtru-
sive client package might be preferred. To accomplish this simple aspect, much of the
configuration must be pushed to the client for each connection. The type and amount
of information and the delivery process can have an impact on other areas of the solution,
such as the extended authentication system required to provide the authentication data
or a directory service used to store client configurations.
Key Implementation
IPSec is based on trusts, and many forms of client packages must be configured with a
shared secret or certificate. These two types and how the vendor approaches them can
have an impact on any preconfigured package delivery mechanism. An example is when
a package is preconfigured with connection information that includes the shared secret.
If that package were to be intercepted, it could be used for unauthorized purposes. If
the stolen package is used for an attack, only the extended authentication process will
provide the last line of defense.
In the case with shared secret, clients may require group identification to determine
which key or password is used later in the creation of the VPN. This type of implemen-
tation is typically associated with access control capabilities of the VPN device. Groups
are normally aligned with rules or filters that are applied to the SAs that a particular
set of users can employ. It is necessary to properly plan the creation of groups and
assign users to those groups to realize the security set forth in the security policy. After
the groups are properly defined, the creation of different packages that represent group
identification can be delivered to the appropriate end user.
Cost Issues
The cost of client support can emanate from many directions, and each can become
very expensive. Several aspects of client costs are not readily apparent and require
Product Evaluation
Knowing IPSec and IKE inside and out can make one feel very
confident when designing and implementing a VPN solution. As
the design requirements and business requirements are
addressed, a final design will tend to surface. However, the more
one knows about IPSec, the more confusing the process can
become when products are aligned with design requirements and
business directives. While it is necessary to understand the idio-
syncrasies of IPSec to determine a proper course of action for an
organization, it is equally necessary to understand the available
solutions, as well as their advantages and shortcomings.
Having discussed the details of IPSec and the concepts of VPN technology, it is necessary
to understand the application of such knowledge in the real world with systems that
do not necessarily follow the technology as expected.
The simple truth is that the IPSec standard is complicated, not entirely complete, and
open to interpretation by vendors and developers. Knowing the standard is a requirement
for designing a comprehensive solution that functions efficiently and operates according
to the requirements set forth in the initial phases and discovery processes — but knowing
the standard is half the battle. Think of the IPSec standard as a topographical map of a
remote island in the South Pacific. The map is used to plot a course from one side of the
island to the other, based on information on the map.The map was created with collected
information at some point in the past, but until one sets foot on the beach and begins
the trek across the island, one has only a guide and cannot make definitive assumptions
until arrival. The IPSec standard is the map that is available to everyone, and the island
is a landscape of products that will bend and twist the planned route to a final solution.
One will show up on the other side of the island eventually, but one might be late and
a few hundred feet from the mark.
To properly navigate to a solution, it is imperative that the business requirements
are clearly defined and understood by all. While the first point is obvious, the latter is
sometimes overlooked. As a consultant or designer, one must ensure that the client (or
boss) is fully aware of the goals that one has interpreted from them and that the
expectations are continuously verified. A simple comment can be made that is under-
stood by the client as option “A,” but not fully aware of the technological limitations or
caveats with that stated requirement. It is up to the consultant to investigate all the
feasible options that can meet that defined goal; therefore, the need to have very clear
directives is essential. Of course, obtaining a clear directive may be impossible in the
beginning; but as options are investigated and detailed, the path to a design will emerge.
Once a clear directive is obtained, or enough to at least begin the process, products
can be reviewed for consideration. By reflecting the stated requirements back to the
client, the interpretation is verified. However, it is not enough to simply just repeat what
was said, but the intention of the communication must be expounded upon. In other
words, someone may say they need to route traffic according to service; this can be
interpreted in many ways when all the variations are known.
This chapter is dedicated to describing the process for obtaining information about
an organization and the requirements to fully understand the current and future needs
and provide a design that best meets those needs.
Business Drivers
The business drivers are areas of interest defined by a company that are not necessarily
considered definitive requirements but represent what the company would prefer as
an acceptable solution.
There are several business drivers that have varying degrees of importance. To meet
every business driver would be a perfect scenario, and to meet only a few with a limited
degree of success would be considered a failure. Business drivers are points of interest
in typical VPN solutions that must be evaluated to determine the degree of support
required for the driver by the VPN solution. Business drivers can be categorized into
several areas that represent common concerns with any new technology, including:
Each of these areas can have varying levels of importance, depending on the orga-
nization, and various levels of support, depending on the vendor product chosen.
Functionality
Functionality is the ability of the communication equipment and software to execute
the desired minimum communication standard. It can also be used to determine the
various vendor options available and their alignment with the design requirements.
Functionality is a crucial element for a company to define. Typically, this is associated
with three areas of focus.
1. application support
2. network environment
3. operational matters
Application Support. This area can include the ability to maintain a consistent
encrypted signal to support the applications the company will utilize. Some VPN
solutions only encrypt certain communications or certain portions of the data. The
ability of the solution to support the application’s communication requirements may
be affected by how the solution handles the data. In addition to the possible limitations,
sensitive application-specific data or characteristics can be revealed.
The ability to coexist with other existing and planned software and hardware cannot
be overstated. A VPN solution that is to provide communication to the network must
be cognizant of all the hardware and software it will be used to access or interact with.
Imagine implementing a perfect design that could potentially save the company huge
amounts of money, but the primary time and billing application is not accessible from
the VPN. The value of the solution will certainly plummet and the design engineers will
be responsible for answering questions about why it is not functioning.
Application support is nearly always the first thing that is questioned of any remote
access solution. If a VPN system is to provide access to services but has difficulty in
extending those services to the client, it will certainly have functionality issues and
scalability problems. The concern for application support is one of the main drivers of
IPSec. Because IPSec operates at the network layer, there is no need for any upper layer
protocols or functions to be concerned with the communications provided. However,
there are custom applications with interesting communication requirements that may
have difficulty; while rare, they must be searched out and tested.
General Functionality Areas. For many companies, routing protocols and network
management support are simply not of any interest. Combine this with standard appli-
cations that represent very little concern, and functionality seems complete. However,
there are some aspects — considered common but a necessity — that must be discussed.
The ability to operate for extended periods of time while under duress must be
evaluated. Also, to operate uninterrupted is a core requirement for many organizations.
This does not necessarily reflect a system’s stability, but rather its ability to remain
operational during administration or process errors. As an example, the addition of a
user or group in the system’s database should not force the administrator to reboot the
system before the changes take effect. If an IP pool of addresses is being utilized, it
should be acceptable to add or modify the pool — within reason — without disturbing
the operation of the system or the users attached. Determining the organization’s
expectations of the day-to-day operations is crucial.
Authentication Process
The authentication process covers many aspects. The ultimate goal is to reduce the
amount of work required to add, modify, or eliminate communication support for users
or vendor networks. It must also be a relatively simple process for creating access
controls for applications and systems based on centralized user databases.
Existing Projects. There are several interesting aspects to authentication in VPN envi-
ronments. Integration with PKI, Directory, or RADIUS services can become a require-
ment if the company is in the process of implementing any of them before VPNs were
considered.The utilization of existing projects will be extremely beneficial to the overall
success of the project.
Vendor Integration
Vendors, partners, or affiliates of an organization that utilize VPN connectivity to access
the organization’s data may be required to implement what the organization has chosen
for the VPN solution for the partner community.This is contrary to the IPSec standard —
a common operating environment for true interoperability — but represents a real
concern when creating VPNs with different equipment. Currently,VPN implementations
are limited and most companies that have VPN solutions are not overlapping into
business relationships with others that are using VPN as well. Occasionally, overlap
occurs; but for the most part in today’s landscape, it is still rare. As VPN solutions
become more commonplace, the ability for product interoperability will become the
center of concern. Unfortunately, this is nearly a moot issue because the interoperability
needed in the future is typically unknown and only applies when it an identified
necessity. In the latter case, the product selected is typically the same as the existing
solution.
Nonetheless, there are organizations that have the ability to direct the partner
community in what direction their VPN must conform to.
Several issues encompass the community, including the:
g Cost of equipment to be implemented at the remote site: The cost can have
an impact on the relationship if the remote partner must purchase the equip-
ment. For small vendors interacting with a larger organization, the cost to
continue the business relationship over the VPN may be cost-prohibitive.
g Support issues for the remote company in the event of a system failure or
configuration modification: VPN implementations can be complicated enough
for a company that has complete control over the implementation. However,
support for mandatory equipment at a remote site that is not part of the
origination organization can represent some technical and political issues.
Manageability
As briefly mentioned above, the ability to manage the VPN product installed can have
an enormous impact on the assimilation of the VPN into existing infrastructures. If
manageability is a concern for the organization, or it is in the process of defining a
network management, any solution must fit into the scheme.
Some of the manageability issues, including:
g the ability to control and manipulate the VPN devices from a central location,
such as a Network Operations Center (NOC)
g central management of users and groups and their associations with established
rules and policies
g type and security of the management application or protocol
g console
g browser (Java, ActiveX, etc.)
g SNMP
g proprietary
Browser. The utilization of a common browser that supports Java, ActiveX, or CGI
scripts is becoming increasingly prevalent. Browsers are a popular management platform
for distributed environments. When considering a solution that utilizes browser man-
agement, the solution’s ability to provide SSL, or some form of encryption, is recom-
mend. However, this is not typical. In some scenarios, the product simply listens on a
non-standard port for HTTP access. Typically, passwords are used to manage a system;
and for an attacker to discover the port at which HTTP management is being processed
is trivial.
Proprietary. It is necessary to be aware that some solutions have specific software that
is used to access their product. This can be seen as a limitation in many large implemen-
tations. It limits in-house program augmentations and the company may be limited by
developmental constraints of the vendor. Furthermore, as with available client packages,
Microsoft platforms are typically focused on management software. Many vendors provide
a custom management application in concert with another type of management (detailed
above). It will be necessary to weigh the advantages and disadvantages of each type of
management to determine what is best for the organization.
1. existing protocols
2. proprietary protocols
Existing protocols include Telnet, HTTP, FTP, and PPP for communicating with the
VPN device. SSL (Secure Sockets Layer) is typically used for secure Internet browsing
traffic where the server’s and client’s identity are established and the session is
encrypted. SSH (Secure Shell) is typically associated with UNIX secure communications,
but can be used to provide secure management protocol communications. And IPSec;
it may seem obvious to use IPSec for an IPSec solution, but its use is limited. In some
cases, one can configure an IPSec tunnel with the VPN device and then run the necessary
management protocol within the IPSec tunnel.
Proprietary protocols are communication methods developed and maintained by
the vendor. This type of management is typically associated with a proprietary manage-
ment system. Therefore, the same possible limitations can be applied that exist with
any proprietary solution.
Multiple Device Support. The solution’s ability to support multiple devices from a
single management station can be a valuable — sometimes mandatory — asset of a VPN
product.
g The operating system that is installed on the clients participating on the VPN
will have an impact on the product selection. Even the version of the operating
system and the latest service pack or patch applied can have an impact on the
product selection process.
g Application coexistence with the required VPN application is a possible barrier.
The installation of the VPN client may have an effect on other system
requirements.
Operating System Support. Few organizations can say they have the same operating
system and versions on client systems throughout the entire organization. Obviously,
the smaller the company, the less complicated having a common platform for all clients.
In large organizations, especially in today’s very diverse climate, a common platform
may be impossible. Partnering organizations, affiliates, and departments with specific
requirements represent areas where the client system software could be diverse and
unchangeable. There are several situations that might affect the selection and control
of the client operating system in large, diversified environments:
1. The Information Systems (IS) department of one organization may have little
impact on a partnering organization, although they interact very closely and the
delineation is blurred.
2. Specialized systems for engineering, development, or advanced applications
(e.g., laboratories and graphic creation) may use operating systems such as
Solaris, AIX, Macintosh, Linux, and HP-UX.
3. Custom applications may have requirements that dictate certain system opera-
tions that are not supported by a common or new version of the platform.
4. Cost is a huge factor.To save money, a company may want to replace its outdated
remote access solution with a more cost-effective VPN solution. However, if the
VPN requires the updating of hundreds of systems throughout the organization,
the costs may be prohibitive.
The installation process, installation options, and the resulting system operation
should all be verified. Included in the lab must be continuous attention to testing the
system’s overall performance. This detail is overlooked in some scenarios. Although
performance is a key issue for VPNs, most client packages operate unnoticeably on
newer, faster systems. Nonetheless, lab tests should be cognizant of performance
impacts on lab systems.
Grading Methodology
Once the business drivers are identified and categorized by priority level, it is necessary
to create a list of products that meet the needs of the design and business drivers. A
grading methodology is the process of reducing the number of candidates to two or
three for rigorous lab testing.
Once the final two or three systems are identified, it will be necessary to obtain
demo equipment for lab testing. Getting equipment can range from an easy process to
nearly impossible and may require traveling to a facility designed for testing the vendor
equipment. The process is totally dependant on the vendor, product availability, will-
ingness of the organization to accept responsibility — which may have a financial
attachment, and the size of the prospect to the vendor. Money is the foundation of
business, and there have been experiences where demo equipment was out of the
question because the organization seemed too small to allocate resources for developing
a sale. In any case, be prepared for anything when attempting to obtain equipment for
lab testing. At minimum, have the lab processes and tests detailed in a document for
their inspection.
This chapter section outlines the important aspects used in grading the proposed
vendor solutions. Using a grading methodology will give the company attempting to
determine a VPN product a tool to quickly differentiate the VPN solutions. The grading
g number of connections
g routing protocol support
g authentication mechanisms
g client functionality
g access control
g scalability
g cost considerations
g extra effort
An extra-effort section is also detailed that attempts to score vendors that display
strong points where the products have exceeded the basic requirements. The scoring
system will be from 1 to 10: 1 being the lowest and 10 being the highest score possible.
The total score at the end of the process is the addition of each attribute value and the
addition of the extra-effort score to the final tally.
Connections
This aspect is based on the product’s capability of supporting multiple concurrent
connections. If the vendor cannot support the necessary number of concurrent con-
nections planned from a single platform, it will be identified and addressed in grading
of scalability. The total number of users that can be supported rely on whether or not
the product is able to interact with LDAP, RADIUS, TACACS, or some form of remote
authentication service.
For many solutions, the number of concurrent connections is related to using
authentication services provided by a separate facility. For some large solutions, an
authentication support infrastructure must be established to support the VPN solution.
If no authentication system is supplied, the internal user database of the VPN device
must be employed, which is typically very limited.There have been examples of systems
supportomg 10,000 users but only handling 100 users internally.
Authentication Mechanisms
This grade addresses the vendor’s interaction with authentication mechanisms. The
aspects of the solution that will receive the highest grade are the vendor’s ability to
interact with RADIUS, LDAP (i.e., Active Directory and NDS), and certificates. This is
another area that influences scalability. Interaction with RADIUS is good, but could be
a limiting factor if that is all the solution can interact with.
Typically, certificate support is the most complicated due to the client intelligence
in handling the certificates. Most products support RADIUS because it has been a
standard remote access authentication method and the install base is expansive. RADIUS
is also utilized for the small packet information and the limited resources in handling
the authentication process.
Client Functionality
This aspect of grading rates the vendor’s VPN client. Key functionality of the client will
be judged on how the client is installed on workstations, how the client establishes the
session, and how the client can be managed. Other areas of functionality include the
ability to lock down the client configuration, centrally administer client configuration,
and enhance security during the session establishment.
Access Control
Probably one of the most important aspects of grading is the solution’s ability to provide
granular control of access to networks or groups of devices. Some vendors will separate
themselves by offering the most robust filtering possible.Access control is vendor specific
and is enhanced by including interaction with RADIUS for group information and rule
passing. However, many products do not provide for filtering capabilities, due to the
resource utilization of the processing and implementation overhead. Nonetheless, the
more granularity of the filter capabilities, the higher the grade.
Scalability
All vendor solutions scale in some form or fashion. This aspect of grading focuses on
how the vendors provide scalability compared to best practices and current techniques
Cost Information
Cost is the primary driver, in some form or another, for implementing a VPN. Either to
reduce tangible costs of phone lines and support equipment, reduce administration, or
reduce the cost of expansion when more remote system support increases.
Several aspects of costs come into play and each is governed by the scope of the
final solution. However, there are several areas in which cost issues tend to gain the
attention of management. Several examples can be explained by discussing two different
companies and directives:
g Company S is small and only needs 500 simultaneous user support for a 5000-
user base.
g Company B is large and requires 9000 simultaneous user support for a 15,000-
user base.
If the VPN system costs $70,000 but the clients are free, company S will pay $14
for each of the 5000 remote users but the effective cost is $140 for each of the 500
users. Company B will pay $4.65 for each of the 15,000 remote users, but an effective
cost of $7.75 for each of the 9000 users.
However, for some solutions, the initial cost is low, but the clients have a licensing
fee. If the VPN system costs $10,000 and the clients are $35 each, company S will pay
$27,500 for the 500 users. Company B will pay $325,000 for the 9000 users.
To properly grade the solution’s cost, the grade is based on cost per user when total
solution cost is calculated against maximum user support. One must calculate against
the maximum simultaneous user support to base the cost on the capability of the
solution. If one buys a product that supports 5000 simultaneous connections, but only
needs 300 for the foreseeable future, one may have the wrong solution — as it pertains
to cost.
Extra Effort
Each of the vendors has focused on various aspects that will set them apart. Many
examples exist, from unique hardware, to robust client management, to filtering
capabilities, to performance capabilities. This grade recognizes the aspects in each of
the vendor’s solutions that indicate the extra effort. This grade is based on the total
Lab Testing
Once the grading is complete and a small, manageable list of products is compiled, a
lab must be performed to ensure that the research performed is verified and not
assumed. Unfortunately, not all information is made available by the vendors during the
investigation process. This in no way reflects the vendor’s performance or ethics, but
details that are tested in a lab cannot be completely predicted by a vendor. Also, in
several situations, customer labs have provided product insight and assisted in the
development of the product or the creation of a patch or fix.
It is necessary to understand that time in the lab is not a waste of money and effort.
Rather, the information collected will be used to implement the solution more efficiently
and with greater understanding of the product. Performing a lab may take time and
money, but the savings of time, money, frustration, and the possibility of purchasing a
product that does not meet the organizations needs may be avoided at a later date.
Lab Setup
Portions of the network design that rely on connectivity issues through security devices
and Internet connectivity issues must be duplicated as closely as possible in a limited
environment. The lab should use several pieces of equipment and communication
technology to emulate connections, networks, software, and environmental situations
that allow the organization’s engineers to test various VPN concepts and general func-
tionality. The lab will allow the organization to find weaknesses in products or to fully
utilize features that were not previously discovered. It will provide an opportunity to
put vendor software and hardware into the network and security designs that best fit
the company’s business requirements.
Prior to actually performing the tests, a test plan, or lab goals, should be created to
expedite the lab and testing processes. Also, providing lab goals will provide vendors
with the ability to participate in a lab to which they feel comfortable providing equip-
ment. If no lab goals are defined and the tests are not detailed, the vendor is completely
unaware of the processes and could spend more time defending the product against
an invalid test or result than assisting in the completion of the test. Defining a set of
lab goals also proves that the organization has selected the right individuals for the VPN
project and that creating comprehensive goals is not effortless.
Report on IPSec
In February 1999, Niels Ferguson and Bruce Schneier, of Counterpane Internet Security,
Inc., produced a document detailing the results of a report on the state of the security
provided by IPSec requested by the NSA. The report is anything but flattering and
represents Ferguson and Schneier’s disenchantment with the resulting protocol. In the
introduction, it stated, “IPSec was a great disappointment to us,” which sets the tone
for the remainder of the report. Shortly after the report was made available to the
community, there was a great deal of discussion in the IETF IPSec workgroup. Everything
ranging from anger to agreement was shared among the group’s participants. During
the process, Stephen Kent, one of the authors of RFC 2401, 2402, and 2406, and a well-
established expert in the field, provided a rebuttal to the comments made by the
Counterpane report.
Ferguson and Schneier are two highly respected individuals in the cryptographic
community and the network security community as a whole, and are two of the authors
of TwoFish, an AES candidate. Given their expertise in cryptography, their report carried
a great deal of weight. Stephen Kent is one of a few, along with Randall Atkinson, Dan
Harkins, Dave Carrel, IPSec experts and knows the internals of the protocol suite
intimately — they wrote the RFCs!
In the IPSec workgroup, it was argued by some that Counterpane did not approach
the workgroup prior to releasing the report, allowing the opportunity to provide
reasoning behind some of the problems outlined. It was also argued that Ferguson and
Schneier did not learn some of the reasoning behind the protocol, which may have
shed light on areas of great contention.
On the other hand, many argued that some points introduced in the report were
valid and should be addressed by the group, adding that by simply knowing the reason
behind an option or functionality does not necessarily validate it. In the world of IPSec,
there seems to be a constant undercurrent of finger pointing between vendors, devel-
opers, implementers, testers, and just about anyone that deals with IPSec on a regular
basis. Conversations on the state of the protocol and the completeness of the protocol
are constant reminders that high security is not easily obtained.
The final result of this adventure was a report on the state of IPSec and comments
from Stephen Kent included in a document provided to the IETF IPSec workgroup.
This hybrid document provides very interesting insight into various positions and
opinions about issues regarding security, protocols, and operability. This author con-
tacted Stephen Kent and Bruce Schneier and asked their permission to reprint the
report with the comments included. They both graciously agreed and, therefore, the
report and comments are included here.
(Stephen Kent’s comments are in bold and the remainder is verbiage directly from
the Counterpane report on IPSec.)
“The standard defines two categories of machines: hosts and security gateways. Hosts
can use transport mode, but security gateways must always use tunnel mode. Elimi-
nating transport mode would also allow this distinction to be eliminated. Various
computers could of course still function as hosts or security gateways, but these
different uses would no longer affect the protocol.”
“The ESP protocol allows the payload to be encrypted without being authenticated.
In virtually all cases, encryption without authentication is not useful.The only situation
in which it makes sense not to use authentication in the ESP protocol is when the
authentication is provided by a subsequent application of the AH protocol (as is done
in transport mode because ESP authentication in transport mode is not strong enough).
[this is one example of when one might not need authentication with ESP, but it is not the
only one. In general, if there is a higher layer integrity and/or authentication function in
place, providing integrity/authentication in IPSec is redundant, both in terms of space and
processing. The authentication field for ESP or AH is 12 bytes. For applications where packet
sizes are quite small, and for some environments where packet size is of critical importance,
e.g., packet voice in a wireless environment, ESP w/o authentication may be appropriate.
This is especially true if the application protocol embodies an authentication mechanism.
This might happen if the application protocol wants to offer uniform protection irrespective
of the lower layers. Admittedly, this might also cause the application to offer confidentiality
as well, but depending on the application, the choices of what security services are being
offered may vary.] Without the transport mode to worry about, ESP should always
provide its own authentication. We recommend that ESP authentication always be
used, and only encryption be made optional. [the question of authentication as an
intrinsic part of ESP is independent of mode, i.e., whether one choose to provide authenti-
cation as a part of ESP is not determined by the choice of transport vs. tunnel mode.]”
“We can thus remove three of the four operational modes without any significant loss
of functionality. [sorry, can’t agree, given the counter examples above.]”
“There are existing combinations of options that are undesirable.These pose a problem
when non-experts have to configure an IPSec installation. Given the fact that experts
are rare and usually have better things to do, most IPSec installations will be configured
by non-experts. [yes, we were aware of this concern. However, there is always a trade-off
between adopting the “we know what’s best for you” approach, vs. the “you can screw it up
if you want to approach.” We opted for a point somewhere along this spectrum, but not at
either end.]”
“In transport mode, use of ESP provides authentication of the payload only. The
authentication excludes the IP headers of the packet. The result is a data stream that
is advertised as “authenticated” for which critical pieces of information (such as the
source and destination IP number) are not authenticated. Unless the system admin-
istrator is intimately familiar with the different forms of authentication used by IPSec,
it is quite likely that the administrator will assume that the authentication protects
the entire packet. The combination of transport mode and the ESP protocol (without
the AH protocol) should therefore not be allowed. [The IP source and destination
“The overall result is that IPSec bulk data handing is overly complex. In our opinion it
is possible to define an equivalent system that is far less complex.”
“When both encryption and authentication are provided, IPSec performs the encryption
first, and authenticates the ciphertext. In our opinion, this is the wrong order. Going
by the “Horton principle” {WS:SSL30}, the protocol should authenticate what was meant,
not what was said. The “meaning” of the ciphertext still depends on the decryption key
used. Authentication should thus be applied to the plaintext (as it is in SSL
{SSLv3Nov96}), and not to the ciphertext. [The order of processing is intentional. It is
explicitly designed to allow a receiver to discard a packet as quickly as possible, in the event
of DoS attacks, as you acknowledge below. The suggestion that this concern be addressed by
the addition of a secondary MAC seems to violate the spirit of simplicity that this document
espouses so strongly, and the specific proposed fix is not strong enough to warrant its incor-
poration. Moreover, this ordering allows parallel processing at a receiver, as a means of
increasing throughput and reducing delay.]”
“This does not always lead to a direct security problem. In the case of the ESP protocol,
the encryption key and authentication key are part of a single ESP key in the SA. A
successful authentication shows that the packet was sent by someone who knew the
authentication key.The recipient trusts the sender to encrypt that packet with the other
half of the ESP key, so that the decrypted data is in fact the same as the original data
that was sent. The exact argument why this is secure gets to be very complicated, and
requires special assumptions about the key agreement protocol. For example, suppose
an attacker can manipulate the key agreement protocol used to set up the SA in such
a way that the two parties get an agreement on the authentication key but a disagreement
on the encryption key. When this is done, the data transmitted will be authenticated
successfully, but decryption takes place with a different key than encryption, and all
the plaintext data is still garbled. [The fundamental assumption is that an ESP SA that employs
both encryption and an HMAC will have the keys bound together, irrespective of the means by
which they are generated. This assumption probably could be better stated in the RFCs.]”
“In other situations, the wrong order does lead to direct security weaknesses.”
“Doing the encryption first and authentication later allows the recipient to discard
packets with erroneous authentication faster, without the overhead of the decryp-
tion. This helps the computer cope with denial-of-service attacks in which a large
number of fake packets eat up a lot of CPU time. We question whether this would
be the preferred mode of attack against a TCP/IP-enabled computer. If this property
is really important, a 1- or 2-byte MAC (Message Authentication Code) on the
ciphertext could be added. The MAC code allows the recipient to rapidly discard
virtually all bogus packets at the cost of an additional MAC computation per packet.
[a one or two byte MAC provides so little protection that this does not seem to be an
attractive counter-proposal. Also, as noted above, it adds complexity …]”
“Most of our aforementioned comments also affect the SA system; the use of two
modes and two protocols make the SA system more complex than necessary.”
“There are very few (if any) situations in which a computer sends an IP packet to a
host, but no reply is ever sent. [we have a growing number of apps where this functionality
may be appropriate. For example, broadcast packet video feeds and secure time feeds are
unidirectional.] There are also very few situations in which the traffic in one direction
needs to be secured, but the traffic in the other direction does not need to be
secured. It therefore seems that in virtually all practical situations, SAs occur in pairs
“The security policies are stored in the SPD (Security Policy Database). For every
packet that is to be sent out, the SPD is checked to find how the packet is to be
processed. The SPD can specify three actions: discard the packet, let the packet
bypass IPSec processing, or apply IPSec processing. In the last case, the SPD also
specifies which SAs should be used (if suitable SAs have already been set up) or
specifies with what parameters new SAs should be set up to be used.”
“The SPD seems to be a very flexible control mechanism that allows a very fine-
grained control over the security processing of each packet. Packets are classified
according to a large number of selectors, and the SPD can match some or all
selectors to determine the appropriate action. Depending on the SPD, this can
result in either all traffic between two computers being carried on a single SA, or
a separate SA being used for each application, or even each TCP connection. Such
a very fine granularity has disadvantages. There is a significantly increased overhead
in setting up the required SAs, and more traffic analysis information is made
available to the attacker. At the same time we do not see any need for such a fine-
grained control. [a lot of customers for IPSec products disagree!] The SPD should
specify whether a packet should be discarded, should bypass any IPSec processing,
requires authentication, or requires authentication and encryption. Whether
several packets are combined on the same SA is not important. [yes it is. By allowing
an administrator the ability to select the granularity of protection, one can control the
level of partial traffic flow confidentiality offered between security gateways. Also, fine-
grained access control allows an admin to allow some forms of connections through the
gateway, while rejecting others. Access control is often the primary, underlying motivation
for using IPSec. A number of attacks become possible if one cannot tightly bind the
authentication provided by IPSec to the access control decision. Also, given the
computational costs of SA establishment via IKE, it is important to allow an administrator
to select the granularity of SAs.] The same holds for the exact choice of cryptographic
algorithm: any good algorithm will do. There are two reasons for this. First of all,
nobody ever attacks a system by cryptanalysis. Instead, attacks are made on the
users, implementation, management, etc. Any reasonable cryptographic algorithm
will provide adequate protection. The second reason is that there are very efficient
and secure algorithms available. Two machines should negotiate the strongest
algorithm that they are allowed. There is no reason to select individual algorithms
on an application-by-application basis. [if one were to employ ESP without
“In our opinion, management of the IPSec protocols can be simplified by letting the
SPD contain policies formulated at such a higher level. As we argued, simplification
will strengthen the actual system. [examples provided above illustrate why fine-grained
access control is important.]”
“It would be nice if the same high-level approach could be done in relation to the
choice of SA end-points. As there currently does not seem to be a reliable automatic
method of detecting IPSec-enabled security gateways, we do not see a practical
alternative to manual configuration of these parameters. It is questionable whether
automatic detection of IPSec-enabled gateways is possible at all. Without some initial
knowledge of the other side, any detection and negotiation algorithm can be sub-
verted by an active attacker. [the authors identify a good problem, but it is hardly an
unsolvable one. A proposal was put forth (by Bob Moscowtiz, over a year ago) to include
records in the DNS analogous to MX records. When one tried to establish an SA to a host
“behind” an SG, fetching this record would direct the initiator to an appropriate SG. This
solves the SG discovery problem. Other approaches have been put forth in the more recent
BBN work on security policy management, which forms the basis for a new IETF WG, chaired
by Luis Sanchez. The fact that none of the approaches has been deployed says more about
the priorities of IPSec vendors and early adopters than about the intractability of the
problem. The other part of the problem is verifying that an SG is authorized to represent
the SA target. Here too, various approaches have been described on the IPSec mailing list.]”
“In {RFC2401}, several fields in the SAD are required for all implementations, but
only used in some of them. It does not make sense to require the presence of fields
within an implementation. Only the external behavior of the system should be
standardized. [the SAD defined in 2401 is nominal, as the text explains. An implementation
is not required to implement these fields, but must exhibit behavior consistent with the
presence of these fields. We were unable to specify external behavior without reference to
a construct of this sort. The SPD has the same property.]”
“IPSec does not allow replay protection on an SA that was established using manual
key management techniques. This is a strange requirement. We realize that the replay
“RFC2401 suggests that an implementation can find the matching SPD entry for a
packet using back-pointers from the SAD entries. In general this will not work
correctly. Suppose the SPD contains two rules: the first one outlaws all packets to
port $X$, and the second one allows all incoming packets that have been authenti-
cated. An SA is set up for this second rule. The sender now sends a packet on this
SA addressed to port $X$. This packet should be refused as it matches the first SPD
rule. However, the back-pointer from the SA points to the second rule in the SPD,
which allows the packet. This shows that back-pointers from the SA do not always
point to the appropriate rule, and that this is not a proper method of finding the
relevant SPD entry. [this is point #3 and is applied only after points #1 and #2. Since point
#1 calls for a liner search of the SPD, the packet would be rejected, as required. Thus point
#3 is not in error.]”
“The text further suggests that unauthenticated ICMP messages should be disre-
garded. This creates problems. Let us envision two machines that are geographically
far apart and have a tunnel-mode SA set up. There are probably a dozen routers
between these two machines that forward the packets. None of these routers knows
about the existence of the SA. Any ICMP messages relating to the packets that are
sent will be unauthenticated and unencrypted. Simply discarding these ICMP mes-
sages results in a loss of IP functionality. This problem is mentioned, but the text
claims this is due to the routers not implementing IPSec. Even if the routers imple-
ment IPSec, they still cannot send authenticated ICMP messages about the tunnel
unless they themselves set up an SA with the tunnel end-point for the purpose of
sending the ICMP packet. The tunnel end-point in turn wants to be sure the source
is a real router. This requires a generic public-key infrastructure, which does not
exist. [RFC 2401 clearly states the dangers associated with blindly accepting unauthenticated
ICMP messages, and the functionality problems associated with discarding such messages.
System administrators are provided with the ability to make this trade-off locally. The first
step to addressing this problem is the addition of IPSec into routers, as stated in the RFC.
Only then does one face the need to have a PKI that identifies routers. Yes, this second PKI
does not exist, but a subset of it (at BGP routers) might be established if the S-BGP technology
is deployed. These are the routers most likely to issue ICMP PMTU messages. So, the answer
“RFC2401 mentions that each auditable event in the AH and ESP specifications lists
a minimum set of information that should be included in the audit-log entry. Not
all auditable events defined in RFC2406 include that information. [you’re right. Exactly
one auditable event in 2406 does not specify the list of data that SHOULD be audited. We’ll
fix that in the next pass.] Furthermore, auditable events in RFC2401 do not specify
such a minimum list of information. [there are exactly 3 events defined as auditable in
2401, one of which overlaps with 2406. So, to be more precise, the other 2 auditable
events defined in 2401 ought to have the minimum data requirements defined. Another
good point that we will fix in the next pass.] The documentation should be reviewed
to ensure that a minimum list of audit-log information is specified with each auditable
event.”
“Weak keys are not really a problem in most situations. For DES, it is far less work
for an attacker to do an exhaustive search over all possible keys than to wait for an
SA that happens to use a weak key. After all, the easiest way for the attacker to
detect the weak keys is to try them all. Weak-key rejection is only required for
algorithms where detecting the weak key class by the weak cipher properties is
significantly less work than trying all the weak keys in question.”
“The only mandatory encryption algorithm in ESP is DES-CBC. Due to the very limited
key length of DES, this cannot be considered to be very secure. We strongly urge that
this algorithm not be standardized but be replaced by a stronger alternative. The most
obvious candidate is triple-DES. Blowfish could be used as an interim high-speed
solution.\footnote{On a Pentium CPU, Blowfish is about six to seven times faster than
triple-DES.} The upcoming AES standard will presumably gain quick acceptance and
probably become the default encryption method for most systems. [DES as a default
was mandated because of pressure from vendors who, at the time, could not get export
permission for 3DES. Triple DES or AES will certainly augment DES as additional, mandatory
defaults, and may replace it in the future.]”
“Use of a block cipher with a 64-bit block size should in general be limited to at most
$2^{32}$ block encryptions per key. This is due to the birthday paradox. After
$2^{32}$ blocks we can expect one collision.\footnote{To get a $10^{-6}$ probability
of a collision it should be limited to about $2^{22}$ blocks.} In CBC mode, two equal
ciphertexts give the attacker the XOR of two blocks of the plaintext.The specifications
for the DES-CBC encryption algorithm \cite{RFC2405} should mention this, and
require that any SA using such an algorithm limit the total amount of data encrypted
by a single key to a suitable value.”
“The preferred mode for using a block cipher in ESP seems to be CBC mode {RFC2451}.
This is probably the most widely used cipher mode, but it has some disadvantages.
As mentioned earlier, a collision gives direct information about the relation of two
plaintext blocks. Furthermore, in hardware implementations each of the encryptions
has to be done in turn. This gives a limited parallelism, which hinders high-speed
hardware implementations. [first, this is not an intrinsic part of the architecture; one can
define different modes for use with existing or different algorithms if the WG is so motivated.
Second, current hardware is available at speeds higher than the associated packet processing
capability of current IPSec devices, so this does not appear to be a problem for the near
term. Transition to AES will decrease the processing burden (relative to 3DES), which may
render this concern less serious.]”
“Although not used very often, the counter mode seems to be preferable. The
ciphertext of block $i$ is formed as $C_i = P_i \oplus E_K( i )$, where $i$ is the
block number that needs to be sent at the start of the packet.\footnote{If replay
“RFC2451 states that Blowfish has weak keys, but that the likelihood of generating
one is very small. We disagree with these statements. The likelihood of getting two
equal 32-bit values in any one 256-entry S-box is about ${256 \choose 2} \cdot 2^{-
32} \approx 2^{-17}$. This is an event that will certainly occur in practice. However,
the Blowfish weak keys only lead to detectable weaknesses in reduced-round versions
of the cipher. There are no known weak keys for the full Blowfish cipher.”
“RFC2451 proposes the use of RC5. We urge caution in the use of this cipher. It uses
some new ideas that have not been fully analyzed or understood by the cryptographic
community. The original RC5 as proposed (with 12 rounds) was broken, and in
response to that the recommended number of rounds was increased to 16. We feel
that further research into the use of data-dependent rotations is required before RC5
is used in fielded systems. [RC5 is not required by IPSec implementations. In the IETF
spirit of flexible parameterization of implementations, vendors are free to offer any addi-
tional algorithms in addition to the required default. In general, the IETF is not prepared
to make value judgments about these algorithms and so one may see RFCs that specify a
variety of additional algorithms.]”
“RFC2406 specifies that the ESP padding should pad the plaintext to a length so that
the overall ciphertext length is both a multiple of the block size and a multiple of 4.
If a block cipher of unusual block size is used (e.g., 15 bytes), then this can require
up to 59 bytes of padding. This padding rule works best for block sizes that are a
multiple of 4, which fortunately is the case for most block ciphers. [this padding rule
is based primarily on IP packet alignment considerations, not on common block cipher sizes!
This is stated in the text.]”
“RFC2406 states that the padding computations of the ESP payload with regard to
the block size of the cipher apply to the payload data, excluding the IV (if present),
Pad Length, and Next Header fields. This would imply that the Pad Length and Next
“The NULL cipher specifies an IV length of zero {RFC2410}. This would seem to imply
that the NULL cipher is used in CBC mode, which is clearly not the case. The NULL
cipher is in fact used in ECB mode, which does not require an IV. Therefore, no IV
length should be specified. [use of the NULL cipher in ECB mode would be inconsistent with
the guidance in FIPS 82, and thus CBC mode is intended, to preserve the confidentiality
characteristics inherent in this cipher :-).]”
“The IPSec system should be simplified significantly. This can be done without loss of
functionality or performance. There are also some security weaknesses that should be
fixed. [the extensive comments above illustrate that the proposed changes to IPSec would
change the functionality, contrary to the claim made here. One might argue about the importance
of some of this functionality, but several examples have been provided to illustrate application
contexts that the authors of this report did not consider in their analysis. Several misunder-
standings of some RFCs also were noted.]”
Due to its high complexity, we have not been able to analyze IPSec as thoroughly as
we would have liked. After simplification, a new security analysis should be performed.”
* Proposal Payload
DCod ISAKMP P;
LABL 0 0 0 b1 Proposal Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
DBYT 0 0 90 c2 Proposal #;
DBYT 0 0 90 c2 Protocol ID;
DBYT 0 0 90 c2 SPI size;
DBYT 0 0 90 c2 # of Transfroms;
* subtract previous field from the length
SUBG 4 a 0 0;
HEX# 0 a 90 c2 SPI:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;
* Transform Payload;
DCod ISAKMP T;
LABL 0 0 0 b1 Transform Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
DBYT 0 0 90 c2 Transform #:;
DBYT 0 0 90 c2 Transform-Id:;
DWRD 0 0 90 c2 Reserved:;
* subtract previous field from the length
SUBG 8 a 0 0;
HEX# 0 a 90 c2 SA Attribates:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;
* ID Payload;
DCod ISAKMP ID;
LABL 0 0 0 b1 Identification Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
DBYT 0 0 90 c2 ID Type:;
HBIT 18 0 90 c2 DOI Specific Id data:;
* subtract previous field from the length
SUBG 8 a 0 0;
HEX# 0 a 90 c2 Identification Data:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;
* CERT Payload;
DCod ISAKMP CERT;
LABL 0 0 0 b1 Certificate Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
DBYT 0 b 90 c2 Cert Encoding:;
CST# ffffffff b 0 14 ISAKMP Cert Type;
* subtract previous field from the length
SUBG 5 a 0 0;
HEX# 0 a 90 c2 Certificate Data:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;
* Signature Payload;
DCod ISAKMP SIG;
LABL 0 0 0 b1 Signature Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
SUBG 4 a 0 0;
HEX# 0 a 90 c2 Signature Data:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;
* Nonce Payload;
DCod ISAKMP NONCE;
LABL 0 0 0 b1 NONCE Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
SUBG 4 a 0 0;
HEX# 0 a 90 c2 Nonce Data:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;
DCod ISAKMP N;
LABL 0 0 0 b1 Notification Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
DLNG 0 8 90 c2 DOI:;
CST# ffffffff 8 0 14 ISAKMP DOI;
DBYT 0 0 90 c2 Protocol-Id:;
DBYT 0 4 90 c2 SPI Size:;
DWRD 0 7 90 c2 Notify Message Type:;
* Notify type string is for values 1-16383
CST# 0 7 0 14 ISAKMP Notify Type;
* Notify type status is for values 16385-65535
* subtract 16384
DCod ISAKMP D;
LABL 0 0 0 b1 Delete Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffc001 d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
DLNG 0 8 90 c2 DOI:;
CST# ffffffff 8 0 14 ISAKMP DOI;
DBYT 0 0 90 c2 Protocol-Id:;
DBYT 0 4 90 c2 SPI Size:;
DWRD 0 7 90 c2 # of SPIs:;
TNXT 0 0 0 0 ISAKMP SPI;
DCod ISAKMP SPI;
* goto next payload if # of SPIs (g7) is zero
TEQU 0 7 0 0 ISAKMP Payload branch;
* For each SPI print (g4) bytes
HEX# 0 4 90 c2 SPI:;
SUBG 1 7 0 0;
* loop for all SPIs
TNXT 0 0 0 0 ISAKMP SPI;
* VID Payload;
DCod ISAKMP VID;
LABL 0 0 0 b1 Vendor ID Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
SUBG 4 a 0 0;
HEX# 0 a 90 c2 Vendor ID:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;
* Unknown Payload;
DCod ISAKMP Unknown;
LABL 0 0 0 b1 Unknown Payload;
* store next payload in 'd'
DBYT 0 d 90 c2 Next Payload:;
CST# ffffffff d 0 14 ISAKMP Payloads;
DBYT 0 0 90 c0 Reserved:;
DWRD 0 a 90 c2 Payload Length:;
SUBG 4 a 0 0;
HEX# 0 a 90 c2 Unknown:;
* SUB goes to next payload 'd'
TNXT 0 0 0 0 ISAKMP Payload branch;