Method and system for protecting against unknown malicious activities by detecting a heap spray attack on an electronic device
AssigneeMcAfee, Inc.
InventorsJ. McEnroe Samuel Navaraj, Rahul C. Kashyap
Life of this patent
Estimating the term…
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.
Claims24
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.
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.
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.
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.
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.
Dependencies are inferred from the claim text.