Malware Detection via CPU Cache Miss Emulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Signature-based malware detection methods fail to effectively identify packed executables containing junk instructions, as these packers alter byte-level representations and insert junk instructions to evade detection, making it difficult to discriminate between junk and actual code.

Innovation Solution

The method involves emulating the execution of an executable up to a first count of instructions, counting cache misses, and comparing them to a threshold to identify potentially malicious files, thereby distinguishing between packed executables with junk instructions and those without.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If packers insert junk instructions in code stream, then malware detection difficulty increases, but executable functionality is preserved

Engineering Contradiction:
Improvemalware detection accuracyVSAvoidcode stream complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts and removes junk instructions from the code stream through emulation-based analysis. The system identifies instructions that do not contribute to actual program functionality by analyzing execution patterns and data flow, then filters them out to reveal the underlying malware payload for detection.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces an emulation environment as an intermediary between the packed executable and the detection system. This virtual execution environment allows the system to observe actual instruction behavior and effects without directly executing the malicious code, enabling safe analysis of junk instruction patterns.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If traditional entropy-based detection is used, then detection speed is fast, but detection accuracy decreases due to junk instructions

Engineering Contradiction:
Improvemalware detection precisionVSAvoiddetection time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies partial emulation by executing only a limited number of instructions or analyzing specific code sections rather than fully emulating the entire executable. This approach provides sufficient information to detect malware presence while avoiding the time cost of complete execution analysis.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent performs preliminary analysis of the code stream to identify and remove junk instructions before conducting main detection operations. This preprocessing step simplifies subsequent analysis and improves overall detection efficiency by eliminating distracting non-functional instructions early in the process.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If packers change byte-level representations, then signature-based detection fails, but program execution semantics are maintained

Engineering Contradiction:
Improvepacker evasion capabilityVSAvoidsignature-based detection reliability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent replaces static signature-based detection with dynamic behavior-based analysis through emulation. Instead of relying on fixed byte-pattern matching that packers can easily evade, the system observes actual execution behavior, instruction effects, and control flow patterns that remain consistent regardless of code obfuscation.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent changes the detection parameter from static byte-level patterns to dynamic execution characteristics such as instruction frequency, data access patterns, and control flow behavior. These parameters remain relatively stable across different packing schemes while maintaining the underlying program semantics, enabling reliable detection despite code transformation.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9607152B1Detect encrypted program based on CPU statistics
Publication Date: 2017.03.28 CA TECH INC
  • US9607152B1 patent drawing
  • US9607152B1 patent drawing
  • US9607152B1 patent drawing

AI summary

Techniques are presented for detecting malware in an executable. The method includes receiving an executable to evaluate for malware, emulating an execution of the executable up to a first count of instructions, determining a number of cache misses that occur while emulating the executable up to the first count of instructions, comparing the number of cache misses to a threshold, and upon determining the number of cache misses exceeds the threshold, identifying the executable as potentially containing malware.