Title
libmask: Protecting browser JIT engines from the devil in the constants.
Abstract
JavaScript (JS) engines are virtual machines that execute JavaScript code. These engines find frequent application in web browsers like Google Chrome, Mozilla Firefox, Microsoft Internet Explorer and Apple Safari. Since, the purpose of a JS engine is to produce executable code, it cannot be run in a non-executable environment, and is susceptible to attacks like Just-in-Time (JIT) Spraying, which embed return-oriented programming (ROP) gadgets in arithmetic or logical instructions as immediate offsets. This paper introduces libmask, a JIT compiler extension to prevent the JIT-spraying attacks as an effective alternative to XOR based constant blinding. libmask transforms constants into global variables and marks the memory area for these global variables as read only. Hence, any constant is referred to by a memory address making exploitation of arithmetic and logical instructions more difficult. Further, these memory addresses are randomized to further harden the security. The scheme has been implemented and evaluated as a librddy extension to Google V8 scripting engine with optimizations that contain performance overhead and make libmask a feasible approach. We demonstrate that libmask masks all the constants in JITed code, and effectively raise the bar for JIT-spray and JIT-ROP attacks. The average overhead incurred upon memory is less than 300 kilobytes, while in most benchmarks the memory overhead is less than 10 KB. The average performance overhead observed with optimizations measures is 5.31%. Further, this new approach shows a modest performance improvement over currently deployed constant blinding technique in Google V8.
Year
Venue
Field
2016
2016 14TH ANNUAL CONFERENCE ON PRIVACY, SECURITY AND TRUST (PST)
Virtual machine,Computer science,Computer security,Just-in-time compilation,Memory address,The Internet,Executable,Scripting language,JavaScript,Global variable
DocType
ISSN
Citations 
Conference
1712-364X
0
PageRank 
References 
Authors
0.34
0
3
Name
Order
Citations
PageRank
Abhinav100.34
Mohit Mishra261.23
Benoit Baudry32000118.08