History-based Access Control with Local Policies



Similar documents
Secure Web Service Using Call by Contract

Fabio Massacci Ida Siahaan

Deterministic Discrete Modeling

Chapter 7: Functional Programming Languages

Dynamic Process/Service Composition/Combination

Intrusion Detection via Static Analysis

The Model Checker SPIN

Algorithmic Software Verification

Software Model Checking: Theory and Practice

Cofred Automated Payments Interface (API) Guide

How Program Monitors Enforce Non-Safety

FF/EDM Intro Industry Goals/ Purpose Related GISB Standards (Common Codes, IETF) Definitions d 4 d 13 Principles p 6 p 13 p 14 Standards s 16 s 25

WA2102 Web Application Programming with Java EE 6 - WebSphere RAD 8.5. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

Software Engineering using Formal Methods

RE-TRUST Design Alternatives on JVM

Linear Types for Continuations

Programming Language Pragmatics

Trust but Verify: Authorization for Web Services. The University of Vermont

Securing the Bring Your Own Device Policy

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Webmail Using the Hush Encryption Engine

Today s Agenda. Automata and Logic. Quiz 4 Temporal Logic. Introduction Buchi Automata Linear Time Logic Summary

Agenda. SQL Injection Impact in the Real World Attack Scenario (1) CHAPTER 8 SQL Injection

Monitoring Networks through Multiparty Session Types

Specification and Analysis of Contracts Lecture 1 Introduction

Virtual Data Centre. User Guide

Semantics and Verification of Software

Security Vulnerability Notice

OHIO S EAUDIT PROCESSES RON POTTORF, EXECUTIVE ADMINISTRATOR OHIO DEPARTMENT OF TAXATION AUDIT DIVISION

MMLIST Listserv User's Guide for ICORS.ORG

s sent to the FaxFinder fax server must meet the following criteria to be processed for sending as a fax:

Security Test s i t ng Eileen Donlon CMSC 737 Spring 2008

Network Configuration Settings

Participant Guide RP301: Ad Hoc Business Intelligence Reporting

LabVIEW Internet Toolkit User Guide

Oracle Database: SQL and PL/SQL Fundamentals

IP Configuration Manual

Exploring ADSS Server Signing Services

WHITE PAPER NEXSAN TRANSPORTER PRODUCT SECURITY AN IN-DEPTH REVIEW

XGENPLUS SECURITY FEATURES...

Firewall Verification and Redundancy Checking are Equivalent

Introduction to Analyzer and the ARP protocol

Redpaper Axel Buecker Kenny Chow Jenny Wong

How does the Excalibur Technology SPAM & Virus Protection System work?

How to Configure and Test QoS in PANOS 3.0

Testing LTL Formula Translation into Büchi Automata

netkit lab bgp: prefix-filtering Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

Fundamentals of Software Engineering

Livezilla How to Install on Shared Hosting By: Jon Manning

vcloud Director User's Guide

DreamFactory Security Whitepaper Customer Information about Privacy and Security

From Bytecode to Javascript: the Js of ocaml Compiler

Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain

Automatic vs. Manual Code Analysis

Going Above and Beyond

Oracle Database: SQL and PL/SQL Fundamentals NEW

How to configure HTTPS proxying in Zorp 5

Rigorous Software Development CSCI-GA

Access Control Fundamentals

Understanding Precision in Host Based Intrusion Detection

JAVA 2 Network Security

Opening Balances Process for a business that is VAT registered using the standard scheme or is NOT VAT registered

1 An application in BPC: a Web-Server

Unified Static and Runtime Verification of Object-Oriented Software

Oracle Database: SQL and PL/SQL Fundamentals

Secure cloud access system using JAR ABSTRACT:

USER GUIDE MANTRA WEB EXTRACTOR.

Opendiem Training Exercise 1 Opendiem-TRN-0001

IIS, FTP Server and Windows

Secure Authentication and Session. State Management for Web Services

Communication Diagrams

Wakefield Council Secure and file transfer User guide for customers, partners and agencies

Attach receipt options:

Java and Java Virtual Machine Security

Oracle Database: Program with PL/SQL

How To Use Exchange Reporter Plus On A Microsoft Mailbox On A Windows (Windows) On A Server Or Ipa (Windows 7) On An Ubuntu 7.6 (Windows 8) On Your Pc Or

Deploying Secure Internet Connectivity

Identifying Data Integrity in the Cloud Storage

CIS 551 / TCOM 401 Computer and Network Security. Spring 2005 Lecture 4

Runtime Verification for Real-Time Automotive Embedded Software

Revision History Revision Date Changes Initial version published to

Transcription:

