SlideShare a Scribd company logo
1 of 44
Download to read offline
IPSec, TLS, and DNSSEC
Three Major Secure Protocols 
 Last lecture presented mechanisms 
 This lecture presents 3 examples of their use 
- Layer 3: IPSec 
- Layer 4: TLS 
- Layer 7: DNSSEC
IPSec Overview 
 Layer 3: between hosts, covers both IPv4 and IPv6 
[RFC 4301] 
 AH: IP Authentication Header (MAY, [RFC 4302]) 
 ESP: Encapsulated Security Payload (MUST, 
[RFC 4303]) 
 Very comprehensive: this lecture will only cover 
some of the basics (no multicast, combined 
ESP+AH, IPv6, etc.)
IPSec Operation [RFC 4301] 
 Hosts can use IPSec directly (“transport mode”) 
 Security gateways can tunnel traffic through IPSec 
(“tunnel mode”) 
 Security Associations (SAs) specify security 
services for traffic in a half-duplex “connection” 
- Bi-directional traffic requires two SAs 
- Security Parameters Index (SPI) field specifies SA in unicast 
traffic 
 Security Association Database (SAD) maintained 
at each endpoint 
- Packets processed based on SA, src/dest IP address 
- SAD managed “semi-manually”
Transport Mode vs. Tunneling Mode 
 Transport mode operates directly on top of IP 
- Next header is TCP, UDP, etc. 
- IPSec header interposes between IP and transport header 
 Tunneling mode encapsulates entire IP packet 
- Next header is IP 
- Separate source, destination addresses
Encapsulating Security Payload [RFC 4303] 
v! pktlen! 
prot=51! checksum! 
src IP address! 
dest IP address! 
Security Parameter Index! 
Sequence Number! 
Payload! 
Padding! 
plen! nhdr! 
integrity tag! 
MACed! 
IP header! 
Encrypted! data! 
data! 
IPsec ESP! 
 Provides confidentiality, integrity, or both 
 Next header field specifies payload
Transport vs. Tunneling 
Tunneling mode (IPv4, TCP)! 
dest IP address! 
Security Parameter Index! 
Sequence Number! 
Payload! 
v! pktlen! 
prot=6! checksum! 
src IP address! 
Padding! 
TCP header, payload! 
padding! 
plen! nhdr=4! 
integrity tag! 
Transport mode (TCP)! 
dest IP address! 
Security Parameter Index! 
Sequence Number! 
Padding! 
plen! nhdr=6! 
integrity tag! 
dest IP address! 
src port! dest port! 
Sequence Number! 
Acknowledgment Number! 
rest of TCP header, payload!
ESP Algorithm Support Complications 
 Some algorithms require an initialization vector 
(IV), e.g. CBC 
 Some algorithms integrate confidentiality and 
integrity (“combined mode algorithms”) 
- If confidentiality is required for integrity, need to repeat SPI 
and sequence number 
 Algorithm can specify payload substructure 
(append/prepend data)
ESP details 
 Must avoid replays 
- Keep counter for 64-bit sequence number 
- Receiver must accept some packets out of order (e.g., up to 32) 
- Only low 32 bits of sequence number in actual packet 
(would be bad if you lost 4 billion packets) 
 Support for traffic flow confidentiality (TFC) 
- Can pad packets to fixed length 
- Can send dummy packets 
 Support for encryption without MAC.. .Bummer! 
- Rationale: App might be SSL, which has MAC-only mode 
- But then attacker can mess with destination address!
Security Gateways 
Host A! Host B! 
Secure Gateway! Secure Gateway! 
Unprotected! 
Network! 
Protected! 
Network! 
Protected! 
Network!
IPSec Complication: NAT 
 Transport mode can encrypt transport header, 
integrity covers transport header 
 NAT needs to rewrite transport header! 
 NAT-T [RFC 3948], tunnel IPSec in UDP
Internet Key Exchange (IKEv2, [RFC 4306]) 
 Can establish SAs for IPSec 
 UDP port 500, designed to work over NATs 
 All messages are request/response exchanges, use 
Diffie-Hellman 
- Alice and Bob have secrets a, b, public values g, p 
- Alice computes A = ga mod p, Bob B = gb mod p 
- Exchange A and B, Alice computes s = Ba mod p, Bob 
s = Ab mod p 
- Both s are gab mod p: shared secret
IKEv2 Exchanges 
 IKE SA INIT: negotiate crypto algorithms, 
