Return Address Encryption for Return-Oriented Programming Mitigation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Return-oriented programming attacks can bypass executable space protections by reusing existing program sequences, posing a significant security risk across various architectures, including CISC and RISC systems, as attackers can chain instructions to execute arbitrary code, evading traditional defenses like DEP and code signing.

Innovation Solution

Encrypting the return address of a function using an encryption cookie, which is decrypted before the function returns, incorporating reversible instructions in the function prologue and epilogue to secure the return address, providing a low-overhead defense against return-oriented programming attacks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If executable space protection (DEP) is implemented to prevent code execution in data memory, then security against traditional buffer overflow attacks is improved, but return-oriented programming attacks can still bypass this protection by reusing existing executable instructions

Engineering Contradiction:
ImprovesecurityVSAvoidreturn-oriented programming attacks
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent changes the state of return addresses from plaintext to encrypted form. By encrypting return addresses before storing them on the stack and decrypting them only when needed for function return, the system prevents attackers from injecting and executing return-oriented programming gadgets while maintaining legitimate function returns.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If return addresses are encrypted to prevent return-oriented programming attacks, then security is improved, but additional encryption/decryption operations increase processing overhead

Engineering Contradiction:
ImprovesecurityVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs encryption of return addresses in advance, during the function prologue execution, before the function body runs. This preliminary encryption action ensures that when return addresses are later needed for function returns, they are already in the correct encrypted form, minimizing runtime overhead.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an encryption cookie as an intermediary value that facilitates the encryption and decryption of return addresses. This cookie acts as a key or mediator that enables secure transformation of return addresses without requiring complex cryptographic infrastructure, thus balancing security with performance.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Object-affected harmful factors

If encryption cookies are used to encrypt return addresses, then difficulty for attackers to decrypt return addresses increases, but implementation complexity of the security mechanism increases

Engineering Contradiction:
Improveattack difficultyVSAvoidimplementation complexity
Core Design Contradiction:
Object-affected harmful factorsVSDevice complexity

Solution Approach 1:

The patent uses simple encryption cookies that can be generated easily and discarded after use. These cookies are typically random values stored in registers or memory, requiring minimal computational resources to generate and use. The simplicity of these disposable encryption objects increases attack difficulty while keeping implementation complexity low.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS10572666B2Return-oriented programming mitigation
Publication Date: 2020.02.25 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10572666B2 patent drawing
  • US10572666B2 patent drawing

AI summary

Systems and methods for the mitigation of return-oriented programming are disclosed. A return address for a function is encrypted to generate an encrypted return address. The encrypted return address is stored as the return address for the function. The encrypted return address can be decrypted prior to a return instruction of the function.