Tradeoffs in Retrofitting Security: An Experience Report Mark S. Miller

Early Choice. Late Despair     

ACLs and OCaps start in mid ‘60s. DVH before specialization of CS ‘70s: Industry took ACL fork in road. ‘90s to present: Rise of Malware But:  You can’t start over again  You can’t add security later

 What to do?

A very powerful program

A very powerful program

Solitaire can delete any file you can.

Functionality vs. Safety? Functionality Safety

Functionality vs. Safety? Functionality

Applications: POLA: User’s Authority Least Authority st at ic w san eb d ap bo ps xin g Applets: Puny Authority

Safety

A Tale of Two Copies $ cp foo.txt bar.txt vs.

$ cat < foo.txt > bar.txt Bundle

authorization with designation. Remove ambient authority.

Objects

A

B

C

Objects b.foo(c)

A

B

C

Objects

A

foo( )

C

B

Objects

A

B

C

Object-Capabilities A

foo( )

B

C

 Inter-object causality only by sending messages on references  Reference graph == Access graph  Only connectivity begets connectivity.

CapDesk demo

CapDesk, Polaris, BitFrost: Usable POLA  Double click launch  File Explorer  Open dialog  Drag/Drop  Etc...

Bundle authorization with designation

Distributed Secure Money in Caja No explicit crypto

function Mint(name) { caja.requireType(name,’string’); var brand = Brand(name); return function Purse(balance) { caja.requireNat(balance); function decr(amount) { caja.requireNat(amount); balance = caja.requireNat(balance - amount);} return caja.freeze({ getBalance: function() { return balance; }, makePurse: function() { return Purse(0); }, getDecr: function() { return brand.seal(decr); }, deposit: function(amount, src) { def newBal := caja.requireNat(balance+amount) brand.unseal(src.getDecr())(amount); balance := newBal;}});};}

Roadmap, in Hindsight

Safe Loading

Mutable Static State

Object-Capabilities

Memory Safety, GC, Eval / Loading

Objects

Message Passing, Encapsulation

Scheme Lexical Nesting

What about Security? W7 E POLA

Safe Reflection

Static Native “Devices” What about Security?

Unprincipled Libraries

Oak, pre.NET No problemo ClassLoaders as Principals Stack Introspection Security Managers

Java, .NET Signed Applets

Detour is Non-Object Causality

Safe Loading

Mutable Static State

Object-Capabilities

Memory Safety, GC, Eval / Loading

Objects

Message Passing, Encapsulation

Scheme Lexical Nesting

W7 E POLA

Safe Reflection

Static Native “Devices” Unprincipled Libraries

Oak, pre.NET No problemo ClassLoaders as Principals Stack Introspection Security Managers

Java, .NET Signed Applets

Oak to Java Oak (Java’s simple ancestor) + ClassLoaders as Principals + SecurityManagers + stack introspection + policy files + signed applets -------------------------------------Painful and Inflexible Security

Don’t add security.

Java to Joe-E Java — all those “security” mechanisms — mutable static state — static native “devices” — unprincipled parts of libraries + library of principled replacements -------------------------------------Simple and Expressive Security

Remove insecurity.

But isn’t that stuff useful? public class Foo { static private int count = 0; public Foo() { count++; … } }

But isn’t that stuff useful? public class Foo { static private int count = 0; public Foo() { count++; … } }

public class FooMaker { private int[] countCell = {0}; public class Foo { public Foo() { countCell[0]++; … } } }

But isn’t that stuff useful? public class Foo { static private int count = 0; public Foo() { count++; … } }

public class FooMaker { private int[] countCell = {0}; public class Foo { public Foo() { countCell[0]++; … } } }

Unnecessary awkwardness. But better engineering anyway: All state is multiply instantiable.

Choice: Intellectual Communities  Traditional OS access control    

+ Brilliant early history - Misdirected priorities, Accumulated Myths Windows -> Polaris Linux -> Plash, BitFrost

 Crypto  + Serious about security, High standards  - Platform security is Someone Else’s Problem  HTTPS -> Webkeys, Foolscap, Second Life

 Programming Language  + Abstraction, Modularity, Composition  - Security is Someone Else’s Problem

Choice: How to secure a language  New language  Gedanken, Emerald, Joule, Toontalk, E, AmbientTalk, Sebyla

 Statically verified subset  Joe-E, Emily, Backwater, JSON, ADsafe, Pthin

 Dynamic restrictions, rewriting  W7, Oz-E, CaPerl, Caja, FBJS?, Squeak-E

 Wrapper-based isolation  J-Kernel, Squeak Islands, Earlier Caja attempts

 Sandboxed virtual machines  Java Isolates?, Tweak Islands, Secure Python

