Chapter 8 Network Security



Similar documents
Network Security (2) CPSC 441 Department of Computer Science University of Calgary

Chapter 8 Security. IC322 Fall Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

SECURITY IN NETWORKS

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Chapter 8 Security Pt 2

Chapter 8 Network Security

Network Security. HIT Shimrit Tzur-David

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

FIREWALLS. Firewall: isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

COSC4377. Chapter 8 roadmap

Chapter 7: Network security

What is network security?

Principles of Network Security

Overview of Network Security

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

VLAN und MPLS, Firewall und NAT,

Chapter 8 Network Security

Chapter 8. Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, sl April Thanks and enjoy!

Network Security #10. Overview. Encryption Authentication Message integrity Key distribution & Certificates Secure Socket Layer (SSL) IPsec

Telematics Chapter 11: Network Security Beispielbild User watching video clip

Data Communications & Networks. Session 11 Main Theme Network Security. Dr. Jean-Claude Franchitti

Chapter 6: Network Access Control

Netzwerksicherheit: Anwendungen

Chapter 8 Network Security. Slides adapted from the book and Tomas Olovsson

Client Server Registration Protocol

Chapter 6 CDMA/802.11i

Security. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key

Lukasz Pater CMMS Administrator and Developer

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Computer Networks - CS132/EECS148 - Spring

Security in Computer Networks

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

Security in Computer Networks

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

Security vulnerabilities in the Internet and possible solutions

Chapter 10. Network Security

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

TELE 301 Network Management. Lecture 18: Network Security

CS5008: Internet Computing

First Semester Examinations 2011/12 INTERNET PRINCIPLES

Overview. SSL Cryptography Overview CHAPTER 1

Application Layer (1)

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Chapter 4 Network Layer

Network Security. Network Security. Security in Computer Networks

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Security & Privacy on the WWW. Topic Outline. Information Security. Briefing for CS4173

Security: Focus of Control. Authentication

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Compter Networks Chapter 9: Network Security

CSCE 465 Computer & Network Security

Cornerstones of Security

Computer Networks. Network Security 1. Professor Richard Harris School of Engineering and Advanced Technology

CS 3251: Computer Networking 1 Security Protocols I

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Network Security Technology Network Management

12/8/2015. Review. Final Exam. Network Basics. Network Basics. Network Basics. Network Basics. 12/10/2015 Thursday 5:30~6:30pm Science S-3-028

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Chapter 7 Transport-Level Security

Managing and Securing Computer Networks. Guy Leduc. Chapter 4: Securing TCP. connections. connections. Chapter goals: security in practice:

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

Lecture 9: Application of Cryptography

Content Teaching Academy at James Madison University

APNIC elearning: IPSec Basics. Contact: esec03_v1.0

Final exam review, Fall 2005 FSU (CIS-5357) Network Security

Transport Level Security

12/3/08. Security in Wireless LANs and Mobile Networks. Wireless Magnifies Exposure Vulnerability. Mobility Makes it Difficult to Establish Trust

Network Security Fundamentals

NETWORK SECURITY. Farooq Ashraf. Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran 31261, Saudi Arabia

IPsec Details 1 / 43. IPsec Details

Public Key Cryptography Overview

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Network Security Concepts: Review

Lecture Objectives. Lecture 8 Mobile Networks: Security in Wireless LANs and Mobile Networks. Agenda. References

EXAM questions for the course TTM Information Security May Part 1

Key Management (Distribution and Certification) (1)

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Network Security in Practice

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

: Network Security. Name of Staff: Anusha Linda Kostka Department : MSc SE/CT/IT

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

CRYPTOGRAPHY IN NETWORK SECURITY

Chapter 8. Network Security

Forward Secrecy: How to Secure SSL from Attacks by Government Agencies

Practice Questions. CS161 Computer Security, Fall 2008

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

IT Networks & Security CERT Luncheon Series: Cryptography

The Misuse of RC4 in Microsoft Word and Excel

Transcription:

Chapter 8 Network Security A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, 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 ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. Thanks and enjoy! JFK/KWR All material copyright 1996-2009 J.F Kurose and K.W. Ross, All Rights Reserved

