Lightweight self-protecting JavaScript
Open Access
- 10 March 2009
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 47-60
Abstract
This paper introduces a method to control JavaScript execution. The aim is to prevent or modify inappropriate behaviour caused by e.g. malicious injected scripts or poorly designed third-party code. The approach is based on modifying the code so as to make it self-protecting: the protection mechanism (security policy) is embedded into the code itself and intercepts security relevant API calls. The challenges come from the nature of the JavaScript language: any variables in the scope of the program can be redefined, and code can be created and run on-the-fly. This creates potential problems, respectively, for tamper-proofing the protection mechanism, and for ensuring that no security relevant events bypass the protection. Unlike previous approaches to instrument and monitor JavaScript to enforce or adjust behaviour, the solution we propose is lightweight in that (i) it does not require a modified browser, and (ii) it does not require any run-time parsing and transformation of code (including dynamically generated code). As a result, the method has low run-time overhead compared to other methods satisfying (i), and the lack of need for browser modifications means that the policy can even be applied on the server to mitigate some effects of cross-site scripting bugs.Keywords
Funding Information
- Sixth Framework Programme (IST-2005-015905)
This publication has 15 references indexed in Scilit:
- Provably Correct Runtime Monitoring2008
- An Operational Semantics for JavaScript2008
- BrowserShieldACM Transactions on the Web, 2007
- Defeating script injection attacks with browser-enforced embedded policies2007
- JavaScript instrumentation for browser security2007
- Defending Against Injection Attacks Through Context-Sensitive String Evaluation2006
- Composing security policies with polymer2005
- Automatically Hardening Web Applications Using Precise Tainting2005
- Enforceable security policiesACM Transactions on Information and System Security, 2000
- Efficient software-based fault isolation1993