Method for realizing lightweight class JavaScript sandbox

An implementation method and a lightweight technology, applied in the field of software security, can solve problems such as programmers' difficulty in mastering and operating, complex implementation of JavaScript programs, etc., and achieve the effect of simple and effective implementation method, easy to grasp, and easy to operate

Active Publication Date: 2013-02-13
ZHEJIANG UNIV CITY COLLEGE
View PDF5 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the implementation of existing JavaScript programs is generally more complicated, and generally requires extending the browser or modifying the Web application program, or even modifying the original syntax of JavaScript, which is difficult for programmers to master and operate.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for realizing lightweight class JavaScript sandbox
  • Method for realizing lightweight class JavaScript sandbox
  • Method for realizing lightweight class JavaScript sandbox

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

[0038] Please refer to figure 1 As shown, the implementation method of the lightweight JavaScript sandbox of the present invention includes the following steps:

[0039] S10: Define the access control inside the sandbox, including the following steps:

[0040] S101: Define a function as the scope of the sandbox, encapsulate the suspicious JavaScript code inside this specific function, define a set of forbidden functions for this sandbox, the execution of these JavaScript functions may cause dangerous program behavior; functions that are forbidden to access The collection is shown in the followi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for realizing a lightweight class JavaScript sandbox. The method comprises the following steps of: S10, defining access control inside the sandbox; S11, automatically generating a sandbox monitoring code according to the defined access control; S12, automatically generating a monitoring code for stopping an access function according to the defined access control; and S13, detecting a malicious code inside the sandbox in real time, and stopping calling a dangerous function. The method for realizing the lightweight class JavaScript sandbox provided by the invention is simple and effective; a programmer can conveniently grasp and operate the method for realizing the lightweight class JavaScript sandbox; the JavaScript program code is safely executed inside the sandbox; and no dangerous program behavior is generated.

Description

Technical field [0001] The invention belongs to the technical field of software security, and relates to a method for implementing a lightweight JavaScript sandbox. Background technique [0002] JavaScript language is a scripting language widely used in Internet applications. JavaScript language has good expressive power and flexibility. Using JavaScript language can improve the flexibility and expressiveness of software systems, and improve the readability and reliability of software systems. Reusability. [0003] The function (function) is the basic structure of the JavaScript language. The JavaScript program is composed of a set of functions. Only by ensuring the safe and reliable execution of the target JavaScript function can the JavaScript program be executed safely and reliably without generating dangerous and malicious programs. behavior. JavaScript language supports runtime evaluation syntax features. Many software systems (such as social networks) use runtime evaluation...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/53
Inventor 吴明晖吕嘉颜晖金苍宏薛莲
Owner ZHEJIANG UNIV CITY COLLEGE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products