128,922 research outputs found
JavaScript: Bringing Object-Level Security to the Browser
JavaScript has evolved from a simple language intended to give web browsers basic hinteraction into a fully featured dynamic language that allows the browser to become an application delivery platform. With innovations such as asynchronous JavaScript and XML (AJAX) and JavaScript Object Notation (JSON), JavaScript has become the de facto standard for creating interactive web applications. With its new found power and popularity, JavaScript has been the target of many attacks. In this paper, we present a framework that allows programmers to define secure properties of JavaScript objects such that they are more immune to malicious activity and require a smaller footprint that existing solutions. We then use our framework and apply it to an already built JavaScript system to analyze its properties and effectiveness.unpublishednot peer reviewe
JSClassFinder: A Tool to Detect Class-like Structures in JavaScript
With the increasing usage of JavaScript in web applications, there is a great
demand to write JavaScript code that is reliable and maintainable. To achieve
these goals, classes can be emulated in the current JavaScript standard
version. In this paper, we propose a reengineering tool to identify such
class-like structures and to create an object-oriented model based on
JavaScript source code. The tool has a parser that loads the AST (Abstract
Syntax Tree) of a JavaScript application to model its structure. It is also
integrated with the Moose platform to provide powerful visualization, e.g., UML
diagram and Distribution Maps, and well-known metric values for software
analysis. We also provide some examples with real JavaScript applications to
evaluate the tool.Comment: VI Brazilian Conference on Software: Theory and Practice (Tools
Track), p. 1-8, 201
Semantics and Security Issues in JavaScript
There is a plethora of research articles describing the deep semantics of
JavaScript. Nevertheless, such articles are often difficult to grasp for
readers not familiar with formal semantics. In this report, we propose a digest
of the semantics of JavaScript centered around security concerns. This document
proposes an overview of the JavaScript language and the misleading semantic
points in its design. The first part of the document describes the main
characteristics of the language itself. The second part presents how those
characteristics can lead to problems. It finishes by showing some coding
patterns to avoid certain traps and presents some ECMAScript 5 new features.Comment: Deliverable Resilience FUI 12: 7.3.2.1 Failles de s\'ecurit\'e en
JavaScript / JavaScript security issue
Information Flow Control in WebKit's JavaScript Bytecode
Websites today routinely combine JavaScript from multiple sources, both
trusted and untrusted. Hence, JavaScript security is of paramount importance. A
specific interesting problem is information flow control (IFC) for JavaScript.
In this paper, we develop, formalize and implement a dynamic IFC mechanism for
the JavaScript engine of a production Web browser (specifically, Safari's
WebKit engine). Our IFC mechanism works at the level of JavaScript bytecode and
hence leverages years of industrial effort on optimizing both the source to
bytecode compiler and the bytecode interpreter. We track both explicit and
implicit flows and observe only moderate overhead. Working with bytecode
results in new challenges including the extensive use of unstructured control
flow in bytecode (which complicates lowering of program context taints),
unstructured exceptions (which complicate the matter further) and the need to
make IFC analysis permissive. We explain how we address these challenges,
formally model the JavaScript bytecode semantics and our instrumentation, prove
the standard property of termination-insensitive non-interference, and present
experimental results on an optimized prototype
A Practical Blended Analysis for Dynamic Features in JavaScript
The JavaScript Blended Analysis Framework is designed to
perform a general-purpose, practical combined static/dynamic
analysis of JavaScript programs, while handling dynamic
features such as run-time generated code and variadic func-
tions. The idea of blended analysis is to focus static anal-
ysis on a dynamic calling structure collected at runtime in
a lightweight manner, and to rene the static analysis us-
ing additional dynamic information. We perform blended
points-to analysis of JavaScript with our framework and
compare results with those computed by a pure static points-
to analysis. Using JavaScript codes from actual webpages
as benchmarks, we show that optimized blended analysis
for JavaScript obtains good coverage (86.6% on average per
website) of the pure static analysis solution and nds ad-
ditional points-to pairs (7.0% on average per website) con-
tributed by dynamically generated/loaded code
Refactoring Legacy JavaScript Code to Use Classes: The Good, The Bad and The Ugly
JavaScript systems are becoming increasingly complex and large. To tackle the
challenges involved in implementing these systems, the language is evolving to
include several constructions for programming- in-the-large. For example,
although the language is prototype-based, the latest JavaScript standard, named
ECMAScript 6 (ES6), provides native support for implementing classes. Even
though most modern web browsers support ES6, only a very few applications use
the class syntax. In this paper, we analyze the process of migrating structures
that emulate classes in legacy JavaScript code to adopt the new syntax for
classes introduced by ES6. We apply a set of migration rules on eight legacy
JavaScript systems. In our study, we document: (a) cases that are
straightforward to migrate (the good parts); (b) cases that require manual and
ad-hoc migration (the bad parts); and (c) cases that cannot be migrated due to
limitations and restrictions of ES6 (the ugly parts). Six out of eight systems
(75%) contain instances of bad and/or ugly cases. We also collect the
perceptions of JavaScript developers about migrating their code to use the new
syntax for classes.Comment: Paper accepted at 16th International Conference on Software Reuse
(ICSR), 2017; 16 page
ADsafety: Type-Based Verification of JavaScript Sandboxing
Web sites routinely incorporate JavaScript programs from several sources into
a single page. These sources must be protected from one another, which requires
robust sandboxing. The many entry-points of sandboxes and the subtleties of
JavaScript demand robust verification of the actual sandbox source. We use a
novel type system for JavaScript to encode and verify sandboxing properties.
The resulting verifier is lightweight and efficient, and operates on actual
source. We demonstrate the effectiveness of our technique by applying it to
ADsafe, which revealed several bugs and other weaknesses.Comment: in Proceedings of the USENIX Security Symposium (2011
- …