New Languages  Object-grain  port programmers, not programs  Algol 60 -> Gedanken

 Pros:  + Ideal laboratory for new ideas  + Ideal teaching vehicle

 Cons:  - Huge barrier to adoption

Statically verified subset  Object-grain  No rewrite  Static library taming  Joe-E Example: No non-final static variables  + 100% compatibility with tool chain  + No measurable runtime cost  - For dynamic languages, restrictions can be severe  JSON, ADsafe, Pthin

Dynamic restrictions, rewriting  Object-grain  Dynamically substituted scope, rewriting  Virtualized Libraries  Caja Example: foo.bar

 foo.bar_canRead___ ? foo.bar : ___.read(foo,”bar”)

 + More permissive rules possible  - Src is one transform removed from IDE’s view  - Runtime cost

Wrapper-based Isolation

A

B

C

Wrapper-based Isolation b.foo(c)

A

B

C

Wrapper-based Isolation

A

foo( )

B

C

Wrapper-based Isolation

foo( )

A

C

B

Wrapper-based Isolation

A

B

C

Wrapper-based Isolation  Component-grain  Synchronous membrane/wrappers  Virtualized Libraries, Rewriter?  Java 1.1 -> J-Kernel  + More compatible with old code  - Domain switching overhead leads to bad designs  - Programmer codes in two models, don’t mix well

Sandboxed Virtual Machine  VM-grain  Alternative Libraries  Java Isolates?  + Technically sound: OS-like isolation  - Maintaining a forked version  - Difficult deployment demands

Need hostile environment  Clean languages are more secureable.  Scheme, ML, Pict

 Academics too friendly, so no adoption.  Virtual Realities  EC Habitats, Den, eMonkey  Croquet?

 Web/App Server  Waterken/Joe-E

 Javascript in web pages  ADsafe, FBJS, Cajax6

Language design by subsetting  Design to change the world  New language -> no adoption

 Languages already too large  “Extra” features destroy useful formal properties

 Insiders can’t subtract. Outsiders can’t add.  Old code vs. old tools: contravariant compatibility

 Discover the simple language struggling to get out.

Stop Malware with OO Security Functionality

Applications: POLA: User’s Authority Least Authority st at ic w san eb d ap bo ps xin g Applets: Puny Authority

Safety

Alice pays Bob var payment = myPurse.makePurse(); payment.deposit(10,myPurse); bob.buy(..., payment);

Q.when(payment, function() { Q.when(myPurse.deposit(10,payment), function() { ... # dispense value});});

buy

depo sit

rse ePu mak

mint

dep osi t

$0 $10 name sealer unsealer

$100 $90

$200 $210

ACL Epicycles

New Languages  Object-grain  port programmers, not programs      

Algol 60 -> Gedanken Prolog+Actors -> FCP, Vulcan -> Joule, Toontalk Java -> E C# -> Sebyla ?? -> Eden, Emerald

Statically verified subset  Object-grain  No rewrite  Static library taming       

Javascript Pict OCaml Python Java Javascript Java

-> JSON (like S-expression) -> Backwater -> Emily -> Pthin (like Pascal) -> Joe-E -> ADsafe (blacklisting) -> Original-E

Dynamic restrictions, rewriting  Object-grain  Dynamically substituted scope, rewriting  Virtualized Libraries Scheme -> W7 Mozart/Oz -> Oz-E Perl -> CaPerl Javascript -> Wrapperless Cajax3 (FBJS?)  1) blacklisting, 2) property name lifting, 3) Caja with whitelisting flags  Smalltalk -> Squeak-E  CommonLisp -> CL-E    

Wrapper-based Isolation  Component-grain  Synchronous membrane/wrappers  Virtualized Libraries, Rewriter?  Java(1.1) -> J-Kernel (ClassLoader tricks + RMI)  Javascript -> Wrapper-based Cajax2  1) Asymmetric suspicion  2) Mutual suspicion  Smalltalk -> Lex Spoon’s Islands

Sandboxed Virtual Machine  Vat-grain  Modified VM, Async wrappers  Alternative Libraries     

Erlang Java Javascript Python Smalltalk

-> Erly -> Java Isolates -> Vats on Gears Workers -> Brett Canon’s “Secure Python” -> Tweak Islands

Escape the Dilemma

Design enforceable language subsets  “You can’t start over again”  “You can’t add security later”  Don’t add security, remove insecurity  Vendors can only grow their language  Non-vendors can only shrink it  Old tools vs. old code: contravariant compatibility

TCRP Annual Report of Progress 2005 - Transportation Research Board

Sep 30, 2006 - fields including planning, service configuration, equipment, facilities, ... end-users of the research: transit agencies, service providers, and ..... of results; (5) the proposer's plan for participation by disadvantaged business.