establish a shared secret 
 IKE AUTH: authenticate INIT messages, exchange 
certificates, establish first SA 
 CREATE CHILD SA: create a new SA, renegotiate 
keys for an SA 
 INFORMATIONAL: Notification, Delete, and 
Configuration
IPSec Overview 
 Layer 3 security, transport and tunneling mode 
 Tunneling mode supports security gateways 
 Transport mode has trouble with NATs 
 Security specified by SPI, SAs established 
manually or through IKE
TLS/SSL
SSL/TLS [RFC 5246] Overview 
 SSL offers security for HTTP protocol 
- That’s what the padlock means in your web browser 
 Authentication of server to client 
 Optional authentication of client to server 
- Incompatibly implemented in different browsers 
- CA infrastructure not in widespread use 
 Confidentiality of communications 
 Integrity protection of communications
Purpose in more detail 
 Authentication based on certification authorities 
(CAs) 
- Certifies who belongs to a public key (domain name and 
real name of company) 
- Example: Verisign 
 What SSL Does Not Address 
- Privacy 
- Traffic analysis 
- Trust management
Ciphersuites: Negotiating ciphers 
 Server authentication algorithm (RSA, DSS) 
 Key exchange algorithm (RSA, DHE) 
 Symmetric cipher for confidentiality (RC4, DES, 
AES) 
 MAC (HMAC-MD5, HMAC-SHA)
Overview of SSL Handshake 
Client Server 
Supported ciphers, client random 
Chosen cipher, server random, certificate 
Encrypted pre−master secret 
MAC of handshake messages 
MAC of handshake messages 
Compute keys Compute keys 
From “SSL and TLS” by Eric Rescorla
SSL Handshake 
 Client and server negotiate on cipher selection 
 Cooperatively establish session keys 
 Use session keys for secure communication 
 Details 
- Multiple messages per stage 
- Get an idea of protocol in action: 
openssl s_client -connect www.paypal.com:443
Client Authentication Handshake 
 Server requests that client send its certificate 
 Client signs a signed digest of the handshake 
messages
SSL Client Certificate 
Client Server 
Supported ciphers, client random 
Chosen cipher, server random, certificate certificate request 
Encrypted pre−master secret certificate, cert verify 
Compute keys Compute keys 
MAC of handshake messages 
MAC of handshake messages 
From “SSL and TLS” by Eric Rescorla
Establishing a Session Key 
 Server and client both contribute randomness. 
 Client sends server a “pre-master secret” 
encrypted with server’s public key 
 Use randomness and pre-master secret to create 
session keys: 
- Client MAC 
- Server MAC 
- Client Write 
- Server Write 
- Client IV 
- Server IV
Establishing a Session Key 
Client random Pre−master secret Server random 
Master secret 
Client MAC key 
Server MAC key 
Client write key 
Server write key 
Server IV 
Client IV 
Key block 
From “SSL and TLS” by Eric Rescorla
Session Resumption 
 Problem: Public key crypto expensive 
 New TCP connection, reuse master secret. 
- Avoids unnecessary public key cryptography. 
 Combines cached master secret with new 
randomness to generate new session keys. 
 Works even when the client IP changes (servers 
cache on session ID, clients cache on server 
hostname).
Example cross-layer issue 
 TLS puts message format on top of TCP (control, 
application) 
 Handshake through control messages before 
application data 
 Virtual hosts: single web server that responds 
differently for different requested hosts (in HTTP 
request) 
 What’s the problem?
2-minute break
Example cross-layer issue 
 TLS puts message format on top of TCP (control, 
application) 
 Handshake through control messages before 
application data 
 Virtual hosts: single web server that responds 
differently for different requested hosts (in HTTP 
request) 
 What’s the problem?
DNS Review 
 Domain Name System: resource records (RRs) 
bind values to names 
 Designed to be highly scalable, distributed 
administration
Structure of a DNS message [RFC 1035] 
+---------------------+ 
| Header | 
+---------------------+ 
| Question | the question for the name server 
+---------------------+ 
| Answer | RRs answering the question 
+---------------------+ 
| Authority | RRs pointing toward an authority 
+---------------------+ 
| Additional | RRs holding additional information 
+---------------------+ 
 Same message format for queries and replies 
- Query has zero RRs in Answer/Authority/Additional sections 
- Reply includes question, plus has RRs 
 Authority allows for delegation 
 Additional for glue + other RRs client might need
