Generic framework for runtime interception and execution control of interpreted languages
View Patent ↗A system and method for controlling execution of an interpreted language. Statements of the interpreted language to be executed by a script engine are intercepted by a protection module and control is passed to a script helper module that is associated with the script engine. The script helper module establishes a secure communications channel with an authorization component and passes the statements and an authorization request to the authorization component. The authorization component sends a reply to the script helper module which either permits the script engine to execute the statement or cancels the attempted execution. When the script engine is loaded, a list is updated identifying the script engine. If a script helper module is not present for the loaded script engine, a boot-strap loader is called to load the script helper module. A special information block contains data as to the location of the interception points.
1. A method comprising:
(a) intercepting a computerized action, wherein the computerized action comprises either:
(i) a request to execute a statement of computer language code; or
(ii) execution of a statement of computer language code;
(b) first passing the computerized action to a trampoline code adapted to pass control to a boot-strap loader;
(c) accessing in the boot-strap loader an address of an information block associated with a script engine, wherein the information block identifies a script helper module associated with the script engine;
(d) if the boot-strap loader has not executed successfully, loading the script helper module identified in the information block;
(e) if the boot-strap loader has executed successfully, second passing the computerized action to the script engine; and
(f) completing the first and second passing steps in an absence of the script helper module.
2. The method of claim 1 further comprising:
using the script helper module to access an interpreted language code based on the statement of computer language code.
3. The method of claim 1 further comprising:
identifying origin information relating to the statement of computer language code.
4. The method of claim 1 further comprising:
establishing a secure communications channel with an authorization component.
5. The method of claim 4 further comprising:
sending the interpreted language code and origin information to the authorization component.
6. The method of claim 5 further comprising:
using the interpreted language code and the origin information to determine whether:
(i) the computerized action is to be executed; or
(ii) the computerized action is to be canceled.
7. The method of claim 1 further comprising:
canceling the computerized action if an authorization component does not permit the computerized action to execute.
8. The method of claim 1 further comprising:
sending the computerized action to the script engine only when an authorization component permits the computerized action to execute based on analysis of the statement of computer language code.