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

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

2MB Sizes 2 Downloads 203 Views

Recommend Documents

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

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

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

pdf-0930\tribulation-force-an-experience-in-sound-and ...
Try one of the apps below to open or edit this item. pdf-0930\tribulation-force-an-experience-in-sound-and-drama-cd-audio-by-tim-lahaye-jerry-b-jenkins.pdf.

INSCAPE: Emotion Expression and Experience in an ...
Interactive Digital Storytelling and Entertainment, in LN in Computer Science, Springer, ... Emotions do have adaptive functions [1, 2, 3, 4, 5], for instance ... In the last 6 years, research has been done in terms of applications that can help user

Approximation-Variance Tradeoffs in Mechanism Design
location [26], approval voting [2], and kidney exchange [3, 5]. Moreover, choosing the .... studies variance [9], in the context of kidney exchange. In contrast to our ...

Retrofitting of Brick Masonry Columns by Ferocementing.pdf ...
capacity. Vertical alignment was ensured to minimize. any eccentricity. All three specimens' sizes showed. brittle failure. Major cracks were vertical, however,. few horizontal cracks were also observed. The vertical. cracks passed through the joints

Session 1 Industrial experience and practical application of dynamic ...
quality. 4. Attitude towards cloning. 5. Expectations for a clone management tool. 6 ... Monitoring Copy-Paste. 8 ... The tool enforces consistent conflict resolution;.

Dynamic Properties of an Extended Polymer in Solution
Apr 26, 1999 - Dynamic Properties of an Extended Polymer in Solution ..... analytic model is good, and we conclude that for a Rouse polymer, the dominant ...

Retrofitting of Brick Masonry Columns by Ferocementing.pdf ...
Page 3 of 3. Page 3 Mark Scheme Syllabus Paper. Cambridge IGCSE – October/November 2014 0606 23. © Cambridge International Examinations 2014.

EMA Report Summary: Security Awareness Training.pdf ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. EMA Report ...

Annual Report PandaLabs 2009 - Panda Security
As for distribution methods, social networks have made the headlines in .... obtained through analyses carried out by the online tool. ActiveScan .... course: 2009 – The year at a glance. FIG.07. EVOLUCIÓN DE MALWARE ACTIVO. DURANTE EL TERCER TRIM

Annual Report PandaLabs 2009 - Panda Security
offenses. In May, part of the network of the US Marshals. (a division of the US Justice Department) had to be disconnected to remedy an infection. These cases are not isolated events; they reflect what is happening in the world. The main lesson here

Annual Security Report 2017.pdf
police officer) employed in NYS to principally perform one or more of the following duties, and the person is not. performing the functions of a private investigator as defined in Section 71 of Article 7 of the General Business Law: Whoops! There was

Annual Security Report 2016.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Annual Security ...

Annual Security Report 2015 pdf.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Annual Security ...

Transactionalizing Legacy Code: An Experience ... - transact 2013
Mar 2, 2013 - server and memslap on the same machine. In our experiments,. 12 threads were dedicated to memslap, so that there was a constant amount of ...

An Experience With Oncology Nurses
and hyperactivity and accelerated behaviors .... Package for the Social Sciences (SPSS, ver- ... action effect existed between the degree of ..... Computer- and.

Brewing an enhanced customer experience - Intel - Media13
The attractive design and advanced, interactive features mean ... around six months using advanced aerospace .... Viewer Analytics (AVA) functionality,” Acht-.

apollo experience report - protection against radiation
Radiation protection problems on earth and in space are discussed. Flight through the Van Allen belts and into space beyond the geomagnetic shielding was ...