Information Flow, Security and Programming Languages Steve Steve Zdancewic.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

8/11/2006PCC Toward More Typed Assembly Languages for Confidentiality Dachuan Yu DoCoMo USA Labs.
Substitution & Evaluation Order cos 441 David Walker.
ICFP Principals in Programming Languages: A Syntactic Proof Technique Steve Zdancewic Dan Grossman and Greg Morrisett Cornell University.
Security of Multithreaded Programs by Compilation Tamara Rezk INDES Project, INRIA Sophia Antipolis Mediterranee Joint work with Gilles Barthe, Alejandro.
PROOF BY CONTRADICTION
SECURITY AND VERIFICATION Lecture 4: Cryptography proofs in context Tamara Rezk INDES TEAM, INRIA January 24 th, 2012.
Current Techniques in Language-based Security David Walker COS 597B With slides stolen from: Steve Zdancewic University of Pennsylvania.
Towards Static Flow-based Declassification for Legacy and Untrusted Programs Bruno P. S. Rocha Sruthi Bandhakavi Jerry den Hartog William H. Winsborough.
Non Interference, Open Systems, Information flows quantification Loïc HélouëtINRIA Rennes.
1 How to transform an analyzer into a verifier. 2 OUTLINE OF THE LECTURE a verification technique which combines abstract interpretation and Park’s fixpoint.
A URA: A language with authorization and audit Steve Zdancewic University of Pennsylvania HCSS 2008.
Current Techniques in Language-based Security David Walker COS 597B With slides stolen from: Steve Zdancewic University of Pennsylvania.
Time Bounds for General Function Pointers Robert Dockins and Aquinas Hobor (Princeton University) (NUS) TexPoint fonts used in EMF. Read the TexPoint manual.
Ashish Kundu CS590F Purdue 02/12/07 Language-Based Information Flow Security Andrei Sabelfield, Andrew C. Myers Presentation: Ashish Kundu
Fall Semantics Juan Carlos Guzmán CS 3123 Programming Languages Concepts Southern Polytechnic State University.
Programming Language Semantics Denotational Semantics Chapter 5 Based on a lecture by Martin Abadi.
ESC Java. Static Analysis Spectrum Power Cost Type checking Data-flow analysis Model checking Program verification AutomatedManual ESC.
7. Fixed Points. © O. Nierstrasz PS — Fixed Points 7.2 Roadmap  Representing Numbers  Recursion and the Fixed-Point Combinator  The typed lambda calculus.
Steve Zdancewic ESOP011 Secure Information Flow and CPS Steve Zdancewic Joint work with Andrew Myers Cornell University.
Programming Language Semantics Denotational Semantics Chapter 5 Part II.
Twelf: The Quintessential Proof Assistant for Language Metatheory Karl Crary Carnegie Mellon University Joint work with Robert Harper and Michael Ashley-Rollman.
1 Enforcing Confidentiality in Low-level Programs Andrew Myers Cornell University.
6/18/2015 4:21 AM Information Flow James Hook CS 591: Introduction to Computer Security.
Verifiable Security Goals
Decentralized Robustness Stephen Chong Andrew C. Myers Cornell University CSFW 19 July 6 th 2006.
Strict Bidirectional Type Checking Adam Chlipala, Leaf Petersen, and Robert Harper.
6/20/ :09 PM Information Flow James Hook CS 591: Introduction to Computer Security.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Polyglot: An Extensible Compiler Framework for Java Nathaniel Nystrom, Michael R. Clarkson, and Andrew C. Myers Presentation by Aaron Kimball & Ben Lerner.
Robust Declassification Steve Zdancewic Andrew Myers Cornell University.
7. Fixed Points. © O. Nierstrasz PS — Fixed Points 7.2 Roadmap Overview  Representing Numbers  Recursion and the Fixed-Point Combinator  The typed.
ESC Java. Static Analysis Spectrum Power Cost Type checking Data-flow analysis Model checking Program verification AutomatedManual ESC.
Harmless Advice Daniel S Dantas Princeton University with Prof. David Walker.
7. Fixed Points. © O. Nierstrasz PS — Fixed Points 7.2 Roadmap  Representing Numbers  Recursion and the Fixed-Point Combinator  The typed lambda calculus.
CS 711 Fall 2002 Programming Languages Seminar Andrew Myers 2. Noninterference 4 Sept 2002.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Programming Language Semantics Denotational Semantics Chapter 5 Part III Based on a lecture by Martin Abadi.
Cormac Flanagan University of California, Santa Cruz Hybrid Type Checking.
Automatic Implementation of provable cryptography for confidentiality and integrity Presented by Tamara Rezk – INDES project - INRIA Joint work with: Cédric.
Information Theory and Security Prakash Panangaden McGill University First Canada-France Workshop on Foundations and Practice of Security Montréal 2008.
The Impact of Programming Language Theory on Computer Security Drew Dean Computer Science Laboratory SRI International.
Language-Based Information-Flow Security Richard Mancusi CSCI 297.
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 2: Operational Semantics I Roman Manevich Ben-Gurion University.
Containment and Integrity for Mobile Code Security policies as types Andrew Myers Fred Schneider Department of Computer Science Cornell University.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Language-Based Information- Flow Security Andrei Sabelfeld.
Typed Lambda Calculus Chapter 9 Benjamin Pierce Types and Programming Languages.
Proof-Carrying Code & Proof-Carrying Authentication Stuart Pickard CSCI 297 June 2, 2005.
Containment and Integrity for Mobile Code End-to-end security, untrusted hosts Andrew Myers Fred Schneider Department of Computer Science Cornell University.
Type Safety Kangwon National University 임현승 Programming Languages.
Checking Reachability using Matching Logic Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CSE 230 The -Calculus. Background Developed in 1930’s by Alonzo Church Studied in logic and computer science Test bed for procedural and functional PLs.
Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Course 2D1453, Some material from B. Pierce: TAPL + some from.
CMSC 330: Organization of Programming Languages Operational Semantics a.k.a. “WTF is Project 4, Part 3?”
SAFE KERNEL EXTENSIONS WITHOUT RUN-TIME CHECKING George C. Necula Peter Lee Carnegie Mellon U.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
CMSC 330: Organization of Programming Languages Operational Semantics.
Language-Based Information- Flow Security (Sabelfeld and Myers) “Practical methods for controlling information flow have eluded researchers for some time.”
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style JFlow: Practical Mostly-Static Information Flow Control.
1 Interactive Computer Theorem Proving CS294-9 October 19, 2006 Adam Chlipala UC Berkeley Lecture 9: Beyond Primitive Recursion.
Verifiable Security Goals
Paper Reading Group:. Language-Based Information-Flow Security. A
Information Security CS 526
Language-based Security
Information Security CS 526
Information Security CS 526
More Undecidable Problems
Presentation transcript:

Information Flow, Security and Programming Languages Steve Steve Zdancewic

What is Security? Resources? Protection? Trust & Integrity? Policy? Principals? Threats?

Information Flow Resource = Data Protection = Access Control Threat = Malicious Programs –"leak" private information Policy? Principals? Trust?

Why Do We Want It? Untrusted code –Applets/Plugins/Extensible Systems E-Commerce & Privacy Shared Resources –Files on a network –Access Control (i.e. Unix permissions) not enough

Outline Lattice-model –Non-interference SLam –Modeling Dependency –Extensions JFlow & Other Approaches Conclusions

Principals & Privileges Associate security levels with data –Specifies who can "see" the data What happens when data is merged? x = a +b

The Lattice Model Elements represent levels of privilege    ' is ordering      ' is join Bell & LaPadula '75 Denning'75,'76,'77 L H 1111 2222 3333 4444 5555 6666

Non-Interference Low security data can't depend on high security data. No information flows from high security values to low security ones.

Explicit vs. Implicit low  hi if hi then low  true else low  false

SLam Heintze & Riecke POPL '98 Lambda Calculus Security annotations on types Well-typed programs have non- interference property –Proof uses logical relations

Types  b   Security Lattice 

Subtyping   '  '  b  b  '             '             '

SLam Expressions bv  #t | #f | ( x: . e) v  bv  e  x | v | (e e) | (prot  e) | (if e then e else e)

Typing Rules    #t  : (b,  )   ( x:  . e)  : (     ,  )  x:     e :  