Fossacs 05 p.1 History-based Access Control with Local Policies Massimo Bartoletti Pierpaolo Degano Gian-Luigi Ferrari Dipartimento di Informatica, Università di Pisa

Fossacs 05 p.2 Mobile code security victim.org Firewall attacker.com Browser Mail Server Hacker Applet read/write download applet upload applet File Server Web Server

Fossacs 05 p.2 Mobile code security victim.org Firewall attacker.com Browser Sandbox Applet read/write download applet Mail Server Hacker upload applet File Server Web Server

Fossacs 05 p.3 The present: stack inspection run-time privileges = intersection of the static permissions of each method in the call stack unclear which are the actual security goals attained (checks scattered through code) makes little sense in functional languages (requires the call stack made explicit) prevents from inter-procedural program optimizations (inlining, tail-call elimination) no protection after return (untrusted results)

Fossacs 05 p.4 Beyond stack inspection major issue: untrusted results instead of call stacks: the whole history the history is a side effect of programs instead of permissions: (regular) properties of histories instead of local checks: local policies to gain efficiency: static analysis History-based access control with local policies

Fossacs 05 p.5 Why local policies? Problem: securization of code upon receipt an untrusted program e is received I want the execution of e to obey a policy ϕ where to insert the checks in e? one issue: e could invoke unknown code solution: dynamic sandboxing ϕ[e] each execution step of e is subject to ϕ the scope of ϕ is left when e terminates

Fossacs 05 p.6 Overview A calculus for history-based access control: λ [ ] = λ + histories + local policies a history η is a sequence of events α a policy ϕ is a regular property of η a framing ϕ[e] localizes the scope of ϕ in e type & effect system to predict histories Optimizations: static verification via model checking, or instrumentation with local checks

Fossacs 05 p.7 The language λ [ ] (syntax) e, e ::= x α λ z x. e e e if b then e else e ϕ[e] variable access event abstraction application conditional safety framing λ. e = λ z x. e (z, x fv(e)) e; e = (λ. e )e

Fossacs 05 p.8 The language λ [ ] (semantics) η, e 1 η, e 1 η, e 1 e 2 η, e 1 e 2 η, e 2 η, e 2 η, v e 2 η, v e 2 η, (λ z x.e)v η, e{v/x, λ z x.e/z} η, α ηα, η, e η, e η = ϕ η = ϕ η, ϕ[e] η, ϕ[e ] η = ϕ η, ϕ[v] η, v

Fossacs 05 p.9 Programming in λ [ ] (1) R = λ. α r W = λ. α w C = λ. α c file Read/Write, socket Connection Browser = λu. λp. if html(u) then display(u) else if trusted(u) then p u else ϕ[p u; W ] ϕ = no connect after read site policy p = λx. ϕ [x ] user policy (a closure!) η, (λx. ϕ [x ]) λ.e η, ϕ [(λ.e) ] η, ϕ [e]

Fossacs 05 p.10 Programming in λ [ ] (2) ϕ = no write user policy Untrusted = λz. λ. Browser z (λy. y ) ε, Browser (Untrusted W ) (λy.ϕ [y ]) ε, ϕ[λy.ϕ [y ] (λ. BrowserW λy. y ); W ] ε, ϕ[ϕ [Browser W (λy. y )]; W ] ε, ϕ[ϕ [(λy. y )W ]; W ] ε, ϕ[ϕ [α w ]; W ] security exception! α w = ϕ

Fossacs 05 p.11 Programming in λ [ ] (3) ε, Browser (Untrusted (λ. R ; C )) (λy.ϕ [y ]) ε, ϕ[λy.ϕ [y ] (Untrusted (λ. R ; C )); W ] ε, ϕ[ϕ [Browser (λ. R ; C ) (λy. y )]; W ] ε, ϕ[ϕ [R ; C ]; W ] ε, ϕ[ϕ [α r ; C ]; W ] α r, ϕ[ϕ [C ]; W ] α r, ϕ[ϕ [α c ]; W ] security exception! α r α c = ϕ

Fossacs 05 p.12 Programming in λ [ ] (4) ε, Browser (Untrusted R) (λy.ϕ [y ]) ε, ϕ[(λy.ϕ [y ]) (Untrusted R); W ] ε, ϕ[ϕ [Browser R (λy. y )]; W ] ε, ϕ[ϕ [R ]; W ] α r, ϕ[ϕ [ ]; W ] α r, ϕ[w ] α r α w, ϕ[ ] α r α w,

Fossacs 05 p.13 Enforcing Principle of least privilege Programs should be granted the minimum set of rights that are needed to accomplish their tasks. an expression must always obey all the active policies (no policy can be overridden) policies can always inspect the whole past history (no event can be hidden) so how to implement privileged calls / discard the past? answer: policies must explicitly allow for it!