Chapter 8: Network Security Chapter goals: understand principles of network security: cryptography and its many uses beyond confidentiality authentication message integrity security in practice: firewalls and intrusion detection systems security in application, transport, network, link layers

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity 8.4 Securing e-mail 8.5 Securing TCP connections: SSL 8.6 Network layer security: IPsec 8.7 Securing wireless LANs 8.8 Operational security: firewalls and IDS

What is network security? Confidentiality: only sender, intended receiver should understand message contents sender encrypts message receiver decrypts message Authentication: sender, receiver want to confirm identity of each other Message integrity: sender, receiver want to ensure message not altered (in transit, or afterwards) without detection Access and availability: services must be accessible and available to users

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 channel data, control messages Bob data secure sender secure receiver data Trudy

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?

There are bad guys (and girls) out there! Q: What can a bad guy do? A: A lot! See section 1.6 eavesdrop: intercept messages actively insert messages into connection impersonation: can fake (spoof) source address in packet (or any field in packet) hijacking: take over ongoing connection by removing sender or receiver, inserting himself in place denial of service: prevent service from being used by others (e.g., by overloading resources)

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity 8.4 Securing e-mail 8.5 Securing TCP connections: SSL 8.6 Network layer security: IPsec 8.7 Securing wireless LANs 8.8 Operational security: firewalls and IDS

The language of cryptography K A Alice s encryption key Bob s decryption K B key plaintext encryption algorithm ciphertext decryption algorithm plaintext m plaintext message K A (m) ciphertext, encrypted with key K A m = K B (K A (m)) 9

Simple encryption scheme substitution cipher: substituting one thing for another monoalphabetic cipher: substitute one letter for another plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: mnbvcxzasdfghjklpoiuytrewq E.g.: Plaintext: bob. i love you. alice ciphertext: nkn. s gktc wky. mgsbc Key: the mapping from the set of 26 letters to the set of 26 letters 10

Polyalphabetic encryption n monoalphabetic cyphers, M 1,M 2,,M n Cycling pattern: e.g., n=4, M 1,M 3,M 4,M 3,M 2 ; M 1,M 3,M 4,M 3,M 2 ; For each new plaintext symbol, use subsequent monoalphabetic pattern in cyclic pattern dog: d from M 1, o from M 3, g from M 4 Key: the n ciphers and the cyclic pattern 11

Breaking an encryption scheme Cipher-text only attack: Trudy has ciphertext that she can analyze Two approaches: Search through all keys: must be able to differentiate resulting plaintext from gibberish Statistical analysis Known-plaintext attack: trudy has some plaintext corresponding to some ciphertext eg, in monoalphabetic cipher, trudy determines pairings for a,l,i,c,e,b,o, Chosen-plaintext attack: trudy can get the cyphertext for some chosen plaintext 12

Types of Cryptography Crypto often uses keys: Algorithm is known to everyone Only keys are secret Public key cryptography Involves the use of two keys Symmetric key cryptography Involves the use one key Hash functions Involves the use of no keys Nothing secret: How can this be useful? 13

Symmetric key cryptography K S K S plaintext message, m encryption algorithm ciphertext K (m) S decryption algorithm plaintext m = K S (K S (m)) symmetric key crypto: Bob and Alice share same (symmetric) key: K S e.g., key is knowing substitution pattern in mono alphabetic substitution cipher Q: how do Bob and Alice agree on key value? 14

Two types of symmetric ciphers Stream ciphers encrypt one bit at time Block ciphers Break plaintext message in equal-size blocks Encrypt each block as a unit 15

Stream Ciphers pseudo random key keystream generator keystream Combine each bit of keystream with bit of plaintext to get bit of ciphertext m(i) = ith bit of message ks(i) = ith bit of keystream c(i) = ith bit of ciphertext c(i) = ks(i) m(i) ( = exclusive or) m(i) = ks(i) c(i) 16

RC4 Stream Cipher RC4 is a popular stream cipher Extensively analyzed and considered good Key can be from 1 to 256 bytes Used in WEP for 802.11 Can be used in SSL 17

