97
May 15th, 2002 1 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania http://www.cis.upenn.edu/~posse

May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Embed Size (px)

Citation preview

Page 1: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 1

505 review – distributed systems and security

(slides mostly from Tanenbaum)

Jonathan M. Smith

University of Pennsylvania

http://www.cis.upenn.edu/~posse

Page 2: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 2

Remote Procedure Call

• Model of communication– support distributed programming

– in fact tries to hide communication!

• Interface between programming language and communications system

• Adopts procedure-call interface– e.g., remote_foo(arg_1, arg_2);

Page 3: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Remote Procedure Call

• Steps in making a remote procedure call– the stubs are shaded gray

Page 4: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 4

RPC client and server

• RPC client host must know how to reach server and what service is required

• RPC server host must know who is requesting the service, what service is requested, and how to reply

• Usually built over UDP; issues include argument marshalling, transport, binding, etc. Example: name resolution

Page 5: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Remote Procedure Call

Implementation Issues• Cannot pass pointers

– call by reference becomes copy-restore (but might fail)

• Weakly typed languages– client stub cannot determine size

• Not always possible to determine parameter types• Cannot use global variables

– may get moved to remote machine

Page 6: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 6

The BSD “socket” API

• Designed for UNIX, which had “pipes”

• Socket provides a “handle” (descriptor) which can be used for system operations such as read() and write()

• Other services must exist for rendezvous, synchronization, etc.

• E.g., sd = socket(INET,STREAM,);

Page 7: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 7

Client and Server Actions

• Server– bind(sd, addr, addr_len)

– listen(sd,.)

– accept(sd, addr, addr_len)

• Client– connect(sd, addr, addr_len)

Page 8: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Distributed Shared Memory (1)

• Note layers where it can be implemented– hardware

– operating system

– user-level software

Page 9: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Distributed Shared Memory (2)

Replication(a) Pages distributed

on 4 machines

(b) CPU 0 reads page 10

(c) CPU 1 reads page 10

Page 10: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Distributed Shared Memory (3)

• False Sharing

• Must also achieve sequential consistency

Page 11: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Distributed Systems (1)

Comparison of three kinds of multiple CPU systems

Page 12: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Distributed Systems (2)

Achieving uniformity with middleware

Page 13: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Network Hardware (1)

• Ethernet(a) classic Ethernet

(b) switched Ethernet

Computer

(a) (b)

Page 14: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 14

CSMA/CD (Ethernet)

• Carrier Sense, Multiple Access with Collision Detect

• Originally 3Mbps, DIX 10Mbps, now 100

• Originally coax bus– Now more commonly twisted pair (10BaseT) through

repeaters

• Optimistic Protocol, Unique Station Address, Variable Size

Page 15: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 15

Ethernet Frame Format

Preamble Dest.Address

SrcAddress

Type CRC PostamblePacket Body

64 48 48 16 32 8

Page 16: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Network Hardware (2)

The Internet

Page 17: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Network Services and Protocols (1)

Network Services

Page 18: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002

Application Needs & Network Characteristics

Application Needs Network Char.

Reliable, Ordered, Single-Copy Message Delivery

Drops , Duplicates and Reorders Messages

Arbitrarily large messages

Finite message size

Allows Flow Control by Receiver

Arbitrary Delay

Supports multiple applications per-host

Page 19: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Network Services and Protocols (2)

• Internet Protocol

• Transmission Control Protocol

• Interaction of protocols

Page 20: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 20

Protocol Stacks illustrated:

• Service and peer interfaces

ProtocolProtocol

High-levelObject

High-levelObject

Peer-to-peer interface

Service interface Service Interface

Host #1 Host #2

Page 21: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 21

Service Interfaces & Encapsulation

• Examples: send(), read(), receive()

• Object representation is encapsulated– Represented in “lower” layer format

• Example: TCP/IP/Ethernet

ETH SrcETH Dst IP Header

