Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dimitris Palyvos Giannas Utilizing Kurose-Ross Slides, 7th Global Ed.

Similar presentations


Presentation on theme: "Dimitris Palyvos Giannas Utilizing Kurose-Ross Slides, 7th Global Ed."— Presentation transcript:

1 Dimitris Palyvos Giannas Utilizing Kurose-Ross Slides, 7th Global Ed.
Network Security Dimitris Palyvos Giannas Utilizing Kurose-Ross Slides, 7th Global Ed.

2 Learning Objectives Explain the requirements of secure communication
Classify different encryption techniques Compare and contrast message integrity strategies Give a high level explanation of real-world security protocols Explain the principles of operational security mechanisms

3 A tale of two lovers Alice Bob data, control messages channel secure
sender secure receiver well-known paradigm in network security world Bob, Alice (lovers!) want to communicate “securely” Trudy (intruder) may intercept, delete, add messages Trudy

4 Network Security Principles
Confidentiality Integrity Authentication Access & Availability confidentiality: only sender, intended receiver should “understand” message contents 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

5 Learning Objectives Explain the requirements for secure communication
Classify various encryption techniques Compare and contrast message integrity strategies Give a high level explanation of real-world security protocols Explain the principles of operational security mechanisms

6 Symmetric Key Cryptography
plaintext ciphertext K encryption algorithm decryption common key Alice Bob Trudy plaintext, ciphertext definitions Sender & Receiver share the same key How are the keys exchanged?

7 Block Ciphers Break up the message into bit blocks of constant size N
Use a substitution table for all values e.g. 100 ➜ 101, 001 ➜ 111, … For N = 64, we need more than 2,305,843 terabytes Instead, use a function that simulates random permuted tables Small permutation tables total size 256KB

8 (encrypts and decrypts)
Block Cipher ECB Mode Block cipher Ciphertext block Symmetric Key (encrypts and decrypts) Plaintext 101 111 IN OUT 000 110 001 111 010 100 011 101 111 Can you think of possible problems with this approach? 011 001 001

9 Information Leakage Block Effect
Encrypting the same plaintext gives us the exact same ciphertext

10 Randomization to the rescue! CBC Mode
Plaintext block 101 111 111 IN OUT 000 110 001 111 010 100 011 101 010 010 001 f IV – init. vector for first block 110 101 111 Block cipher Cipher Block Chaining Identical blocks are now encrypted differently The initial vector is sent as plaintext Each ciphertext block is used to randomize the encryption of the next block Ciphertext block 001 010 011

11 Symmetric key ciphers DES (Data Encryption Standard)
Designed by IBM 1975, Adopted by NIST* 1977 Criticized for short key length (56 bits) and mysterious “S-boxes” Not considered secure anymore! 3-DES (repeating DES three times with different keys) 3-DES probably secure today but too computational intensive AES (Advanced Encryption Standard) Replaces DES as of 2001 Result of an official competition Longer Key lengths: 128, 192 or 256 bits Brute force decryption: if DES takes 1 second, AES-128 takes 149 trillion years, AES-256 would take 1052 years explain brute force

12 Symmetric Key Cryptography
Encryption algorithms are public Sender & Receiver share a common secret key Messages are split into blocks of constant length (e.g. 64, 128, 256, …) Many block ciphers & modes of operation Brute force attacks – trying all possible combinations Key Length # Combinations 1 2 10 1024 20 64 128 (3 billion billion billion billion …) Key size matters!

13 Public Key Cryptography
+ Bob’s public key K B - Bob’s private key K B encryption algorithm ciphertext decryption algorithm m = K (K (m)) B + - m plaintext message K (m) B + plaintext message

14 Public Key Cryptography
One key is public – the other kept secret One key is used to encrypt, the other to decrypt Based on mathematically hard problems RSA Cipher (Rivest, Shamir, Adleman) Factorization of very large prime numbers Slow because of the large numbers involved Key Length 1024 bits and up in RSA 21024 = which means > 300 digit numbers In practice, used to exchange symmetric keys! Can also be used for digital signatures!

15 Cryptographic Hash Function
Unique summary of a large message Small change in message results in completely different hash Deterministic Fast to compute Irreversible Infeasible to find collisions Does not encrypt data! MD5 (compromised), SHA-1 (compromised*), SHA-2, SHA-3 Torrent example * Since 2005 SHA-1 has not been considered secure against well-funded opponents

16 Cryptographic Hash Function
SHA-1

17 Performance Comparison
Hash functions SHA-1 MD5 Symmetric ciphers 200-1,000 Mbyte/s AES DES 3-DES performance 100 Mbyte/s Public-Key ciphers RSA 0.1 Mbyte/s

18 bit.ly/2EKDpVi (case sensitive!)
Your turn bit.ly/2EKDpVi (case sensitive!)

19 Learning Objectives Explain the requirements for secure communication
Classify different encryption techniques Compare and contrast message integrity strategies Give a high level explanation of popular security protocols Explain the principles of operational security mechanisms

20 Woman in the middle attack!
Bob Alice Trudy altered ciphertext ciphertext “I love you” “I hate you” Was the message altered by Trudy? Message Integrity Was the message was sent by Alice? Digital Signatures + Authentication Contents can be changed even if it is encrypted!

21 MAC Message Authentication Code
Sender Receiver Message S HASH MAC Compare Sender and receiver need a shared secret Authenticates sender + Verifies Message Integrity No encryption!

22 Digital Signatures No need for shared secret
Only you have the private key Image:

23 Digital Signatures Cryptographic technique analogous to hand-written signatures No shared secret required! Based on public key ciphers Sender (Alice) digitally signs document This way, she establishes she is document owner/creator Verifiable, nonforgeable: recipient (Bob) can prove to someone that Alice, and no one else, must have signed document Everybody can prove that Alice signed the message, as long as they have her public key!

