# US 2013/0254892 A1 · Detecting malicious computer code in an executing program module

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

- Number: US 2013/0254892 A1
- Document ID: US20130254892A1
- Status: Published application
- Kind: A1
- Application number: 13/427,089
- Filed: 2012-03-22
- Published: 2013-09-26
- Earliest claimed: 2012-03-22
- Assignees: International Business Machines Corporation
- Inventors: Philip D. Kaufman
- Web page: https://patentgrep.com/patent/US20130254892A1

## CPC

- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F 21/51: at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
- G06F 21/54: by adding security routines or objects to programs
- G06F 21/55: Detecting local intrusion or implementing counter-measures
- G06F 21/552: {involving long-term monitoring or reporting}
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer program includes one or more computer program instructions, each computer program instruction being of one or more instruction types. Prior to execution of the computer program instructions, the computer determines respective counts for the instruction type(s) of the computer program instructions. At a time during execution of the computer program instructions, the computer determines respective counts for the instruction type(s) of the computer program instructions. The computer, in response to determining that the count for one of the instruction types determined prior to execution differs a predetermined amount from the count for the same instruction type determined during execution, makes a record that the computer program has an indicia of maliciousness.

## Claims

### Claim 1

A method to determine if a computer program in a memory of a computer is malicious, the computer program including one or more a plurality of different types of computer program instructions, the method comprising the steps of:
prior to execution of the computer program in the computer, the computer counting the computer program instructions of each of the types;
at a time during execution of the computer program in the computer, the computer counting the computer program instructions of each of the types; and
the computer determining that the count of the computer program instructions of one of the types determined prior to execution of the computer program differs by at least a predetermined amount from the count of the computer program instructions of the one type determined at the time during execution of the computer program, and in response, the computer making a record that the computer program has an indicia of maliciousness.

### Claim 2 (depends on 1)

A method in accordance with claim 1, wherein the step of making a record further comprises:
the computer determining that the count of the computer program instructions of one or more of the types determined prior to execution of the computer program differs by at least a predetermined amount from the count of the computer program instructions of the one or more types determined at the time during execution of the computer program, each of the one or more types having an associated predetermined amount, and in response, the computer making a record that the computer program has an indicia of maliciousness.

### Claim 3 (depends on 1)

A method in accordance with claim 1, wherein the step of the computer counting the program instructions of each of the types at a time during execution of the computer program is performed at two or more times during execution of the computer program.

### Claim 4 (depends on 1)

A method in accordance with claim 1, wherein the step of the computer counting the program instructions of each of the types at a time during the execution of the computer program is performed by a program routine that is called upon the execution of a computer program instruction of the type operating system interrupt generating program instruction.

### Claim 5 (depends on 4)

A method in accordance with claim 4, further comprising the step of inserting a program instruction into the computer program, the inserted program instruction of the type operating system interrupt generating program instruction.

### Claim 6 (depends on 1)

A method in accordance with claim 1 wherein the predetermined amount is zero.

### Claim 7 (depends on 1)

A method in accordance with claim 1 wherein the predetermined amount is an integer greater than zero.

### Claim 8 (depends on 1)

A method in accordance with claim 1, further comprising the step of the computer terminating or suspending execution of the computer program in response to determining that the count for of the computer program instructions of one of the types determined prior to execution of the computer program differs by at least a predetermined amount from the count of the computer program instructions of the one type determined at the time during execution of the computer program.

### Claim 9

A computer program product to determine if a computer program in a memory of a computer is malicious, the computer program including a plurality of different types of computer program instructions, the computer program product comprising:
one or more computer-readable storage devices and program code stored on at least one of the one or more storage devices, the program code comprising:
program code to count the computer program instruction of each of the types prior to execution of the computer program in the computer;
program code to count the computer program instruction of each of the types at a time during execution of the computer program in the computer; and
program code to determine that the count of the computer program instructions of one of the types determined prior to execution of the computer program differs by at least a predetermined amount from the count of the computer program instructions of the one type determined at the time during execution of the computer program, and in response, to make a record that the computer program has an indicia of maliciousness.

### Claim 10 (depends on 9)

A computer program product in accordance with claim 9, wherein the program code to make a record further comprises:
program code to determine that the count of the computer program instructions of one or more of the types determined prior to execution of the computer program differs by at least a predetermined amount from the count of the computer program instructions of the one or more types determined at the time during execution of the computer program, each of the one or more types having an associated predetermined amount, and in response, the computer making a record that the computer program has an indicia of maliciousness.

### Claim 11 (depends on 9)

A computer program product in accordance with claim 9, wherein the program code to count the computer program instruction of each of the types at a time during execution of the computer program are performed at two or more times during execution of the computer program instructions.

### Claim 12 (depends on 9)

A computer program product in accordance with claim 9, wherein the program code to count the computer program instruction of each of the types at a time during execution are performed by program code that is called upon the execution of a computer program instruction of the type operating system interrupt generating program instruction.

### Claim 13 (depends on 12)

A computer program product in accordance with claim 12, further comprising program code to cause the computer to insert a program instruction into the computer program, the inserted program instruction of the type operating system interrupt generating program instruction.

### Claim 14 (depends on 9)

A computer program product in accordance with claim 9 wherein the predetermined amount is zero.

### Claim 15 (depends on 9)

A computer program product in accordance with claim 9 wherein the predetermined amount is an integer greater than zero.

### Claim 16 (depends on 9)

A computer program product in accordance with claim 9, further comprising program code to terminate or suspend execution of the computer program in response to determining that the count of the computer program instructions of one of the types determined prior to execution of the computer program differs by at least a predetermined amount from the count of the computer program instructions of the one type determined at the time during execution of the computer program.

### Claim 17

A computer system to determine if a computer program in a memory of a computer is malicious, the computer program including a plurality of computer program instructions, each computer program instruction being of one or more instruction types, the computer program product comprising:
one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage devices, and program instructions stored on at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, the program instructions comprising:
program code to count the computer program instruction of each of the types prior to execution of the computer program in the computer;
program code to count the computer program instruction of each of the types at a time during execution of the computer program in the computer; and
program code to determine that the count of the computer program instructions of one of the types determined prior to execution differs by at least a predetermined amount from the count of the computer program instructions of the one type determined at the time during execution of the computer program, and in response, to make a record that the computer program has an indicia of maliciousness.
