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

Tradeoffs in Retrofitting Security: An Experience ... - Research at Google

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 ...

2MB Sizes 1 Downloads 310 Views

Recommend Documents

Tradeoffs in Retrofitting Security: An Experience Report - Dynamic ...
Object-Capabilities. ▫ Inter-object causality only by sending messages on references. ▫ Reference graph == Access graph. ▫ Only connectivity begets connectivity ...

Tradeoffs in Retrofitting Security: An Experience Report - Dynamic ...
Puny Authority. Applications: User's Authority. Safety static sandboxing web apps. Functionality .... Web/App Server. ▫ Waterken/Joe-E. ▫ Javascript ... dispense value});}); name sealer unsealer buy. $90. $210. $10 m. akePurse deposit deposit ...

User Experience Evaluation Methods in ... - Research at Google
Tampere University of Technology, Human-Centered Technology, Korkeakoulunkatu 6, ... evaluation methods that provide information on how users feel about ...

Moving Targets: Security and Rapid-Release in ... - Research at Google
Nov 7, 2014 - of rapid-release methodology on the security of the Mozilla. Firefox browser. ... their development lifecycle, moving from large-scale, infre- quent releases of new ...... http://www.cigital.com/presentations/ARA10.pdf. [36] Gary ...

Security Vulnerability in Processor-Interconnect ... - Research at Google
Nov 7, 2014 - C.2.0 [Computer-Communication Networks]: General– security and .... for each router, with each physical channel supporting 4 vir- tual channels [7] to avoid ..... the routing tables focused on request and response packets. 365 ...

Designing the Chromecast Out-of-Box Experience - Research at Google
Jun 25, 2014 - Page 1 ... Chromecast [2] is a small HDMI device that provides users with an easy way ... mobile devices or laptops and within media apps like.

Experience of non-adherence among six rehab ... - Research at Google
The informant were selected informally. Over one week in the Bay Area and one week in. Copenhagen, Denmark, the author used any social encounter off work to interject statements like this one as a conversation trigger, “Studies suggest that close t

"Research Experience for Undergraduates in Chihuahuan Desert ...
experience in hypothesis-driven collaborative research utilizing field based and/or laboratory methods and fully engage students in projects associated with the ...

Tablets Use in Emerging Markets: An Exploration - Research at Google
Aug 27, 2013 - implications for design across markets. Author Keywords. Tablets; user study; emerging markets. .... for example, said: “I won it at a contest for creative writing. I didn't think of buying one but now I cannot ... device online most

An Information Avalanche - Research at Google
Web-page editors, blogging soft- ware, image- and video-sharing ser- vices, Internet-enabled mobile devices with multimedia recording capability, and a host of ...

Learning Speed-Accuracy Tradeoffs in ...
All this means that the u and v values are defined by a recurrent system of ... Report CSL-80-12 and in the Proceedings of the Nobel Symposium on Text ...

Early Research Experience With OpenAccess Gear: An ...
Apr 3, 2005 - Gear system, an open source software initiative intended to provide ... individual design database requires the development of parsers and.

Early Research Experience With OpenAccess Gear: An Open Source ...
Apr 3, 2005 - Keywords. EDA, database, open source, physical design, placement, timing. 1. ... an open source development environment with a library of tools and software ..... available for download from a separate web site [5]. Table 1.

Capturing Mobile Experience in the Wild: A Tale ... - Research at Google
a popular massively multiplayer online role-playing game. (MMORPG) which has over ... on providing business analytics to the users (e.g., number of downloads, geographical ..... dents to create, study and share flash cards. SB also provides.

Security Challenges During VLSI Test - Research at Google
Email: [email protected] ... the best candidate for reducing the security risk associated with ..... Scan chain integrity mechanisms are thus a good.

Security-Aware SoC Test Access Mechanisms - Research at Google
... extended to include invoking BIST, programming nonvolatile memory, debugging ... To facilitate design automation, modular design, and effi- cient reuse of ...

Video CAPTCHAs: Usability vs. Security - Research at Google
Sep 26, 2008 - A Completely Automated Public Turing test to tell Computer and Humans Apart ... automated programs that signup for thousands of free email ...

RECOGNIZING ENGLISH QUERIES IN ... - Research at Google
2. DATASETS. Several datasets were used in this paper, including a training set of one million ..... http://www.cal.org/resources/Digest/digestglobal.html. [2] T.