# US 2016/0239664 A1 · Preventing re-patching by malware on a computer

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

- Number: US 2016/0239664 A1
- Document ID: US20160239664A1
- Status: Published application
- Kind: A1
- Application number: 15/136,274
- Filed: 2016-04-22
- Published: 2016-08-18
- Earliest claimed: 2014-06-16
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Ilan Levine-Fraiman
- Web page: https://patentgrep.com/patent/US20160239664A1

## CPC

- G06F 21/56: Computer malware detection or handling, e.g. anti-virus arrangements
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Preventing re-patching by malware on a computer by detecting a request to modify a write-protection attribute of a memory location within a memory of a computer to allow the memory location to be written to, where the detecting is performed subsequent to the detection of activity identified as malware-related activity involving the memory location, and preventing modification of the write-protection attribute of the memory location.

## Claims

### Claim 1

A computer security method comprising:
detecting, by one or more processors, a request to modify a write-protection attribute of a memory location within a memory of a computer, wherein the request seeks to allow the memory location to be written to, and wherein the memory location was previously subject to detected malware-related activity; and
preventing, by the one or more processors, modification of the write-protected attribute of the memory location.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
detecting, by the one or more processors, an attempt by a computer software instruction to write to the memory location, wherein the computer software instruction belongs to a process that is executed by the computer;
overwriting, by the one or more processors, the computer software instruction with one or more replacement computer software instructions; and
causing, by the one or more processors, the process to execute the one or more replacement computer software instructions.

### Claim 3 (depends on 2)

The method of claim 2, wherein detecting, by the one or more processors, the attempt to write to the memory location further comprises:
setting, by the one or more processors, an exception handler to detect a failed write to the memory location.

### Claim 4 (depends on 2)

The method of claim 2, wherein the one or more replacement computer software instructions are “no operation” (NOP) instructions.

### Claim 5 (depends on 1)

The method of claim 1 further comprising:
prior to detecting, by the one or more processors, the request to modify the write-protection attribute of the memory location, identifying, by the one or more processors, the memory location for monitoring responsive to detection and removal of a malicious patch affecting the memory location.

### Claim 6 (depends on 5)

The method of claim 5 further comprising:
adding, by the one or more processors, the memory location to a list of memory locations to be monitored for subsequent attempts to modify write-protection attributes of the respective memory locations.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
responsive to preventing, by the one or more processors, modification of the write-protected attribute of the memory location, adding, by the one or more processors, the memory location to a list of memory locations to monitor for subsequent attempts to write to the respective memory locations.

### Claim 8

A computer program product for computer security comprising:
one or more computer-readable storage media and program instructions stored on at least one of the one or more computer-readable storage media, the program instructions comprising:
program instructions to detect a request to modify a write-protection attribute of a memory location within a memory of a computer, wherein the request seeks to allow the memory location to be written to, and wherein the memory location was previously subject to detected malware-related activity; and
program instructions to prevent modification of the write-protected attribute of the memory location.

### Claim 9 (depends on 8)

The computer program product of claim 8 further comprising:
program instructions to detect an attempt by a computer software instruction to write to the memory location, wherein the computer software instruction belongs to a process that is executed by the computer;
program instructions to overwrite the computer software instruction with one or more replacement computer software instructions; and
program instructions to cause the process to execute the one or more replacement computer software instructions.

### Claim 10 (depends on 9)

The computer program product of claim 9, wherein the program instructions to detect the attempt to write to the memory location further comprise:
program instructions to set an exception handler to detect a failed write to the memory location.

### Claim 11 (depends on 9)

The computer program product of claim 9, wherein the one or more replacement computer software instructions include “no operation” (NOP) instructions.

### Claim 12 (depends on 8)

The computer program product of claim 8 further comprising:
prior to detecting the request to modify the write-protection attribute of the memory location, program instructions to identify the memory location for monitoring responsive to detection and removal of a malicious patch affecting the memory location.

### Claim 13 (depends on 12)

The computer program product of claim 12 further comprising:
program instructions to add the memory location to a list of memory locations to be monitored for subsequent attempts to modify write-protection attributes of the respective memory locations.

### Claim 14 (depends on 8)

The computer program product of claim 8 further comprising:
responsive to preventing modification of the write-protected attribute of the memory location, program instructions to add the memory location to a list of memory locations to monitor for subsequent attempts to write to the respective memory locations.

### Claim 15

A computer system for computer security comprising:
one or more computer processors;
one or more computer-readable storage media; and
program instructions stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, the program instructions comprising:
program instructions to detect a request to modify a write-protection attribute of a memory location within a memory of a computer, wherein the request seeks to allow the memory location to be written to, and wherein the memory location was previously subject to detected malware-related activity; and
program instructions to prevent modification of the write-protected attribute of the memory location.

### Claim 16 (depends on 15)

The computer system of claim 15 further comprising:
program instructions to detect an attempt by a computer software instruction to write to the memory location, wherein the computer software instruction belongs to a process that is executed by the computer;
program instructions to overwrite the computer software instruction with one or more replacement computer software instructions; and
program instructions to cause the process to execute the one or more replacement computer software instructions.

### Claim 17 (depends on 16)

The computer system of claim 16, wherein the program instructions to detect the attempt to write to the memory location further comprise:
program instructions to set an exception handler to detect a failed write to the memory location.

### Claim 18 (depends on 16)

The computer system of claim 16, wherein the one or more replacement computer software instructions include “no operation” (NOP) instructions.

### Claim 19 (depends on 15)

The computer system of claim 15 further comprising:
prior to detecting the request to modify the write-protection attribute of the memory location, program instructions to identify the memory location for monitoring responsive to detection and removal of a malicious patch affecting the memory location.

### Claim 20 (depends on 19)

The computer system of claim 19 further comprising:
responsive to preventing modification of the write-protected attribute of the memory location, program instructions to add the memory location to a list of memory locations to monitor for subsequent attempts to write to the respective memory locations.