DNS software architecture 
 Two types of query 
- Recursive 
- Non-Recursive 
 Apps make recursive queries to 
local DNS server (1) 
 Local server queries remote 
servers non-recursively (2, 4, 6) 
- Aggressively caches result 
- E.g., only contact root on first query 
ending .umass.edu
DNS Vulnerabilities 
 Results cached: cache poisoning 
 UDP, no session to guess 
 Responses spoofable, can structure content to 
generate many opportunities 
 Chance, but networks are always faster and one 
posioned cache can be disastrous
DNSSEC [RFC 4034] 
 Security extensions for DNS (new RRs): 
- DNSKEY: public key for zone 
- RRSIG: signature for a set of RRs 
- NSEC: next authoritative name 
- DS: identifying digest of DNSKEY (stored in parent zone) 
 Provides integrity and authentication, not 
confidentiality
DNSSEC Example: www.berkeley.edu 
 dig . DNSKEY | grep -Ev '^($|;)'  root.keys 
 dig +sigchase +trusted-key=./root.keys 
www.berkekey.edu
Proof of Non-Existence 
 Problem: spoofed host name, maybe don’t want to 
sign RR 
 NSEC record allows a client to verify a node does 
not exist 
 Contains next valid name 
 dig +sigchase +trusted-key=./root.keys 
wws.berkekey.edu 
 dig +sigchase +trusted-key=./root.keys 
wwz.berkekey.edu 
 See a problem?
Hashed Denial of Existence [RFC 5155] 
 NSEC record allows an adversary to enumerate a 
domain 
 NSEC3 record: rather than next host name, 
contains hash of next host name 
 Couldn’t find anyone serving NSEC3...
Question 1: How do resolvers validate root 
DNSKEY?
Question 2: Who has the root zone private 
key?
Certificates
What does CA mean by certificate? 
 That a public key belongs to someone authorized 
to represent a hostname? 
 That a public key belongs to someone who is 
associated in some way with a hostname? 
 That a public key belongs to someone who has lots 
of paper trails associated to a company related to a 
hostname? 
 That the CA has no liability, or $100,000, or 
$250,00? 
 100-page Certification Practice Statement (CPS)
How to get a Verisign certificate 
 Get DBA license from city call ($20) 
- No on-line check for name conflicts. . . can I do business as 
Microsoft? 
 Letterhead from company ($0) 
 Notarized document (need driver’s license) ($0) 
 E.g., pay Verisign ($399–$1,499/year) 
 Conclusions: 
- Easy to get a fraudulent certificate 
- Maybe not so easy to avoid prosecution afterwards 
 But that’s only Verisign’s policy 
- Many CAs can issue certificates
So many CAs. . .
CA Convenience vs. Security 
 How convenient is a Verisign certificate? 
- Need fee + cooperation from Stanford IT to get one here 
- Good for credit cards, but shuts out many other people 
 How trustworthy is a Verisign certificate? 
- In mid-March 2001, VeriSign, Inc., advised Microsoft that 
on January 29 and 30, 2001, it issued two. . . [fraudulent] 
certificates. . . . The common name assigned to both 
certificates is “Microsoft Corporation.” 
VeriSign has revoked the certificates. . . . However. . . it is 
not possible for any browser’s CRL-checking mechanism to 
locate and use the VeriSign CRL. 
– Microsoft Security Bulletin MS01-017
How Do You Revoke a Certificate?

More Related Content

What's hot

What's hot (20)

5 sharing-app
5 sharing-app5 sharing-app
5 sharing-app
 
10 Networking
10 Networking10 Networking
10 Networking
 
7 technical-dns-workshop-day3
7 technical-dns-workshop-day37 technical-dns-workshop-day3
7 technical-dns-workshop-day3
 
FLOSS UK DEVOPS Spring 2015 Enhancing ssh config
FLOSS UK DEVOPS Spring 2015 Enhancing ssh configFLOSS UK DEVOPS Spring 2015 Enhancing ssh config
FLOSS UK DEVOPS Spring 2015 Enhancing ssh config
 
8 technical-dns-workshop-day4
8 technical-dns-workshop-day48 technical-dns-workshop-day4
8 technical-dns-workshop-day4
 
Introduction to SSH
Introduction to SSHIntroduction to SSH
Introduction to SSH
 
