SlideShare a Scribd company logo
1 of 53
11
IP Sec An OverviewIP Sec An Overview
 why IPSec?why IPSec?
 IPSec ArchitectureIPSec Architecture
 Internet Key Exchange (IKE)Internet Key Exchange (IKE)
 IPSec PolicyIPSec Policy
 discussiondiscussion
22
IP is not Secure!IP is not Secure!
 IP protocol was designed in the lateIP protocol was designed in the late
70s to early 80s70s to early 80s
– Part of DARPA Internet ProjectPart of DARPA Internet Project
– Very small networkVery small network
 All hosts are known!All hosts are known!
 So are the users!So are the users!
 Therefore, security was not an issueTherefore, security was not an issue
33
Security Issues in IPSecurity Issues in IP
 source spoofingsource spoofing
 replay packetsreplay packets
 no data integrity orno data integrity or
confidentialityconfidentiality
• DOS attacks
• Replay attacks
• Spying
• and more…
Fundamental Issue:
Networks are not (and will never be)
fully secure
44
Goals of IPSecGoals of IPSec
 to verify sources of IP packetsto verify sources of IP packets
– authenticationauthentication
 to prevent replaying of old packetsto prevent replaying of old packets
 to protect integrity and/orto protect integrity and/or
confidentiality of packetsconfidentiality of packets
– data Integrity/Data Encryptiondata Integrity/Data Encryption
55
OutlineOutline
 Why IPsec?Why IPsec?
 IPSec ArchitectureIPSec Architecture
 Internet Key Exchange (IKE)Internet Key Exchange (IKE)
 IPsec PolicyIPsec Policy
 DiscussionDiscussion
66
The IPSec Security ModelThe IPSec Security Model
Secure
Insecure
77
IPSec ArchitectureIPSec Architecture
ESP AH
IKE
IPSec Security Policy
Encapsulating Security
Payload
Authentication Header
The Internet Key Exchange
88
IPSec ArchitectureIPSec Architecture
 IPSec provides security in three
situations:
– Host-to-host, host-to-gateway and
gateway-to-gateway
 IPSec operates in two modes:
– Transport mode (for end-to-end)
– Tunnel mode (for VPN)
99
IPsec ArchitectureIPsec Architecture
Tunnel Mode
Router Router
Transport Mode
1010
Various PacketsVarious Packets
IP header
IP header
IP header
TCP header
TCP header
TCP header
data
data
data
IPSec header
IPSec header IP header
Original
Transport
mode
Tunnel
mode
1111
IPSecIPSec
 A collection of protocols (RFC 2401)A collection of protocols (RFC 2401)
– Authentication Header (AH)Authentication Header (AH)
 RFC 2402RFC 2402
– Encapsulating Security Payload (ESP)Encapsulating Security Payload (ESP)
 RFC 2406RFC 2406
– Internet Key Exchange (IKE)Internet Key Exchange (IKE)
 RFC 2409RFC 2409
– IP Payload Compression (IPcomp)IP Payload Compression (IPcomp)
 RFC 3137RFC 3137
1212
Authentication HeaderAuthentication Header
(AH)(AH)
 Provides source authenticationProvides source authentication
– Protects against source spoofingProtects against source spoofing
 Provides data integrityProvides data integrity
 Protects against replay attacksProtects against replay attacks
– Use monotonically increasing sequenceUse monotonically increasing sequence
numbersnumbers
– Protects against denial of service attacksProtects against denial of service attacks
 NO protection for confidentiality!NO protection for confidentiality!
1313
AH DetailsAH Details
 Use 32-bit monotonically increasingUse 32-bit monotonically increasing
sequence number to avoid replaysequence number to avoid replay
attacksattacks
 Use cryptographically strong hashUse cryptographically strong hash
algorithms to protect data integrityalgorithms to protect data integrity
(96-bit)(96-bit)
– Use symmetric key cryptographyUse symmetric key cryptography
– HMAC-SHA-96, HMAC-MD5-96HMAC-SHA-96, HMAC-MD5-96
1414
AH Packet DetailsAH Packet Details
Authentication Data
Sequence Number
Security Parameters Index (SPI)
Next
header
Payload
length
Reserved
Old IP header (only in Tunnel mode)
TCP header
New IP header
Authenticated
Data
Encapsulated
TCP or IP packet
Hash of everything
else
1515
Encapsulating SecurityEncapsulating Security
Payload (ESP)Payload (ESP)
 Provides all that AH offers, andProvides all that AH offers, and
 in addition providesin addition provides datadata
confidentialityconfidentiality
– Uses symmetric key encryptionUses symmetric key encryption
1616
ESP DetailsESP Details
 Same as AH:Same as AH:
– Use 32-bit sequence number to counterUse 32-bit sequence number to counter
replaying attacksreplaying attacks
– Use integrity check algorithmsUse integrity check algorithms
 Only in ESP:Only in ESP:
– Data confidentiality:Data confidentiality:
 Uses symmetric key encryption algorithmsUses symmetric key encryption algorithms
to encrypt packetsto encrypt packets
1717
ESP Packet DetailsESP Packet Details
Authentication Data
Sequence Number
Security Parameters Index (SPI)
Next
header
Payload
length
Reserved
TCP header
Authenticated
IP header
Initialization vector
Data
Pad Pad length Next
Encrypted TCP
packet
1818
Question?Question?
1.1. Why have both AH and ESP?Why have both AH and ESP?
2.2. Both AH and ESP use symmetricBoth AH and ESP use symmetric
key based algorithmskey based algorithms
– Why not public-key cryptography?Why not public-key cryptography?
– How are the keys being exchanged?How are the keys being exchanged?
– What algorithms should we use?What algorithms should we use?
– Similar to deciding on the ciphersuiteSimilar to deciding on the ciphersuite
in SSLin SSL
1919
OutlineOutline
 Why IPsec?Why IPsec?
 IPsec ArchitectureIPsec Architecture
 Internet Key Exchange (IKE)Internet Key Exchange (IKE)
 IPsec PolicyIPsec Policy
 DiscussionDiscussion
