CSS432 Network Security Textbook Ch8

Slides:



Advertisements
Similar presentations
Spring 2012: CS419 Computer Security Vinod Ganapathy SSL, etc.
Advertisements

Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Grid Computing, B. Wilkinson, 20045a.1 Security Continued.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
1 Network Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
McGraw-Hill © ©The McGraw-Hill Companies, Inc., 2004 Chapter 31 Security Protocols in the Internet.
Encryption and Firewalls Chapter 7. Learning Objectives Understand the role encryption plays in firewall architecture Know how digital certificates work.
Lesson 12 Cryptography for E-Commerce. Approaches to Network Security Separate Security Protocol--SSL Application-Specific Security--SHTTP Security with.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Client/Server Computing Model of computing in which very powerful personal computers (clients) are connected in a network with one or more server computers.
Security Overview Hofstra University University College for Continuing Education - Advanced Java Programming Lecturer: Engin Yalt May 24, 2006.
K. Salah 1 Chapter 31 Security in the Internet. K. Salah 2 Figure 31.5 Position of TLS Transport Layer Security (TLS) was designed to provide security.
Spring 2002CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
بسم الله الرحمن الرحيم NETWORK SECURITY Done By: Saad Al-Shahrani Saeed Al-Smazarkah May 2006.
EECC694 - Shaaban #1 lec #16 Spring Properties of Secure Network Communication Secrecy: Only the sender and intended receiver should be able.
Spring 2003CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
TCP/IP Protocol Suite 1 Chapter 28 Upon completion you will be able to: Security Differentiate between two categories of cryptography schemes Understand.
Katz, Stoica F04 EE 122: (More) Network Security November 5, 2003.
INTRODUCTION Why Signatures? A uthenticates who created a document Adds formality and finality In many cases, required by law or rule Digital Signatures.
Cryptography 101 Frank Hecker
CSCI 6962: Server-side Design and Programming
INE1020: Introduction to Internet Engineering 6: Privacy and Security Issues1 Lecture 9: E-commerce & Business r E-Commerce r Security Issues m Secure.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 23 – April 6, 2010.
SYSTEM ADMINISTRATION Chapter 13 Security Protocols.
Securing Data at the Application Layer Planning Authenticity and Integrity of Transmitted Data Planning Encryption of Transmitted Data.
Secure Socket Layer (SSL)
Network Security. Information secrecy-only specified parties know the information exchanged. Provided by criptography. Information integrity-the information.
Network Security. Cryptography Cryptography functions Secret key (e.g., DES) Public key (e.g., RSA) Message digest (e.g., MD5) Security services Privacy:
Linux Networking and Security Chapter 8 Making Data Secure.
Security Keys, Signatures, Encryption. Slides by Jyrki Nummenmaa ‘
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
Dr. L. Christofi1 Local & Metropolitan Area Networks ACOE322 Lecture 8 Network Security.
E-Commerce Security Professor: Morteza Anvari Student: Xiaoli Li Student ID: March 10, 2001.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 29 Internet Security.
1 Firewalls. 2 What is a firewall? Device that provides secure connectivity between networks (internal/external; varying levels of trust) Used to implement.
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
1 Securing Data and Communication. 2 Module - Securing Data and Communication ♦ Overview Data and communication over public networks like Internet can.
Internet Security. 2 PGP is a security technology which allows us to send that is authenticated and/or encrypted. Authentication confirms the identity.
Network Security. 2 SECURITY REQUIREMENTS Privacy (Confidentiality) Data only be accessible by authorized parties Authenticity A host or service be able.
1 SSL - Secure Sockets Layer The Internet Engineering Task Force (IETF) standard called Transport Layer Security (TLS) is based on SSL.
Tunneling and Securing TCP Services Nathan Green.
1 Security Protocols in the Internet Source: Chapter 31 Data Communications & Networking Forouzan Third Edition.
Internet-security.ppt-1 ( ) 2000 © Maximilian Riegel Maximilian Riegel Kommunikationsnetz Franken e.V. Internet Security Putting together the.
Application Services COM211 Communications and Networks CDA College Theodoros Christophides
4-Jun-164/598N: Computer Networks Differentiated Services Problem with IntServ: scalability Idea: segregate packets into a small number of classes –e.g.,
Chapter 8 – Network Security Two main topics Cryptographic algorithms and mechanisms Firewalls Chapter may be hard to understand if you don’t have some.
NETWORK SECURITY.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
X.509 Topics PGP S/MIME Kerberos. Directory Authentication Framework X.509 is part of the ISO X.500 directory standard. used by S/MIME, SSL, IPSec, and.
Security Many secure IT systems are like a house with a locked front door but with a side window open -somebody.
TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
CS 6401 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
1 Some Backgrounds on Network Security Rocky K. C. Chang 12 February 2003.
ClientServer ClientID, E(x, CHK) E(x+1, SHK), E(y, SHK) E(y+1, CHK) E(SK, SHK) Three-way handshake Authentication Protocols CHK, SHK are keys known by.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
Secure Socket Layer SSL and TLS. SSL Protocol Peer negotiation for algorithm support Public key encryptionPublic key encryption -based key exchange and.
SSH. 2 SSH – Secure Shell SSH is a cryptographic protocol – Implemented in software originally for remote login applications – One most popular software.
Security Outline Encryption Algorithms Authentication Protocols
Security Outline Encryption Algorithms Authentication Protocols
Advanced Computer Networks
Message Digest Cryptographic checksum One-way function Relevance
Security Outline Homework 1, selected solutions Encryption Algorithms
Advanced Computer Networks
Presentation transcript:

CSS432 Network Security Textbook Ch8 Professor: Munehiro Fukuda CSS432: Network Security

Overview Cryptography functions Secret key (e.g., DES): sharing a common single secret key Public key (e.g., RSA): owning a private key, while publishing the corresponding public key Message digest (e.g., MD5): generating a cryptographic checksum Security services Privacy: preventing unauthorized release of information Authentication: verifying identity of the remote participant Integrity: making sure message has not been altered Security Cryptography algorithms Public key (e.g., RSA) Secret (e.g., DES) Message digest (e.g., MD5) services Authentication Privacy integrity CSS432: Network Security

Secret Key (DES) Plaintext Encrypt with secret key Ciphertext Decrypt with CSS432: Network Security

64-bit key (56-bits + 8-bit parity) 16 rounds Initial permutation Round 1 Round 2 Round 16 56-bit key Final permutation … Each Round Left half Right half + F L i – 1 R K Combiner function Ex-OR CSS432: Network Security

Repeat for larger messages 64bits 64bits 64bits 64bits Block 1 IV DES Cipher 2 3 4 + Initialization vector (Random number) CSS432: Network Security

Public Key (RSA) Plaintext Encrypt with public key Ciphertext Decrypt with private key Encryption: c = memod n where <e, n> is a public key Decryption: m = cdmod n where <d, n> is a private key The main goal is to find a pair of e and d CSS432: Network Security

RSA (cont) Algorithm Example Choose two large prime numbers p and q (each 256 bits) n = p x q Choose the encryption key e, such that e and (p - 1) x (q - 1) are relatively prime. Two numbers are relatively prime if they have no common factor greater than one Compute decryption key d such that d = e-1mod ((p - 1) x (q - 1)) Construct public key as (e, n) Construct private key as (d, n) Discard (do not disclose) original primes p and q Encryption: c = memod n Decryption: m = cdmod n p = 3, q = 5 n = 3 x 5 = 15 (3-1) x (5 – 1) = 8 e = 7 7d = 1 mod 8 d = 15 7 x 15 = 105 = 1 mod 8 m = 2 c = 27 mod 15 = 8 m = 815 mod 15 = 2 CSS432: Network Security

Message Digest Sender message message message checksum checksum Adversary knows the checksum computation Receiver Errors altered message message message Wrong altered checksum checksum checksum checksum checksum checksum No errors Errors detected No alternation detected CSS432: Network Security

Message Digest message message message MD MD MD Errors altered message Adversary doesn’t know the key used in MD Errors altered message message message Wrong altered MD MD MD MD MD MD No errors nor alternations Errors detected Alternation detected CSS432: Network Security

Message Digest Message (padded) 128-bit Initial digest (constant) 512 bits 512 bits 512 bits Bitwise transform Bitwise transform Bitwise transform Message digest CSS432: Network Security