24 Public Key Cryptography & Digital Signatures
Everybody can encrypt Only one can decrypt Digital Signatures Only one can encrypt (sign) Everybody can decrypt (verify)

25 Digital Certificates The attacker can alter the public key!
Another layer of authentication: Public Key Certificates A Certification Authority (CA) sings the name + public key Everybody can use the CA’s public key to verify other public keys How do we verify the CA’s public key? Show certificate in browser

26 End-point Authentication
Bob wants Alice to “prove” her identity to him “I am Alice” “I am Alice”

27 End-point authentication
Alice could send her IP address and a secret password to Bob… Alice’s IP addr encrypted password “I’m Alice” OK Alice’s IP addr “I’m Alice” Alice’s IP addr encrypted password Playback attack!

28 End-point authentication
Use a unique number (nonce) R and a shared secret! “I am Alice” R K (R) A-B Alice is live, and only Alice knows key to encrypt nonce, so it must be Alice!

29 Learning Objectives Explain the requirements for secure communication
Classify different encryption techniques Compare and contrast message integrity strategies Give a high level explanation of real-world security protocols Explain the principles of operational security mechanisms

30 Real World Source: xkcd

31 Transport Layer Security SSL & TLS
SSL/TLS provides secure communication over TCP Guarantees Confidentiality, Integrity & Authentication Widely deployed (billions $/year over SSL) Provides an API to TCP applications Application TCP IP normal application Application SSL TCP IP application with SSL widely deployed security protocol supported by almost all browsers, web servers https billions $/year over SSL variation -TLS: transport layer security, RFC 2246 provides confidentiality integrity authentication

32 SSL Handshake How do we make sure that the server’s public key was not altered? Mention certificate authorities, digital certificates.

33 SSL Handshake Client sends (supported algorithms, client nonce)
Server chooses algorithms from list; sends back: (algorithms choice, certificate, server nonce) Client verifies certificate, extracts server’s public key, generates PMS, encrypts with server’s public key, sends to server (encrypted PMS) Client and Server independently compute encryption and MAC keys from PMS and nonces Client sends a MAC of all the handshake messages Server sends a MAC of all the handshake messages

34 The Devil is in the Details
The two final steps protect handshake from tampering (e.g. weak algorithm suggestions) 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 (without being able to decrypt it) 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

35 bit.ly/2CG3IGk (case sensitive!)
Your turn bit.ly/2CG3IGk (case sensitive!)

36 Learning Objectives Explain the requirements for secure communication
Classify different encryption techniques Compare and contrast message integrity strategies Give a high level explanation of real-world security protocols Explain the principles of operational security mechanisms

37 Packet Filtering untrusted “bad guys” Firewall trusted “good guys”
administered network public Internet isolates organization’s internal net from larger Internet, allowing some packets to pass, blocking others trusted “good guys” untrusted “bad guys” Firewall

38 Stateless Packet Filters
Should arriving packet be allowed in? Departing packet let out? Internal network connected to Internet via router firewall Router Firewall, filters packet-by-packet. Decision to forward/drop based on: IP addresses (Src & Dest) Port numbers (Src & Dest) ICMP message type TCP SYN and ACK bits Security 8-41

39 Stateless Packet Filters
Policy Firewall Setting No outside Web access. Drop all outgoing packets to any IP address, port 80 No incoming TCP connections, except those for institution’s public Web server only. Drop all incoming TCP SYN packets to any IP except , port 80 Prevent Web-radios from eating up the available bandwidth. Drop all incoming UDP packets - except DNS and router broadcasts. Prevent your network from being used for a smurf DoS attack. Drop all ICMP packets going to a “broadcast” address (e.g ). Prevent your network from being tracerouted Drop all outgoing ICMP TTL expired traffic

40 Stateful packet filters
stateless packet filter: heavy handed tool admits packets that make no sense e.g., dest port = 80, ACK bit set, even if no TCP connection established stateful packet filter: track status of every TCP connection track connection setup (SYN), teardown (FIN): determine whether incoming, outgoing packets “make sense” timeout inactive connections at firewall, no longer admit packets

41 Firewalls Operate on TCP/IP headers only
Prevent denial of service attacks e.g. 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 Stateful/stateless

42 Application Gateways application gateway host-to-gateway telnet session Firewall gateway-to-remote host telnet session Filter packets on application data as well as on header data Example: allow select internal users to telnet outside Require all telnet users to telnet through gateway For authorized users, gateway sets up telnet connection to dest host. Gateway relays data between 2 connections Router filter blocks all telnet connections not originating from gateway

43 Challenges for Packet Filters/Gateways
IP spoofing Firewall can’t know if data really comes from claimed source Filters often use all or nothing policy for UDP Filtering is a tradeoff Degree of communication ↔︎ Level of security Each app requires its own gateway → resource requirements Client software must know how to contact gateway e.g., must set IP address of proxy in Web browser Not a panacea! Many highly protected sites still suffer from attacks

44 IDS Intrusion Detection Systems
Packet Filtering Operates on TCP/IP headers only No correlation check among sessions IDS deep packet inspection – look at packet contents (e.g., check strings in packet against database of known virus, attack strings) Examine correlation among multiple packets Port scanning Network mapping DoS attack Signature/Anomaly based

45 IDS Intrusion Detection Systems
One or more IDS sensors Multiple IDS sensors divide load Second firewall can be an application gateway

46 Security Courses @ Chalmers
Computer Security (SP3) Cryptography (SP2) Language-based Security (SP4) Network security (SP4)


Download ppt "Dimitris Palyvos Giannas Utilizing Kurose-Ross Slides, 7th Global Ed."

Similar presentations


Ads by Google