university of calgary – cpsc 441. the field of network security is about: how bad guys can...

22
Network Security University of Calgary – CPSC 441

Upload: kerry-hopkins

Post on 23-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

Network SecurityUniversity of Calgary – CPSC 441

Page 2: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

Why network security?

The field of network security is about: how bad guys can attack computer networks how we can defend networks against attacks how to design architectures that are immune to attacks

Internet not originally designed with (much) security in mind original vision: “a group of mutually trusting users

attached to a transparent network” Internet protocol designers playing “catch-up” Security considerations in all layers!

2

Page 3: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

Malware

Malware can get in host from a virus, worm, or trojan horse.

Spyware malware can record keystrokes, web sites visited, upload info to collection site.

Infected host can be enrolled in a botnet, used for spam and DDoS attacks.

Malware is often self-replicating: from an infected host, seeks entry into other hosts

3

Page 4: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

Types of malware

Trojan horse Hidden part of some

otherwise useful software

Today often on a Web page (Active-X, plugin)

Virus infection by receiving

object (e.g., e-mail attachment), actively executing

self-replicating: propagate itself to other hosts, users

Worm: infection by passively

receiving object that gets itself executed

self- replicating: propagates to other hosts, users

4

Page 5: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

Example: SQL Slammer (2003)

Also know as Sapphir Worm Exploited a buffer overflow bug in Microsoft SQL Server Caused a denial of service on some hosts Dramatically slowed down general Internet traffic

5

Page 6: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

Denial of service

Bad guys can attack servers and network infrastructure Denial of service (DoS): attackers make resources (server,

bandwidth) unavailable to legitimate traffic by overwhelming resource with bogus traffic

target

1. select target

2. break into hosts around the network (see botnet)

3. send packets toward target from compromised hosts

6

Page 7: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

Packet sniffing

The bad guys can sniff packets broadcast media (shared Ethernet, wireless) promiscuous network interface reads/records all packets

(e.g., including passwords!) passing by

A

B

C

src:B dest:A payload

Wireshark software is an example of a packet-sniffer

7

Page 8: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

8

IP spoofing

• The bad guys can use false source addresses• IP spoofing: send packet with false source address

A

B

C

src:B dest:A payload

Page 9: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

9

Record and playback

• The bad guys can record and playback• sniff sensitive info (e.g., password), and use later

• password holder is the legit user from system point of view

A

B

C

src:B dest:A user: B; password: foo

Page 10: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

10

Secure communication

Bob and Alice want to communicate securely.

Trudy (intruder) may intercept, delete, add messages

securesender

securereceiver

channel data, control messages

data data

Alice Bob

Trudy

Page 11: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

11

Cryptography

  “… is the practice and study of techniques for secure communication”[Wikipedia].

Goals: 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

Page 12: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

12

The language of cryptography

m plaintext messageKA(m) ciphertext, encrypted with key KA

m = KB(KA(m))

plaintext plaintextciphertext

KA

encryptionalgorithm

decryption algorithm

Alice’s encryptionkey

Bob’s decryptionkey

KB

Page 13: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

13

Simple encryption schemesubstitution cipher: substituting one thing for

another• monoalphabetic cipher: substitute one letter for another

plaintext: abcdefghijklmnopqrstuvwxyz

ciphertext: mnbvcxzasdfghjklpoiuytrewq

Plaintext: bob. i love you. aliceciphertext: nkn. s gktc wky. mgsbc

E.g.:

Key: the mapping from the set of 26 letters to the set of 26 letters

Page 14: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

14

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

▪ e.g., in monoalphabetic cipher, Trudy determines pairings for a,l,i,c,e,b,o,

Chosen-plaintext attack: Trudy can get the cypher-text for some chosen plaintext

Page 15: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

15

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 use of one key

Hash functions Involves the use of no keys Nothing secret: How can this be useful?

Page 16: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

16

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

Hash functions are useful here.

Page 17: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

17

Message Digests

Function H( ) that takes as input an arbitrary length message and outputs a fixed-length string: “message signature”

H( ) is often called a “hash function”

To be able check the integrity of a message: Sender sends the message

signature along with the message

Receiver applies the hash function on the received message and compares it to the message signature

Desirable properties: Easy to calculate 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

large message

m

H: HashFunction

H(m)

Page 18: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

18

Symmetric key cryptography

symmetric key crypto: Bob and Alice share same (symmetric) key: K e.g., key is knowing substitution pattern in mono

alphabetic substitution cipher

Q: how do Bob and Alice agree on key value?

plaintextciphertext

K

encryptionalgorithm

decryption algorithm

K

plaintextmessage, m

K (m) m = K(K(m))

Page 19: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

19

Public Key Cryptography

Problem with symmetric keys cryptography:

requires sender, receiver know shared secret key

Q: how to agree on key in first place (particularly if never “met”)?

Public key cryptographyo radically different approach

[Diffie-Hellman76, RSA78]

o sender, receiver do not share secret key

o public encryption key known to all

o private decryption key known only to receiver

Page 20: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

20

Digital signatures

Used against playback attack, IP spoofing, …

Also, provides non-repudiation

Using the public key encryption scheme sender (Bob) digitally signs document, using his private key

▪ establishing he is document owner/creator. recipient (Alice) decrypts the signature with Bob’s public key

▪ verifying Bob is the document owner/creator.

verifiable, nonforgeable: recipient (Alice) can prove to someone that Bob, and no one else (including Alice), must have signed document

Page 21: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

21

Curious for more?

Take CPSC 526: Network Systems Security

Course Description: “Attacks on networked systems, tools and techniques for detection and protection against attacks including firewalls and intrusion detection and protection systems, authentication and identification in distributed systems, cryptographic protocols for IP networks, security protocols for emerging networks and technologies, privacy enhancing communication. Legal and ethical issues will be introduced.”

Page 22: University of Calgary – CPSC 441.  The field of network security is about:  how bad guys can attack computer networks  how we can defend networks against

22

Some of the slides are courtesy of the slide supplements for:

Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith RossAddison-WesleyMarch 2012