# US 2019/0317676 A1 · Executable memory protection

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

- Number: US 2019/0317676 A1
- Document ID: US20190317676A1
- Status: Published application
- Kind: A1
- Application number: 15/951,861
- Filed: 2018-04-12
- Published: 2019-10-17
- Earliest claimed: 2018-04-12
- Assignees: Webroot Inc.
- Applicants: Webroot Inc.
- Inventors: Andrew L. Sandoval
- Web page: https://patentgrep.com/patent/US20190317676A1

## CPC

- G06F 3/0622: {in relation to access}
- G06F 21/54: by adding security routines or objects to programs
- G06F 3/0653: {Monitoring storage devices or systems}
- G06F 3/0673: {Single storage device}
- G06F 21/604: {Tools and structures for managing or administering access control systems}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Examples of the present disclosure describe systems and methods for executable memory protection. In an example, calls to a memory API may be monitored to identify protection attributes of the associated memory. If software requests access to memory that is both executable and writeable, different protection attributes may be used to limit the availability of memory that is both executable and writeable. Subsequently, if software attempts to access the memory in a way not permitted by the different protection attributes, a resulting memory exception may be evaluated to determine whether to modify the memory protection attributes. In examples, the memory protection attributes may be updated accordingly (e.g., to be made executable but not writeable, writeable but not executable, etc.) and execution of the set of software instructions may resume. Thus, memory that is both executable and writeable may be reduced or eliminated; decreasing the likelihood of exploitation by malicious software.

## Claims

### Claim 1

A system comprising:
at least one processor; and
memory storing instructions that, when executed by the at least one processor, causes the system to perform a set of operations, the set of operations comprising:
generating a hook on a memory application programming interface (API), wherein the hook is associated with the threat processor;
receiving, by a threat processor, an indication from the generated hook, wherein the indication is received in response to a set of software instructions generating a call to the memory API;
based on the received indication, generating stored memory information comprising one or more protection attributes associated with the call to the memory API;
determining whether the one or more protection attributes indicate memory that is executable and writeable;
based on determining the one or more protection attributes indicate memory that is executable and writeable, modifying the one or more protection attributes to generate modified protection attributes; and
continuing execution of the set of software instructions based on the modified protection attributes.

### Claim 2 (depends on 1)

The system of claim 1, wherein the set of operations further comprises:
registering an exception handler;
receiving, by the threat processor, an indication of a memory exception from the exception handler, wherein the memory exception is associated with accessing memory having the modified protection attributes by the set of software instructions;
determining one or more requested protection attributes associated with the memory exception;
determining, based on the stored memory information, whether the set of software instructions is permitted access to memory having at least one of the one or more requested protection attributes;
based on determining that the set of software is permitted access to memory having the at least one of the one or more requested protection attributes, modifying the memory having the modified protection attributes based on the one or more requested protection attributes; and
continuing execution of the set of software instructions using the memory.

### Claim 3 (depends on 1)

The system of claim 1, wherein modifying the one or more protection attributes to generate modified protection attributes comprises generating modified protection attributes that indicate memory that is one of executable or writeable.

### Claim 4 (depends on 1)

The system of claim 1, wherein modifying the one or more protection attributes to generate modified protection attributes comprises:
determining whether the set of software instructions needs access to memory that is both executable and writeable;
based on determining that the set of software instructions needs access to memory that is both executable and writeable, determining whether the set of software instructions is permitted access to memory that is both executable and writeable; and
when it is determined that the set of software instructions is not permitted access to memory that is both executable and writeable, modifying the one or more protection attributes to generate the modified protection attributes.

### Claim 5 (depends on 2)

The system of claim 2, wherein the set of operations further comprises:
based on determining that the set of software is not permitted access to memory having the at least one of the one or more requested protection attributes, retaining the modified protection attributes; and
continuing execution of the set of software instructions using the memory having the modified protection attributes.

### Claim 6 (depends on 2)

The system of claim 2, wherein modifying the memory having the modified protection attributes based on the one or more requested protection attributes comprises:
when the modified protection attributes indicate writeable memory, modifying protection attributes associated with the memory to be executable and not writeable; and
when the modified protection attributes indicate executable memory, modifying protection attributes associated with the memory to be writeable and not executable.

### Claim 7 (depends on 2)

The system of claim 2, wherein determining whether the set of software instructions is permitted access to memory having at least one of the one or more requested protection attributes comprises:
determining whether the set of software instructions needs access to memory that is both executable and writeable;
based on determining that the set of software instructions needs access to memory that is both executable and writeable, determining whether the set of software instructions is permitted access to memory that is both executable and writeable.

### Claim 8

