IP Library Granted Patent US 9,223,964
Granted Patent B2
US 9,223,964 · App. 14/098,299 · Granted Dec 29, 2015

Detecting JAVA sandbox escaping attacks based on JAVA bytecode instrumentation and JAVA method hooking

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,223,964
App. No.
14/098,299
Granted
Dec 29, 2015
Kind
B2
Abstract

By injecting bytecode into a predetermined method of a sandbox environment, an application that uses an exploit to attempt to escape from the sandbox environment may be detected without knowledge of the application or the exploit used to attempt to escape from the sandbox environment. Upon indicating that the application has escaped the sandbox, the application may be terminated or the escape may be reported, allowing further monitoring of the application.

Claims (52)

1. A nontransitory machine-readable medium on which are stored instructions, comprising instructions that when executed by a programmable device, cause the programmable device to:

instantiate a sandbox environment on the programmable device; and

inject code into the sandbox environment, the code comprising instructions that when executed by the programmable device, instruments a method of the sandbox to cause the programmable device to:

detect an attempt to escape from the sandbox environment without depending on knowledge of an exploit used to attempt to escape the sandbox environment, wherein the method of the sandbox provides a reference to a security manager object; and

indicate that an attempt to escape has occurred when an invocation of the method returns a value that is associated with a change to the security manager object.

2. The nontransitory machine-readable medium of claim 1 , wherein the instructions that when executed instrument a method of the sandbox to cause the programmable device to detect an attempt to escape from the sandbox environment without depending on knowledge of the exploit used to attempt to escape the sandbox environment comprise instructions that when executed cause the method of the sandbox to:

indicate an attempt to escape has occurred responsive to an invocation of the method returning a value indicating that no security manager object exists.

3. The nontransitory machine-readable medium of claim 1 , wherein the instructions that when executed instrument a method of the sandbox to cause the programmable device to detect an attempt to escape from the sandbox environment without depending on knowledge of the exploit used to attempt to escape the sandbox environment comprise instructions that when executed cause the method of the sandbox to:

indicate an attempt to escape has occurred if an invocation of the method returns a value indicating that the security manager object has been disabled.

4. The nontransitory machine-readable medium of claim 1 , wherein the method is a method that executes a specified command in a separate process on the programmable device.

5. The nontransitory machine-readable medium of claim 4 , wherein the instructions that when executed instrument a method of the sandbox to cause the programmable device to detect an attempt to escape from the sandbox environment without depending on knowledge of the exploit used to attempt to escape the sandbox environment comprise instructions that when executed cause the method of the sandbox to:

check a permission status of an application invoking the method; and

indicate an attempt to escape responsive to the application having a predetermined set of permissions.

6. The nontransitory machine-readable medium of claim 4 , wherein the instructions that when executed instrument a method of the sandbox to cause the programmable device to detect an attempt to escape from the sandbox environment without depending on knowledge of the exploit used to attempt to escape the sandbox environment comprise instructions that when executed cause the method of the sandbox to:

check a permission status of an application invoking the method; and

indicate an attempt to escape responsive to the application having a predetermined permission.

7. The nontransitory machine-readable medium of claim 1 , wherein the instructions that when executed by the programmable device cause the programmable device to inject code into the sandbox environment comprise instructions that when executed cause the programmable device to inject code into the sandbox environment after the sandbox environment has started.

8. The nontransitory machine-readable medium of claim 1 , wherein the instructions further comprise instructions that when executed cause the programmable device to terminate an application attempting to escape the sandbox environment.

9. The nontransitory machine-readable medium of claim 1 , wherein the instructions further comprise instructions that when executed cause the programmable device to report an application attempting to escape the sandbox environment.

10. A method of detecting an attempt to escape from a bytecode-based sandbox environment of a programmable device, comprising:

instantiating the sandbox environment in the programmable device;

injecting bytecode into a predetermined method of the sandbox environment; wherein the predetermined method provides a reference to a security manager object;

executing the bytecode in the predetermined method upon invocation of the method by an application;

indicating an attempt to escape from the sandbox by the application without depending on knowledge of an exploit used by the application to attempt to escape from the sandbox; wherein the indicating of the attempt using a value associated with a change to the security manager object that is returned when the predetermined method is invoked.

11. The method of claim 10 , wherein indicating an attempt to escape from the sandbox by the application comprises:

indicating an attempt to escape from the sandbox responsive to the method indicating that no security manager object exists.

