IP Library Granted Patent US 9,003,501
Granted Patent B2
US 9,003,501 · App. 12/962,439 · Granted Apr 7, 2015

Method and system for protecting against unknown malicious activities by detecting a heap spray attack on an electronic device

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,003,501
App. No.
12/962,439
Granted
Apr 7, 2015
Kind
B2
Abstract

A method and system for protecting against unknown malicious activities by detecting a heap spray attack on a electronic device are disclosed. A script is received at an electronic device from a remote device via a network and a loop operation is detected in the script that contains a write operation operable to write data to a memory of the electronic device. The amount of the data operable to be written to the memory by the write operation is determined and the data is prevented from being written to the memory if the amount of the data is greater than or equal to a threshold.

Claims (80)

1. A method for detecting a heap spray attack, comprising:

receiving a script at an electronic device from a remote device via a network;

detecting a loop operation in the script that contains a write operation operable to write data to a memory of the electronic device;

determining an amount of the data operable to be written to the memory by the write operation;

based at least on a determination that the data is greater than or equal to a threshold, detecting a potential heap spray attack and preventing the data from being written to the memory; and

based at least on a determination that the data is less than the threshold, allowing the script to be executed.

2. The method of claim 1 , wherein:

the amount of data comprises a size of the data based on one iteration of the loop operation; and

the threshold is between 750 kilobytes (KB) and 1.5 megabytes (MB).

3. The method of claim 1 , wherein:

the amount of data comprises an aggregate size of multiple copies of the data based on a total number of iterations of the loop operation; and

the threshold is between 70 megabytes (MB) and 150 MB.

4. The method of claim 1 , wherein:

the amount of data comprises a size of the data based on one iteration of the loop operation and an aggregate size of multiple copies of the data based on a total number of iterations of the loop operation; and

the threshold comprises a first threshold and a second threshold.

5. The method of claim 4 , further comprising preventing the data from being written to the memory if:

the size of the data based on one iteration of the loop is greater than or equal to the first threshold; and

the aggregate size of the multiple copies of the data based on the total number of iterations of the loop operation is greater than or equal to the second threshold.

6. The method of claim 1 , wherein the data comprises a string including a NOP code and a shellcode.

7. An electronic device for detecting a heap spray attack, comprising:

a processor;

a computer readable memory communicatively coupled to the processor; and

processing instructions encoded in the computer readable memory, the processing instructions, when executed by the processor, operable to perform operations comprising:

receiving a script from a remote device via a network;

detecting a loop operation in the script that contains a write operation operable to write data to the computer readable memory;

determining an amount of the data operable to be written to the computer readable memory;

based at least on a determination that the data is greater than or equal to a threshold, detecting a potential heap spray attack and preventing the data from being written to the computer readable memory; and

based at least on a determination that the data is less than the threshold, allowing the script to be executed.

8. The electronic device of claim 7 , wherein:

the amount of data comprises a size of the data based on one iteration of the loop operation; and

the threshold is between 750 kilobytes (KB) and 1.5 megabytes (MB).

9. The electronic device of claim 7 , wherein:

the amount of data comprises an aggregate size of multiple copies of the data based on a total number of iterations of the loop operation; and

the threshold is between 70 megabytes (MB) and 150 MB.

10. The electronic device of claim 7 , wherein:

the amount of data comprises a size of the data based on one iteration of the loop operation and an aggregate size of multiple copies of the data based on a total number of iterations of the loop operation; and

the threshold comprises a first threshold and a second threshold.

11. The electronic device of claim 10 , wherein the processing instructions are further operable to perform operations comprising preventing the data from being written to the memory if:

the size of the data based on one iteration of the loop is greater than or equal to the first threshold; and

the aggregate size of the multiple copies of the data based on the total number of iterations of the loop operation is greater than or equal to the second threshold.

12. The electronic device of claim 7 , wherein the data comprises a string including a NOP code and a shellcode.

13. A non-transitory computer readable medium storing instructions for detecting a heap spray attack, the instructions, when executed by a processor, configured to:

receive a script at an electronic device from a remote device via a network;

detect a loop operation in the script that contains a write operation operable to write data to a memory of the electronic device;

determine an amount of the data operable to be written to the memory by the write operation;

based at least on a determination that the data is greater than or equal to a threshold, detecting a potential heap spray attack and prevent the data from being written to the memory; and

based at least on a determination that the data is less than the threshold, allowing the script to be executed.

14. The non-transitory computer readable medium of claim 13 , wherein:

the amount of data comprises a size of the data based on one iteration of the loop operation; and

the threshold is between 750 kilobytes (KB) and 1.5 megabytes (MB).

15. The non-transitory computer readable medium of claim 13 , wherein:

the amount of data comprises an aggregate size of multiple copies of the data based on a total number of iterations of the loop operation; and

the threshold is between 70 megabytes (MB) and 150 MB.

16. The non-transitory computer readable medium of claim 13 , wherein:

the amount of data comprises a size of the data based on one iteration of the loop operation and an aggregate size of multiple copies of the data based on a total number of iterations of the loop operation; and

the threshold comprises a first threshold and a second threshold.

17. The non-transitory computer readable medium of claim 16 , wherein the instructions are further configured to prevent the data from being written to the memory if:

the size of the data based on one iteration of the loop is greater than or equal to the first threshold; and

the aggregate size of the multiple copies of the data based on the total number of iterations of the loop operation is greater than or equal to the second threshold.

18. The non-transitory computer readable medium of claim 13 , wherein the data comprises a string including a NOP code and a shellcode.

19. A method for detecting a heap spray attack, comprising:

receiving a script at an electronic device from a remote device via a network;

detecting a loop operation in the script that contains a write operation operable to write a string to a memory of the electronic device;

determining a size of the string operable to be written to the memory by the write operation based on one iteration of the loop operation;

determining an aggregate size of multiple copies of the string operable to be written to the memory by the write operation based on a total number of iterations of the loop operation;

based at least on a determination that the size of the string is greater than or equal to a first threshold and the aggregate size of the multiple copies of the string is greater than or equal to a second threshold, detecting a potential heap spray attack and preventing the string from being written to the memory; and

based at least on a determination that the size of the string is less than a first threshold or the aggregate size of the multiple copies of the string is less than a second threshold, allowing the string to be written to the memory.

20. The method of claim 19 , wherein:

the first threshold is between 750 kilobytes (KB) and 1.5 megabytes (MB); and

the second threshold is between 70 megabytes (MB) and 150 MB.

21. The method of claim 19 , wherein the string comprises a NOP code and a shellcode.

22. The method of claim 19 , wherein the write operation comprises a concatenation operation.

23. The method of claim 19 , wherein the script is a JavaScript or a VBScript.

24. A non-transitory computer readable medium storing instructions for protecting an electronic device, the instructions, when executed by a processor, configured to:

detect a script received at an electronic device from a remote device via a network;

detect a loop operation in the script that contains a write operation operable to write a string to a memory of the electronic device;

determine a size of the string operable to be written to the memory by the write operation based on one iteration of the loop operation;

determine an aggregate size of multiple copies of the string operable to be written to the memory by the write operation based on a total number of iterations of the loop operation;

based at least on a determination that the size of the string is greater than or equal to a first threshold and the aggregate size of the multiple copies of the string is greater than or equal to a second threshold, detecting a potential heap spray attack and preventing the string from being written to the memory; and

based at least on a determination that the size of the string is less than a first threshold or the aggregate size of the multiple copies of the string is less than a second threshold, allowing the string to be written to the memory.

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 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 →
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 →
SECURITY INTEREST Recorded Jan 12, 2018
From: MCAFEE, LLC
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 045056/0676 →
SECURITY INTEREST Recorded Jan 12, 2018
From: MCAFEE, LLC
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 045055/0786 →
CHANGE OF NAME AND ENTITY CONVERSION Recorded Aug 24, 2017
From: MCAFEE, INC.
To: MCAFEE, LLC
Reel/Frame 043665/0918 →