A method for protecting executable memory, comprising:
registering an exception handler;
receiving, by the threat processor, an indication of a memory exception from the exception handler, wherein the memory exception is associated with a set of software instructions accessing memory associated with one or more current protection attributes;
determining one or more requested protection attributes associated with the memory exception;
determining whether the set of software instructions is permitted access to memory having at least one of the one or more requested protection attributes;
based on determining that the set of software is permitted access to memory having the at least one of the one or more requested protection attributes, modifying the memory associated with the current protection attributes based on the one or more requested protection attributes; and
continuing execution of the set of software instructions using the memory.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
based on determining that the set of software is not permitted access to memory having the at least one of the one or more requested protection attributes, retaining the current protection attributes; and
continuing execution of the set of software instructions using the memory having the current protection attributes.

### Claim 10 (depends on 8)

The method of claim 8, wherein determining whether the set of software instructions is permitted access to memory having at least one of the one or more requested protection attributes comprises evaluating stored memory information.

### Claim 11 (depends on 8)

The method of claim 8, wherein determining whether the set of software instructions is permitted access to memory having at least one of the one or more requested protection attributes comprises:
determining whether the set of software instructions needs access to memory that is both executable and writeable;
based on determining that the set of software instructions needs access to memory that is both executable and writeable, determining whether the set of software instructions is permitted access to memory that is both executable and writeable.

### Claim 12 (depends on 8)

The method of claim 8, wherein modifying the memory associated with the current protection attributes based on the one or more requested protection attributes comprises:
when the current protection attributes indicate writeable memory, modifying protection attributes associated with the memory to be executable and not writeable; and
when the current protection attributes indicate executable memory, modifying protection attributes associated with the memory to be writeable and not executable.

### Claim 13 (depends on 10)

The method of claim 10, wherein the stored memory information is generated by the threat processor based on a call by the set of software instructions to a memory application programming interface (API), and wherein the memory information comprises one or more protection attributes associated with the call to the memory API.

### Claim 14

A method for protecting executable memory, comprising:
generating a hook on a memory application programming interface (API), wherein the hook is associated with the threat processor;
receiving, by a threat processor, an indication from the generated hook, wherein the indication is received in response to a set of software instructions generating a call to the memory API;
based on the received indication, generating stored memory information comprising one or more protection attributes associated with the call to the memory API;
determining whether the one or more protection attributes indicate memory that is executable and writeable;
based on determining the one or more protection attributes indicate memory that is executable and writeable, modifying the one or more protection attributes to generate modified protection attributes; and
continuing execution of the set of software instructions based on the modified protection attributes.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
registering an exception handler;
receiving, by the threat processor, an indication of a memory exception from the exception handler, wherein the memory exception is associated with accessing memory having the modified protection attributes by the set of software instructions;
determining one or more requested protection attributes associated with the memory exception;
determining, based on the stored memory information, whether the set of software instructions is permitted access to memory having at least one of the one or more requested protection attributes;
based on determining that the set of software is permitted access to memory having the at least one of the one or more requested protection attributes, modifying the memory having the modified protection attributes based on the one or more requested protection attributes; and
continuing execution of the set of software instructions using the memory.

### Claim 16 (depends on 14)

The method of claim 14, wherein modifying the one or more protection attributes to generate modified protection attributes comprises generating modified protection attributes that indicate memory that is one of executable or writeable.

### Claim 17 (depends on 14)

The method of claim 14, wherein modifying the one or more protection attributes to generate modified protection attributes comprises:
determining whether the set of software instructions needs access to memory that is both executable and writeable;
based on determining that the set of software instructions needs access to memory that is both executable and writeable, determining whether the set of software instructions is permitted access to memory that is both executable and writeable; and
when it is determined that the set of software instructions is not permitted access to memory that is both executable and writeable, modifying the one or more protection attributes to generate the modified protection attributes.

### Claim 18 (depends on 15)

The method of claim 15, further comprising:
based on determining that the set of software is not permitted access to memory having the at least one of the one or more requested protection attributes, retaining the modified protection attributes; and
continuing execution of the set of software instructions using the memory having the modified protection attributes.

### Claim 19 (depends on 15)

The method of claim 15, wherein modifying the memory having the modified protection attributes based on the one or more requested protection attributes comprises:
when the modified protection attributes indicate writeable memory, modifying protection attributes associated with the memory to be executable and not writeable; and
when the modified protection attributes indicate executable memory, modifying protection attributes associated with the memory to be writeable and not executable.

### Claim 20 (depends on 15)

The method of claim 15, wherein determining whether the set of software instructions is permitted access to memory having at least one of the one or more requested protection attributes comprises:
determining whether the set of software instructions needs access to memory that is both executable and writeable;
based on determining that the set of software instructions needs access to memory that is both executable and writeable, determining whether the set of software instructions is permitted access to memory that is both executable and writeable.
