Secure ECMAScript Name Subject To Change Douglas Crockford Yahoo!

Slides:



Advertisements
Similar presentations
Ajax Security Douglas Crockford Yahoo! javascript.crockford.com/security.ppt.
Advertisements

Secure ECMAScript Name Subject To Change
Douglas Crockford Principles Security of. White hats vs. black hats. Security is not hats.
GATEKEEPER MOSTLY STATIC ENFORCEMENT OF SECURITY AND RELIABILITY PROPERTIES FOR JAVASCRIPT CODE Salvatore Guarnieri & Benjamin Livshits Presented by Michael.
 The Citrix Application Firewall prevents security breaches, data loss, and possible unauthorized modifications to Web sites that access sensitive business.
June 1, 2000 Object Oriented Programming in Java (95-707) Java Language Basics 1 Lecture 6 Object Oriented Programming in Java Language Basics Objects.
Presented by Vaibhav Rastogi.  Advent of Web 2.0 and Mashups  Inclusion of untrusted third party content a necessity  Need to restrict the functionality.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
JSON, ADsafe, and Misty Douglas Crockford Yahoo!.
ASP.Net, web services--- asynchronous and synchronous and AJAX By Thakur Rashmi Singh.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
CSE331: Introduction to Networks and Security Lecture 28 Fall 2002.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
ASP.NET Programming with C# and SQL Server First Edition
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Sanzaru Capability-Based Interactions for Web Applications Raluca Sauciuc Shaunak Chatterjee University of California, Berkeley Motivation Limitations.
Software Process and Product Metrics
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Chapter 6: Hostile Code Guide to Computer Network Security.
Phu H. Phung Chalmers University of Technology JSTools’ 12 June 13, 2012, Beijing, China Joint work with Lieven Desmet (KU Leuven)
C++ for Java Programmers Chapter 1 Basic Philosophical Differences.
MCTS Guide to Configuring Microsoft Windows Server 2008 Active Directory Chapter 3: Introducing Active Directory.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
Design Patterns.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Mobile App Support Jacob Poirier Geri Hengesbach Andrea Menke Erin Rossell.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
JavaScript Heap Analysis: From Browser Exploits to Safe JavaScript Subsets Adam Barth Joel Weinberger Matt Finifter Dawn Song University of California,
Chapter 7: WORKING WITH GROUPS
Lecture 18 Page 1 CS 111 Online Access Control Security could be easy – If we didn’t want anyone to get access to anything The trick is giving access to.
Lecture 16 Page 1 CS 236 Online SQL Injection Attacks Many web servers have backing databases –Much of their information stored in a database Web pages.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 7: Focusing on Users and Their Tasks.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Moodle (Course Management Systems). Managing Your class In this Lecture, we’ll cover course management, including understanding and using roles, arranging.
CSCE 201 Web Browser Security Fall CSCE Farkas2 Web Evolution Web Evolution Past: Human usage – HTTP – Static Web pages (HTML) Current: Human.
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 3 1 Searching the Web Using Search Engines and Directories Effectively Tutorial.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
Section 11: Implementing Software Restriction Policies and AppLocker What Is a Software Restriction Policy? Creating a Software Restriction Policy Using.
SECURE WEB APPLICATIONS VIA AUTOMATIC PARTITIONING S. Chong, J. Liu, A. C. Myers, X. Qi, K. Vikram, L. Zheng, X. Zheng Cornell University.
Introduction to JavaScript CS101 Introduction to Computing.
REFACTORINGREFACTORING. Realities Code evolves substantially during development Requirements changes 1%-4% per month on a project Current methodologies.
Legion - A Grid OS. Object Model Everything is object Core objects - processing resource– host object - stable storage - vault object - definition of.
REST By: Vishwanath Vineet.
Introduction to JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Introduction to JavaScript Programming Instructor: Joseph DiVerdi, Ph.D., MBA.
LESSON 5-2 Protecting Your Computer Lesson Contents Protecting Your Computer Best Practices for Securing Online and Network Transactions Measures for Securing.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Chapter4 Part2. User Account Management Once Active Directory is installed and configured, you enable users to access network servers and resources through.
Lecture 3 Page 1 CS 236 Online Security Mechanisms CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Submitted by: Moran Mishan. Instructed by: Osnat (Ossi) Mokryn, Dr.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Advanced Higher Computing Science
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Prof. Bhushan Trivedi Director GLS Institute of Computer Technology
Distributed Shared Memory
User Interface Design and Usability Course Introduction
Full Page Watermarking
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
SharePoint-Hosted Apps and JavaScript
More Object-Oriented Programming
Introducing the .NET Framework
Java History, Editions, Version Features
An Introduction to JavaScript
CPS120: Introduction to Computer Science
Presentation transcript:

Secure ECMAScript Name Subject To Change Douglas Crockford Yahoo!

The purpose of this workshop is to consider the feasibility and necessity of a secure replacement for ECMAScript.

Security is our Number One Problem All websites are under attack. Progress is being frustrated. Mash Up We Must!

Three Possible Solutions Safe JavaScript Subset. Timeframe: Immediate Communicating Vats. Timeframe: Intermediate Secure Programming Language. Timeframe: Distant All of the Above.

Safe JavaScript Subset Constrain the existing language by code rewriting and runtime repression or by static validation. The constrained language limits the capabilities that are given by default to a program. Good examples may inform the design of Ses. It may be good to derive a standard, but that is not the goal of this meeting.