2020
Internet Key ExchangeInternet Key Exchange
(IKE)(IKE)
 Exchange and negotiate securityExchange and negotiate security
policiespolicies
 Establish security sessionsEstablish security sessions
– Identified asIdentified as Security AssociationsSecurity Associations
 Key exchangeKey exchange
 Key managementKey management
 Can be used outside IPsec as wellCan be used outside IPsec as well
2121
IPsec/IKE AcronymsIPsec/IKE Acronyms
 Security Association (SA)Security Association (SA)
– Collection of attribute associated with aCollection of attribute associated with a
connectionconnection
– IsIs asymmetric!asymmetric!
 One SA for inbound traffic, another SA forOne SA for inbound traffic, another SA for
outbound trafficoutbound traffic
 Similar to ciphersuites in SSLSimilar to ciphersuites in SSL
 Security Association Database (SADB)Security Association Database (SADB)
– A database of SAsA database of SAs
2222
IPsec/IKE AcronymsIPsec/IKE Acronyms
 Security Parameter Index (SPI)Security Parameter Index (SPI)
– A unique index for each entry in theA unique index for each entry in the
SADBSADB
– Identifies the SA associated with aIdentifies the SA associated with a
packetpacket
 Security Policy Database (SPD)Security Policy Database (SPD)
– Store policies used to establish SAsStore policies used to establish SAs
2323
How They Fit TogetherHow They Fit Together
SPD
SADB
SA-2
SPI
SPI
SA-1
2424
SPD and SADB ExampleSPD and SADB Example
FromFrom ToTo ProtocolProtocol PortPort PolicyPolicy
AA BB AnyAny AnyAny AH[HMAC-MD5]AH[HMAC-MD5]
Tunnel Mode
Transport Mode
A
C
B
A’s SPD
FromFrom ToTo ProtocolProtocol SPISPI SA RecordSA Record
AA BB AHAH 1212 HMAC-MD5 keyHMAC-MD5 key
A’s SADB
D
FromFrom ToTo ProtocolProtocol PortPort PolicyPolicy Tunnel DestTunnel Dest
AnyAny AnyAny ESP[3DES]ESP[3DES] DD
C’s SPD
FromFrom ToTo ProtocolProtocol SPISPI SA RecordSA Record
ESPESP 1414 3DES key3DES key
C’s SADB
Asub Bsub
Asub Bsub
2525
How It WorksHow It Works
 IKE operates in two phasesIKE operates in two phases
– Phase 1:Phase 1: negotiate and establish an auxiliarynegotiate and establish an auxiliary
end-to-end secure channelend-to-end secure channel
 Used by subsequent phase 2 negotiationsUsed by subsequent phase 2 negotiations
 Only established once between two end points!Only established once between two end points!
– Phase 2:Phase 2: negotiate and establish customnegotiate and establish custom
secure channelssecure channels
 Occurs multiple timesOccurs multiple times
– Both phases use Diffie-Hellman key exchangeBoth phases use Diffie-Hellman key exchange
to establish a shared keyto establish a shared key
2626
IKE Phase 1IKE Phase 1
 Goal:Goal: to establish a secure channelto establish a secure channel
between two end pointsbetween two end points
– This channel provides basic securityThis channel provides basic security
features:features:
 Source authenticationSource authentication
 Data integrity and data confidentialityData integrity and data confidentiality
 Protection against replay attacksProtection against replay attacks
2727
IKE Phase 1IKE Phase 1
 Rationale:Rationale: each application haseach application has
different security requirementsdifferent security requirements
 But they all need to negotiationBut they all need to negotiation
policies and exchange keys!policies and exchange keys!
 So, provide the basic securitySo, provide the basic security
features and allow application tofeatures and allow application to
establish custom sessionsestablish custom sessions
2828
ExamplesExamples
 All packets sent to addressAll packets sent to address
mybank.commybank.com must be encrypted usingmust be encrypted using
3DES with HMAC-MD5 integrity3DES with HMAC-MD5 integrity
checkcheck
 All packets sent to addressAll packets sent to address
www.forum.comwww.forum.com must use integritymust use integrity
check with HMAC-SHA1 (nocheck with HMAC-SHA1 (no
encryption is required)encryption is required)
2929
Phase 1 ExchangePhase 1 Exchange
 Can operate in two modes:Can operate in two modes:
– Main modeMain mode
 Six messages in three round tripsSix messages in three round trips
 More optionsMore options
– Quick modeQuick mode
 Four messages in two round tripsFour messages in two round trips
 Less optionsLess options