Authentication Protocols Three-Way Handshake E(msg, key): msg was encrypted with key CHK: client handshake key SHK: server handshake key Both client and server must know CHK and SHK. Client sends x encrypted with CHK. Server decrypts x with CHK. Server sends x + 1 and y encrypted with SHK. Client decrypts x + 1 and y with SHK and knows Server has CHK. Client sends y + 1 encrypted with CHK. Server decrypts y + 1 with CHK and knows Client has SHK. What if client and server know nothing about each other? CSS432: Network Security

Authentication Protocols Trusted Third Party (Kerberos) The authentication server S assumes that A and B each share a secret key with S. T: timestamp L: Lifetime K: Session key KA: Secret key shared between A and S KB: Secret key shared between B and S B A , E (( T , L , K , A knows T, L, and K A checks if B has received K E B (( T ), , K L , ), K , A A ), K ) B E (( A , E T (( ), T , K L ), , K , A ), K ) B knows T, L, and K B responds T+1 to A B K ) + 1, E ( T A session has been established CSS432: Network Security

Public key authentication A authenticated B CSS432: Network Security

Message Integrity Protocols Digital signature using RSA Original cryptography: Encryption with a public key : c = memod n Decryption with a private key: m = cdmod n Compute signature with private key and verify with public key Encryption with a private key : m = cdmod n Decryption with a public key: c = memod n Large computational complexity Keyed MD5 sender: m + MD5(m + k) receiver Sender and receiver share the key k Computes MD5(m + k) and compare it with the received MD5(m + k) MD5 with RSA signature sender: m + E(MD5(m), private) decrypts MD5(m) with sender’s public key compares result with MD5 checksum sent with message CSS432: Network Security

Key Distribution Certificate Special type of digitally signed document: “I certify that the public key in this document belongs to the entity named in this document, signed X.” The name of the entity being certified The public key of the entity The name of the certified authority A digital signature Certified Authority (CA) Administrative entity that issues certificates Useful only to someone that already holds the CA’s public key. PGP Example: CA imports a public key from a person who wants it to certify his/her public key. CA retrieves the finger print from this public key. CA verify it with the key’s owner over a phone or through any other means. CSS432: Network Security

Key Distribution (cont) Chain of Trust X certifies that a certain public key belongs to Y: X.cert( Y, publicKeyY ) Y certifies that another public key belongs to Z: Y.cert( Z, publicKeyZ ) Someone, say A wants to verify Z’s public key has to know X’s public key: A.knows( X, publicKeyX ) Certificate Revocation List A digitally signed list of revoked certificates Periodically updated and made available in public A revoked certificate will be listed for a certain time period A certificate has an expiration date. PGP Example: A person who wants to revoke his/her public key generates a revocation certificate. (This should be done before his/her public key becomes useless.) He/she prints out the revocation certificate and sends it to CA. CSS432: Network Security

Example Systems Pretty Good Privacy (PGP) Secure Shell (SSH) Encryption and authentication for email Secure Shell (SSH) Secured version of Unix R commands (rlogin, rsh, and rcp) Transport Layer Security (TLS, SSL, HTTPS) Additional handshake to encrypt and authenticate TCP communication, in particular HTTP connections IP Security (IPSEC) Framework to make IP packets secured CSS432: Network Security

PGP A popular approach to providing encryption ad authentication capabilities for email. A user decides the level of establishing trust You know A well, and thus trust A’s public key. You have received B’s certificate from A. You trust it if B is A’s colleague but not a politician. You have received B’s certificate from C and D and then trust B’s certificate. A user collects a set of certificates with varying trust level in a key ring (~/.gnupg/trustdb.gpg) Systems available at: MIT distribution site for PGP: http://web.mit.edu/network/pgp.html The International PGP Home Page: http://www.pgpi.org/ The Gnu Privacy Guard: http://www.gnupg.org/ CSS432: Network Security

PGP (Message Encryption) Generating a key: gpg --gen-key Required to type your real name, comments, and email address( mfukuda@u.washington.edu) Exporting a public key: gpg --output mfukuda.pub --armor --export mfukuda Importing a public key: gpg --import --armor mfukuda.pub Validating a public key: gpg --edit-key mfukuda@u.washington.edu Command > fpr // check his finger print Command > sign // sign this public key at a favorite trust level Encrypting a document: gpg –output doc.enc –encrypt –recipient balke@cyb.org doc Decrypting a document: gpg –output doc –descript doc.enc Create a random secret key k Encrypt message using DES with secret key k Decrypt message using DES with secret key k Encrypt k using RSA with recipient’s public key Decrypt E(k) using RSA with my private key -> k Encode message + E(k) in ASCII for transmission Convert ASCII message CSS432: Network Security

PGP (Message Integrity and Authentication) Making a signature: gpg --output doc.asc --sign doc Making a signature in email format: gpg --clearsign doc // doc.asc is automatically created Verifying a signature: gpg --output doc --decrypt doc.asc Sender identity and message integrity confirmed if checksums match Calculate MD5 checksum on received message and compare against received value Calculate MD5 checksum over message contents Sign checksum using RSA with sender’s private key Decrypt signed checksum with sender’s public key CSS432: Network Security

SSH Secured version of Unix R commands (rlogin, rsh, and rcp) SSH-TRANS: a transport layer protocol on top a TCP connection SSH-AUTH: An authentication protocl using RSA SSH-CONN: a connection protocol enabling SSH tunnelling CSS432: Network Security

SSH (Protocol Exchange) (1) Contact to port 22 /etc/ssh/ssh_host_rsa_key host1 /etc/ssh/ssh_known_hosts ~/.ssh/known_hosts host1 host2 host3 (2) SSH version host1 /etc/ssh/ssh_host_rsa_key.pub host1 (3) server (4) Server Authentication session E( , ) server host1 session server (5) Secure connection established server ~/.ssh/id_rsa (~/.ssh/identity) mfukuda@local1 (6) Client Authentication ~/.ssh/authorized_keys mfukuda@local1 mfukuda@local2 E( random 256-bit string, ) mfukuda@local1 MD5(random 256-bit string, ) session (7) All authentications completed local1 server1 CSS432: Network Security

SSH (Key Generation Example) Munehiro Fukuda@fukuda-thinkpad ~$ ssh-keygent –t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/Munehiro Fukuda/.ssh/id_rsa): Enter passphrase (empty for no passphrase): ******** Enter same passphrase again: ******** Your identification has been saved in /home/Munehiro Fukuda/.ssh/id_rsa. Your public key has been saved in /home/Munehiro Fukuda/.ssh/id_rsa.pub. The key finger print is: 3b:4c:e7:db:68:25:13:7e:77:a2:c8:b8:43:af:44:82 Munehiro Fukuda@fukuda-thinkpad Munehiro Fukuda@fukuda-thinkpad ~$ cd .ssh Munehiro Fukuda@fukuda-thinkpad ~$ ls Id_rsa id_rsa.pub known_hosts known_hosts~ Munehiro Fukuda@fukuda-thinkpad ~$ sftp perseus.bothell.washington.edu Connecting to perseus.bothell.washington.edu… mfukuda@perseus.bothell.washington.edu’s password: ******** sftp> put id_rsa.pub sftp> quit Munehiro Fukuda@fukuda-thinkpad ~$ ssh –l mfukuda perseus.bothell.washington.edu mfukuda@perseus.bothell.washington.edu’s passowrd: ******** [mfukuda@perseus mfukuda]$ mv id_rsa.pub .ssh/id_rsa.fukuda-thinkpad.pub [mfukuda@perseus mfukuda]$ cd .ssh [mfukuda@perseus mfukuda]$ cat id_rsa.fukuda-thinkpad.pub >> authorized_keys [mfukuda@perseus mfukuda]$ chmod 644 authorized_keys [mfukuda@perseus mfukuda]$ exit Munehiro Fukuda@fukuda-thinkpad ~$ ssh –l mfukuda perseus bothell.washington.edu Enter passphrase for key ‘/honme/Munehiro Fukuda/.ssh/id_rsa’: ******** [mfukuda@perseus mfukuda]$ CSS432: Network Security