Public Key Cryptography symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if never met )? public key cryptography radically different approach [Diffie- Hellman76, RSA78] sender, receiver do not share secret key public encryption key known to all private decryption key known only to receiver 18

Public key cryptography K B + K B - Bob s public key Bob s private key plaintext message, m encryption algorithm ciphertext + K (m) B decryption algorithm plaintext message - + m = K (K (m)) B B 19

Public key encryption algorithms Requirements: 1 2.. + - B - + B need K ( ) and K ( ) such that K (K (m)) = m B B given public key K B, it should be impossible to compute - private key K B + RSA: Rivest, Shamir, Adelson algorithm 20

Prerequisite: modular arithmetic x mod n = remainder of x when divide by n Facts: [(a mod n) + (b mod n)] mod n = (a+b) mod n [(a mod n) - (b mod n)] mod n = (a-b) mod n [(a mod n) * (b mod n)] mod n = (a*b) mod n Thus (a mod n) d mod n = a d mod n Example: x=14, n=10, d=2: (x mod n) d mod n = 4 2 mod 10 = 6 x d = 14 2 = 196 x d mod 10 = 6 21

RSA: getting ready A message is a bit pattern. A bit pattern can be uniquely represented by an integer number. Thus encrypting a message is equivalent to encrypting a number. Example m= 10010001. This message is uniquely represented by the decimal number 145. To encrypt m, we encrypt the corresponding number, which gives a new number (the cyphertext). 22

RSA: Creating public/private key pair 1. Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, z = (p-1)(q-1) 3. Choose e (with e<n) that has no common factors with z. (e, z are relatively prime ). 4. Choose d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 ). 5. Public key is (n,e). Private key is (n,d). K B + K B - 23

RSA: Encryption, decryption 0. Given (n,e) and (n,d) as computed above 1. To encrypt message m (<n), compute c = m e mod n 2. To decrypt received bit pattern, c, compute m = c d mod n Magic happens! m = (m e d mod n) mod n c 24

RSA example: Bob chooses p=5, q=7. Then n=35, z=24. e=5 (so e, z relatively prime). d=29 (so ed-1 exactly divisible by z). Encrypting 8-bit messages. encrypt: bit pattern m m e c = m e mod n 0000l000 12 24832 17 decrypt: c c d m = c d mod n 17 481968572106750915091411825223071697 12 25

Why does RSA work? Must show that c d mod n = m where c = m e mod n Fact: for any x and y: x y mod n = x (y mod z) mod n where n= pq and z = (p-1)(q-1) Thus, c d mod n = (m e mod n) d mod n = m ed mod n = m (ed mod z) mod n = m 1 mod n = m 26

RSA: another important property The following property will be very useful later: - + K (K (m)) = m B B use public key first, followed by private key = + - B B K (K (m)) use private key first, followed by public key Result is the same! 27

- + Why K (K (m)) = m = K (K (m))? B B + - B B Follows directly from modular arithmetic: (m e mod n) d mod n = m ed mod n = m de mod n = (m d mod n) e mod n 28

Why is RSA Secure? Suppose you know Bob s public key (n,e). How hard is it to determine d? Essentially need to find factors of n without knowing the two factors p and q. Fact: factoring a big number is hard. Generating RSA keys Have to find big primes p and q Approach: make good guess then apply testing rules (see Kaufman) 29

Session keys Exponentiation is computationally intensive DES is at least 100 times faster than RSA Session key, K S Bob and Alice use RSA to exchange a symmetric key K S Once both have K S, they use symmetric key cryptography 30

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity 8.4 Securing e-mail 8.5 Securing TCP connections: SSL 8.6 Network layer security: IPsec 8.7 Securing wireless LANs 8.8 Operational security: firewalls and IDS

Message Integrity Allows communicating parties to verify that received messages are authentic. Content of message has not been altered Source of message is who/what you think it is Message has not been replayed Sequence of messages is maintained Let s first talk about message digests 32

Message Digests Function H( ) that takes as input an arbitrary length message and outputs a fixed-length string: message signature Note that H( ) is a manyto-1 function H( ) is often called a hash function large message m Desirable properties: Easy to calculate H: Hash Function H(m) Irreversibility: Can t determine m from H(m) Collision resistance: Computationally difficult to produce m and m such that H(m) = H(m ) Seemingly random output 33