Network configuration
Network configurationNetwork configuration
Network configuration
 
5.Dns Rpc Nfs
5.Dns Rpc Nfs5.Dns Rpc Nfs
5.Dns Rpc Nfs
 
5.Dns Rpc Nfs 2
5.Dns Rpc Nfs 25.Dns Rpc Nfs 2
5.Dns Rpc Nfs 2
 
2 technical-dns-workshop-day1
2 technical-dns-workshop-day12 technical-dns-workshop-day1
2 technical-dns-workshop-day1
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol Design
 
Docker networking tutorial 102
Docker networking tutorial 102Docker networking tutorial 102
Docker networking tutorial 102
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
 
4 technical-dns-workshop-day2
4 technical-dns-workshop-day24 technical-dns-workshop-day2
4 technical-dns-workshop-day2
 
Ports and services
Ports and servicesPorts and services
Ports and services
 
Pgp smime
Pgp smimePgp smime
Pgp smime
 
SSL/TLS
SSL/TLSSSL/TLS
SSL/TLS
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Understanding the DNS & DNSSEC
Understanding the DNS & DNSSECUnderstanding the DNS & DNSSEC
Understanding the DNS & DNSSEC
 
Docker summit : Docker Networking Control-plane & Data-Plane
Docker summit : Docker Networking Control-plane & Data-PlaneDocker summit : Docker Networking Control-plane & Data-Plane
Docker summit : Docker Networking Control-plane & Data-Plane
 

Viewers also liked

Chap3 multi threaded programming
Chap3 multi threaded programmingChap3 multi threaded programming
Chap3 multi threaded programmingraksharao
 
Machine learning (4)
Machine learning (4)Machine learning (4)
Machine learning (4)NYversity
 
Inter thread communication
Inter thread communicationInter thread communication
Inter thread communicationsubash andey
 
Technology and work design in Organizational Relation
Technology and work design in Organizational RelationTechnology and work design in Organizational Relation
Technology and work design in Organizational RelationSatya P. Joshi
 
Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threadingAntonio Cesarano
 
Radius Protocol
Radius ProtocolRadius Protocol
Radius ProtocolNetwax Lab
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS ConceptBoopathi K
 
Super Effective Denial of Service Attacks
Super Effective Denial of Service AttacksSuper Effective Denial of Service Attacks
Super Effective Denial of Service AttacksJan Seidl
 
Radius server,PAP and CHAP Protocols
Radius server,PAP and CHAP ProtocolsRadius server,PAP and CHAP Protocols
Radius server,PAP and CHAP ProtocolsDhananjay Aloorkar
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 
AAA & RADIUS Protocols
AAA & RADIUS ProtocolsAAA & RADIUS Protocols
AAA & RADIUS ProtocolsPeter R. Egli
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationMohd Tousif
 

Viewers also liked (20)

Chap3 multi threaded programming
Chap3 multi threaded programmingChap3 multi threaded programming
Chap3 multi threaded programming
 
Machine learning (4)
Machine learning (4)Machine learning (4)
Machine learning (4)
 
Inter thread communication
Inter thread communicationInter thread communication
Inter thread communication
 
Multi-Threading
Multi-ThreadingMulti-Threading
Multi-Threading
 
Technology and work design in Organizational Relation
Technology and work design in Organizational RelationTechnology and work design in Organizational Relation
Technology and work design in Organizational Relation
 
Tcp ip presentation
Tcp ip presentationTcp ip presentation
Tcp ip presentation
 
Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threading
 
Oops concept
Oops conceptOops concept
Oops concept
 
Multi threading
Multi threadingMulti threading
Multi threading
 
Radius Protocol
Radius ProtocolRadius Protocol
Radius Protocol
 
multi threading
multi threadingmulti threading
multi threading
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS Concept
 
Super Effective Denial of Service Attacks
Super Effective Denial of Service AttacksSuper Effective Denial of Service Attacks
Super Effective Denial of Service Attacks
 
Radius server,PAP and CHAP Protocols
Radius server,PAP and CHAP ProtocolsRadius server,PAP and CHAP Protocols
Radius server,PAP and CHAP Protocols
 
Multi threading
Multi threadingMulti threading
Multi threading
 
Internet Key Exchange Protocol
Internet Key Exchange ProtocolInternet Key Exchange Protocol
Internet Key Exchange Protocol
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
Ipc ppt
Ipc pptIpc ppt
Ipc ppt
 