3030
Phase 1 (Main Mode)Phase 1 (Main Mode)
Initiator Responder
[Header, SA1]
3131
Phase 1 (Main Mode)Phase 1 (Main Mode)
Initiator Responder
[Header, SA1]
[Header, SA2]
Establish vocabulary for further communication
3232
Phase 1 (Main Mode)Phase 1 (Main Mode)
Initiator Responder
[Header, SA1]
[Header, SA2]
[Header, KE, Ni, {Cert_Reg} ]
3333
Phase 1 (Main Mode)Phase 1 (Main Mode)
Initiator Responder
Header, SA1
[Header, SA1]
[Header, KE, Ni { , Cert_Req} ]
[Header, KE, Nr {, Cert_Req}]
Establish secret key using Diffie-Hellman key exchange
Use nonces to prevent replay attacks
3434
Phase 1 (Main Mode)Phase 1 (Main Mode)
Initiator Responder
[Header, SA1]
[Header, SA1]
[Header, KE, Ni {,Cert_Req} ]
[Header, KE, Nr {,Cert_Req}]
[Header, IDi, {CERT} sig]
3535
Phase 1 (Main Mode)Phase 1 (Main Mode)
Initiator Responder
[Header, SA1]
[Header, SA1]
[Header, KE, Ni {, Cert_req}]
[Header, KE, Nr {, Cert_req}]
[Header, IDi, {CERT} sig]
[Header, IDr, {CERT} sig]
Signed hash of IDi (without Cert_req , just send the hash)
3636
Phase 1 (Aggressive Mode)Phase 1 (Aggressive Mode)
Initiator Responder
[Header, SA1, KE, Ni, IDi]
3737
Phase 1 (Aggressive Mode)Phase 1 (Aggressive Mode)
Initiator Responder
[Header, SA1, KE, Ni, IDi]
[Header, SA2, KE, Nr,
IDr, [Cert]sig]
[Header, [Cert]sig]
First two messages combined into one
(combine Hello and DH key exchange)
3838
IPSec (Phase 1)IPSec (Phase 1)
 Four different way to authenticateFour different way to authenticate
(either mode)(either mode)
– Digital signatureDigital signature
– Two forms of authentication withTwo forms of authentication with
public key encryptionpublic key encryption
– Pre-shared keyPre-shared key
 NOTE:NOTE: IKE does use public-keyIKE does use public-key
based cryptography for encryptionbased cryptography for encryption
3939
IPSec (Phase 2)IPSec (Phase 2)
 Goal:Goal: to establish custom secureto establish custom secure
channels between to end pointschannels between to end points
– End points are identified by <IP, port>:End points are identified by <IP, port>:
 e.g.e.g. <www.mybank.com, 8000><www.mybank.com, 8000>
– Or by packet:Or by packet:
 e.g. All packets going toe.g. All packets going to 128.124.100.0/24128.124.100.0/24
– Use the secure channel established inUse the secure channel established in
Phase 1 for communicationPhase 1 for communication
4040
IPSec (Phase 2)IPSec (Phase 2)
 Only one mode:Only one mode: Quick ModeQuick Mode
 Multiple quick mode exchanges canMultiple quick mode exchanges can
be multiplexedbe multiplexed
 Generate SAs for two end pointsGenerate SAs for two end points
 Can use secure channel establishedCan use secure channel established
in phase 1in phase 1
4141
IP Payload CompressionIP Payload Compression
 Used for compressionUsed for compression
 Can be specified as part of theCan be specified as part of the
IPSec policyIPSec policy
 Will not cover!Will not cover!
4242
OutlineOutline
 Why IPsec?Why IPsec?
 IPsec ArchitectureIPsec Architecture
 Internet Key Exchange (IKE)Internet Key Exchange (IKE)
 IPSec PolicyIPSec Policy
 DiscussionDiscussion
4343
IPsec PolicyIPsec Policy
 Phase 1 policies are defined in terms ofPhase 1 policies are defined in terms of
protection suitesprotection suites
 Each protection suiteEach protection suite
– Must contain the following:Must contain the following:
 Encryption algorithmEncryption algorithm
 Hash algorithmHash algorithm
 Authentication methodAuthentication method
 Diffie-Hellman GroupDiffie-Hellman Group
– May optionally contain the following:May optionally contain the following:
 LifetimeLifetime
 ……
4444
IPSec PolicyIPSec Policy
 Phase 2 policies are defined in terms ofPhase 2 policies are defined in terms of
proposalsproposals
 Each proposal:Each proposal:
– May contain one or more of the followingMay contain one or more of the following
 AH sub-proposalsAH sub-proposals
 ESP sub-proposalsESP sub-proposals
 IPComp sub-proposalsIPComp sub-proposals
 Along with necessary attributes such asAlong with necessary attributes such as
– Key length, life time, etcKey length, life time, etc
4545
IPSec Policy ExampleIPSec Policy Example
 In English:In English:
– All traffic to 128.104.120.0/24 must be:All traffic to 128.104.120.0/24 must be:
 Use pre-hashed key authenticationUse pre-hashed key authentication
 DH group is MODP with 1024-bit modulusDH group is MODP with 1024-bit modulus
 Hash algorithm is HMAC-SHA (128 bit key)Hash algorithm is HMAC-SHA (128 bit key)
 Encryption using 3DESEncryption using 3DES
 In IPSec:In IPSec:
– [Auth=Pre-Hash;[Auth=Pre-Hash;
DH=MODP(1024-bit);DH=MODP(1024-bit);
HASH=HMAC-SHA;HASH=HMAC-SHA;
ENC=3DES]ENC=3DES]
4646
IPsec Policy ExampleIPsec Policy Example
 In English:In English:
– All traffic to 128.104.120.0/24 must use oneAll traffic to 128.104.120.0/24 must use one
of the following:of the following:
 AH with HMAC-SHA or,AH with HMAC-SHA or,
 ESP with 3DES as encryption algorithm andESP with 3DES as encryption algorithm and
(HMAC-MD5 or HMAC-SHA as hashing algorithm)(HMAC-MD5 or HMAC-SHA as hashing algorithm)
 In IPsec:In IPsec:
– [AH: HMAC-SHA] or,[AH: HMAC-SHA] or,
– [ESP: (3DES and HMAC-MD5) or[ESP: (3DES and HMAC-MD5) or
(3DES and HMAC-SHA)](3DES and HMAC-SHA)]
4747
Virtual Private NetworksVirtual Private Networks
(VPNs)(VPNs)
 VirtualVirtual
– It is not a physically distinct networkIt is not a physically distinct network
 PrivatePrivate
– Tunnels are encrypted to provideTunnels are encrypted to provide
confidentialityconfidentiality
 CS dept might have a VPNCS dept might have a VPN
