A URA: A language with authorization and audit Steve Zdancewic University of Pennsylvania HCSS 2008.

Slides:



Advertisements
Similar presentations
Sml2java a source to source translator Justin Koser, Haakon Larsen, Jeffrey Vaughan PLI 2003 DP-COOL.
Advertisements

Operating Systems Components of OS
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Wei Lu 1, Kate Keahey 2, Tim Freeman 2, Frank Siebenlist 2 1 Indiana University, 2 Argonne National Lab
Secure Naming structure and p2p application interaction IETF - PPSP WG July 2010 Christian Dannewitz, Teemu Rautio and Ove Strandberg.
The Role of Trust Management in Distributed Systems Authors Matt Blaze, John Feigenbaum, John Ioannidis, Angelos D. Keromytis Presented By Akshay Gupte.
Challenges for Information-flow Security* Steve Zdancewic University of Pennsylvania * This talk is an attempt to be provocative and controversial.
Semantics Static semantics Dynamic semantics attribute grammars
A Unified Approach to Trust, Delegation, and Authorization Blair Dillaway, Greg Fee Microsoft Corporation Presented at GGF18 Copyright © 2006, Microsoft.
Building Secure Distributed Systems The CIF model : Component Information Flow Lilia Sfaxi DCS Days - 26/03/2009.
Untrusted Hosts and Confidentiality: Secure Program Partitioning Steve Zdancewic Lantian Zheng Nathaniel Nystrom Andrew Myers Cornell University.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
REFEREE: Trust Management for Web Applications Yang-hua Chu (MIT/W3C) Joint Work with Joan Feigenbaum (AT&T Labs) Brian LaMacchia (AT&T Labs) Paul Resnick.
CMSC 414 Computer (and Network) Security Lecture 13 Jonathan Katz.
Lakshmi Narayana Gupta Kollepara 10/26/2009 CSC-8320.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Ashish Kundu CS590F Purdue 02/12/07 Language-Based Information Flow Security Andrei Sabelfield, Andrew C. Myers Presentation: Ashish Kundu
An Introduction to Proof-Carrying Code David Walker Princeton University (slides kindly donated by George Necula; modified by David Walker)
Programming Trustworthy Provenance Andy Cirillo Radha Jagadeesan Corin Pitcher James Riely School of CTI, DePaul University, Chicago Workshop on Principles.
CSE331: Introduction to Networks and Security Lecture 28 Fall 2002.
Information Flow, Security and Programming Languages Steve Steve Zdancewic.
Steve Zdancewic ESOP011 Secure Information Flow and CPS Steve Zdancewic Joint work with Andrew Myers Cornell University.
1 Enforcing Confidentiality in Low-level Programs Andrew Myers Cornell University.
Programmability with Proof-Carrying Code George C. Necula University of California Berkeley Peter Lee Carnegie Mellon University.
Polyglot: An Extensible Compiler Framework for Java Nathaniel Nystrom, Michael R. Clarkson, and Andrew C. Myers Presentation by Aaron Kimball & Ben Lerner.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
Robust Declassification Steve Zdancewic Andrew Myers Cornell University.
A Type System for Expressive Security Policies David Walker Cornell University.
1 Modeling and Analysis of Networked Secure Systems with Application to Trusted Computing Jason Franklin Joint work with Deepak Garg, Dilsun Kaynar, and.
1 CSE 380 Computer Operating Systems Instructor: Insup Lee and Dianna Xu University of Pennsylvania Fall 2003 Lecture Note: Protection Mechanisms.
Describing Syntax and Semantics
Type-Based Distributed Access Control Tom Chothia, Dominic Duggan, and Jan Vitek Presented by Morgan Kleene.
Automatic Implementation of provable cryptography for confidentiality and integrity Presented by Tamara Rezk – INDES project - INRIA Joint work with: Cédric.
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
The Impact of Programming Language Theory on Computer Security Drew Dean Computer Science Laboratory SRI International.
1 22 August 2001 The Security Architecture of the M&M Mobile Agent Framework P. Marques, N. Santos, L. Silva, J. Silva CISUC, University of Coimbra, Portugal.
Containment and Integrity for Mobile Code Security policies as types Andrew Myers Fred Schneider Department of Computer Science Cornell University.
Java Security Pingping Ma Nov 2 nd, Overview Platform Security Cryptography Authentication and Access Control Public Key Infrastructure (PKI)
Proof-Carrying Code & Proof-Carrying Authentication Stuart Pickard CSCI 297 June 2, 2005.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Containment and Integrity for Mobile Code End-to-end security, untrusted hosts Andrew Myers Fred Schneider Department of Computer Science Cornell University.
SECURE WEB APPLICATIONS VIA AUTOMATIC PARTITIONING S. Chong, J. Liu, A. C. Myers, X. Qi, K. Vikram, L. Zheng, X. Zheng Cornell University.
Android Security Model that Provide a Base Operating System Presented: Hayder Abdulhameed.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
The TAOS Authentication System: Reasoning Formally About Security Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Semantics In Text: Chapter 3.
Non-interference in Constructive Authorization Logic Deepak Garg and Frank Pfenning Carnegie Mellon University.
12/9/20151 Programming Languages and Compilers (CS 421) Elsa L Gunter 2112 SC, UIUC Based in part on slides by Mattox.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
SAFE KERNEL EXTENSIONS WITHOUT RUN-TIME CHECKING George C. Necula Peter Lee Carnegie Mellon U.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Decentralized Information Flow A paper by Myers/Liskov.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Getting Started in PL Design Research Stephanie Weirich University of Pennsylvania.
Csci5233 Computer Security1 Bishop: Chapter 14 Representing Identity.
LINUX Presented By Parvathy Subramanian. April 23, 2008LINUX, By Parvathy Subramanian2 Agenda ► Introduction ► Standard design for security systems ►
ALLOY: A Formal Methods Tool Glenn Gordon Indiana University of Pennsylvania COSC 481- Formal Methods Dr. W. Oblitey 26 April 2005.
Decentralized Access Control: Overview Deepak Garg Foundations of Security and Privacy Fall 2009.
A Proof-Carrying File System Deepak Garg and Frank Pfenning (Carnegie Mellon University) IEEE Symposium on Security and Privacy May 18, 2010.
TAG Presentation 18th May 2004 Paul Butler
Decentralized Access Control: Policy Languages and Logics
Programming Languages and Compilers (CS 421)
Understanding Android Security
TAG Presentation 18th May 2004 Paul Butler
State your reasons or how to keep proofs while optimizing code
Modern Systems: Security
PLANNING A SECURE BASELINE INSTALLATION
Access Control What’s New?
Presentation transcript:

A URA: A language with authorization and audit Steve Zdancewic University of Pennsylvania HCSS 2008

2 Security-oriented Languages Manifest Security Project (NSF ) –Penn: Benjamin Pierce, Stephanie Weirich –CMU: Karl Crary, Bob Harper, Frank Pfenning CAREER: Language-based Distributed System Security (NSF ) Limin Jia, Karl Mazurak, Jeff Vaughan, Jianzhou Zhao Joey Schorr and Luke Zarko

3 host applications data Networked Information System Security Networked hosts Many applications running Data resides at the hosts but can be shared over the network

4 host applications data Information-flow Constraints Some data is confidential Heterogeneous trust: –Not all hosts are trusted to the same degree –Different principals might have different opinions about trust

5 Challenges Policies are complex to specify and difficult to enforce –Many entities: hosts, programs, users, etc. –Software is large and complex –Heterogeneous trust implies decentralization of policies Existing mechanisms are necessary… –Cryptography –Network protocols –OS / Firewalls, etc. level isolation …but not sufficient –Must decrypt data to process it –Hard to regulate information flows through software –OS / Firewall access control and auditing is at the wrong level of abstraction

6 Security-oriented Languages Use static analysis (e.g. type systems) and dynamic checks to enforce security properties at the language level. My own research [Zdancewic et al.] –Jif, secure-program partitioning, robust declassification, … Authorization Logics & Proof Carrying Authorization: –ABLP 1993 [Abadi, Burrows, Lampson, Plotkin] –DCC [Abadi], linearity & time [Garg & Pfenning] –Trust Management [Blaze et al.] Information flow: –Jif [Myers, et al.], FlowCaml [Simonet, et al.], … Much work in the last decade: ESC/Java, Spec# [Leino, et al.] Type Qualifiers [Foster, et al.] PoET/PSLang [Erlingson & Schneider] TAL, Cyclone [Morrisett, et al.] PCC, Ccured[Necula, et al.] xg++, metal [Engler, et al.], Fable [Hicks…]

7 Goal of the A URA project: Develop a security-oriented programming language that supports: –Proof-carrying Authorization [Appel & Felton] [Bauer et al.] –Strong information-flow properties (as in Jif [Myers et al.], FlowCaml [Pottier & Simonet] ) Why? –Declarative policies (for access control & information flow) –Auditing & logging: proofs of authorization are informative –Good theoretical foundations In this talk: A high-level tour of A URA 's design –Focus on the authorization and audit components

8 Outline A URA 's programming model Authorization logic –Examples Programming in A URA –Dependent types Status, future directions, conclusions

9 A URA : Programming Model A URA is a type-safe functional programming language As in Java, C#, etc. A URA provides an interface to the OS resources –disk, network, memory, … A URA is intended to be used for writing security-critical components system interface application A URA runtime system code I/O