12. The method of claim 10 , wherein the predetermined method of the sandbox environment is a method that allows the application to execute a command in a separate process on the programmable device.

13. The method of claim 12 , wherein executing the bytecode in the predetermined method comprises:

checking a permission status of the application; and

wherein indicating an attempt to escape comprises:

indicating an attempt to escape from the sandbox responsive to the application having a predetermined permission status.

14. A system for allowing applications to run in a sandbox environment, comprising:

a programmable device;

an operating system for the programmable device;

a virtual machine environment, configured for execution under the operating system, that when executed by the programmable device creates a sandbox environment;

detection logic to instrument a method of the sandbox environment to detect that an application executing in the sandbox environment has attempted to escape the sandbox environment, without depending on knowledge of an exploit used to attempt to escape the sandbox environment,

wherein the virtual machine environment comprises:

an agent class object; and

a class loader method of the virtual machine environment, configured to load the agent class object upon initialization of the virtual machine environment, and

wherein the agent class object is configured to inject the detection logic into a predetermined method of the sandbox environment; and

wherein the predetermined method provides a reference to a security manager object; and detects that an application has attempted to escape responsive to an invocation of the predetermined method returning a value that is associated with a change to the security manager object.

15. The system of claim 14 , wherein the detection logic comprises bytecode.

16. The system of claim 14 , wherein the detection logic, when injected by the agent class object into the predetermined method of the sandbox environment, is configured to cause the predetermined method to indicate that an attempt to escape has occurred responsive to an invocation of the method returning a value that no security manager exists.

17. The system of claim 14 , wherein the predetermined method is a method that when executed causes a command to execute on the programmable device as a separate process.

18. The system of claim 17 , wherein the detection logic, when injected by the agent class object into the predetermined method of the sandbox environment, is configured to cause the predetermined method to:

check a permission status of the application; and

indicate an attempt to escape has occurred responsive to the application having a predetermined set of permissions.

19. The system of claim 17 , wherein the detection logic, when injected by the agent class object into the predetermined method of the sandbox environment, is configured to cause the predetermined method to:

check a permission status of the application; and

indicate an attempt to escape has occurred responsive to the application having a predetermined permission.

20. The system of claim 14 , wherein the detection logic is configured to terminate the application attempting to escape the sandbox.

21. The system of claim 14 , wherein agent class object is configured to inject the detection logic into the predetermined method of the sandbox environment after the sandbox environment has started.

Assignments (9)
CORRECTIVE ASSIGNMENT TO CORRECT THE THE PATENT TITLES AND REMOVE DUPLICATES IN THE SCHEDULE PREVIOUSLY RECORDED AT REEL: 059354 FRAME: 0335. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Jun 23, 2022
From: MCAFEE, LLC
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 060792/0307 →
SECURITY INTEREST Recorded Mar 3, 2022
From: MCAFEE, LLC
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT AND COLLATERAL AGENT
Reel/Frame 059354/0335 →
RELEASE OF INTELLECTUAL PROPERTY COLLATERAL - REEL/FRAME 045056/0676 Recorded Mar 2, 2022
From: MORGAN STANLEY SENIOR FUNDING, INC., AS COLLATERAL AGENT
To: MCAFEE, LLC
Reel/Frame 059354/0213 →
RELEASE OF INTELLECTUAL PROPERTY COLLATERAL - REEL/FRAME 045055/0786 Recorded Oct 26, 2020
From: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
To: MCAFEE, LLC
Reel/Frame 054238/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE PATENT 6336186 PREVIOUSLY RECORDED ON REEL 045056 FRAME 0676. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY INTEREST. Recorded Oct 22, 2020
From: MCAFEE, LLC
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 054206/0593 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE PATENT 6336186 PREVIOUSLY RECORDED ON REEL 045055 FRAME 786. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY INTEREST. Recorded Oct 22, 2020
From: MCAFEE, LLC
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 055854/0047 →
SECURITY INTEREST Recorded Jan 12, 2018
From: MCAFEE, LLC
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 045055/0786 →
SECURITY INTEREST Recorded Jan 12, 2018
From: MCAFEE, LLC
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 045056/0676 →
CHANGE OF NAME AND ENTITY CONVERSION Recorded Aug 24, 2017
From: MCAFEE, INC.
To: MCAFEE, LLC
Reel/Frame 043665/0918 →