# US 2016/0253497 A1 · Return Oriented Programming Attack Detection Via Memory Monitoring

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2016/0253497 A1
- Document ID: US20160253497A1
- Status: Published application
- Kind: A1
- Application number: 14/632,652
- Filed: 2015-02-26
- Published: 2016-09-01
- Earliest claimed: 2015-02-26
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Mihai Christodorescu; Charles Bergan; Rajarshi Gupta; Satyajit Prabhakar Patne; Sumita Rao
- Web page: https://patentgrep.com/patent/US20160253497A1

## CPC

- G06F 21/554: {involving event detection and direct action}
- G06F 21/52: during program execution, e.g. stack integrity {; Preventing unwanted data erasure; Buffer overflow}
- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Aspects include computing devices, systems, and methods for implementing detecting return oriented programming (ROP) attacks on a computing device. A memory traversal map for a program called to run on the computing device may be loaded. A memory access request of the program to a memory of the computing device may be monitored and a memory address of the memory from the memory access request may be retrieved. The retrieved memory address may be compared to the memory traversal map and a determination of whether the memory access request indicates a ROP attack may be made. The memory traversal map may include a next memory address adjacent to a previous memory address in the memory traversal map. A cumulative anomaly score based on mismatches between the retrieved memory address and the memory traversal map may be calculated and used to determine whether to load a finer grain memory traversal map.

## Claims

### Claim 1

A method of detecting return oriented programming attacks on a computing device, comprising:
loading a memory traversal map for a program called to run on the computing device;
monitoring a memory access request of the program to a memory of the computing device;
comparing a memory address of the memory from the memory access request to the memory traversal map; and
determining whether the memory access request indicates a return oriented programming attack based on comparing the memory address to the memory traversal map.

### Claim 2 (depends on 1)

The method of claim 1, wherein the memory traversal map comprises a plurality of memory addresses for processor-executable codes of the program stored in the memory and the plurality of memory addresses are linked in an order of access of the memory corresponding to an order of execution of the processor-executable codes for the program such that a next memory address of the plurality of memory addresses is adjacent to a previous memory address in the memory traversal map.

### Claim 3 (depends on 2)

The method of claim 2, wherein:
loading a memory traversal map for a program running on the computing device comprises loading the next memory address based on a previous memory access request for the previous memory address; and
comparing a memory address of the memory from the memory access request to the memory traversal map comprises comparing the memory address to the next memory address.

### Claim 4 (depends on 2)

The method of claim 2, wherein:
comparing a memory address of the memory from the memory access request to the memory traversal map comprises determining whether the memory address matches the next memory address; and
determining whether the memory access request indicates a return oriented programming attack based on comparing the memory address to the memory traversal map comprises determining whether the memory access request indicates a return oriented programming attack in response to determining that the memory address does not match the next memory address.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
holding a return of the memory access request in response to determining that the memory access request indicates a return oriented programming attack; and
releasing the return of the memory access request in response to determining that the memory access request does not indicate a return oriented programming attack.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
determining an anomaly score for a mismatch between the memory address of the memory from the memory access request and the memory traversal map;
calculating a cumulative anomaly score using the determined anomaly score;
comparing the cumulative anomaly score to a cumulative anomaly score threshold; and
loading a finer grain memory traversal map in response to the cumulative anomaly score exceeding the cumulative anomaly score threshold.

### Claim 7 (depends on 1)

The method of claim 1, wherein loading a memory traversal map for a program called to run on the computing device comprises loading a memory traversal map representing a part of the program likely to be affected by a return oriented programming attack.

### Claim 8 (depends on 1)

The method of claim 1, further comprising triggering a configurable security response in response to determining that the memory access request indicates a return oriented programming attack.

### Claim 9 (depends on 1)

The method of claim 1, wherein the memory traversal map is a virtual memory traversal map created from an interprocedural control flow graph and a virtual memory layout of the program.

### Claim 10 (depends on 1)

The method of claim 1, wherein the memory traversal map is a physical memory traversal map created from an interprocedural control flow graph, a virtual memory layout of the program, and an operating system virtual-to-physical page map.

### Claim 11

A computing device, comprising:
a memory; and
a processor coupled to the memory and configured with processor-executable to perform operations comprising:
loading a memory traversal map for a program called to run on the processor;
monitoring a memory access request of the program to the memory;
comparing a memory address of the memory from the memory access request to the memory traversal map; and
determining whether the memory access request indicates a return oriented programming attack based on comparing the memory address to the memory traversal map.