SSH (SSH Agent) $ ssh-add ssh-agent SSH protocol exchange server local ~/.ssh/id_rsa (~/.ssh/identity) mfukuda@local1 mfukuda@local server local Munehiro Fukuda@fukuda-thinkpad ~$ eval `ssh-agent` Agent pid 228 Munehiro Fukuda@fukuda-thinkpad ~$ ssh-add Enter passphrase for /home/Munehiro Fukuda/.ssh/id_rsa: ******** Identity added: /home/Munehiro Fukuda/.ssh/id_rsa (home/Munehiro Fukuda/..ssh/id_rsa) Munehiro Fukuda@fukuda-thinkpad ~$ ssh –l mfukuda perseus.bothell.washington.edu [mfukuda@perseus mfukuda]$ exit Munehiro Fukuda@fukuda-thinkpad ~$ eval `ssh-agent –k` Agent pid 228 killd Munehiro Fukuda@fukuda-thinkpad ~$ ssh –l mfukuda perseus bothell.washington.edu Enter passphrase for key ‘/honme/Munehiro Fukuda/.ssh/id_rsa’: ******** [mfukuda@perseus mfukuda]$ CSS432: Network Security

SSH (Agent Forwarding) SSH protocol exchange sshd proxy agent SSH protocol exchange $ ssh-add ssh-agent sshd mfukuda@local ~/.ssh/id_rsa mfukuda@local authentication authentication forwarded authentication scp scp scp local Server X Server X #Enable agent forwarding ssh –A …. sftp userId@serverX:file1 userId@serverY:file2 CSS432: Network Security

