Understanding and Monitoring Embedded Web Scripts

Yuchen Zhou and David Evans
36th IEEE Symposium on Security and Privacy ("Oakland")
San Jose, CA
18-20 May 2015

Abstract

Modern web applications make frequent use of third-party scripts, often in ways that allow scripts loaded from external servers to make unrestricted changes to the embedding page and access critical resources including private user information. This paper introduces tools to assist site administrators in understanding, monitoring, and restricting the behavior of third-party scripts embedded in their site. We developed ScriptInspector, a modified browser that can intercept, record, and check third-party script accesses to critical resources against security policies, along with a Visualizer tool that allows users to conveniently view recorded script behaviors and candidate policies and a PolicyGenerator tool that aids script providers and site administrators in writing policies. Site administrators can manually refine these policies with minimal effort to produce policies that effectively and robustly limit the behavior of embedded scripts. PolicyGenerator is able to generate effective policies for all scripts embedded on 72 out of the 100 test sites with minor human assistance. In this paper, we present the designs of our tools, report on what we've learned about script behaviors using them, evaluate the value of our approach for website administrator.

Source Code

https://github.com/Treeeater/JSAccessVisualizer
Includes code for the ScriptInspector, Visualizer, and PolicyGenerator.

Paper

[PDF], 16 pages