AAA & RADIUS Protocols
AAA & RADIUS ProtocolsAAA & RADIUS Protocols
AAA & RADIUS Protocols
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 

Similar to Computer network (4)

Similar to Computer network (4) (20)

8.X Sec & I Pv6
8.X Sec & I Pv68.X Sec & I Pv6
8.X Sec & I Pv6
 
The Network Protocol Stack Revisited
The Network Protocol Stack RevisitedThe Network Protocol Stack Revisited
The Network Protocol Stack Revisited
 
Ipsec vpn v0.1
Ipsec vpn v0.1Ipsec vpn v0.1
Ipsec vpn v0.1
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and ssl
 
WLAN and IP security
WLAN and IP securityWLAN and IP security
WLAN and IP security
 
Ip Sec
Ip SecIp Sec
Ip Sec
 
IoT Secure Bootsrapping : ideas
IoT Secure Bootsrapping : ideasIoT Secure Bootsrapping : ideas
IoT Secure Bootsrapping : ideas
 
Ip Sec
Ip SecIp Sec
Ip Sec
 
Ip Sec Rev1
Ip Sec Rev1Ip Sec Rev1
Ip Sec Rev1
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
 
FreeBSD and Hardening Web Server
FreeBSD and Hardening Web ServerFreeBSD and Hardening Web Server
FreeBSD and Hardening Web Server
 
16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)
 
Ip sec talk
Ip sec talkIp sec talk
Ip sec talk
 
12 tcp-dns
12 tcp-dns12 tcp-dns
12 tcp-dns
 
Web Security
Web SecurityWeb Security
Web Security
 
Net Programming.ppt
Net Programming.pptNet Programming.ppt
Net Programming.ppt
 
Ipsec
IpsecIpsec
Ipsec
 
Transportsec
TransportsecTransportsec
Transportsec
 
Network Prog.ppt
Network Prog.pptNetwork Prog.ppt
Network Prog.ppt
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 

More from NYversity

Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1NYversity
 
3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-distNYversity
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28NYversity
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27NYversity
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26NYversity
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25NYversity
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24NYversity
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23NYversity
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22NYversity
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20NYversity
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19NYversity
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18NYversity
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17NYversity
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16NYversity
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15NYversity
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14NYversity
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13NYversity
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12NYversity
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11NYversity
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10NYversity
 

More from NYversity (20)

Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1
 
3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-dist
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10
 

