CS 43: Computer Networks Security. Kevin Webb Swarthmore College December 7, 2017

Similar documents
The Security Problem

Security: Cryptography

Introduction and Overview. Why CSCI 454/554?

Cryptography III Want to make a billion dollars? Just factor this one number!

Key Exchange. Secure Software Systems

Protection and Security

Cryptography. Cryptography is much more than. What is Cryptography, exactly? Why Cryptography? (cont d) Straight encoding and decoding

Protection and Security. Sarah Diesburg Operating Systems CS 3430

Secure Multiparty Computation

CMPSC 497 Buffer Overflow Vulnerabilities

Davenport University ITS Lunch and Learn February 2, 2012 Sneden Center Meeting Hall Presented by: Scott Radtke

Crypto CS 485/ECE 440/CS 585 Fall 2017

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

Crypto Basics: History, Applied Cryptography in IT Security Today and in the Next Year

Lecture 4 September Required reading materials for this class

Is stack overflow still a problem?

typedef void (*type_fp)(void); int a(char *s) { type_fp hf = (type_fp)(&happy_function); char buf[16]; strncpy(buf, s, 18); (*hf)(); return 0; }

Secure Programming I. Steven M. Bellovin September 28,

Cyber Security Practice Questions. Varying Difficulty

CPSC 467b: Cryptography and Computer Security

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

1.264 Lecture 28. Cryptography: Asymmetric keys

CS Final Exam

Introduction to Information Security Miscellaneous

BEST PRACTICES FOR PERSONAL Security

CHAPTER 8 SECURING INFORMATION SYSTEMS

CS Lab 11. Today's Objectives. Prime Number Generation Implement Diffie-Hellman Key Exchange Implement RSA Encryption

CS573 Data Privacy and Security. Cryptographic Primitives and Secure Multiparty Computation. Li Xiong

CS 332 Computer Networks Security

Cryptography III. Public-Key Cryptography Digital Signatures. 2/1/18 Cryptography III

Lecture Nov. 21 st 2006 Dan Wendlandt ISP D ISP B ISP C ISP A. Bob. Alice. Denial-of-Service. Password Cracking. Traffic.

CPSC 467b: Cryptography and Computer Security

What did we talk about last time? Public key cryptography A little number theory

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology

EEC-484/584 Computer Networks

Distributed Systems. 25. Authentication Paul Krzyzanowski. Rutgers University. Fall 2018

CS November 2018

CS 645: Lecture 3 Software Vulnerabilities. Rachel Greenstadt July 3, 2013

Buffer overflow is still one of the most common vulnerabilities being discovered and exploited in commodity software.

Diffie-Hellman. Part 1 Cryptography 136

CSE 565 Computer Security Fall 2018

Fall 2005 Joseph/Tygar/Vazirani/Wagner Final

DO NOT OPEN UNTIL INSTRUCTED

Computers and Security

Overview. Public Key Algorithms I

CS Computer Networks 1: Authentication

The Tension. Security vs. ease of use: the more security measures added, the more difficult a site is to use, and the slower it becomes

Full file at

Cryptography Worksheet

19.1. Security must consider external environment of the system, and protect it from:

Chapter 15: Security. Chapter 15: Security

Security PGP / Pretty Good Privacy. SANOGXXX July, 2017 Gurgaon, Haryana, India

The question paper contains 40 multiple choice questions with four choices and students will have to pick the correct one (each carrying ½ marks.).

MU2a Authentication, Authorization & Accounting Questions and Answers with Explainations

Modern cryptography 2. CSCI 470: Web Science Keith Vertanen

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Secure Sockets Layer (SSL) / Transport Layer Security (TLS)

Information Security CS 526

CS 161 Computer Security

Lorenz Cipher. Menu. Class 4: Modern Cryptography. British Cipher Machine. German Code-Breaking Efforts. Some loose ends on WWII Maurice Burnett

Encryption. INST 346, Section 0201 April 3, 2018

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

L13. Reviews. Rocky K. C. Chang, April 10, 2015

More on Cryptography CS 136 Computer Security Peter Reiher January 19, 2017

Software Security: Buffer Overflow Attacks (continued)

Uses of Cryptography

Cryptography (Overview)

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Cryptography and Network Security