– I can be on this VPN while travelingI can be on this VPN while traveling
4848
Alice is TravelingAlice is Traveling
 AliceAlice works for the mergers andworks for the mergers and
acquisitions (M&A) department ofacquisitions (M&A) department of
takeover.comtakeover.com
 She is atShe is at HicktownHicktown taking over ataking over a
meat-packing plantmeat-packing plant
 She wants to access the M&AShe wants to access the M&A
server at her companyserver at her company
(confidentially of course)(confidentially of course)
4949
Alice is TravelingAlice is Traveling
5050
OutlineOutline
 Why IPsec?Why IPsec?
 IPsec ArchitectureIPsec Architecture
 Internet Key Exchange (IKE)Internet Key Exchange (IKE)
 IPsec PolicyIPsec Policy
 DiscussionDiscussion
5151
DiscussionDiscussion
 IPSec is not the only solution!IPSec is not the only solution!
– Security features can be added on topSecurity features can be added on top
of IP!of IP!
 e.g. Kerberos, SSLe.g. Kerberos, SSL
 Confused?Confused?
– IP, IPSec protocols are very complex!IP, IPSec protocols are very complex!
 Two modes, three sub protocolsTwo modes, three sub protocols
– Complexity is the biggest enemy ofComplexity is the biggest enemy of
securitysecurity
5252
DiscussionDiscussion
 Has it been used?Has it been used?
– Yes—primarily used by some VPNYes—primarily used by some VPN
vendorsvendors
 But not all routers support itBut not all routers support it
– No—it is not really an end-to-endNo—it is not really an end-to-end
solutionsolution
 Authentication is too coarse (host based)Authentication is too coarse (host based)
 Default encryption algorithm too weakDefault encryption algorithm too weak
(DES)(DES)
 Too complex for applications to useToo complex for applications to use
5353
ResourcesResources
 IP, IPsec and related RFCs:IP, IPsec and related RFCs:
– http://www.ietf.org/html.charters/ipsec-charter.htmlhttp://www.ietf.org/html.charters/ipsec-charter.html
– IPsec: RFC 2401, IKE: RFC 2409IPsec: RFC 2401, IKE: RFC 2409
– www.freeswan.orgwww.freeswan.org
 Google searchGoogle search

More Related Content

What's hot (20)

Internet Key Exchange Protocol
Internet Key Exchange ProtocolInternet Key Exchange Protocol
Internet Key Exchange Protocol
 
Ipsec
IpsecIpsec
Ipsec
 
Ipsecurity
IpsecurityIpsecurity
Ipsecurity
 
Ipsec (network security)
Ipsec (network security)Ipsec (network security)
Ipsec (network security)
 
IPSec VPN tunnel
IPSec VPN tunnelIPSec VPN tunnel
IPSec VPN tunnel
 
IPsec vpn
IPsec vpnIPsec vpn
IPsec vpn
 
Ip Sec
Ip SecIp Sec
Ip Sec
 
IP Sec by Amin Pathan
IP Sec by Amin PathanIP Sec by Amin Pathan
IP Sec by Amin Pathan
 
IPsec
IPsecIPsec
IPsec
 
I psec
I psecI psec
I psec
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and ssl
 
IPsec with AH
IPsec with AHIPsec with AH
IPsec with AH
 
IPSec | Computer Network
IPSec | Computer NetworkIPSec | Computer Network
IPSec | Computer Network
 
Ip sec talk
Ip sec talkIp sec talk
Ip sec talk
 
Internet security association and key management protocol (isakmp)
Internet security association and key management protocol (isakmp)Internet security association and key management protocol (isakmp)
Internet security association and key management protocol (isakmp)
 
Internet Key Exchange (ikev2) Protocol
Internet Key Exchange (ikev2) ProtocolInternet Key Exchange (ikev2) Protocol
Internet Key Exchange (ikev2) Protocol
 
I psecurity
I psecurityI psecurity
I psecurity
 
Ike
IkeIke
Ike
 
IP Security
IP SecurityIP Security
IP Security
 
05 06 ike
05   06 ike05   06 ike
05 06 ike
 

Viewers also liked

Types of authentication
Types of authenticationTypes of authentication
Types of authenticationAlexis Goguen
 
End-to-End Encryption of Distributed Applications
End-to-End Encryption of Distributed ApplicationsEnd-to-End Encryption of Distributed Applications
End-to-End Encryption of Distributed ApplicationsJeff Lambert
 
Dynamic Spectrum Access and the race for mobile capacity
Dynamic Spectrum Access and the race for mobile capacityDynamic Spectrum Access and the race for mobile capacity
Dynamic Spectrum Access and the race for mobile capacityAndrew Stirling
 
(SEC303) Architecting for End-To-End Security in the Enterprise
(SEC303) Architecting for End-To-End Security in the Enterprise(SEC303) Architecting for End-To-End Security in the Enterprise
(SEC303) Architecting for End-To-End Security in the EnterpriseAmazon Web Services
 
Review on Whatsapp's End to End encryption and Facebook integration
Review on Whatsapp's End to End encryption and Facebook integrationReview on Whatsapp's End to End encryption and Facebook integration
Review on Whatsapp's End to End encryption and Facebook integrationGovindarrajan NV
 
Vpn site to site
Vpn site to siteVpn site to site
Vpn site to siteIT Tech
 
IoT End-to-End Security Overview
IoT End-to-End Security OverviewIoT End-to-End Security Overview
IoT End-to-End Security OverviewAmazon Web Services
 
VPN - Virtual Private Network
VPN - Virtual Private NetworkVPN - Virtual Private Network
VPN - Virtual Private NetworkPeter R. Egli
 

Viewers also liked (9)

Types of authentication
Types of authenticationTypes of authentication
Types of authentication
 
Unit08
Unit08Unit08
Unit08
 