Recently uploaded

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Recently uploaded (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

Computer network (4)

  • 2. Three Major Secure Protocols Last lecture presented mechanisms This lecture presents 3 examples of their use - Layer 3: IPSec - Layer 4: TLS - Layer 7: DNSSEC
  • 3. IPSec Overview Layer 3: between hosts, covers both IPv4 and IPv6 [RFC 4301] AH: IP Authentication Header (MAY, [RFC 4302]) ESP: Encapsulated Security Payload (MUST, [RFC 4303]) Very comprehensive: this lecture will only cover some of the basics (no multicast, combined ESP+AH, IPv6, etc.)
  • 4. IPSec Operation [RFC 4301] Hosts can use IPSec directly (“transport mode”) Security gateways can tunnel traffic through IPSec (“tunnel mode”) Security Associations (SAs) specify security services for traffic in a half-duplex “connection” - Bi-directional traffic requires two SAs - Security Parameters Index (SPI) field specifies SA in unicast traffic Security Association Database (SAD) maintained at each endpoint - Packets processed based on SA, src/dest IP address - SAD managed “semi-manually”
  • 5. Transport Mode vs. Tunneling Mode Transport mode operates directly on top of IP - Next header is TCP, UDP, etc. - IPSec header interposes between IP and transport header Tunneling mode encapsulates entire IP packet - Next header is IP - Separate source, destination addresses
  • 6. Encapsulating Security Payload [RFC 4303] v! pktlen! prot=51! checksum! src IP address! dest IP address! Security Parameter Index! Sequence Number! Payload! Padding! plen! nhdr! integrity tag! MACed! IP header! Encrypted! data! data! IPsec ESP! Provides confidentiality, integrity, or both Next header field specifies payload
  • 7. Transport vs. Tunneling Tunneling mode (IPv4, TCP)! dest IP address! Security Parameter Index! Sequence Number! Payload! v! pktlen! prot=6! checksum! src IP address! Padding! TCP header, payload! padding! plen! nhdr=4! integrity tag! Transport mode (TCP)! dest IP address! Security Parameter Index! Sequence Number! Padding! plen! nhdr=6! integrity tag! dest IP address! src port! dest port! Sequence Number! Acknowledgment Number! rest of TCP header, payload!
  • 8. ESP Algorithm Support Complications Some algorithms require an initialization vector (IV), e.g. CBC Some algorithms integrate confidentiality and integrity (“combined mode algorithms”) - If confidentiality is required for integrity, need to repeat SPI and sequence number Algorithm can specify payload substructure (append/prepend data)
  • 9. ESP details Must avoid replays - Keep counter for 64-bit sequence number - Receiver must accept some packets out of order (e.g., up to 32) - Only low 32 bits of sequence number in actual packet (would be bad if you lost 4 billion packets) Support for traffic flow confidentiality (TFC) - Can pad packets to fixed length - Can send dummy packets Support for encryption without MAC.. .Bummer! - Rationale: App might be SSL, which has MAC-only mode - But then attacker can mess with destination address!
  • 10. Security Gateways Host A! Host B! Secure Gateway! Secure Gateway! Unprotected! Network! Protected! Network! Protected! Network!
  • 11. IPSec Complication: NAT Transport mode can encrypt transport header, integrity covers transport header NAT needs to rewrite transport header! NAT-T [RFC 3948], tunnel IPSec in UDP
  • 12. Internet Key Exchange (IKEv2, [RFC 4306]) Can establish SAs for IPSec UDP port 500, designed to work over NATs All messages are request/response exchanges, use Diffie-Hellman - Alice and Bob have secrets a, b, public values g, p - Alice computes A = ga mod p, Bob B = gb mod p - Exchange A and B, Alice computes s = Ba mod p, Bob s = Ab mod p - Both s are gab mod p: shared secret
  • 13. IKEv2 Exchanges IKE SA INIT: negotiate crypto algorithms, establish a shared secret IKE AUTH: authenticate INIT messages, exchange certificates, establish first SA CREATE CHILD SA: create a new SA, renegotiate keys for an SA INFORMATIONAL: Notification, Delete, and Configuration
  • 14. IPSec Overview Layer 3 security, transport and tunneling mode Tunneling mode supports security gateways Transport mode has trouble with NATs Security specified by SPI, SAs established manually or through IKE
  • 16. SSL/TLS [RFC 5246] Overview SSL offers security for HTTP protocol - That’s what the padlock means in your web browser Authentication of server to client Optional authentication of client to server - Incompatibly implemented in different browsers - CA infrastructure not in widespread use Confidentiality of communications Integrity protection of communications
  • 17. Purpose in more detail Authentication based on certification authorities (CAs) - Certifies who belongs to a public key (domain name and real name of company) - Example: Verisign What SSL Does Not Address - Privacy - Traffic analysis - Trust management
  • 18. Ciphersuites: Negotiating ciphers Server authentication algorithm (RSA, DSS) Key exchange algorithm (RSA, DHE) Symmetric cipher for confidentiality (RC4, DES, AES) MAC (HMAC-MD5, HMAC-SHA)
  • 19. Overview of SSL Handshake Client Server Supported ciphers, client random Chosen cipher, server random, certificate Encrypted pre−master secret MAC of handshake messages MAC of handshake messages Compute keys Compute keys From “SSL and TLS” by Eric Rescorla
  • 20. SSL Handshake Client and server negotiate on cipher selection Cooperatively establish session keys Use session keys for secure communication Details - Multiple messages per stage - Get an idea of protocol in action: openssl s_client -connect www.paypal.com:443
  • 21. Client Authentication Handshake Server requests that client send its certificate Client signs a signed digest of the handshake messages
  • 22. SSL Client Certificate Client Server Supported ciphers, client random Chosen cipher, server random, certificate certificate request Encrypted pre−master secret certificate, cert verify Compute keys Compute keys MAC of handshake messages MAC of handshake messages From “SSL and TLS” by Eric Rescorla
  • 23. Establishing a Session Key Server and client both contribute randomness. Client sends server a “pre-master secret” encrypted with server’s public key Use randomness and pre-master secret to create session keys: - Client MAC - Server MAC - Client Write - Server Write - Client IV - Server IV
  • 24. Establishing a Session Key Client random Pre−master secret Server random Master secret Client MAC key Server MAC key Client write key Server write key Server IV Client IV Key block From “SSL and TLS” by Eric Rescorla
  • 25. Session Resumption Problem: Public key crypto expensive New TCP connection, reuse master secret. - Avoids unnecessary public key cryptography. Combines cached master secret with new randomness to generate new session keys. Works even when the client IP changes (servers cache on session ID, clients cache on server hostname).
  • 26. Example cross-layer issue TLS puts message format on top of TCP (control, application) Handshake through control messages before application data Virtual hosts: single web server that responds differently for different requested hosts (in HTTP request) What’s the problem?
  • 28. Example cross-layer issue TLS puts message format on top of TCP (control, application) Handshake through control messages before application data Virtual hosts: single web server that responds differently for different requested hosts (in HTTP request) What’s the problem?
  • 29. DNS Review Domain Name System: resource records (RRs) bind values to names Designed to be highly scalable, distributed administration
  • 30. Structure of a DNS message [RFC 1035] +---------------------+ | Header | +---------------------+ | Question | the question for the name server +---------------------+ | Answer | RRs answering the question +---------------------+ | Authority | RRs pointing toward an authority +---------------------+ | Additional | RRs holding additional information +---------------------+ Same message format for queries and replies - Query has zero RRs in Answer/Authority/Additional sections - Reply includes question, plus has RRs Authority allows for delegation Additional for glue + other RRs client might need
  • 31. DNS software architecture Two types of query - Recursive - Non-Recursive Apps make recursive queries to local DNS server (1) Local server queries remote servers non-recursively (2, 4, 6) - Aggressively caches result - E.g., only contact root on first query ending .umass.edu
  • 32. DNS Vulnerabilities Results cached: cache poisoning UDP, no session to guess Responses spoofable, can structure content to generate many opportunities Chance, but networks are always faster and one posioned cache can be disastrous
  • 33. DNSSEC [RFC 4034] Security extensions for DNS (new RRs): - DNSKEY: public key for zone - RRSIG: signature for a set of RRs - NSEC: next authoritative name - DS: identifying digest of DNSKEY (stored in parent zone) Provides integrity and authentication, not confidentiality
  • 34. DNSSEC Example: www.berkeley.edu dig . DNSKEY | grep -Ev '^($|;)' root.keys dig +sigchase +trusted-key=./root.keys www.berkekey.edu
  • 35. Proof of Non-Existence Problem: spoofed host name, maybe don’t want to sign RR NSEC record allows a client to verify a node does not exist Contains next valid name dig +sigchase +trusted-key=./root.keys wws.berkekey.edu dig +sigchase +trusted-key=./root.keys wwz.berkekey.edu See a problem?
  • 36. Hashed Denial of Existence [RFC 5155] NSEC record allows an adversary to enumerate a domain NSEC3 record: rather than next host name, contains hash of next host name Couldn’t find anyone serving NSEC3...
  • 37. Question 1: How do resolvers validate root DNSKEY?
  • 38. Question 2: Who has the root zone private key?
  • 40. What does CA mean by certificate? That a public key belongs to someone authorized to represent a hostname? That a public key belongs to someone who is associated in some way with a hostname? That a public key belongs to someone who has lots of paper trails associated to a company related to a hostname? That the CA has no liability, or $100,000, or $250,00? 100-page Certification Practice Statement (CPS)
  • 41. How to get a Verisign certificate Get DBA license from city call ($20) - No on-line check for name conflicts. . . can I do business as Microsoft? Letterhead from company ($0) Notarized document (need driver’s license) ($0) E.g., pay Verisign ($399–$1,499/year) Conclusions: - Easy to get a fraudulent certificate - Maybe not so easy to avoid prosecution afterwards But that’s only Verisign’s policy - Many CAs can issue certificates
  • 43. CA Convenience vs. Security How convenient is a Verisign certificate? - Need fee + cooperation from Stanford IT to get one here - Good for credit cards, but shuts out many other people How trustworthy is a Verisign certificate? - In mid-March 2001, VeriSign, Inc., advised Microsoft that on January 29 and 30, 2001, it issued two. . . [fraudulent] certificates. . . . The common name assigned to both certificates is “Microsoft Corporation.” VeriSign has revoked the certificates. . . . However. . . it is not possible for any browser’s CRL-checking mechanism to locate and use the VeriSign CRL. – Microsoft Security Bulletin MS01-017
  • 44. How Do You Revoke a Certificate?