### Claim 12 (depends on 11)

The computing device of claim 11, wherein the memory traversal map comprises a plurality of memory addresses for processor-executable codes of the program stored in the memory and the plurality of memory addresses are linked in an order of access of the memory corresponding to an order of execution of the processor-executable codes for the program such that a next memory address of the plurality of memory addresses is adjacent to a previous memory address in the memory traversal map.

### Claim 13 (depends on 2)

The method of claim 2, wherein the processor is configured with processor-executable to perform operations comprising:
loading a memory traversal map for a program running on the processor comprises loading the next memory address based on a previous memory access request for the previous memory address; and
comparing a memory address of the memory from the memory access request to the memory traversal map comprises comparing the memory address to the next memory address.

### Claim 14 (depends on 2)

The method of claim 2, wherein the processor is configured with processor-executable to perform operations such that:
comparing a memory address of the memory from the memory access request to the memory traversal map comprises determining whether the memory address matches the next memory address; and
determining whether the memory access request indicates a return oriented programming attack based on comparing the memory address to the memory traversal map comprises determining whether the memory access request indicates a return oriented programming attack in response to determining that the memory address does not match the next memory address.

### Claim 15 (depends on 11)

The computing device of claim 11, the processor is configured with processor-executable to perform operations further comprising:
holding a return of the memory access request in response to determining that the memory access request indicates a return oriented programming attack; and
releasing the return of the memory access request in response to determining that the memory access request does not indicate a return oriented programming attack.

### Claim 16 (depends on 11)

The computing device of claim 11, the processor is configured with processor-executable to perform operations further comprising:
determining an anomaly score for a mismatch between the memory address of the memory from the memory access request and the memory traversal map;
calculating a cumulative anomaly score using the determined anomaly score;
comparing the cumulative anomaly score to a cumulative anomaly score threshold; and
loading a finer grain memory traversal map in response to the cumulative anomaly score exceeding the cumulative anomaly score threshold.

### Claim 17 (depends on 11)

The computing device of claim 11, wherein the processor is configured with processor-executable to perform operations such that loading a memory traversal map for a program called to run on the processor comprises loading a memory traversal map representing a part of the program likely to be affected by a return oriented programming attack.

### Claim 18 (depends on 11)

The computing device of claim 11, the processor is configured with processor-executable to perform operations further comprising triggering a configurable security response in response to determining that the memory access request indicates a return oriented programming attack.

### Claim 19 (depends on 11)

The computing device of claim 11, wherein the processor is configured with processor-executable to perform operations comprising creating the memory traversal map as a virtual memory traversal map from an interprocedural control flow graph and a virtual memory layout of the program.

### Claim 20 (depends on 11)

The computing device of claim 11, wherein the processor is configured with processor-executable to perform operations comprising creating the memory traversal map as a physical memory traversal map from an interprocedural control flow graph, a virtual memory layout of the program, and an operating system virtual-to-physical page map.

### Claim 21

A computing device, comprising:
means for loading a memory traversal map for a program called to run on the computing device;
means for monitoring a memory access request of the program to a memory of the computing device;
means for comparing a memory address of the memory from the memory access request to the memory traversal map; and
means for determining whether the memory access request indicates a return oriented programming attack based comparing the memory address to the memory traversal map.

### Claim 22 (depends on 21)

The computing device of claim 21, wherein the memory traversal map comprises a plurality of memory addresses for processor-executable codes of the program stored in the memory and the plurality of memory addresses are linked in an order of access of the memory corresponding to an order of execution of the processor-executable codes for the program such that a next memory address of the plurality of memory addresses is adjacent to a previous memory address in the memory traversal map.

### Claim 23 (depends on 22)

The computing device of claim 22, wherein:
means for loading a memory traversal map for a program running on the computing device comprises loading the next memory address based on a previous memory access request for the previous memory address; and
means for comparing a memory address of the memory from the memory access request to the memory traversal map comprises comparing the memory address to the next memory address.

### Claim 24 (depends on 22)

The computing device of claim 22, wherein:
means for comparing a memory address of the memory from the memory access request to the memory traversal map comprises means for determining whether the memory address matches the next memory address; and
means for determining whether the memory access request indicates a return oriented programming attack based on comparing the memory address to the memory traversal map comprises means for determining whether the memory access request indicates a return oriented programming attack in response to determining that the memory address does not match the next memory address.