End-to-End Encryption of Distributed Applications
End-to-End Encryption of Distributed ApplicationsEnd-to-End Encryption of Distributed Applications
End-to-End Encryption of Distributed Applications
 
Dynamic Spectrum Access and the race for mobile capacity
Dynamic Spectrum Access and the race for mobile capacityDynamic Spectrum Access and the race for mobile capacity
Dynamic Spectrum Access and the race for mobile capacity
 
(SEC303) Architecting for End-To-End Security in the Enterprise
(SEC303) Architecting for End-To-End Security in the Enterprise(SEC303) Architecting for End-To-End Security in the Enterprise
(SEC303) Architecting for End-To-End Security in the Enterprise
 
Review on Whatsapp's End to End encryption and Facebook integration
Review on Whatsapp's End to End encryption and Facebook integrationReview on Whatsapp's End to End encryption and Facebook integration
Review on Whatsapp's End to End encryption and Facebook integration
 
Vpn site to site
Vpn site to siteVpn site to site
Vpn site to site
 
IoT End-to-End Security Overview
IoT End-to-End Security OverviewIoT End-to-End Security Overview
IoT End-to-End Security Overview
 
VPN - Virtual Private Network
VPN - Virtual Private NetworkVPN - Virtual Private Network
VPN - Virtual Private Network
 

Similar to I psec

IP security Part 1
IP security   Part 1IP security   Part 1
IP security Part 1CAS
 
8.X Sec & I Pv6
8.X Sec & I Pv68.X Sec & I Pv6
8.X Sec & I Pv6phanleson
 
The Security layer
The Security layerThe Security layer
The Security layerSwetha S
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network SecurityKathirvel Ayyaswamy
 
IS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecurityIS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecuritySarthak Patel
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psecMohd Arif
 
Crypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configurationCrypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configurationdborsan
 
SREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
SREcon Europe 2016 - Full-mesh IPsec network at Hosted GraphiteSREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
SREcon Europe 2016 - Full-mesh IPsec network at Hosted GraphiteHostedGraphite
 
IP Security in Network Security NS6
IP Security in Network Security NS6IP Security in Network Security NS6
IP Security in Network Security NS6koolkampus
 

Similar to I psec (20)

Lecture14..pdf
Lecture14..pdfLecture14..pdf
Lecture14..pdf
 
IPsec for IMS
IPsec for IMSIPsec for IMS
IPsec for IMS
 
IP security Part 1
IP security   Part 1IP security   Part 1
IP security Part 1
 
Network IP Security.pdf
Network IP Security.pdfNetwork IP Security.pdf
Network IP Security.pdf
 
8.X Sec & I Pv6
8.X Sec & I Pv68.X Sec & I Pv6
8.X Sec & I Pv6
 
The Security layer
The Security layerThe Security layer
The Security layer
 
Ip security
Ip security Ip security
Ip security
 
Ip Sec
Ip SecIp Sec
Ip Sec
 
WLAN and IP security
WLAN and IP securityWLAN and IP security
WLAN and IP security
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
IS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecurityIS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email Security
 
Ip Sec Rev1
Ip Sec Rev1Ip Sec Rev1
Ip Sec Rev1
 
Ipsec rbe guide
Ipsec rbe guideIpsec rbe guide
Ipsec rbe guide
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psec
 
IP security
IP securityIP security
IP security
 
Crypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configurationCrypto map based IPsec VPN fundamentals - negotiation and configuration
Crypto map based IPsec VPN fundamentals - negotiation and configuration
 
SREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
SREcon Europe 2016 - Full-mesh IPsec network at Hosted GraphiteSREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
SREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
 
IP Security in Network Security NS6
IP Security in Network Security NS6IP Security in Network Security NS6
IP Security in Network Security NS6
 
VPN presentation - moeshesh
VPN presentation - moesheshVPN presentation - moeshesh
VPN presentation - moeshesh
 
Chapter 6.ppt
Chapter 6.pptChapter 6.ppt
Chapter 6.ppt
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