Internet checksum: poor message digest Internet checksum has some properties of hash function: produces fixed length digest (16-bit sum) of input is many-to-one But given message with given hash value, it is easy to find another message with same hash value. Example: Simplified checksum: add 4-byte chunks at a time: message ASCII format message ASCII format I O U 1 0 0. 9 9 B O B 49 4F 55 31 30 30 2E 39 39 42 D2 42 I O U 1 0 0. 9 9 B O B 49 4F 55 31 30 30 2E 39 39 42 D2 42 B2 C1 D2 AC different messages but identical checksums! B2 C1 D2 AC 34

Hash Function Algorithms MD5 hash function widely used (RFC 1321) computes 128-bit message digest in 4-step process. SHA-1 is also used. US standard [NIST, FIPS PUB 180-1] 160-bit message digest 35

Message Authentication Code (MAC) s s = shared secret message message s message H( ) H( ) compare Authenticates sender Verifies message integrity No encryption! Also called keyed hash Notation: MD m = H(s m) ; send m MD m 36

HMAC Popular MAC standard Addresses some subtle security flaws 1. Concatenates secret to front of message. 2. Hashes concatenated message 3. Concatenates the secret to front of digest 4. Hashes the combination again. 37

Example: OSPF Recall that OSPF is an intra-as routing protocol Each router creates map of entire AS (or area) and runs shortest path algorithm over map. Router receives linkstate advertisements (LSAs) from all other routers in AS. Attacks: Message insertion Message deletion Message modification How do we know if an OSPF message is authentic? 38

OSPF Authentication Within an Autonomous System, routers send OSPF messages to each other. OSPF provides authentication choices No authentication Shared password: inserted in clear in 64- bit authentication field in OSPF packet Cryptographic hash Cryptographic hash with MD5 64-bit authentication field includes 32-bit sequence number MD5 is run over a concatenation of the OSPF packet and shared secret key MD5 hash then appended to OSPF packet; encapsulated in IP datagram 39

End-point authentication Want to be sure of the originator of the message end-point authentication. Assuming Alice and Bob have a shared secret, will MAC provide end-point authentication. We do know that Alice created the message. But did she send it? 40

Playback attack MAC = f(msg,s) Transfer $1M from Bill to Trudy MAC Transfer $1M from Bill to Trudy MAC

Defending against playback attack: nonce I am Alice R MAC = f(msg,s,r) Transfer $1M from Bill to Susan MAC

Digital Signatures Cryptographic technique analogous to handwritten signatures. sender (Bob) digitally signs document, establishing he is document owner/creator. Goal is similar to that of a MAC, except now use public-key cryptography verifiable, nonforgeable: recipient (Alice) can prove to someone that Bob, and no one else (including Alice), must have signed document 43

Digital Signatures Simple digital signature for message m: Bob signs m by encrypting with his private key - - K B, creating signed message, K B (m) Bob s message, m Dear Alice Oh, how I have missed you. I think of you all the time! (blah blah blah) Bob K B - Public key encryption algorithm Bob s private key K B - (m) Bob s message, m, signed (encrypted) with his private key 44

Digital signature = signed message digest Bob sends digitally signed message: large message m + H: Hash function Bob s private key K B - H(m) digital signature (encrypt) encrypted msg digest - K B (H(m)) Alice verifies signature and integrity of digitally signed message: large message m H: Hash function H(m) Bob s public key K B + equal? encrypted msg digest - K B (H(m)) digital signature (decrypt) H(m) 45