### Claim 25 (depends on 22)

The computing device of claim 22, further comprising:
means for holding a return of the memory access request in response to determining that the memory access request indicates a return oriented programming attack; and
means for releasing the return of the memory access request in response to determining that the memory access request does not indicate a return oriented programming attack.

### Claim 26 (depends on 22)

The computing device of claim 22, further comprising:
means for determining an anomaly score for a mismatch between the memory address of the memory from the memory access request and the memory traversal map;
means for calculating a cumulative anomaly score using the determined anomaly score;
means for comparing the cumulative anomaly score to a cumulative anomaly score threshold; and
means for loading a finer grain memory traversal map in response to the cumulative anomaly score exceeding the cumulative anomaly score threshold.

### Claim 27 (depends on 22)

The computing device of claim 22, wherein means for loading a memory traversal map for a program called to run on the computing device comprises means for loading a memory traversal map representing a part of the program likely to be affected by a return oriented programming attack.

### Claim 28 (depends on 22)

The computing device of claim 22, further comprising means for triggering a configurable security response in response to determining that the memory access request indicates a return oriented programming attack.

### Claim 29 (depends on 22)

The computing device of claim 22, further comprising means for creating the memory traversal map as a virtual memory traversal map from an interprocedural control flow graph and a virtual memory layout of the program.

### Claim 30 (depends on 22)

The computing device of claim 22, further comprising means for creating the memory traversal map as a physical memory traversal map from an interprocedural control flow graph, a virtual memory layout of the program, and an operating system virtual-to-physical page map.

### Claim 31

A non-transitory processor-readable storage medium having stored thereon processor-executable instructions configured to cause a processor of a computing device to perform operations comprising:
loading a memory traversal map for a program called to run on the computing device;
monitoring a memory access request of the program to a memory of the computing device;
comparing a memory address of the memory from the memory access request to the memory traversal map; and
determining whether the memory access request indicates a return oriented programming attack based on comparing the memory address to the memory traversal map.

### Claim 32 (depends on 31)

The non-transitory processor-readable storage medium of claim 31, wherein the memory traversal map comprises a plurality of memory addresses for processor-executable codes of the program stored in the memory and the plurality of memory addresses are linked in an order of access of the memory corresponding to an order of execution of the processor-executable codes for the program such that a next memory address of the plurality of memory addresses is adjacent to a previous memory address in the memory traversal map.

### Claim 33 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations such that:
loading a memory traversal map for a program running on the computing device comprises loading the next memory address based on a previous memory access request for the previous memory address; and
comparing a memory address of the memory from the memory access request to the memory traversal map comprises comparing the memory address to the next memory address.

### Claim 34 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations such that:
comparing a memory address of the memory from the memory access request to the memory traversal map comprises determining whether the memory address matches the next memory address; and
determining whether the memory access request indicates a return oriented programming attack based on comparing the memory address to the memory traversal map comprises determining whether the memory access request indicates a return oriented programming attack in response to determining that the memory address does not match the next memory address.

### Claim 35 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations further comprising:
holding a return of the memory access request in response to determining that the memory access request indicates a return oriented programming attack; and
releasing the return of the memory access request in response to determining that the memory access request does not indicate a return oriented programming attack.

### Claim 36 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations further comprising:
determining an anomaly score for a mismatch between the memory address of the memory from the memory access request and the memory traversal map;
calculating a cumulative anomaly score using the determined anomaly score;
comparing the cumulative anomaly score to a cumulative anomaly score threshold; and
loading a finer grain memory traversal map in response to the cumulative anomaly score exceeding the cumulative anomaly score threshold.

### Claim 37 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations such that loading a memory traversal map for a program called to run on the computing device comprises loading a memory traversal map representing a part of the program likely to be affected by a return oriented programming attack.

### Claim 38 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations further comprising triggering a configurable security response in response to determining that the memory access request indicates a return oriented programming attack.

### Claim 39 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations further comprising creating the memory traversal map as a virtual memory traversal map from an interprocedural control flow graph and a virtual memory layout of the program.

### Claim 40 (depends on 32)

The non-transitory processor-readable storage medium of claim 32, wherein the stored processor-executable instructions are configured to cause the processor to perform operations further comprising creating the memory traversal map as a physical memory traversal map from an interprocedural control flow graph, a virtual memory layout of the program, and an operating system virtual-to-physical page map.
