Speculative CPU Emulation for ROP Payload Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current systems are ineffective in detecting return-oriented programming (ROP) payloads, which allow attackers to execute arbitrary code by manipulating existing code fragments, posing a significant threat despite protections like Data Execution Prevention (DEP).

Innovation Solution

The detection mechanism identifies potential gadget address spaces and speculatively executes code fragments to determine if a data piece corresponds to these spaces, using a CPU emulator to identify ROP payloads by counting unique gadget executions and threshold-based criteria.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If Data Execution Prevention (DEP) is implemented to prevent code injection attacks, then the security against traditional shellcode injection is improved, but attackers can bypass this protection by using return-oriented programming (ROP) techniques that execute existing code fragments

Engineering Contradiction:
Improvesecurity against code injectionVSAvoidROP-based attacks
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The system performs preliminary identification of gadget address spaces and speculatively executes code fragments before actual ROP payload execution can occur. By pre-identifying potential gadget locations and analyzing their execution patterns, the system establishes detection criteria in advance that enable it to recognize ROP attacks when they occur, effectively preparing defensive measures before the attack fully materializes.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A CPU emulator is introduced as an intermediary component that speculatively executes code fragments and analyzes execution patterns without actually running the potentially malicious ROP payload on the real system. This emulator acts as a safe intermediary that can explore execution paths and identify ROP patterns while isolating the real system from direct exposure to the attack, enabling detection without compromising system integrity.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If the system speculatively executes code fragments to detect ROP payloads, then the detection accuracy is improved, but the computational overhead and system performance are worsened

Engineering Contradiction:
ImproveROP payload detection accuracyVSAvoidcomputational overhead
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

Instead of fully executing complete ROP payloads or analyzing entire code segments, the system performs partial speculative execution of code fragments and analyzes only specific execution patterns that are indicative of ROP attacks. By focusing on partial execution and key pattern recognition rather than comprehensive analysis, the system achieves sufficient detection accuracy while significantly reducing the computational overhead associated with full execution and analysis.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If the system analyzes execution patterns to distinguish intentional ROP payloads from accidental code execution, then the false positive rate is reduced, but the complexity of the detection mechanism is increased

Engineering Contradiction:
Improvedetection accuracyVSAvoiddetection mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system pre-establishes execution patterns and criteria that characterize intentional ROP payload execution versus accidental code execution. By defining these patterns in advance during the speculative execution phase, the system creates a reference framework that simplifies the subsequent detection process. This preliminary establishment of detection criteria reduces the complexity of real-time analysis by providing pre-defined benchmarks against which actual execution can be compared.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11599628B2Detecting return-oriented programming payloads by evaluating data for a gadget address space address and determining whether operations associated with instructions beginning at the address indicate a return-oriented programming payload
Publication Date: 2023.03.07 THE TRUSTEES OF COLUMBIA UNIV IN THE CITY OF NEW YORK
  • US11599628B2 patent drawing
  • US11599628B2 patent drawing
  • US11599628B2 patent drawing

AI summary

Systems, methods, and media for detecting the presence of return-oriented programming (ROP) payloads are provided, comprising: identifying a potential gadget address space; determining if a piece of the data corresponds to an address of the potential gadget address space; and in response to determining that the piece of the data corresponds to an address of the potential gadget address space: determining whether a plurality of operations, each associated one of a plurality instructions beginning at the address, indicates that an ROP payload is present in the data, and indicating that an ROP payload is present in the data in response to making a determination that a plurality of operations indicates that an ROP payload is present in the data a given number of times.