Fossacs 05 p.14 Extracting History Expressions e 1 = if b then α else α H 1 = α + α α, α

Fossacs 05 p.14 Extracting History Expressions e 1 = if b then α else α H 1 = α + α α, α e 2 = (λx. α ) : unit H 2 = ε α unit

Fossacs 05 p.14 Extracting History Expressions e 1 = if b then α else α H 1 = α + α α, α e 2 = (λx. α ) : unit H 2 = ε e 3 = (λx. α )α H 3 = α α αα α unit

Fossacs 05 p.14 Extracting History Expressions e 1 = if b then α else α H 1 = α + α α, α e 2 = (λx. α ) : unit H 2 = ε e 3 = (λx. α )α H 3 = α α αα α unit e 4 = (λy. ϕ[α; y ])(λx. ϕ [α ]) H 4 = ϕ[α ϕ [α ]] [ ϕ α[ ϕ α ] ϕ ] ϕ H 4 = αα

Fossacs 05 p.14 Extracting History Expressions e 1 = if b then α else α H 1 = α + α α, α e 2 = (λx. α ) : unit H 2 = ε e 3 = (λx. α )α H 3 = α α αα α unit e 4 = (λy. ϕ[α; y ])(λx. ϕ [α ]) H 4 = ϕ[α ϕ [α ]] [ ϕ α[ ϕ α ] ϕ ] ϕ H 4 = αα e 5 = (λ z x. α; z x) H 5 = µh. α h ε, α, αα,...

Fossacs 05 p.15 Type & Effect System typing judgements Γ, H e : τ types: τ ::= unit τ H τ effects: history expressions H correctness of history expressions: ε, e η, e = η prefix( H ) type safety: H valid = e will not go wrong

Fossacs 05 p.16 Validity of Histories obeying all the policies, within their scopes ex: ϕ[α r ]α c valid, ϕ[α r ϕ [α c ]α w ] not valid safe-sets of ϕ[α r ϕ [α c ]α w ]: ϕ[{α r, α r α c, α r α c α w }] ϕ [{α r α c }] η valid iff, for each safe-set ϕ[{η 1,..., η k }] of η: η i = ϕ H valid iff each η H 1 i k is valid

Fossacs 05 p.17 Verifying History Expressions If validity were a regular property... H BP A(H) Pushdown automaton validity Ψ(H) A Ψ(H) Büchi automaton H valid if L(BP A(H)) L(A Ψ(H) ) = But validity of histories is non-regular! ex: µh. α + h h + ϕ[h] in or out? solution: transform H to make Ψ(H) regular

Fossacs 05 p.18 Regularizing History Expressions (1) idea: eliminating the redundant framings ϕ[αϕ [α ϕ[α ]]] valid iff ϕ[αϕ [α α ]] valid the inner ϕ-framing is redundant elimination of non-regularity: H has no redundant framings preservation of validity: H valid H valid

Fossacs 05 p.19 Regularizing History Expressions (2) H Φ eliminates all the redundant framings, plus the framings in the set of policies Φ ex: H = ϕ[αϕ [α ϕ[α ]]] H = ϕ[(αϕ [α ϕ[α ]]) ϕ ] = ϕ[α(ϕ [α ϕ[α ]) ϕ ]] = ϕ[αϕ [(α ϕ[α ]) ϕ,ϕ ]] = ϕ[αϕ [α (ϕ[α ]) ϕ,ϕ ]] = ϕ[αϕ [α α ]]

Fossacs 05 p.20 Regularizing History Expressions (3) H = µh. α + h h + ϕ[h] H = µh. α + h h + ϕ[h ϕ ] = µh. α + h h + ϕ[(µh. α + h h + ϕ[h]) ϕ ] = µh. α + h h + ϕ[µh. α + h h + h ] trickier example: µh. µh. α + h ϕ[h ]

Fossacs 05 p.21 Büchi automata for validity α c α r α r, α c A ϕ q0 α r q1 α c q2 α r α c L(A ϕ ) α c α r α r, α c q0 α r q1 α c q2 A ϕ[ ] [ ϕ ] ϕ [ ϕ ] ϕ α r q0 q1 α c α r [ ϕ w ] ϕ = ϕ[w] α r [ ϕ α c ] ϕ L(A ϕ[ ] ) [ ϕ α r ] ϕ α c L(A ϕ[ ] )

Fossacs 05 p.22 Conclusions λ [ ] = λ + histories + local policies history expression H from e (type & effect) H has no redundant framings (regularization) η H valid iff η = ϕ [ ] ϕ η (Büchi automata) H valid BP A(H ) = ϕ H ϕ [ ] type safety + verification (model checking): Γ, H e : τ, H valid = e will not go wrong