2MB Sizes 1 Downloads 280 Views

Recommend Documents

TCRP Annual Report of Progress 2005 - Transportation Research Board
Sep 30, 2006 - TCRP Project D-4, “Visual Impact of Overhead Contact Systems for Electric Transit ..... the National Center for Advanced Transportation Technology, the ...... resource for people who have the difficult and often cumbersome ...

Workshop Announcement - Transportation Research Board
Candidates for fellows should have 1 to 3 years of ... real-time driving directions, social media, carsharing ... contacts and peer networks, refining personal and.

annual report - SENS Research Foundation
Apr 1, 2013 - This is all good news, in itself, and we ourselves have been ..... Buck Institute for Research on Aging, Novato CA ..... Albert Einstein College.

annual report - SENS Research Foundation
Apr 1, 2013 - after two days of recovery ... They have begun collecting data confirming ..... in the translation of basic bioscience into affordable and widely.

2005 Annual Report - Community Foundation of Tompkins County
2005 was a transition year: Peg Hendricks, whose boundless energy and good ... 2. Traci's Hope Fund. Six years ago, Traci Gibson heard the dreaded words: “You have stage 3 breast cancer. .... access to knowledge and resources that will help allevia

Friends of Mount Athos Annual Report 2005.pdf
Professor Robert W. Allison .... po po po po' is intended to represent the trajec- tory of the spit down the cliff. .... Friends of Mount Athos Annual Report 2005.pdf.

2005 Annual Report - Community Foundation of Tompkins County
We look forward to continued success as we try our best to make a difference close to ...... at California State University where Dr. Louis Perlgut had a distin-.

School Wellness Policy Building Annual Progress Report (2014-2015 ...
School Wellness Policy Building Annual Progress Report (2014-2015).pdf. School Wellness Policy Building Annual Progress Report (2014-2015).pdf. Open.

Southeast Polk Annual Progress Report 2015.pdf
Proficient. Reading Comprehension. Page 3 of 4. Southeast Polk Annual Progress Report 2015.pdf. Southeast Polk Annual Progress Report 2015.pdf. Open.

Lake Whatcom Management Program 2012 Annual Progress Report
Area activities, cost estimates for 2012, and Program Area recommendations for 2013. .... source control and treatment, and the evaluation of stormwater control ..... by encouraging watershed residents to use alternative transport and to limit the ..

SCTS Board Register of Interests - scts-annual-report-accounts ...
There was a problem loading this page. SCTS Board Register of Interests - scts-annual-report-accounts---2015-16-final.pdf. SCTS Board Register of Interests ...

Rec Rights Annual Report 2014 PPT Board presentation.pdf ...
Page 2 of 20. SERVICE SITE INFORMATION. Residential DD. 179. Residential MI. 46. SIP 48. Residential MI &. DD. 34. Residential DD. Case Management.

Irish Greyhound Board annual report 2012.pdf
Page 1 of 34. Page 1 of 34. Page 2 of 34. Page 2 of 34. Page 3 of 34. Page 3 of 34. Irish Greyhound Board annual report 2012.pdf. Irish Greyhound Board ...

progress report - World Urban Campaign
Feb 29, 2016 - The Campaign currently includes 1 Top and 3 Main Sponsoring Partners, 40 Lead ... f) 10 – 11 January 2016: Urban Thinkers Campus Dubai .... Campaign Secretariat developed a social media proposal in line with the ...

progress report - World Urban Campaign
Feb 29, 2016 - A full list of all Urban Thinkers Campuses, which are all organized by ... Campaign Secretariat developed a social media proposal in line with ...

Quarterly Progress Report - cuts citee
2. Activities carried out by CUTS in the month of December, 2014. 2.1 The Diagnostic study ..... http://www.sdpi.org/policy_outreach/event_details448-2014.html.

Quarterly Progress Report - cuts citee
Inputs Trade with Farm and Non-farm incomes and Resource Use Efficiency” to ... II. Sustainable Energy for All (SE4ALL). III. Food Security Session I: Food ...

annual report 2015 - PDFKUL.COM
The African Institute for Mathematical Sciences (AIMS) is a pan-African ..... For the first time humanity is up against an environmental change of .... in science and engineering at leading universities worldwide. ..... of Quantum Chemistry. 115(1) .

2014 ANNUAL REPORT
growth in nearly every important measure of technology transfer success, and 2014 was no exception. .... Award for driving business growth, jobs and economic ...

Annual Report
Models as Tools for Economic Policy ..... Given the primitive state of computational tools, ... analysis of monetary policy in the face of shocks. This analysis has ...

2014 ANNUAL REPORT
program offers companies a low-cost, low-risk method to determine the commercial potential behind existing ... CURx Pharmaceuticals is developing a non-oral.