Typing Rules II   (e  e  ) :       e  : (     ,  )   e  :    '     '   

Typing Rules III   if e then e  else e  :       e : (b,  )   e i :    e :           e :  

Typing Rules IV   e :    prot  e :  

Example  if #t H then #t L else #f L : (b, L)  H  #t H : (b, H)  #t L : (b, L) (b, L)  H  (b, L  H)  (b, H)  #f L : (b, L)

Operational Semantics (( x:  . e)  e ' )  prot  e[e ' /x] (if #t  then e  else e  )  prot  e  prot  bv  '  bv    '

Proving Non-interference? Suppose lattice is L  H Functions of the type:  b H   b L  b L  L “look” like  b  b

Modeling “Views” Give a denotational semantics for Slam Instead of just CPO’s, also include binary relations to capture the “view” Functions must preserve the “view”

Binary Relations as Views Concrete View C #t#f #t 1 0 #f 0 1 Abstract View A #t#f #t 1 1 #f 1 1 If  x,y  R then x and y "look the same".

Semantics of Types  (b,  )   #t  #f   (     ,  )         p      R  "view of  at level  " R        

View Relations Abstract View:  '   '    R         Concrete View (bool):  '    R  b  '  C

View Relations II Concrete view (functions)  '    R((     ,  '   f,g  x,y  R     f  x ,g  y  R     ' 

Adequacy Theorem (Plotkin): If   e :  then    e :    is defined iff e  *v.

Related Environments  x     x     x n  n                 n  Theorem: Suppose   e :  and  '      are related environments at , then      e :        e :    '  R(  )

Contexts & Equivalence C[ ] is a context (expression with hole) Write e  e ' if whenever e  *v and e '  *v ' it is the case that v  v ' C[e]  C[e ' ]

Non-interference Theorem: Suppose    e , e  :  and    C[e  ] :  b  '  where    ' then C[e  ]  C[e  ]. let 

Proof I Consider open term: y:    C[y] :  b  '  d i      e i :    Lemma: Since    ' (d 1, d 2 )  R(  ') Proof: R(  ') is abstract.

Proof II f i   y:    C[y] :  b  '    d i By Related Environments theorem, we have:  f 1, f 2  R  b  '  ')  C Thus, f 1 = f 2, easy to show that f i      v :  b  '    since v  v,we're done.

Recursion Need to show that R 's are "directed complete" Need to finesse termination issues in contexts – y:unit    C[y ()] :  b  '  CBN vs. CBV –Strong vs. Weak non-interference

Extending SLam Products, Sums, Recursive Types (Pitts '96) State –“No read up, no write down” –Globally track dependency Integrity –The more people who touch data, the less trustworthy it is.

Core Calculus of Dependency Abadi, Banerjee, Heintze, Riecke (POPL '99) Use type constructors T  Can translate SLam, Binding- time calculi, Smith&Volpano's calculi, etc., into DCC.

Recap SLam provides language based information-flow protection Non-interference proved by logical relations...but you wouldn't want to program in it.

JFlow Myers (POPL ‘99) Emphasis on usable language –Java extension Decentralized label model –Very large, fine grained lattice Security level polymorphism First class labels, principals

Threads & Concurrency Smith & Volpano (POPL '98) –Simple, imperative language with threads –Can't loop on high-variables –Assumes non-deterministic thread scheduling –Clock is high-security –Subject to Probabilistic attacks

Non-Interference? Too strong: –No encryption –No password lookup Need declassification –Everything ends up at H Hard to define in concurrent setting

Alternatives? What you really care about is leakage of "useful" information?...or... What you care about is the rate of leakage of information?

Problems Compilation in information- flow setting: –Compiler should preserve flow properties –CPS translation/code-motion not valid: –f (if x then y else z)  (if x then f(y) else f(z))

Covert Channels Threads/Concurrency Timing attacks Probabilistic attacks "Semantic" channels - i.e. order of initialization, aliasing and more...

Conclusions (Security) Information flow is a useful tool for security. Non-interference is a strong policy (too strong?) Programming language technology can help Lots left to be done...

Conclusions (PL) Non-interference expressed in terms of dependency –Polymorphism, Binding Time Analysis, Slicing Denotational techniques useful Still lots to be done...