10 A URA : Authorization Policies A URA security policies are expressed in an authorization logic Applications can define their own policies Language provides features for creating/manipulating proofs system interface application A URA runtime system code policy proof I/O

11 A URA : Authorization Policies Proofs are first class and they can depend on data Proof objects are capabilities needed to access resources protected by the runtime: A URA 's type system ensures compliance The runtime logs the proofs for later audit system interface application A URA runtime system code policy proof data I/O log

12 A URA : Principals and Keys For distributed systems, A URA also manages private keys Keys can create policy assertions sharable over the network Connected to the policy by A URA 's notion of principal system interface application A URA runtime system log code policy proof data I/O A B AB

13 Evidence-based Audit Connecting the contents of log entries to policy helps determine what to log. log policy code

14 Evidence-based Audit Connecting the contents of log entries to policy helps determine what to log. Proofs contain structure that can help administrators find flaws or misconfigurations in the policy. log policy code

15 Evidence-based Audit Connecting the contents of log entries to policy helps determine what to log. Proofs contain structure that can help administrators find flaws or misconfigurations in the policy. Reduced TCB: Typed interface forces code to provide auditable evidence. log policy code

16 Outline A URA 's programming model Authorization logic –Examples Programming in A URA –Dependent types Status, future directions, conclusions

17 A URA 's Authorization Logic Policy propositions  ::=true c A says            .  Principals A,B,C … P,Q,R etc. Constructive logic: –proofs are programs –easy integration with software Access control in a Core Calculus of Dependency [Abadi: ICFP 2006]

18 Example: File system authorization P1: FS says (Owns A f1) P2: FS says (Owns B f2) … OwnerControlsRead: FS says  o,r,f.(Owns o f)  (o says (MayRead r f))  (MayRead r f) Might need to prove: FS says (MayRead A f1) What are "Owns" and "f1"?

19 Decentralized Authorization Authorization policies require application-specific constants: –e.g. "MayRead B f" or "Owns A f" –There is no "proof evidence" associated with these constants –Otherwise, it would be easy to forge authorization proofs But, principal A should be able to create a proof of A says (MayRead B f) –No justification required -- this is a matter of policy, not fact! Decentralized implementation: –One proof that "A says T" is A's digital signature on a string "T" –written sign(A, "T")

20 Example Proof (1) P1: FS says (Owns A f1) OwnerControlsRead: FS says  o,r,f.(Owns o f)  (o says (MayRead r f))  (MayRead r f) Direct authorization via FS's signature: sign(FS, "MayRead A f1") : FS says (MayRead A f1)

21 Example Proof (2) P1: FS says (Owns A f1) OwnerControlsRead: FS says  o,r,f.(Owns o f)  (o says (MayRead r f))  (MayRead r f) Complex proof constructed using "bind" and "return" bind p = OwnerControlsRead in bind q = P1 in return FS (p A A f1 q sign(A,"MayRead A f1"))) : FS says (MayRead A f1)

22 Authority in A URA How to create the value sign(A, "  ") ? Components of the software have authority –Authority modeled as possession of a private key –With A's authority : say("  ") evaluates to sign(A, "  ") What  's should a program be able to say? –From a statically predetermined set (static auditing) –From a set determined at load time In any case: log which assertions are made

23 Example Theorems T  P says T "Principals assert all true statements" (P says T)  (P says (T  U))  (P says U) "Principals' assertions are closed under deduction" Define "P speaks-for Q" = . (P says  )  (Q says  ) (Q says (P speaks-for Q))  (P speaks-for Q) "Q can delegate its authority to P" (The "hand off" axiom)

24 Example Non-theorems It is not possible to prove false: False  .  "The logic is consistent" Without sign, it's not possible to prove: P says False "Principals are consistent" It is not possible to prove: .(A says  )   "Just because A says it doesn't mean it's true" If  (Q = P) then there is no T such that: (Q says T)  P says False "Nothing Q can say can cause P to be inconsistent"

25 Outline A URA 's programming model Authorization logic –Examples Programming in A URA –Dependent types Status, future directions, conclusions

26 Propositions: specify policy  A says  (    ) .T (Owns A fh1) Evidence: proofs/credentials sign(A, "  ") bind  P A URA Programming Language Types: describe programs int FileHandle stringPrin int -> int Programs: computations, I/O 3fh1 "hello"A say(  ) ProgramsPolicies Static Dynamic

27 Dependent Types Policy propositions can mention program data –E.g. "f1" is a file handle that can appear in a policy –A URA restricts dependency to first order data types –Disallows computation at the type level Programming with dependent types: {x:T; U(x)} dependent pair (x:T)  U(x) dependent functions Invariant: sign only types –Computation can't depend on signatures –But, can use predicates: {x:int; A says Good(x)}

