Self-Protecting JavaScript Based on Hierarchical Control

Self-protecting JavaScript can prevent malicious code execution by wrapping security relevant API calls and embedding security policy into the code. This mechanism is easy to use but hold high run-time overhead. This paper introduces hierarchical policy for self-protecting JavaScript. We make the division in accordance with the frequency and control mode of policy and mainly reduce the number of times policies were called. The new approach is able to ensure safety and decrease run-time overhead significantly.