Memory Anomaly Detection for Heap Spray Attack Identification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional heap spray detection methods using whitelists or blacklists for NOP instructions are ineffective due to high false positives and negatives, as they struggle to keep pace with the vast number of permutations and variations in non-malicious patterns, leading to inefficient detection and potential missed attacks.

Innovation Solution

A memory anomaly detection system that monitors memory allocation and performs similarity analysis using fuzzy hashing to identify highly correlated content across memory regions, reducing false positives and negatives by analyzing memory regions for abnormal allocation and patterns.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional whitelist or blacklist comparison methods are used to detect NOP instructions, then detection can be performed with known patterns, but the system produces high false positives and cannot keep pace with vast permutations of non-malicious patterns

Engineering Contradiction:
Improvedetection accuracyVSAvoidfalse positive rate
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent transforms the detection approach from static pattern matching (whitelist/blacklist) to dynamic analysis by monitoring memory allocation parameters. It tracks the number of memory regions, total memory allocated, and size distributions, using these quantitative parameters to detect heap spray attacks without relying on predefined NOP instruction patterns, thereby eliminating false positives from legitimate applications.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent shifts detection from the traditional dimension of inspecting NOP instruction sequences to a new dimension of analyzing memory allocation behavior. By examining memory region counts, allocation sizes, and distribution patterns, the system detects attacks based on behavioral anomalies rather than content matching, resolving the contradiction between detecting novel patterns and avoiding false positives.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If a whitelist of all possible non-malicious NOP instructions is maintained, then false positives can be eliminated, but the list would require constant updating and become untenable

Engineering Contradiction:
Improvefalse positive rateVSAvoidwhitelist maintenance complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements a self-service detection system that automatically learns and adapts to legitimate memory allocation patterns without human intervention. By continuously monitoring memory allocation behavior and establishing baseline statistics, the system autonomously distinguishes between normal and malicious patterns, eliminating the need for manual whitelist updates and maintenance.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system incorporates feedback mechanisms where detection results and memory allocation patterns are continuously analyzed to refine detection thresholds and parameters. This closed-loop approach allows the system to adapt to new legitimate patterns automatically, maintaining high reliability without requiring manual intervention to update whitelists.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If memory allocation monitoring and similarity analysis are performed on all memory regions, then detection accuracy improves, but processing time and computational resources increase

Engineering Contradiction:
Improvedetection accuracyVSAvoiddetection speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies partial action by focusing analysis only on memory regions that exhibit anomalous allocation patterns. Instead of analyzing all memory regions equally, the system identifies suspicious regions based on allocation statistics and applies detailed similarity analysis only to those regions, reducing computational overhead while maintaining detection accuracy.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The detection process is segmented into multiple stages: initial screening based on memory allocation parameters, followed by detailed similarity analysis only for suspicious regions. This segmentation allows the system to quickly filter out normal memory allocations and concentrate computational resources on potential threats, balancing speed and accuracy.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10430586B1Methods of identifying heap spray attacks using memory anomaly detection
Publication Date: 2019.10.01 MAGENTA SECURITY HOLDINGS LLC
  • US10430586B1 patent drawing
  • US10430586B1 patent drawing
  • US10430586B1 patent drawing

AI summary

A non-transitory storage medium including instructions that are executable by one or more processors to perform operations including instrumenting a VM is shown. The VM is used to process an object to determine whether the object is associated with malware. Logic within the VM analyzes memory allocated for a process within the VM for a point of interest (POI), the POI being an address of one of a set predetermined instructions likely to be associated with malware. The VMM detects a memory violation during processing of the object and responsive to detecting the memory violation, injects a transition event at the POI on the page on which the POI is located in memory. Further, responsive to detecting an attempted execution of the transition event, the VMM (i) emulates an instruction located at the POI, and (ii) the logic within the VM performs one or more malware detection routines.