# US 2013/0254556 A1 · Non-transitory computer readable medium, program protection apparatus, and program protection method

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

- Number: US 2013/0254556 A1
- Document ID: US20130254556A1
- Status: Published application
- Kind: A1
- Application number: 13/628,598
- Filed: 2012-09-27
- Published: 2013-09-26
- Earliest claimed: 2012-03-26
- Assignees: Fuji Xerox Co., Ltd.
- Applicants: Fuji Xerox Co., Ltd.
- Inventors: Mitsuhisa KAMEI
- Web page: https://patentgrep.com/patent/US20130254556A1

## CPC

- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 21/54: by adding security routines or objects to programs
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided is a non-transitory computer readable medium causing a computer to function as a designation receiving unit that receives designation of a protection target section, a movement arranging unit that moves and arranges the protection target section of a program to a second arrangement location different from a first arrangement location, and a changing unit that changes the protection target section of the program to a substitution code, wherein the substitution code causes a native environment to function as a reconstruction unit that reconstructs context of the native environment as virtual context for a virtual machine in a memory of the native environment, and a virtual machine execution unit that executes the virtual machine, and delivers information indicative of an address in the memory of the virtual context to the virtual machine, so that the virtual machine executes the protection target section using the virtual context.

## Claims

### Claim 1

A non-transitory computer readable medium causing a computer to function as:
a designation receiving unit that receives designation of a protection target section which is a protection target of a program;
a movement arranging unit that moves and arranges the protection target section of the program to a second arrangement location which is different from a first arrangement location which corresponds to an arrangement location of the protection target section of the program; and
a changing unit that changes the protection target section of the program to a substitution code,
wherein the substitution code causes a native environment to function as:
a reconstruction unit that reconstructs context of the native environment at a time point in which the program is executed until immediately before the program proceeds to the protection target section as virtual context for a virtual machine in a memory of the native environment, and
a virtual machine execution unit that executes the virtual machine, and delivers information indicative of an address in the memory of the reconstructed virtual context using the reconstruction unit to the virtual machine, so that the virtual machine executes the protection target section using the virtual context.

### Claim 2 (depends on 1)

The non-transitory computer readable medium according to claim 1,
wherein the substitution code causes the native environment to further function as a rewriting unit that, at a time point in which a process returns from execution of the protection target section on the virtual machine to execution of the program of the native environment, rewrites at least a part of the virtual context at the time point as the context of the native environment.

### Claim 3 (depends on 1)

The non-transitory computer readable medium according to claim 1,
wherein, when a call command, of the protection target section, that calls a native execution code which is executed on the native environment is executed, the virtual machine executes a process of rewriting the virtual context of the virtual machine at a time point immediately before the corresponding call command is executed into the context of the native environment, and executes the call command after the rewriting process is executed.

### Claim 4 (depends on 2)

The non-transitory computer readable medium according to claim 2,
wherein, when a call command, of the protection target section, that calls a native execution code which is executed on the native environment is executed, the virtual machine executes a process of rewriting the virtual context of the virtual machine at a time point immediately before the corresponding call command is executed into the context of the native environment, and executes the call command after the rewriting process is executed.

### Claim 5 (depends on 3)

The non-transitory computer readable medium according to claim 3,
wherein, when a return command that instructs to return to the protection target section from the native execution code is received, the virtual machine executes the process of rewriting the context of the native environment at the time point immediately before the return command is executed into the virtual context of the virtual machine, and executes the return command after the rewriting process is performed.

### Claim 6 (depends on 4)

The non-transitory computer readable medium according to claim 4,
wherein, when a return command that instructs to return to the protection target section from the native execution code is received, the virtual machine executes the process of rewriting the context of the native environment at the time point immediately before the return command is executed into the virtual context of the virtual machine, and executes the return command after the rewriting process is performed.

### Claim 7 (depends on 1)

The non-transitory computer readable medium according to claim 1,
wherein the virtual machine uses a second command coding system which is different from a first command coding system which is a command coding system of the native environment,
wherein the program is described using the first command coding system, and
wherein the movement arranging unit converts description in the first command coding system of the protection target section of the program into description in the second command coding system, and moves to arrange the protection target section, obtained after the conversion is performed, to the second arrangement location.

### Claim 8 (depends on 2)

The non-transitory computer readable medium according to claim 2,
wherein the virtual machine uses a second command coding system which is different from a first command coding system which is a command coding system of the native environment,
wherein the program is described using the first command coding system, and
wherein the movement arranging unit converts description in the first command coding system of the protection target section of the program into description in the second command coding system, and moves to arrange the protection target section, obtained after the conversion is performed, to the second arrangement location.

### Claim 9 (depends on 3)

The non-transitory computer readable medium according to claim 3,
wherein the virtual machine uses a second command coding system which is different from a first command coding system which is a command coding system of the native environment,
wherein the program is described using the first command coding system, and
wherein the movement arranging unit converts description in the first command coding system of the protection target section of the program into description in the second command coding system, and moves to arrange the protection target section, obtained after the conversion is performed, to the second arrangement location.