28 Auditing Interfaces Type of the "native" read operation: raw_read : FileHandle  String A URA 's runtime exposes it this way: read : (f:FileHandle)  RT says (OkToRead self f)  {ans:String; RT says (DidRead f ans)} RT is a principal that represents the A URA runtime OKtoRead and DidRead are "generic" policies –The application implements its own policies about when it is OKtoRead

29 Example File Server Program (* assertions to do with FS access-control policy *) assert Owns : Prin -> FileHandle -> Prop; assert MayRead : Prin -> FileHandle -> Prop; (* RT's delegation to FS *) let del = say((f:FileHandle) -> (p:Prin) -> FS says (MayRead p f) -> OkToRead FS f) (* FS code to handle a request *) let handle (r:Request) = match r with { | readRequest q o f (x:o says MayRead q f) -> match getOwner f with { | Just {o':Owner; ownFS:FS says Own o' f} -> if o = o' then let FSproof = bind a = OwnerControlsRead in bind b = ownFS in return FS (a o q f b x))) in let cap : OkToRead FS f = del f q FSproof Just (read f cap) else … | Nothing -> … | … Create application specific propositions Interface with A URA 's generic policy Dynamically testing values refines proof types. Construct a proof object Call the A URA runtime.

30 Outline A URA 's programming model Authorization logic –Examples Programming in A URA –Dependent types Status, future directions, conclusions

31 A URA 's Status A URA 's core calculus: –Rich type system that supports dependent authorization policies, recursive types, etc., suitable for compiler intermediate language –Type system is specified using the Coq proof assistant –Correctness properties proved in Coq: Type soundness proof is (nearly) complete (~7000 loc) Have implemented an interpreter in F# –Many small examples programs –Working on larger examples –Goal: experience with proof sizes, logging infrastructure Planning to compile A URA to Microsoft.NET platform –Proof representation / compatibility with C# and other.NET languages

32 Open Questions This story seems just fine for integrity, but what about confidentiality? –We have many ideas about connecting to information-flow analysis –Is there an "encryption" analog to "signatures" interpretation? Other future directions: –Revocation/expiration of signed objects? –(Dependent) Type inference? Proof inference? –Connection to program verification? –Correlate distributed logs?

33 Security-oriented Languages A URA A language with support for authorization and audit Authorization logic Dependent types Language features that support secure systems

34 Thanks!

35 Auditing programs What does the program do with the proofs? More Logging! –They record justifications of why certain operations were permitted. When do you do the logging? –Answer: As close to the use of the privileges as possible. –Easy for built-in security-relevant operations like file I/O. –Also provide a "log" operation for programmers to use explicitly. Question: what theorem do you prove? –Correspondence between security-relevant operations and log entries. –Log entries should explain the observed behavior of the program. Speculation: A theory of auditing?

36 Background: Authorization Enforcing authorization policies in distributed systems is difficult –Policies can become complex –Software that enforces the policies can be complex Authorization Logics: –Abadi, Burrows, Lampson, Plotkin "ABLP" [TOPLAS 1993] somewhat ad hoc w.r.t. delegation and negation –Garg & Pfenning [CSFW 2006, ESORICS 2006] a constructive modal logic that's very close to monomorphic DCC –Becker,Gordon, Fournet [CSFW 2007] Trust Management / KeyNote –Blaze et al. [Oakland 1996…]

37 Dependency Core Calculus (DCC) A Core Calculus of Dependency [Abadi, Banerjee, Heintz, Riecke: POPL 1999] –Type system with lattice of "labels" T L –Key property: noninterference –Showed how to encode many dependency analyses: information flow, binding time analysis, slicing, etc. Access control in a Core Calculus of Dependency [Abadi: ICFP 2006] –Essentially the same type system is an authorization logic –Instead of T L read the type as "L says T" –Curry-Howard isomorphism "programs are proofs"

38 Example A URA Program assert Owns : Prin -> FileHandle -> Prop data OwnerInfo : FileHandle -> Type { | oinfo :(f:FileHandle) -> (p:prin) -> (pf (FS says (Owns p f))) -> OwnerInfo f } getOwner : (f:FileHandle) -> Maybe (OwnerInfo f)

39 More examples assert OkToRead : FileHandle -> Prop assert HasContents: FileHandle -> String -> Prop data FileData : FileHandle -> Type { | fd : (f:FileData) -> (d:String) -> (pf (FS says (HasContents f d))) -> FileData } read : (f:FileHandle) -> (pf (FS says (OkToRead f)) -> (FileData f)

40 Existing mechanisms are necessary Cryptographic protocols provide authentication Encryption protects data on the network OS / Firewalls provide coarse-grained isolation and protection

41 …but not sufficient Data must be decrypted during computation Encryption must be used consistently with the policy Regulating information-flow through software is hard Auditing is at the wrong level of abstraction (Firewall, OS) Policy is usually expressed at the application level