Back to results

University of Oxford

Verifying information flow and metaprogramming in dynamically typed languages

Abstract

dc:description.abstract

<p>The ubiquity of JavaScript in Web applications means that its analysis has become an important security problem. This thesis develops techniques for analysing information flow in JavaScript programs and verifying the absence of undesirable flows (for example, of sensitive data to untrusted third parties).</p> <p>JavaScript presents a unique combination of challenges not usually addressed by information flow analyses: its semantics are quaint and poorly specified, making formal reasoning largely infeasible; it is dynamically typed, which precludes the use of the most advanced existing analyses; and its <b>eval</b> construct, which executes a string as program code, allows arbitrary behaviour to result from data manipulated within the program.</p> <p>The thesis focuses on the last of these problems. It considers an idealised subset of JavaScript and augments it with <em>staged metaprogramming</em>, a formalism that captures the construction, execution and manipulation of code templates. The resulting language is called SLamJS. An information flow analysis for SLamJS is developed and its correctness is proved. This builds on the existing analysis 0CFA, but adds support for metaprogramming (paying particular attention to the difficult behaviour of variable capture) and information flow.</p> <p>In order to demonstrate the applicability of this analysis to JavaScript, where <b>eval</b>-using programs operate on code strings formed through concatenation, rather than splicing of templates, an algorithm to transform an <b>eval</b>-using program into one that uses staged metaprogramming is also developed. The transformation repurposes an existing lexer/parser (for example, one produced by the popular tools lex and yacc) to parse fragments of program code out-of-order.</p> <p>The transformed program is then a suitable target for the analysis. This multi-step approach is vital to allow subdivision of the complex overall problem into smaller, more manageable parts. </p>

Degree

thesis:*
Name dc:type.qualificationname
DPhil
Level dc:type.qualificationlevel
Doctoral
Grantor dc:publisher.institution
University of Oxford
Year dc:date.issued
2015

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Lester, Martin Mariusz
Advisor dc:contributor.advisor
  • Ong, Luke

Subjects

dc:subject × 3

Rights

dc:rights
Statement dc:rights
  • CC Attribution (CC BY)
Language dc:language.dcterms_iso639_2
eng

Identifiers

dc:identifier.*
Identifier
uuid:6ef73c31-8aba-4896-be72-41df7c490a19

Chain of custody

source
Harvested from
Oxford University
Base URL
ora.ox.ac.uk/oai2
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Lester, Martin Mariusz. Verifying information flow and metaprogramming in dynamically typed languages. Doctoral thesis, University of Oxford, 2015. https://ora.ox.ac.uk/objects/uuid:6ef73c31-8aba-4896-be72-41df7c490a19/files/mbac37a405cb5eeacfae41b4fcf9c6400