### Claim 10 (depends on 4)

The non-transitory computer readable medium according to claim 4,
wherein the virtual machine uses a second command coding system which is different from a first command coding system which is a command coding system of the native environment,
wherein the program is described using the first command coding system, and
wherein the movement arranging unit converts description in the first command coding system of the protection target section of the program into description in the second command coding system, and moves to arrange the protection target section, obtained after the conversion is performed, to the second arrangement location.

### Claim 11 (depends on 5)

The non-transitory computer readable medium according to claim 5,
wherein the virtual machine uses a second command coding system which is different from a first command coding system which is a command coding system of the native environment,
wherein the program is described using the first command coding system, and
wherein the movement arranging unit converts description in the first command coding system of the protection target section of the program into description in the second command coding system, and moves to arrange the protection target section, obtained after the conversion is performed, to the second arrangement location.

### Claim 12 (depends on 6)

The non-transitory computer readable medium according to claim 6,
wherein the virtual machine uses a second command coding system which is different from a first command coding system which is a command coding system of the native environment,
wherein the program is described using the first command coding system, and
wherein the movement arranging unit converts description in the first command coding system of the protection target section of the program into description in the second command coding system, and moves to arrange the protection target section, obtained after the conversion is performed, to the second arrangement location.

### Claim 13 (depends on 7)

The non-transitory computer readable medium according to claim 7,
wherein the movement arranging unit encrypts the protection target section obtained after the conversion to the second command coding system is performed, and arranges the encrypted protection target section at the second arrangement location, together with a decryption code to decrypt the encrypted protection target section in the native environment.

### Claim 14 (depends on 8)

The non-transitory computer readable medium according to claim 8,
wherein the movement arranging unit encrypts the protection target section obtained after the conversion to the second command coding system is performed, and arranges the encrypted protection target section at the second arrangement location, together with a decryption code to decrypt the encrypted protection target section in the native environment.

### Claim 15 (depends on 7)

The non-transitory computer readable medium according to claim 7,
wherein the movement arranging unit encrypts the protection target section obtained after the conversion to the second command coding system is performed, and arranges the encrypted protection target section at the second arrangement location, and
wherein the substitution code includes a decryption code to decrypt the encrypted protection target section in the native environment.

### Claim 16 (depends on 13)

The non-transitory computer readable medium according to claim 13,
wherein the substitution code causes the native environment to function as:
a unit that determines whether the program is analyzed using a debugger; and
a key generation unit that generates a first decryption key which correctly decrypts the protection target section obtained after the encryption when it is determined that the program is not analyzed using the debugger, and that generates a second decryption key which does not correctly decrypt the protection target section obtained after the encryption when it is determined that the program is analyzed using the debugger, and
wherein the decryption code decrypts the encrypted protection target section in the native environment using one of the first decryption key and the second decryption key which are generated by the key generation unit.

### Claim 17 (depends on 1)

The non-transitory computer readable medium according to claim 1,
wherein the movement arranging unit encrypts the protection target section, and arranges the encrypted protection target section at the second arrangement location together with a decryption code to decrypt the encrypted protection target section in the native environment.

### Claim 18 (depends on 1)

The non-transitory computer readable medium according to claim 1,
wherein the movement arranging unit encrypts the protection target section, and arranges the encrypted protection target section at the second arrangement location, and
wherein the substitution code includes a decryption code to decrypt the encrypted protection target section in the native environment.

### Claim 19

A program protection apparatus comprising:
a designation receiving unit that receives designation of a protection target section which is a protection target of a program;
a movement arranging unit that moves and arranges the protection target section of the program to a second arrangement location which is different from a first arrangement location which corresponds to an arrangement location of the protection target section of the program; and
a changing unit that changes the protection target section of the program to a substitution code,
wherein the substitution code causes a native environment to function as:
a reconstruction unit that reconstructs context of the native environment at a time point in which the program is executed until immediately before the program proceeds to the protection target section as virtual context for a virtual machine in a memory of the native environment, and
a virtual machine execution unit that executes the virtual machine, and delivers information indicative of an address in the memory of the reconstructed virtual context using the reconstruction unit to the virtual machine, so that the virtual machine executes the protection target section using the virtual context.

### Claim 20

A program protection method comprising:
receiving designation of a protection target section which is a protection target of a program;
moving to arrange the protection target section of the program to a second arrangement location which is different from a first arrangement location which corresponds to an arrangement location of the protection target section of the program; and
changing the protection target section of the program to a substitution code,
wherein the substitution code causes a native environment to function as:
reconstructing context of the native environment at a time point in which the program is executed until immediately before the program proceeds to the protection target section as virtual context for a virtual machine in a memory of the native environment, and
executing the virtual machine, and delivering information indicative of an address in the memory of the reconstructed virtual context using the reconstructing step to the virtual machine, so that the virtual machine executes the protection target section using the virtual context.