Digital Signatures (more) Suppose Alice receives msg m, digital signature K B (m) Alice verifies m signed by Bob by applying Bob s + - + - public key K B to K B (m) then checks K B (K B (m) ) = m. + - If K B (K B (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 (oavvislighet): - Alice can take m, and signature K B (m) to court and prove that Bob signed m. 46

Public-key certification Motivation: Trudy plays pizza prank on Bob Trudy creates e-mail order: Dear Pizza Store, Please deliver to me four pepperoni pizzas. Thank you, Bob Trudy signs order with her private key Trudy sends order to Pizza Store Trudy sends to Pizza Store her public key, but says it s Bob s public key. Pizza Store verifies signature; then delivers four pizzas to Bob. Bob doesn t even like Pepperoni 47

Certification Authorities Certification authority (CA): binds public key to particular entity, E. E (person, router) registers its public key with CA. E provides proof of identity to CA. CA creates certificate binding E to its public key. certificate containing E s public key digitally signed by CA CA says this is E s public key Bob s identifying information Bob s public key K B + digital signature (encrypt) CA private key K - CA K B + certificate for Bob s public key, signed by CA 48

Certification Authorities When Alice wants Bob s public key: gets Bob s certificate (Bob or elsewhere). apply CA s public key to Bob s certificate, get Bob s public key K B + digital signature (decrypt) K B + Bob s public key CA public key K + CA 49

Certificates: summary Primary standard X.509 (RFC 2459) Certificate contains: Issuer name Entity name, address, domain name, etc. Entity s public key Digital signature (signed with issuer s private key) Public-Key Infrastructure (PKI) Certificates and certification authorities Often considered heavy 50

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity 8.4 Securing e-mail 8.5 Securing TCP connections: SSL 8.6 Network layer security: IPsec 8.7 Securing wireless LANs 8.8 Operational security: firewalls and IDS

Secure e-mail Alice wants to send confidential e-mail, m, to Bob. K S m K S ( ). K S (m ) K S (m ) K S ( ). m K S +. K B ( ) K B + + K B (K S ) + - Internet + K B (K S ) K B - K S -. K B ( ) Alice: generates random symmetric private key, K S. encrypts message with K S (for efficiency) also encrypts K S with Bob s public key. sends both K S (m) and K B (K S ) to Bob.

Secure e-mail Alice wants to send confidential e-mail, m, to Bob. K S m K S ( ). K S (m ) K S (m ) K S ( ). m K S +. K B ( ) K B + + K B (K S ) + - Internet + K B (K S ) K B - K S -. K B ( ) Bob: uses his private key to decrypt and recover K S uses K S to decrypt K S (m) to recover m

Secure e-mail (continued) Alice wants to provide sender authentication message integrity. m H( ) K Ā. -. K A ( ) - K A (H(m)) - K A (H(m)) K+ A +. K A ( ) H(m ) + - Internet compare m m. H( ) H(m ) Alice digitally signs message. sends both message (in the clear) and digital signature.

Secure e-mail (continued) Alice wants to provide secrecy, sender authentication, message integrity. m H( ) K Ā. -. K A ( ) - K A (H(m)) +. K S ( ) K S m K S +. K B ( ) K B + + + K B (K S ) Internet Alice uses three keys: her private key, Bob s public key, newly created symmetric key

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity 8.4 Securing e-mail 8.5 Securing TCP connections: SSL 8.6 Network layer security: IPsec 8.7 Securing wireless LANs 8.8 Operational security: firewalls and IDS

Firewalls firewall isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others. administered network public Internet firewall

Firewalls: Why prevent denial of service attacks: SYN flooding: attacker establishes many bogus TCP connections, no resources left for real connections prevent illegal modification/access of internal data. e.g., attacker replaces CIA s homepage with something else allow only authorized access to inside network (set of authenticated users/hosts) three types of firewalls: stateless packet filters stateful packet filters application gateways

Stateless packet filtering Should arriving packet be allowed in? Departing packet let out? internal network connected to Internet via router firewall router filters packet-by-packet, decision to forward/drop packet based on: source IP address, destination IP address TCP/UDP source and destination port numbers ICMP message type TCP SYN and ACK bits

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

Stateless packet filtering: more examples Policy No outside Web access. No incoming TCP connections, except those for institution s public Web server only. Prevent Web-radios from eating up the available bandwidth. Prevent your network from being used for a smurf DoS attack. Prevent your network from being tracerouted Firewall Setting Drop all outgoing packets to any IP address, port 80 Drop all incoming TCP SYN packets to any IP except 130.207.244.203, port 80 Drop all incoming UDP packets - except DNS and router broadcasts. Drop all ICMP packets going to a broadcast address (eg 130.207.255.255). Drop all outgoing ICMP TTL expired traffic

Access Control Lists ACL: table of rules, applied top to bottom to incoming packets: (action, condition) pairs action source address dest address protocol source port dest port flag bit allow 222.22/16 outside of 222.22/16 TCP > 1023 80 any allow outside of 222.22/16 222.22/16 TCP 80 > 1023 ACK allow 222.22/16 outside of 222.22/16 UDP > 1023 53 --- allow outside of 222.22/16 222.22/16 UDP 53 > 1023 ---- deny all all all all all all

Stateful packet filtering stateless packet filter: heavy handed tool admits packets that make no sense, e.g., dest port = 80, ACK bit set, even though no TCP connection established: action source address dest address protocol source port dest port flag bit allow outside of 222.22/16 222.22/16 TCP 80 > 1023 ACK stateful packet filter: track status of every TCP connection track connection setup (SYN), teardown (FIN): can determine whether incoming, outgoing packets makes sense timeout inactive connections at firewall: no longer admit packets

Stateful packet filtering ACL augmented to indicate need to check connection state table before admitting packet action source address dest address proto source port dest port flag bit check conxion allow 222.22/16 allow outside of 222.22/16 outside of 222.22/16 222.22/16 TCP > 1023 80 any TCP 80 > 1023 ACK x allow 222.22/16 outside of 222.22/16 UDP > 1023 53 --- allow outside of 222.22/16 222.22/16 UDP 53 > 1023 ---- x deny all all all all all all

Application gateways filters packets on application data as well as on IP/TCP/UDP fields. example: allow select internal users to telnet outside. host-to-gateway telnet session application gateway gateway-to-remote host telnet session router and filter 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.

Limitations of firewalls and gateways IP spoofing: router can t know if data really comes from claimed source if multiple app s. need special treatment, each has own app. gateway. client software must know how to contact gateway. e.g., must set IP address of proxy in Web browser filters often use all or nothing policy for UDP. tradeoff: degree of communication with outside world, level of security many highly protected sites still suffer from attacks.

Intrusion detection systems packet filtering: operates on TCP/IP headers only no correlation check among sessions IDS: intrusion detection system deep packet inspection: look at packet contents (e.g., check character strings in packet against database of known virus, attack strings) examine correlation among multiple packets port scanning network mapping DoS attack

Intrusion detection systems multiple IDSs: different types of checking at different locations application gateway firewall Internet internal network IDS sensors Web server FTP server DNS server demilitarized zone

Network Security (summary) Basic techniques... cryptography (symmetric and public) message integrity end-point authentication. used in many different security scenarios secure email secure transport (SSL) IP sec 802.11 Operational Security: firewalls and IDS 8: Network Security

Review Questions In RSA, we create the public key (n,e) and the private key is (n,d) by: Choosing two large prime numbers p and q. Computing n = pq and z = (p-1)(q-1) Choosing a number e (with e<n) that has no common factors with z. Choosing d such that ed-1 is exactly divisible by z. 70

Review Questions We encrypt message m by K+(m) = m e mod n and decrypt cipher text c by K - (c) = c d mod n, where x mod n is the remainder of x when divided by n. Useful facts: [(a mod n) + (b mod n)] mod n = (a+b) mod n [(a mod n) - (b mod n)] mod n = (a-b) mod n [(a mod n) * (b mod n)] mod n = (a*b) mod n (a mod n) d mod n = a d mod n For any x and y: x y mod n = x (y mod z) mod n, where n= pq and z = (p-1)(q-1) 71

Review Questions Please prove that: K - (K + (m)) = m. K + (K - (m)) = m. Please explain that: Why RSA is good for encryption? Why RSA is good for authentication? 72

Review Questions Please take a look at the figure in which Alice is preparing a message to Bob 73

Review Questions For each rectangle from top left to bottom right, please explain the steps that Alice takes. Please draw the Bob s process when processing Alice s message. Please explain the steps that Bob must take when processing Alice s message (for each rectangle from top left to bottom right). 74