CSC 580 Cryptography and Computer Security

Securing Internet Communication: TLS

Kurose & Ross, Chapters (5 th ed.)

Security. 1 Introduction. Alex S. 1.1 Authentication

ECCouncil Certified Ethical Hacker. Download Full Version :

Cryptography and Network Security. Sixth Edition by William Stallings

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Great Theoretical Ideas in Computer Science. Lecture 27: Cryptography

Protecting Information Assets - Week 11 - Cryptography, Public Key Encryption and Digital Signatures. MIS 5206 Protecting Information Assets

Uzzah and the Ark of the Covenant

Most Common Security Threats (cont.)

CRYPTOGRAPHY AND NETWROK SECURITY-QUESTION BANK

EE 122: Network Security

EEC-682/782 Computer Networks I

Other Uses of Cryptography. Cryptography Goals. Basic Problem and Terminology. Other Uses of Cryptography. What Can Go Wrong? Why Do We Need a Key?

14. Internet Security (J. Kurose)

Cryptography. Intercepting Information Scenario 1. Tuesday, December 9, December 9, Wireless broadcasts information using radio signals

CPSC 467b: Cryptography and Computer Security

CMSC 414 Computer and Network Security

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

CCNA Security 1.1 Instructional Resource

Chapter 9 Public Key Cryptography. WANG YANG

CSE 509: Computer Security

Authentication CHAPTER 17

Authentication Handshakes

Operating Systems Design Exam 3 Review: Spring 2011

Security in ECE Systems

Public Key Cryptography

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

Public Key Cryptography, OpenPGP, and Enigmail. 31/5/ Geek Girls Carrffots GVA

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L

Transcription:

CS 43: Computer Networks Security Kevin Webb Swarthmore College December 7, 2017

Topics Spying on network traffic Classic problem: buffer overflow attack Monetizing botnets

Once upon a time The Internet was a group of mutually trusting users attached to a transparent network. Result: Not much built-in security Email headers IP address spoofing IP prefix hijacking

Once upon a time Trust is gone, is the network still transparent? Switches help, cables can still be tapped What about wireless?

Wireless example/demo

Encryption Multiple options: End to end (SSL, TLS): Browsers use this. Link layer (WEP, WPA): Access point uses this. Facebook: enabled E2E encryption? July 2013

Cryptography Dates back 1000 s of years Simple substitution cipher (Caesar cipher) Shift each letter by three (a -> d, b -> e, ) Hello world becomes khoor zruog Many other, significantly better ciphers since De facto standard today: AES

(Symmetric) Cryptography Problem: Encrypting with a cipher requires shared key information. (prior to 1970 s) Sophisticated cipher doesn t help if we have to communicate the secret key!

Box Analogy You want to ship a package to someone. You trust it won t be stolen, but might be read.

Box Analogy You want to ship a package to someone. You trust it won t be stolen, but might be read.

Box Analogy You want to ship a package to someone. You trust it won t be stolen, but might be read.

Box Analogy You want to ship a package to someone. You trust it won t be stolen, but might be read.

Box Analogy You want to ship a package to someone. You trust it won t be stolen, but might be read.

Box Analogy You want to ship a package to someone. You trust it won t be stolen, but might be read. Shared Secret!?

(Asymmetric) Public Key Crypto Analogy: locking and unlocking are asymmetric Anybody can lock Very difficult to unlock without the key Let s apply this to data. We need a function that s easy to apply in one direction and difficult in the other.

Factoring Multiplication is easy. Factoring (primes) is hard. 617077493 is the product of two primes. What are they?

RSA Algorithm Rivest, Shamir, Adleman (RSA) Everyone computes two items: Public key (kind of like a pad lock, ok if seen) Private key (keep this to yourself) Receiver distributes public key, sender uses it to craft message that only receiver can read.

RSA Algorithm Choose two prime numbers of similar length. P = 41 and Q = 29 Compute N = P * Q N = 41 * 29 = 1189 Compute phi(n) = (P 1) * (Q 1) phi(n) = (41 1) * (29 1) = 40 * 28 = 1120 Choose a value e, 1 < e < 1120 e must not divide 1120, we ll pick 13

