language-based security: information flow control

28
Language-based Security: Information Flow Control 18739A: Foundations of Security and Privacy Anupam Datta Fall 2009

Upload: mika

Post on 25-Feb-2016

41 views

Category:

Documents


2 download

DESCRIPTION

18739A: Foundations of Security and Privacy. Language-based Security: Information Flow Control. Anupam Datta Fall 2009. Lecture Outline. Information Flow Control (IFC) Security definition Non-interference [Goguen-Meseguer82] Language-based enforcement - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Language-based Security:  Information Flow Control

Language-based Security: Information Flow Control

18739A: Foundations of Security and Privacy

Anupam DattaFall 2009

Page 2: Language-based Security:  Information Flow Control

Lecture Outline

Information Flow Control (IFC)

Security definition Non-interference [Goguen-Meseguer82]

Language-based enforcement Type system [Volpano-Smith-Irvine96] based on

prior work [Denning-Denning77]

Page 3: Language-based Security:  Information Flow Control

IFC in Tax Preparation Software

Page 4: Language-based Security:  Information Flow Control

Definition of Security Non-interference (idea)

Program

HI

LI

HO

LO

HI’ HO’

No information flows from high inputs to low outputs

Security levels:H: ClassifiedL: Unclassified

Page 5: Language-based Security:  Information Flow Control

Exampleif x = 1 then y:=1 else y:=0

NoLHYesHL

YesLL

YesHHNIyx

Page 6: Language-based Security:  Information Flow Control

Specification and Enforcement

Approach Use a typed programming language Types represent security levels

H, L,… Sub-typing captures partial order among

security levels L H

Type system captures allowed information flows Soundness theorem

Well-typed programs satisfy non-interference

Page 7: Language-based Security:  Information Flow Control

Language Definition Syntax Type System Operational Semantics

Soundness Theorem Well typed programs satisfy non-interference

Page 8: Language-based Security:  Information Flow Control

Syntax (I)

Page 9: Language-based Security:  Information Flow Control

Syntax (II)

We will focus on the special case where type is either H or L and L H

Page 10: Language-based Security:  Information Flow Control

Type System (I) Typing judgment

Page 11: Language-based Security:  Information Flow Control

Type system (II)

Page 12: Language-based Security:  Information Flow Control

Type System (III)

Page 13: Language-based Security:  Information Flow Control

Exampleif x = 1 then y:=1 else y:=0

NoLHYesHL

YesLL

YesHHNIyx

Will justify rows 1 & 2

Page 14: Language-based Security:  Information Flow Control

Example with types

Key rules used are (ASSIGN) and (IF)

Page 15: Language-based Security:  Information Flow Control

Type System (IV)

Page 16: Language-based Security:  Information Flow Control

Exampleif x = 1 then y:=1 else y:=0

NoLHYesHL

YesLL

YesHHNIyx

Will justify rows 3 & 4

Page 17: Language-based Security:  Information Flow Control

Example with types Suppose x: L var and y: H var

1. Use (ASSIGN), (CMD-), (SUBTYPE) to infer (y:=1): L cmd and (y:=0): L cmd

2. Now use (IF) rule

x: H var and y: L var is not well-typed as expected

L H

Page 18: Language-based Security:  Information Flow Control

Operational Semantics (I) is memory: a function from locations to values (l) is contents of location l Judgments

1. Evaluating expression e in memory yields value n

2. Evaluating command c in memory yields memory ’

Program executes by evaluating expressions and commands

Page 19: Language-based Security:  Information Flow Control

Operational Semantics (II)

Page 20: Language-based Security:  Information Flow Control

Operational Semantics (III)

Page 21: Language-based Security:  Information Flow Control

Soundness Theorem

Page 22: Language-based Security:  Information Flow Control

Recall Non-interference

Program

HI

LI

HO

LO

HI’ HO’

No information flows from high inputs to low outputs

Security levels:H: ClassifiedL: Unclassified

Page 23: Language-based Security:  Information Flow Control

Practical Languages for IFC Jif [Liskov-Myers et al.]

Java + information flow http://www.cs.cornell.edu/jif/

Flow Caml [Pottier-Simonet] Extends OCaml language with type system for

tracing information flow http://

citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.11.2104

Page 24: Language-based Security:  Information Flow Control

Web Security: A Domain for IFC

Brendan Eich, Chief Technology Officer, Mozilla Corp.Improving JavaScript's Default Security Model with Information Flow, CSF 2009 Invited talk

Page 25: Language-based Security:  Information Flow Control

Thanks

Questions?

Page 26: Language-based Security:  Information Flow Control

Formal definition

•System is deterministic finite state machine: takes input and transitions to next state producing output•Trace tr is a sequence of inputs and outputs (high & low)•OutputL(S,tr,c): low output of system S when input c is applied to the state corresponding to trace tr•purgeHI(tr): returns a trace with all high inputs in tr removed

Page 27: Language-based Security:  Information Flow Control

Programming Language Definition Syntax and Static Semantics (or “well-formed

programs”) Syntax of types and terms Type system

Semantics (or “meaning of programs”) Operational or dynamic semantics (Defines how programs execute)

Type Safety Well-typed programs do not get stuck, i.e., they

either terminate or keep reducing following the operational semantics

Page 28: Language-based Security:  Information Flow Control

Language Definition Examples Syntax, Semantics (Static, Dynamic) ML:

R. Milner, M. Tofte, R. Harper, and D. MacQueen, The Definition of Standard ML (Revised). MIT Press, 1997

Java: J. Alves-Foss (Ed.), Formal Syntax and Semantics

of Java. LNCS 1523, 1999