TCP Packet (Sequence #,Checksum & Data)

Page 22: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 22

IPv4 Packet Format

• IPv4

Version Hlen TOS Length

Ident Flags Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options(variable length) Pad

DATA

Page 23: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 23

TCP and UDP packets

• Protocols support O.S. “port numbers”:

SrcPort DstPort

Checksum Length SequenceNum

SrcPort DstPort

Options (variable)

Checksum UrgPtr

HL 0 Flags Advert.Wind.

Acknowledgment

DATA

UDP TCP

Page 24: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 24

Packet-Switched Nets are “Store-and-Forward”

• So, buffers (“elastic buffers”) are used to accommodate bursts– Can never have enough buffering!

– Buffers form “queues”

Source#1

Source#2

Desti-nationQueue

Router

Page 25: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 25

TCP Learns what?

• Tries to discover “bottleneck bandwidth”

• Does this with acknowledgments

TCPSender

TCPSender

TCPRcvrQueue

Router ACK

ACK

ACK

Page 26: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 26

Congestion Window Timeline

• Slow-start, then maintenance

Time

WINDOW

BottleneckBandwidth

Page 27: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Document-Based Middleware (1)

• The Web– a big directed graph of documents

Page 28: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Document-Based Middleware (2)

How the browser gets a page

1. Asks DNS for IP address

2. DNS replies with IP address

3. Browser makes connection

4. Sends request for specified page

5. Server sends file

6. TCP connection released

7. Browser displays text

8. Browser fetches, displays images

Page 29: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

File System-Based Middleware (1)

• Transfer Models(a) upload/download model

(b) remote access model

(a)(b)

Page 30: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

File System-Based Middleware (2)

Naming Transparency

(b) Clients have same view of file system

(c) Alternatively, clients with different view

Page 31: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

File System-Based Middleware (3)

• Semantics of File sharing– (a) single processor gives sequential consistency– (b) distributed system may return obsolete value

Page 32: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

File System-Based Middleware (4)

• AFS – Andrew File System– workstations grouped into cells

– note position of venus and vice

Client's view

Page 33: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Shared Object-Based Middleware (1)

• Main elements of CORBA based system– Common Object Request Broker Architecture

Page 34: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Shared Object-Based Middleware (2)

• Scaling to large systems– replicated objects

– flexibility

• Globe– designed to scale to a billion users

– a trillion objects around the world

Page 35: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Shared Object-Based Middleware (3)

Globe structured object

Page 36: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Shared Object-Based Middleware (4)

• A distributed shared object in Globe– can have its state copied on multiple computers at

once

Page 37: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Shared Object-Based Middleware (5)

Internal structure of a Globe object

Page 38: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Coordination-Based Middleware (1)• Linda

– independent processes

– communicate via abstract tuple space

• Tuple– like a structure in C, record in Pascal

1. Operations: out, in, read, eval

Page 39: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Coordination-Based Middleware (2)

Publish-Subscribe architecture

Page 40: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

Coordination-Based Middleware (3)• Jini - based on Linda model

– devices plugged into a network

– offer, use services

• Jini Methods1. read

2. write

3. take

4. notify

Page 41: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 41

Security

Chapter 9

9.1 The security environment 9.2 Basics of cryptography 9.3 User authentication 9.4 Attacks from inside the system 9.5 Attacks from outside the system 9.6 Protection mechanisms 9.7 Trusted systems

Page 42: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 42

The Security EnvironmentThreats

Security goals and threats

Page 43: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 43

Intruders

Common Categories

1. Casual prying by nontechnical users

2. Snooping by insiders

3. Determined attempt to make money

4. Commercial or military espionage

Page 44: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 44

Accidental Data Loss

Common Causes

1. Acts of God- fires, floods, wars

2. Hardware or software errors- CPU malfunction, bad disk, program bugs

3. Human errors- data entry, wrong tape mounted

Page 45: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 45

Basics of Cryptography

Relationship between the plaintext and the ciphertext

Page 46: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 46

• Monoalphabetic substitution– each letter replaced by different letter

• Given the encryption key, – easy to find decryption key

• Secret-key crypto called symmetric-key crypto

Secret-Key Cryptography

Page 47: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 47

Public-Key Cryptography

• All users pick a public key/private key pair– publish the public key

– private key not published

• Public key is the encryption key– private key is the decryption key

Page 48: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 48

One-Way Functions

• Function such that given formula for f(x)

– easy to evaluate y = f(x)

• But given y

– computationally infeasible to find x

Page 49: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 49

Digital Signatures

• Computing a signature block

• What the receiver gets

(b)

Page 50: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 50

Key Management

• This is the hard part!

• How do you get a shared secret?– Private-key systems need this, right?

– Public-key systems don’t

• Do need a directory of public keys

• Keys might (and often do) change with time

Page 51: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 51

User Authentication

Basic Principles. Authentication must identify:

1. Something the user knows

2. Something the user has

3. Something the user is

This is done before user can use the system

Page 52: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 52

Authentication Using Passwords

(a) A successful login

(b) Login rejected after name entered

(c) Login rejected after name and password typed

Page 53: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 53

Authentication Using Passwords

• How a cracker broke into LBL– a U.S. Dept. of Energy research lab

Page 54: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 54

Authentication Using Passwords

The use of salt to defeat precomputation of

encrypted passwords

Salt Password

,

,

,

,

Page 55: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 55

Authentication Using a Physical Object

• Magnetic cards– magnetic stripe cards

– chip cards: stored value cards, smart cards

Page 56: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 56

Authentication Using Biometrics

A device for measuring finger length.

Page 57: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 57

Countermeasures

• Limiting times when someone can log in

• Automatic callback at number prespecified

• Limited number of login tries

• A database of all logins

• Simple login name/password as a trap– security personnel notified when attacker bites

Page 58: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 58

Operating System SecurityTrojan Horses

• Free program made available to unsuspecting user– Actually contains code to do harm

• Place altered version of utility program on victim's computer– trick user into running that program

Page 59: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 59

Login Spoofing

(a) Correct login screen

(b) Phony login screen

Page 60: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 60

Logic Bombs

• Company programmer writes program– potential to do harm

– OK as long as he/she enters password daily

– ff programmer fired, no password and bomb explodes

Page 61: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 61

Trap Doors

(a) Normal code.

(b) Code with a trapdoor inserted

Page 62: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 62

Buffer Overflow

• (a) Situation when main program is running

• (b) After program A called

• (c) Buffer overflow shown in gray

Page 63: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 63

Generic Security Attacks

Typical attacks

• Request memory, disk space, tapes and just read

• Try illegal system calls

• Start a login and hit DEL, RUBOUT, or BREAK

• Try modifying complex OS structures

• Try to do specified DO NOTs

• Convince a system programmer to add a trap door

• Beg admin's sec’y to help a poor user who forgot password

Page 64: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 64

Famous Security Flaws

The TENEX – password problem

(a) (b) (c)

Page 65: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 65

Design Principles for Security

1. System design should be public

2. Default should be n access

3. Check for current authority

4. Give each process least privilege possible

5. Protection mechanism should be- simple

- uniform

- in lowest layers of system

6. Scheme should be psychologically acceptable

And … keep it simple

Page 66: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 66

Network Security

• External threat– code transmitted to target machine

– code executed there, doing damage

• Goals of virus writer– quickly spreading virus

– difficult to detect

– hard to get rid of

• Virus = program can reproduce itself– attach its code to another program

– additionally, do harm

Page 67: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 67

Virus Damage Scenarios

• Blackmail

• Denial of service as long as virus runs

• Permanently damage hardware

• Target a competitor's computer– do harm

– espionage

• Intra-corporate dirty tricks– sabotage another corporate officer's files

Page 68: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 68

How Viruses Work (1)

•Virus written in assembly language

•Inserted into another program– use tool called a “dropper”

•Virus dormant until program executed– then infects other programs

– eventually executes its “payload”

Page 69: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 69

How Viruses Work (2)

Recursive procedure that finds executable files on a UNIX system

Virus could

infect them all

Page 70: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 70

How Viruses Work (3)

• An executable program• With a virus at the front• With the virus at the end• With a virus spread over free space within program

Page 71: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 71

How Viruses Work (4)

• After virus has captured interrupt, trap vectors

• After OS has retaken printer interrupt vector

• After virus has noticed loss of printer interrupt vector and recaptured it

Page 72: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 72

How Viruses Spread

•Virus placed where likely to be copied

•When copied– infects programs on hard drive, floppy

– may try to spread over LAN

•Attach to innocent looking email– when it runs, use mailing list to replicate

Page 73: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 73

Antivirus and Anti-Antivirus Techniques

(a) A program(b) Infected program(c) Compressed infected program(d) Encrypted virus(e) Compressed virus with encrypted compression code

Page 74: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 74

Antivirus and Anti-Antivirus Techniques

Examples of a polymorphic virus

All of these examples do the same thing

Page 75: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 75

Antivirus and Anti-Antivirus Techniques

• Integrity checkers

• Behavioral checkers

• Virus avoidance– good OS

– install only shrink-wrapped software

– use antivirus software

– do not click on attachments to email

– frequent backups

• Recovery from virus attack– halt computer, reboot from safe disk, run antivirus

Page 76: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 76

The Internet Worm

•Consisted of two programs– bootstrap to upload worm

– the worm itself

•Worm first hid its existence

•Next replicated itself on new machines

Page 77: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 77

Mobile Code (1) Sandboxing

(a) Memory divided into 1-MB sandboxes

(b) One way of checking an instruction for validity

Page 78: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 78

Mobile Code (2)

Applets can be interpreted by a Web browser

Page 79: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 79

Mobile Code (3)

How code signing works

Page 80: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 80

Java Security (1)

• A type safe language– compiler rejects attempts to misuse variable

• Checks include …1. Attempts to forge pointers

2. Violation of access restrictions on private class members

3. Misuse of variables by type

4. Generation of stack over/underflows

5. Illegal conversion of variables to another type

Page 81: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 81

Java Security (2)

Examples of specified protection with JDK 1.2

Page 82: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 82

Protection Mechanisms Protection Domains (1)

Examples of three protection domains

Page 83: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 83

Protection Domains (2)

A protection matrix

Page 84: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 84

Protection Domains (3)

A protection matrix with domains as objects

Page 85: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 85

Access Control Lists (1)

Use of access control lists of manage file access

Page 86: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 86

Access Control Lists (2)

Two access control lists

Page 87: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 87

Capabilities (1)

Each process has a capability list

Page 88: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 88

• Cryptographically-protected capability

• Generic Rights1. Copy capability

2. Copy object

3. Remove capability

4. Destroy object

Capabilities (2)

Server Object Rights f(Objects, Rights, Check)

Page 89: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 89

Trusted SystemsTrusted Computing Base

A reference monitor

Page 90: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 90

Formal Models of Secure Systems

(a) An authorized state

(b) An unauthorized state

Page 91: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 91

Multilevel Security (1)

The Bell-La Padula multilevel security model

Page 92: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 92

Multilevel Security (2)

The Biba Model

• Principles to guarantee integrity of data

1. Simple integrity principle• process can write only objects at its security level or lower

2. The integrity * property• process can read only objects at its security level or higher

Page 93: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 93

Orange Book Security (1)

• Symbol X means new requirements

• Symbol -> requirements from next lower category apply here also

Page 94: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 94

Orange Book Security (2)

Page 95: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 95

Covert Channels (1)

Client, server and collaborator processes

Encapsulated server can still leak to collaborator via

covert channels

Page 96: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 96

Covert Channels (2)

A covert channel using file locking

Page 97: May 15th, 20021 505 review – distributed systems and security (slides mostly from Tanenbaum) Jonathan M. Smith University of Pennsylvania posse

May 15th, 2002 97

Covert Channels (3)

• Pictures appear the same

• Picture on right has text of 5 Shakespeare plays– encrypted, inserted into low order bits of color values

ZebrasHamlet, Macbeth, Julius CaesarMerchant of Venice, King Lear