Use this URL to cite or link to this record in EThOS:
Title: Verifying information flow and metaprogramming in dynamically typed languages
Author: Lester, Martin Mariusz
ISNI:       0000 0004 6346 745X
Awarding Body: University of Oxford
Current Institution: University of Oxford
Date of Award: 2015
Availability of Full Text:
Access from EThOS:
Full text unavailable from EThOS. Please try the link below.
Access from Institution:
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). 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 eval construct, which executes a string as program code, allows arbitrary behaviour to result from data manipulated within the program. The thesis focuses on the last of these problems. It considers an idealised subset of JavaScript and augments it with staged metaprogramming, 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. In order to demonstrate the applicability of this analysis to JavaScript, where eval-using programs operate on code strings formed through concatenation, rather than splicing of templates, an algorithm to transform an eval-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. 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.
Supervisor: Ong, Luke Sponsor: Engineering and Physical Sciences Research Council
Qualification Name: Thesis (Ph.D.) Qualification Level: Doctoral
EThOS ID:  DOI: Not available