0% found this document useful (0 votes)
11 views36 pages

Chapter8 Security Updated

Uploaded by

Sarah Almussa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views36 pages

Chapter8 Security Updated

Uploaded by

Sarah Almussa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

Chapter 8

Security

A note on the use of these ppt slides: Computer


We’re making these slides freely available to all (faculty, students, readers).
They’re in PowerPoint form so you see the animations; and can add, modify, Networking: A
and delete slides (including this one) and slide content to suit your needs.
They obviously represent a lot of work on our part. In return for use, we only Top Down
ask the following:
 If you use these slides (e.g., in a class) that you mention their source Approach
(after all, we’d like people to use our book!)
 If you post any slides on a www site, that you note that they are adapted
6th edition
from (or perhaps identical to) our slides, and note our copyright of this Jim Kurose, Keith Ross
material. Addison-Wesley
Thanks and enjoy! JFK/KWR March 2012
All material copyright 1996-2012
J.F Kurose and K.W. Ross, All Rights Reserved

8-1
What is network security?

Network Security 8-2


Friends and enemies: Alice, Bob, Trudy
 well-known in network security world
 Bob, Alice (lovers!) want to communicate “ securely”
 Trudy (intruder) may intercept, delete, add messages

Alice Bob
channel data, control
messages

data secure secure data


sender s
receiver

Trudy

Network Security 8-3


Who might Bob, Alice be?
 … well, real-life Bobs and Alices!
 Web browser/server for electronic transactions
(e.g., on-line purchases)
 on-line banking client/server
 DNS servers
 routers exchanging routing table updates
 other examples?

Network Security 8-4


Network Security 8-5
The language of cryptography

Alice’s Bob’s
K encryption K decryption
A
key Bkey

plaintext encryption ciphertext decryption plaintext


algorithm algorithm

m plaintext message
KA(m) ciphertext, encrypted with key KA
m = KB(KA(m))

Network Security 8-6


Breaking an encryption scheme

Network Security 8-7


Digital signatures
cryptographic technique analogous to hand-written
signatures:
 sender (Bob) digitally signs document, establishing
he is document owner/creator.
 verifiable, nonforgeable: recipient (Alice) can prove
to someone that Bob, and no one else (including
Alice), must have signed document

Network Security 8-8


Digital signatures
simple digital signature for message m:
-
 Bob signs m by encrypting with his private key KB,
-
creating “ signed” message, KB(m)

- Bob’s private -
Bob’s message, m KB m,K B(m)
key
Dear Alice
Bob’s message,
Oh, how I have missed Public key m, signed
you. I think of you all the
time! …(blah blah blah) encryption (encrypted) with
algorithm his private key
Bob

Network Security 8-9


Digital signatures
-
 suppose Alice receives msg m, with signature: m, KB(m)
 Alice verifies
-
m signed by Bob by applying Bob’s public key
+ + -
KB to KB(m) then checks KB(KB(m) ) = m.
+ -
 If KB(KB(m) ) = m, whoever signed m must have used Bob’s
private key.
Alice thus verifies that:
 Bob signed m
 no one else signed m
 Bob signed m and not m‘
non-repudiation:
 Alice can take m, and signature KB(m) to court and prove that
-
Bob signed m

Network Security 8-10


Message digests H: Hash
Function

H(m)

Network Security 8-11


 original goals:
 Web e-commerce
transactions
 encryption (especially
credit-card numbers)
 Web-server authentication
 optional client
authentication
 minimum hassle in doing
business with new
merchant
 available to all TCP
applications
 secure socket interface
Network Security 8-12
SSL and TCP/IP

Application Application

SSL
TCP
TCP
IP IP

normal application application with SSL

Network Security 8-13


Network Security 8-14
Real SSL: handshake (2)
1. client sends list of algorithms it supports, along with
client nonce
2. server chooses algorithms from list; sends back: choice
+ certificate + server nonce
3. client verifies certificate, extracts server’s public key,
generates pre_master_secret, encrypts with server’s
public key, sends to server
4. client and server independently compute encryption
and MAC keys from pre_master_secret and nonces
5. client sends a MAC of all the handshake messages
6. server sends a MAC of all the handshake messages
Network Security 8-15
Real SSL: handshaking (3)
last 2 steps protect handshake from tampering
 client typically offers range of algorithms, some
strong, some weak
 man-in-the middle could delete stronger algorithms
from list
 last 2 steps prevent this
 last two messages are encrypted

Network Security 8-16


Real SSL: handshaking (4)
 why two random nonces?
 suppose Trudy sniffs all messages between Alice
& Bob
 next day, Trudy sets up TCP connection with Bob,
sends exact same sequence of records
 Bob (Amazon) thinks Alice made two separate orders
for the same thing
 solution: Bob sends different random nonce for each
connection. This causes encryption keys to be different
on the two days
 Trudy’s messages will fail Bob’s integrity check

Network Security 8-17


SSL record protocol
data

data data
MAC MAC
fragment fragment

record encrypted record encrypted


header data and MAC header data and MAC

record header: content type; version; length


MAC: includes sequence number, MAC key Mx
fragment: each SSL fragment 214 bytes (~16 Kbytes)
Network Security 8-18
SSL record format
1 byte 2 bytes 3 bytes
content
type SSL version length

data

MAC

data and MAC encrypted (symmetric algorithm)

Network Security 8-19


handshake: ClientHel
Real SSL k e:
lo

ServerHello
connection hands ha
Certificate
handshake:
: S erv e rHe lloDone
handshak e

handshake: ClientK
eyExchange
ChangeCipherS
pec

everything handshake: Finish


e d
henceforth
is encrypted ChangeCipherS
pec

ds ha k e: Finished
han

application_data

ata
application_d

Alert: warning, close


_notify
TCP FIN follows
Network Security 8-20
Network Security 8-21
Network Security 8-22
IPsec transport mode

IPsec IPsec

 IPsec datagram emitted and received by end-system


 protects upper level protocols

Network Security 8-23


IPsec – tunneling mode

IPsec IPsec
IPsec IPsec

 edge routers IPsec-  hosts IPsec-aware


aware

Network Security 8-24


Network Security 8-25
Four combinations are possible!

Network Security 8-26


firewall

firewall
Network Security 8-27
Firewalls: why

Network Security 8-28


Should arriving
packet be allowed in?
Departing packet let
out?

Network Security 8-29


Stateless packet filtering: example
 example 1: block incoming and outgoing datagrams with
IP protocol field = 17 and with either source or dest port
= 23
 result: all incoming, outgoing UDP flows and telnet
connections are blocked
 example 2: block inbound TCP segments with ACK=0.
 result: prevents external clients from making TCP
connections with internal clients, but allows internal
clients to connect to outside.

Network Security 8-30


Stateless packet filtering: more examples

Network Security 8-31


gateway-to-remote
host telnet session
host-to-gateway
telnet session

application router and filter


gateway

Network Security 8-32


Application gateways
 filter packets on application host-to-gateway application
telnet session
data as well as on gateway

IP/TCP/UDP fields. router and filter

 example: allow select


internal users to telnet
gateway-to-remote
outside host telnet session

1. require all telnet users to telnet through gateway.


2. for authorized users, gateway sets up telnet connection to
dest host. Gateway relays data between 2 connections
3. router filter blocks all telnet connections not originating
from gateway.
Network Security 8-33
Network Security 8-34
Intrusion detection systems

Network Security 8-35


Intrusion detection systems

firewall

internal
network
Internet

Web DNS
server FTP server
server
demilitarized
zone
Network Security 8-36

You might also like