RSA Algorithm P = 41 and Q = 29 N = 1189 phi(n) = 1120 e = 13 Compute modular multiplicative inverse of e Need: (d * e) % phi(n) = 1 d = 517

RSA Algorithm P = 41 and Q = 29 N = 1189, phi(n) = 1120, e = 13, d = 517 Public key is (n, e), private key is (n, d) To encrypt message m = 1000: Take 1000 13 % 1189 = 611 To decrypt message 611: 611 517 % 1189 = 1000

In Practice Result: we can exchange secure messages with parties we ve never talked to before! (e.g., your bank) Exchange a secure message containing shared secret via RSA (asymmetric crypto) Subsequently use shared secret for conventional symmetric crypto (e.g., AES)

Classic Attack: Buffer Overflow Encryption ruining your (evil) day? Let s try taking control instead!

Recall: The Stack Callee s frame. Caller s frame. Callee s local variables. Caller s Frame Pointer Return Address First Argument to Callee Final Argument to Callee Caller s local variables. Older stack frames. Shared by caller and callee.

A well intentioned program Suppose we have a protocol that does recv() until it finds \r\n\r\n. char buf[1000] buf[0] Stack Memory buf[999] Ret urn add ress

A well intentioned program Suppose we have a protocol that does recv() until it finds \r\n\r\n. char buf[1000] G E T / Stack Memory i n d e x. h t m l \0 \0 \0 \0 \0 Ret urn add ress

A well intentioned program What happens if we re sent more than 1000 bytes before we see \r\n\r\n? Keep writing char buf[1000] G E T / Stack Memory i n d e x. h t m l D D D D D D D D D

A well intentioned program Uh, if we can overwrite the return address We can control execution on return. char buf[1000] G E T / Stack Memory i n d e x. h t m l D D D D D D D D D

A well intentioned program Let s send malicious data that contains a ptr. char buf[1000] G E T / Stack Memory i n d e x. h t m l D D D D D PTR PTR PTR PTR

A well intentioned program Let s send malicious data that contains a ptr. char buf[1000] G E T / Stack Memory i n d e x. h t m l D D D D D PTR PTR PTR PTR

A well intentioned program Oh, and also some commands up here char buf[1000] E V I L Stack Memory C O D E H E R E D D D D D PTR PTR PTR PTR

A well intentioned program Function returns, executes evil code. char buf[1000] E V I L Stack Memory C O D E H E R E D D D D D PTR PTR PTR PTR

A well intentioned program Improve chances: NO OP sled char buf[1000] NOP NOP NOP NOP NOP Stack Memory NOP NOP NOP NOP NOP E V I L C O D E PTR PTR PTR PTR

A well intentioned program See: Smashing the Stack for Fun and Profit char buf[1000] NOP NOP NOP NOP NOP Stack Memory NOP NOP NOP NOP NOP E V I L C O D E PTR PTR PTR PTR

Input from Network Programs that receive user input are susceptible to buffer overflow (& more) attacks. Potentially much more problematic to receive input from the Internet! If attackers can take over program s control flow, they can execute anything.

Relevant XKCD #327 Alt text: Her daughter is named Help I'm trapped in a driver's license factory. Bottom line: be careful about what you re accepting from the network! Make sure the memory you re using is bounded and that the data is valid!

1988: The Morris Worm Cornell student Robert Morris Exploited buffer overflow in fingerd It had a 512-byte buffer, he exploited it to execute /bin/sh, giving him shell access Told compromised host to download his worm code, it self-replicated by exploiting others Claimed wanted to gauge size of Internet

1988: The Morris Worm Worm did a check to see if it needed to replicate itself If machine already compromised (process running) don t infect again. Worried about admins putting up fake process Replicate anyway, at random, 1/7 times. This effectively shut down LOTS of machines.

1988: The Morris Worm Robert Morris: First person convicted under Computer Fraud and Abuse Act Sentenced to three years probation, 400 hours community service, $10,000 Where is he now?

Exploits Today Worms Trojans (trick user) Browser exploits (drive-by downloads) Often used in BotNets

BotNets Having access to 1000 s of machines is lucrative! Send Spam. Flood target with traffic (DDoS). Steal data (CC # s, state secrets, etc.). Mine bitcoins.

Questions?

Final Exam Friday, December 15, at 9:00 LOCATION: SCI 199