Fossacs 05 p.23 Understanding History Inspection resource usage analysis [Colcombet & Fradet 00, Igarashi & Kobayashi 02, Marriott, Stuckey & Sulzmann 03] capability-based model [Abadi & Fournet 03] shallow histories [Fong 04] type & effect system [Skalka & Smith 04] relation with information flow [Banerjee & Naumann 04] membranes [Gorla, Hennessy & Sassone, 04] safety and liveness framing for secure service composition [Bartoletti, Degano & Ferrari 05]

Fossacs 05 p.24 A Type and Effect system for λ [ ] (1) Γ, ε x : Γ(x) Γ, α α : unit Γ, H e : τ Γ, ϕ[h] ϕ[e] : τ Γ, H e : τ Γ, H + H e : τ Γ, H e : τ Γ, H e : τ Γ, H if b then e else e : τ

Fossacs 05 p.25 A Type and Effect system for λ [ ] (2) Γ; x : τ; z : τ H τ, H e : τ Γ, ε λ z x.e : τ H τ Γ, H e : τ H τ Γ, H e : τ Γ, H H H ee : τ

Fossacs 05 p.26 A Type and Effect system for λ [ ] (3) e = λ z x. b? α + (b? zzx + ϕ[zx]) Γ, ε z : τ H τ Γ, ε x : τ Γ, H z x : τ Γ, H H z z x : τ Γ, ϕ[h] ϕ[z x] : τ Γ, H H + ϕ[h] z z x : τ Γ, H H + ϕ[h] ϕ[z x] : τ Γ, H H + ϕ[h] b? z z x + ϕ[z x] : τ Γ, α + H H + ϕ[h] b? α + (b? z z x + ϕ[z x]) : τ H = α + H H + ϕ[h] = H = µh. α + h h + ϕ[h], ε e : unit µh. α+h h+ϕ[h] unit

Fossacs 05 p.27 History Expressions (syntax) H, H ::= ε h α H H H + H ϕ[h] µh.h empty variable access event sequence choice safety framing recursion

Fossacs 05 p.28 History Expressions (semantics) ε ρ = ε α ρ = α h ρ = ρ(h) H H ρ = H ρ H ρ H + H ρ = H ρ H ρ ϕ[h] ρ = ϕ[ H ρ] µh.h ρ = n ω f n ( ), f(x) = H ρ{x/h}

Fossacs 05 p.29 Validity (alt. definition) plain histories + framing events [ ϕ and ] ϕ notation: [ ϕ η ] ϕ = ϕ[η] validity: [ ϕ α r ] ϕ α c valid, α r [ ϕ α c not valid η discards the framing events in η Φ(η) is the set of ϕ such that [ ϕ > ] ϕ in η β 1 β n is valid iff β 1 β k = Φ(β 1 β k ), for all k 1..n H valid iff each η H is valid

Fossacs 05 p.30 Regularizing history expressions (1) ε Φ,Γ = ε h Φ,Γ = h α Φ,Γ = α (H H ) Φ,Γ = H Φ,Γ H Φ,Γ (H + H ) Φ,Γ = H Φ,Γ + H Φ,Γ ϕ[h] Φ,Γ = { H Φ,Γ ϕ[h Φ {ϕ},γ ] if ϕ Φ otherwise

Fossacs 05 p.31 Regularizing history expressions (2) (µh. H) Φ,Γ = µh. (H σ Φ,Γ{(µh.H)Γ/h} σ) where H = H {h/h i } i, h i fresh, h fv(h ) σ(h i ) = (µh.h)γ Φ guard(hi,h ),Γ σ (h i ) = { h h i if guard(h i, H ) Φ otherwise

Fossacs 05 p.32 Büchi automaton for ϕ [ ] A ϕ[ ] = Σ, Q, Q 0, ρ, F Σ = Σ { [ ϕ, ] ϕ ϕ Π } Q = F = Q { q q F } ρ = ρ { q, [ ϕ, q q F } { q, ] ϕ, q } { q 0, α, q 1 q 0, α, q 1 ρ and q 1 F } { q, [ ϕ, q q, ] ϕ, q q Q and ϕ ϕ }

Fossacs 05 p.33 Conclusions λ [ ] = λ + histories + local policies history expression H from e (type & effect) H has no redundant framings (regularization) η H valid iff η = ϕ [ ] ϕ η (Büchi automata) H valid BP A(H ) = ϕ H ϕ [ ] type safety + verification (model checking): Γ, H e : τ, H valid = e will not go wrong