I psec

  • 1. 11 IP Sec An OverviewIP Sec An Overview  why IPSec?why IPSec?  IPSec ArchitectureIPSec Architecture  Internet Key Exchange (IKE)Internet Key Exchange (IKE)  IPSec PolicyIPSec Policy  discussiondiscussion
  • 2. 22 IP is not Secure!IP is not Secure!  IP protocol was designed in the lateIP protocol was designed in the late 70s to early 80s70s to early 80s – Part of DARPA Internet ProjectPart of DARPA Internet Project – Very small networkVery small network  All hosts are known!All hosts are known!  So are the users!So are the users!  Therefore, security was not an issueTherefore, security was not an issue
  • 3. 33 Security Issues in IPSecurity Issues in IP  source spoofingsource spoofing  replay packetsreplay packets  no data integrity orno data integrity or confidentialityconfidentiality • DOS attacks • Replay attacks • Spying • and more… Fundamental Issue: Networks are not (and will never be) fully secure
  • 4. 44 Goals of IPSecGoals of IPSec  to verify sources of IP packetsto verify sources of IP packets – authenticationauthentication  to prevent replaying of old packetsto prevent replaying of old packets  to protect integrity and/orto protect integrity and/or confidentiality of packetsconfidentiality of packets – data Integrity/Data Encryptiondata Integrity/Data Encryption
  • 5. 55 OutlineOutline  Why IPsec?Why IPsec?  IPSec ArchitectureIPSec Architecture  Internet Key Exchange (IKE)Internet Key Exchange (IKE)  IPsec PolicyIPsec Policy  DiscussionDiscussion
  • 6. 66 The IPSec Security ModelThe IPSec Security Model Secure Insecure
  • 7. 77 IPSec ArchitectureIPSec Architecture ESP AH IKE IPSec Security Policy Encapsulating Security Payload Authentication Header The Internet Key Exchange
  • 8. 88 IPSec ArchitectureIPSec Architecture  IPSec provides security in three situations: – Host-to-host, host-to-gateway and gateway-to-gateway  IPSec operates in two modes: – Transport mode (for end-to-end) – Tunnel mode (for VPN)
  • 9. 99 IPsec ArchitectureIPsec Architecture Tunnel Mode Router Router Transport Mode
  • 10. 1010 Various PacketsVarious Packets IP header IP header IP header TCP header TCP header TCP header data data data IPSec header IPSec header IP header Original Transport mode Tunnel mode
  • 11. 1111 IPSecIPSec  A collection of protocols (RFC 2401)A collection of protocols (RFC 2401) – Authentication Header (AH)Authentication Header (AH)  RFC 2402RFC 2402 – Encapsulating Security Payload (ESP)Encapsulating Security Payload (ESP)  RFC 2406RFC 2406 – Internet Key Exchange (IKE)Internet Key Exchange (IKE)  RFC 2409RFC 2409 – IP Payload Compression (IPcomp)IP Payload Compression (IPcomp)  RFC 3137RFC 3137
  • 12. 1212 Authentication HeaderAuthentication Header (AH)(AH)  Provides source authenticationProvides source authentication – Protects against source spoofingProtects against source spoofing  Provides data integrityProvides data integrity  Protects against replay attacksProtects against replay attacks – Use monotonically increasing sequenceUse monotonically increasing sequence numbersnumbers – Protects against denial of service attacksProtects against denial of service attacks  NO protection for confidentiality!NO protection for confidentiality!
  • 13. 1313 AH DetailsAH Details  Use 32-bit monotonically increasingUse 32-bit monotonically increasing sequence number to avoid replaysequence number to avoid replay attacksattacks  Use cryptographically strong hashUse cryptographically strong hash algorithms to protect data integrityalgorithms to protect data integrity (96-bit)(96-bit) – Use symmetric key cryptographyUse symmetric key cryptography – HMAC-SHA-96, HMAC-MD5-96HMAC-SHA-96, HMAC-MD5-96
  • 14. 1414 AH Packet DetailsAH Packet Details Authentication Data Sequence Number Security Parameters Index (SPI) Next header Payload length Reserved Old IP header (only in Tunnel mode) TCP header New IP header Authenticated Data Encapsulated TCP or IP packet Hash of everything else
  • 15. 1515 Encapsulating SecurityEncapsulating Security Payload (ESP)Payload (ESP)  Provides all that AH offers, andProvides all that AH offers, and  in addition providesin addition provides datadata confidentialityconfidentiality – Uses symmetric key encryptionUses symmetric key encryption
  • 16. 1616 ESP DetailsESP Details  Same as AH:Same as AH: – Use 32-bit sequence number to counterUse 32-bit sequence number to counter replaying attacksreplaying attacks – Use integrity check algorithmsUse integrity check algorithms  Only in ESP:Only in ESP: – Data confidentiality:Data confidentiality:  Uses symmetric key encryption algorithmsUses symmetric key encryption algorithms to encrypt packetsto encrypt packets
  • 17. 1717 ESP Packet DetailsESP Packet Details Authentication Data Sequence Number Security Parameters Index (SPI) Next header Payload length Reserved TCP header Authenticated IP header Initialization vector Data Pad Pad length Next Encrypted TCP packet
  • 18. 1818 Question?Question? 1.1. Why have both AH and ESP?Why have both AH and ESP? 2.2. Both AH and ESP use symmetricBoth AH and ESP use symmetric key based algorithmskey based algorithms – Why not public-key cryptography?Why not public-key cryptography? – How are the keys being exchanged?How are the keys being exchanged? – What algorithms should we use?What algorithms should we use? – Similar to deciding on the ciphersuiteSimilar to deciding on the ciphersuite in SSLin SSL
  • 19. 1919 OutlineOutline  Why IPsec?Why IPsec?  IPsec ArchitectureIPsec Architecture  Internet Key Exchange (IKE)Internet Key Exchange (IKE)  IPsec PolicyIPsec Policy  DiscussionDiscussion
  • 20. 2020 Internet Key ExchangeInternet Key Exchange (IKE)(IKE)  Exchange and negotiate securityExchange and negotiate security policiespolicies  Establish security sessionsEstablish security sessions – Identified asIdentified as Security AssociationsSecurity Associations  Key exchangeKey exchange  Key managementKey management  Can be used outside IPsec as wellCan be used outside IPsec as well
  • 21. 2121 IPsec/IKE AcronymsIPsec/IKE Acronyms  Security Association (SA)Security Association (SA) – Collection of attribute associated with aCollection of attribute associated with a connectionconnection – IsIs asymmetric!asymmetric!  One SA for inbound traffic, another SA forOne SA for inbound traffic, another SA for outbound trafficoutbound traffic  Similar to ciphersuites in SSLSimilar to ciphersuites in SSL  Security Association Database (SADB)Security Association Database (SADB) – A database of SAsA database of SAs
  • 22. 2222 IPsec/IKE AcronymsIPsec/IKE Acronyms  Security Parameter Index (SPI)Security Parameter Index (SPI) – A unique index for each entry in theA unique index for each entry in the SADBSADB – Identifies the SA associated with aIdentifies the SA associated with a packetpacket  Security Policy Database (SPD)Security Policy Database (SPD) – Store policies used to establish SAsStore policies used to establish SAs
  • 23. 2323 How They Fit TogetherHow They Fit Together SPD SADB SA-2 SPI SPI SA-1
  • 24. 2424 SPD and SADB ExampleSPD and SADB Example FromFrom ToTo ProtocolProtocol PortPort PolicyPolicy AA BB AnyAny AnyAny AH[HMAC-MD5]AH[HMAC-MD5] Tunnel Mode Transport Mode A C B A’s SPD FromFrom ToTo ProtocolProtocol SPISPI SA RecordSA Record AA BB AHAH 1212 HMAC-MD5 keyHMAC-MD5 key A’s SADB D FromFrom ToTo ProtocolProtocol PortPort PolicyPolicy Tunnel DestTunnel Dest AnyAny AnyAny ESP[3DES]ESP[3DES] DD C’s SPD FromFrom ToTo ProtocolProtocol SPISPI SA RecordSA Record ESPESP 1414 3DES key3DES key C’s SADB Asub Bsub Asub Bsub
  • 25. 2525 How It WorksHow It Works  IKE operates in two phasesIKE operates in two phases – Phase 1:Phase 1: negotiate and establish an auxiliarynegotiate and establish an auxiliary end-to-end secure channelend-to-end secure channel  Used by subsequent phase 2 negotiationsUsed by subsequent phase 2 negotiations  Only established once between two end points!Only established once between two end points! – Phase 2:Phase 2: negotiate and establish customnegotiate and establish custom secure channelssecure channels  Occurs multiple timesOccurs multiple times – Both phases use Diffie-Hellman key exchangeBoth phases use Diffie-Hellman key exchange to establish a shared keyto establish a shared key
  • 26. 2626 IKE Phase 1IKE Phase 1  Goal:Goal: to establish a secure channelto establish a secure channel between two end pointsbetween two end points – This channel provides basic securityThis channel provides basic security features:features:  Source authenticationSource authentication  Data integrity and data confidentialityData integrity and data confidentiality  Protection against replay attacksProtection against replay attacks
  • 27. 2727 IKE Phase 1IKE Phase 1  Rationale:Rationale: each application haseach application has different security requirementsdifferent security requirements  But they all need to negotiationBut they all need to negotiation policies and exchange keys!policies and exchange keys!  So, provide the basic securitySo, provide the basic security features and allow application tofeatures and allow application to establish custom sessionsestablish custom sessions
  • 28. 2828 ExamplesExamples  All packets sent to addressAll packets sent to address mybank.commybank.com must be encrypted usingmust be encrypted using 3DES with HMAC-MD5 integrity3DES with HMAC-MD5 integrity checkcheck  All packets sent to addressAll packets sent to address www.forum.comwww.forum.com must use integritymust use integrity check with HMAC-SHA1 (nocheck with HMAC-SHA1 (no encryption is required)encryption is required)
  • 29. 2929 Phase 1 ExchangePhase 1 Exchange  Can operate in two modes:Can operate in two modes: – Main modeMain mode  Six messages in three round tripsSix messages in three round trips  More optionsMore options – Quick modeQuick mode  Four messages in two round tripsFour messages in two round trips  Less optionsLess options
  • 30. 3030 Phase 1 (Main Mode)Phase 1 (Main Mode) Initiator Responder [Header, SA1]
  • 31. 3131 Phase 1 (Main Mode)Phase 1 (Main Mode) Initiator Responder [Header, SA1] [Header, SA2] Establish vocabulary for further communication
  • 32. 3232 Phase 1 (Main Mode)Phase 1 (Main Mode) Initiator Responder [Header, SA1] [Header, SA2] [Header, KE, Ni, {Cert_Reg} ]
  • 33. 3333 Phase 1 (Main Mode)Phase 1 (Main Mode) Initiator Responder Header, SA1 [Header, SA1] [Header, KE, Ni { , Cert_Req} ] [Header, KE, Nr {, Cert_Req}] Establish secret key using Diffie-Hellman key exchange Use nonces to prevent replay attacks
  • 34. 3434 Phase 1 (Main Mode)Phase 1 (Main Mode) Initiator Responder [Header, SA1] [Header, SA1] [Header, KE, Ni {,Cert_Req} ] [Header, KE, Nr {,Cert_Req}] [Header, IDi, {CERT} sig]
  • 35. 3535 Phase 1 (Main Mode)Phase 1 (Main Mode) Initiator Responder [Header, SA1] [Header, SA1] [Header, KE, Ni {, Cert_req}] [Header, KE, Nr {, Cert_req}] [Header, IDi, {CERT} sig] [Header, IDr, {CERT} sig] Signed hash of IDi (without Cert_req , just send the hash)
  • 36. 3636 Phase 1 (Aggressive Mode)Phase 1 (Aggressive Mode) Initiator Responder [Header, SA1, KE, Ni, IDi]
  • 37. 3737 Phase 1 (Aggressive Mode)Phase 1 (Aggressive Mode) Initiator Responder [Header, SA1, KE, Ni, IDi] [Header, SA2, KE, Nr, IDr, [Cert]sig] [Header, [Cert]sig] First two messages combined into one (combine Hello and DH key exchange)
  • 38. 3838 IPSec (Phase 1)IPSec (Phase 1)  Four different way to authenticateFour different way to authenticate (either mode)(either mode) – Digital signatureDigital signature – Two forms of authentication withTwo forms of authentication with public key encryptionpublic key encryption – Pre-shared keyPre-shared key  NOTE:NOTE: IKE does use public-keyIKE does use public-key based cryptography for encryptionbased cryptography for encryption
  • 39. 3939 IPSec (Phase 2)IPSec (Phase 2)  Goal:Goal: to establish custom secureto establish custom secure channels between to end pointschannels between to end points – End points are identified by <IP, port>:End points are identified by <IP, port>:  e.g.e.g. <www.mybank.com, 8000><www.mybank.com, 8000> – Or by packet:Or by packet:  e.g. All packets going toe.g. All packets going to 128.124.100.0/24128.124.100.0/24 – Use the secure channel established inUse the secure channel established in Phase 1 for communicationPhase 1 for communication
  • 40. 4040 IPSec (Phase 2)IPSec (Phase 2)  Only one mode:Only one mode: Quick ModeQuick Mode  Multiple quick mode exchanges canMultiple quick mode exchanges can be multiplexedbe multiplexed  Generate SAs for two end pointsGenerate SAs for two end points  Can use secure channel establishedCan use secure channel established in phase 1in phase 1
  • 41. 4141 IP Payload CompressionIP Payload Compression  Used for compressionUsed for compression  Can be specified as part of theCan be specified as part of the IPSec policyIPSec policy  Will not cover!Will not cover!
  • 42. 4242 OutlineOutline  Why IPsec?Why IPsec?  IPsec ArchitectureIPsec Architecture  Internet Key Exchange (IKE)Internet Key Exchange (IKE)  IPSec PolicyIPSec Policy  DiscussionDiscussion
  • 43. 4343 IPsec PolicyIPsec Policy  Phase 1 policies are defined in terms ofPhase 1 policies are defined in terms of protection suitesprotection suites  Each protection suiteEach protection suite – Must contain the following:Must contain the following:  Encryption algorithmEncryption algorithm  Hash algorithmHash algorithm  Authentication methodAuthentication method  Diffie-Hellman GroupDiffie-Hellman Group – May optionally contain the following:May optionally contain the following:  LifetimeLifetime  ……
  • 44. 4444 IPSec PolicyIPSec Policy  Phase 2 policies are defined in terms ofPhase 2 policies are defined in terms of proposalsproposals  Each proposal:Each proposal: – May contain one or more of the followingMay contain one or more of the following  AH sub-proposalsAH sub-proposals  ESP sub-proposalsESP sub-proposals  IPComp sub-proposalsIPComp sub-proposals  Along with necessary attributes such asAlong with necessary attributes such as – Key length, life time, etcKey length, life time, etc
  • 45. 4545 IPSec Policy ExampleIPSec Policy Example  In English:In English: – All traffic to 128.104.120.0/24 must be:All traffic to 128.104.120.0/24 must be:  Use pre-hashed key authenticationUse pre-hashed key authentication  DH group is MODP with 1024-bit modulusDH group is MODP with 1024-bit modulus  Hash algorithm is HMAC-SHA (128 bit key)Hash algorithm is HMAC-SHA (128 bit key)  Encryption using 3DESEncryption using 3DES  In IPSec:In IPSec: – [Auth=Pre-Hash;[Auth=Pre-Hash; DH=MODP(1024-bit);DH=MODP(1024-bit); HASH=HMAC-SHA;HASH=HMAC-SHA; ENC=3DES]ENC=3DES]
  • 46. 4646 IPsec Policy ExampleIPsec Policy Example  In English:In English: – All traffic to 128.104.120.0/24 must use oneAll traffic to 128.104.120.0/24 must use one of the following:of the following:  AH with HMAC-SHA or,AH with HMAC-SHA or,  ESP with 3DES as encryption algorithm andESP with 3DES as encryption algorithm and (HMAC-MD5 or HMAC-SHA as hashing algorithm)(HMAC-MD5 or HMAC-SHA as hashing algorithm)  In IPsec:In IPsec: – [AH: HMAC-SHA] or,[AH: HMAC-SHA] or, – [ESP: (3DES and HMAC-MD5) or[ESP: (3DES and HMAC-MD5) or (3DES and HMAC-SHA)](3DES and HMAC-SHA)]
  • 47. 4747 Virtual Private NetworksVirtual Private Networks (VPNs)(VPNs)  VirtualVirtual – It is not a physically distinct networkIt is not a physically distinct network  PrivatePrivate – Tunnels are encrypted to provideTunnels are encrypted to provide confidentialityconfidentiality  CS dept might have a VPNCS dept might have a VPN – I can be on this VPN while travelingI can be on this VPN while traveling
  • 48. 4848 Alice is TravelingAlice is Traveling  AliceAlice works for the mergers andworks for the mergers and acquisitions (M&A) department ofacquisitions (M&A) department of takeover.comtakeover.com  She is atShe is at HicktownHicktown taking over ataking over a meat-packing plantmeat-packing plant  She wants to access the M&AShe wants to access the M&A server at her companyserver at her company (confidentially of course)(confidentially of course)
  • 50. 5050 OutlineOutline  Why IPsec?Why IPsec?  IPsec ArchitectureIPsec Architecture  Internet Key Exchange (IKE)Internet Key Exchange (IKE)  IPsec PolicyIPsec Policy  DiscussionDiscussion
  • 51. 5151 DiscussionDiscussion  IPSec is not the only solution!IPSec is not the only solution! – Security features can be added on topSecurity features can be added on top of IP!of IP!  e.g. Kerberos, SSLe.g. Kerberos, SSL  Confused?Confused? – IP, IPSec protocols are very complex!IP, IPSec protocols are very complex!  Two modes, three sub protocolsTwo modes, three sub protocols – Complexity is the biggest enemy ofComplexity is the biggest enemy of securitysecurity
  • 52. 5252 DiscussionDiscussion  Has it been used?Has it been used? – Yes—primarily used by some VPNYes—primarily used by some VPN vendorsvendors  But not all routers support itBut not all routers support it – No—it is not really an end-to-endNo—it is not really an end-to-end solutionsolution  Authentication is too coarse (host based)Authentication is too coarse (host based)  Default encryption algorithm too weakDefault encryption algorithm too weak (DES)(DES)  Too complex for applications to useToo complex for applications to use
  • 53. 5353 ResourcesResources  IP, IPsec and related RFCs:IP, IPsec and related RFCs: – http://www.ietf.org/html.charters/ipsec-charter.htmlhttp://www.ietf.org/html.charters/ipsec-charter.html – IPsec: RFC 2401, IKE: RFC 2409IPsec: RFC 2401, IKE: RFC 2409 – www.freeswan.orgwww.freeswan.org  Google searchGoogle search