Vats Secure containers for computation. Constrained intervat communication. First steps: Google's Gears Workerpools; durable, XDM. Ultimately, transmission of capabilities, futures, distributed garbage collection. This is out of scope for today's meeting.

A New Language Similar, but not compatible. Retain the goodness of ECMAScript. Replace, repair, or remove the bad parts. JavaScript got a lot right. Minimize retraining. Capture programmers, not programs.

Goals A computation model that allows for cooperation under mutual suspicion. As simple as possible. Simple systems are easier to reason about. Approachable. The language must be usable by ordinary web developers. Unsurprising. Not freaky. Avoid confusion, difficulty, unmanagability.

Confusion of Interest Computer System Mode

Confusion of Interest System System Mode User

Confusion of Interest System System Mode User

Confusion of Interest CP/M MS-DOS MacOS Windows System Mode

Confusion of Interest CP/M MS-DOS MacOS Windows System Mode The System cannot distinguish the interest of the user from the interest of any program. This enables floppy-borne viruses.

Confusion of Interest CP/M MS-DOS MacOS Windows System Mode When networking is introduced, network- borne viruses are enabled.

User Confusion of Interest Browser System Mode Site The browser is a significant improvement, able to distinguish the interests of users and sites in some cases.

But within a page, interests are confused. An ad or a widget or an Ajax library gets the same rights as the site's own scripts.

JavaScript got close to getting it right. Except for the Global Object. It can be repaired, becoming an object capability language.

An Introduction to Object Capabilities

A is an Object. Object A has state and behavior.

Object A has a reference to Object B. An object can have references to other objects. has-a

...because it has a reference to Object B. Object A can communicate with Object B...

Object B provides an interface that constrains access to its own state and references. Object A does not get access to Object B's innards.

Object A does not have a reference to Object C, so Object A cannot communicate with Object C. In an Object Capability System, an object can only communicate with objects that it has references to.

An Object Capability System is produced by constraining the ways that references are obtained. A reference cannot be obtained simply by knowing the name of a global variable or a public class.

There are exactly three ways to obtain a reference. 1.By Creation. 2.By Construction. 3.By Introduction.

1. By Creation If a function creates an object, it gets a reference to that object.

2. By Construction An object may be endowed by its constructor with references. This can include references in the constructor's context and inherited references.

3. By Introduction A has a references to B and C. B has no references, so it cannot communicate with A or C. C has no references, so it cannot communicate with A or B.

3. By Introduction A calls B, passing a reference to C.

3. By Introduction B is now able to communicate with C. It has the capability.

If references can only be obtained by Creation, Construction, or Introduction, then you may have a safe system.

If references can be obtained in any other way, you do not have a safe system.

Potential weaknesses include 1.Arrogation. 2.Corruption. 3.Confusion. 4.Collusion.

1. Arrogation To take or claim for oneself without right. Global variables. public static variables. Standard libraries that grant powerful capabilities like access to the file system or the network or the operating system to all programs. Address generation.

2. Corruption It should not be possible to tamper with or circumvent the system or other objects.

3. Confusion It should be possible to create objects that are not subject to confusion. A confused object can be tricked into misusing its capabilities.

4. Collusion It must not be possible for two objects to communicate until they are introduced. If two independent objects can collude, they might be able to pool their capabilities to cause harm. For example, I can give gasoline to one object, and matches to another. I need to be confident that they cannot collude.

Rights Attenuation Some capabilities are too dangerous to give to guest code. We can instead give those capabilities to intermediate objects that will constrain the power. For example, an intermediate object for a file system might limit access to a particular device or directory, or limit the size of files, or the number of files, or the longevity of files, or the types of files.

Ultimately, every object should be given exactly the capabilities it needs to do its work. Capabilities should be granted on a need-to-do basis. Information Hiding - Capability Hiding.

Intermediate objects, or facets, can be very light weight. Class-free languages can be especially effective.

The Facet object limits the Guest object's access to the Dangerous object. The Guest object cannot tamper with the Facet to get a direct reference to the Dangerous object.

References are not revocable. Once you introduce an object, you can't ask it to forget it. You can ask, but you should not depend on your request being honored.

The Guest object has a reference to an Agency object. The Guest asks for an introduction to the Dangerous object.

The Agency object makes a Facet, and gives it to the Guest. The Facet might be a simple pass through.

When the Agency wants to revoke the capability, it tells the Facet to forget its capability. The Facet is now useless to the Guest.

A Facet can mark requests so that the Dangerous object can know where the request came from.

Facets Very expressive. Easy to construct. Lightweight. Power Reduction. Revocation. Notification. Delegation. The best OO patterns are also capability patterns

Good Object Capability Design is Good Object Oriented Design

Secure ECMAScript Must Be Incompatible With ES3 If it were compatible, it would share the weaknesses of ES3. Incompatibility gives us license to correct many of the problems that ES3.1 must preserve. Lacking compatibility in the design process could lead to a lack of feature discipline.

Minimal An elegant, minimal language is easier to reason about than an over-featured, maximal language. Committees are generally unable to produce minimal designs. We should avoid a Design-by-committee.

Competition We invite members to submit designs. We drafts rules for the competition, and select a winner based on the criteria of security, expressiveness, and minimalism. Over several rounds of evaluation and influence, we may find either a clear winner or convergence on an ideal approach.

Review of Current Work ES3.1 FBJS Caja, Cajita (and E) Jacaranda dojox.secure JSON, ADsafe (and Misty)