SSH (Port Forwarding) Local forwarding Remote forwarding ssh -L x:appserver:y username@sshdserver Ex: ssh –L 80:localhost:8080 mfukuda@perseus Localhost = perseus in this example Remote forwarding ssh -R x:appclient:y username@sshdserver Ex: ssh –R 80:localhost: mfukuda@perseus Localhost = my local computer (fukuda-thinkpad) =localhost x y 22 appclient sshclient sshdserver appserver =localhost 22 y x appclient sshdserver appserver sshclient CSS432: Network Security

Firewalls Filter-Based Solution Example Rest of the Internet Local site Firewall Filter-Based Solution Example ( 192.12.13.14, 1234, 128.7.6.5, 80 ) filter all packets from port 1234 on host 192.12.13.14 addressed to port 80 on host 128.7.6.5 (*,*, 128.7.6.5, 80 ) filter all packets address to port 80 on 128.7.6.5 Default: forward or not forward? All ports initialized to forward packets All ports initialized to filter packets How dynamic? Filter initialized upon a boot Filter reinitialized at run time CSS432: Network Security

CISCO Example X 172.16.2.0 Internet Local Network hostname router1 172.16.1.1 192.168.1.1 hostname router1 ! Link to the Internet interface ethernet 0 ip address 172.16.1.1 255.255.255.0 ip access-group 1 in ! Link to the local network interface ethernet 1 ip address 192.168.1.1 255.255.255.0 ! Access-list 1 deny 172.16.2.0 0.0.0.255 Access-list 1 permit 0.0.0.0 255.255.255.255 CSS432: Network Security

Proxy-Based Firewalls Problem: complex policy Example: web server Solution: proxy Question: What if we need to run different applications (HTTP, FTP, IMAP, etc)? Company net Firewall W eb server Random external user Remote company Internet Filter port 80 or not Some web pages should be visible, While the other should not. External client External HTTP/TCP connection Proxy Firewall Internal HTTP/TCP connection Local server CSS432: Network Security

DMZ and Bastion Servers 1. Forward packets from 192.168.1.0/4 Filter the others 172.16.1.1 Internet Local Network Border Router Firewall System 2. What if someone spoofs 192.168.1.X ? 192.168.1.1 192.168.1.0/24 De-Militarized Zone (DMZ) HTTP FTP IMAP Bastion Hosts 3. Solution: hostname router1 ! Link to the Internet interface ethernet 0 ip address 172.16.1.1 255.255.255.0 ip access-group 1 in ! Link to the local network interface ethernet 1 ip address 192.168.1.1 255.255.255.0 ! Access-list 1 deny 192.168.1.0 0.0.0.255 Access-list 1 permit 0.0.0.0 255.255.255.255 4. Limitations: Attacks from within local network CSS432: Network Security

Reviews Cryptography algorithms: DES, RSA, and MD5 Authentication: three way handshake and Kerberos Message integrity: RSA, keyed MD5, and MD5 with RSA signature Examples: PGP and SSH Firewall: filter-based, proxy-based, and DMZ CSS432: Network Security