# US 2022/0035905 A1 · Malware analysis through virtual machine forking

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

- Number: US 2022/0035905 A1
- Document ID: US20220035905A1
- Status: Published application
- Kind: A1
- Application number: 16/945,104
- Filed: 2020-07-31
- Published: 2022-02-03
- Earliest claimed: 2020-07-31
- Assignees: Palo Alto Networks, Inc.
- Applicants: Palo Alto Networks, Inc.
- Inventors: Chien-Hua Lu; Ryan Carroll Salsamendi
- Web page: https://patentgrep.com/patent/US20220035905A1

## CPC

- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 21/56: Computer malware detection or handling, e.g. anti-virus arrangements
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F 2009/45562: {Creating, deleting, cloning virtual machine instances}
- G06F 2009/45587: {Isolation or security of virtual machine instances}
- G06F 2009/45595: {Network integration; Enabling network access in virtual machine instances}
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A set of virtual machines (VMs) with different guest operating systems installed is initially booted and prepared to facilitate rapid creation, or “forking,” of a child VM(s) for malware analysis of a software sample. Because malicious code may be packaged for a specific operating system version, subsets of the VMs may have different versions of the same guest operating system installed. Upon detection of a sample indicated for malware analysis, a child VM(s) running the appropriate guest operating system is created based on a corresponding one(s) of the set of VMs. A process in which the corresponding VM(s) has been booted is forked to create a child process. A child VM which is a copy of the VM booted in the parent process is then created in the child process. The sample is then sandboxed in the child VM for analysis to determine if the sample comprises malware.

## Claims

### Claim 1

A method comprising:
based on indication of a first software sample for malware analysis, identifying a first virtual machine of a plurality of virtual machines having installed a first guest operating system compatible with the first software sample;
forking a first process of the first virtual machine to create a first child process with a second virtual machine based, at least in part, on the first virtual machine;
loading the first software sample into the second virtual machine; and
based on analysis of behavior of the first software sample in the second virtual machine, indicating whether the first software sample is malware.

### Claim 2 (depends on 1)

The method of claim 1 further comprising:
identifying a third virtual machine having installed a second guest operating system compatible with the first software sample;
forking a second process of the third virtual machine to create a second child process with a fourth virtual machine based, at least in part, on the third virtual machine; and
loading the first software sample into the fourth virtual machine,
wherein indicating whether the first software sample is malware is also based on analysis of behavior of the first software sample in the fourth virtual machine.

### Claim 3 (depends on 2)

The method of claim 2, wherein the first and second guest operating systems compatible with the first software sample are different versions of a same operating system.

### Claim 4 (depends on 1)

The method of claim 1, further comprising collecting log data from the second virtual machine, wherein the log data comprise indications of the behavior of the first software sample in the second virtual machine.

### Claim 5 (depends on 4)

The method of claim 4, wherein the analysis of the behavior is based on analysis of the log data.

### Claim 6 (depends on 1)

The method of claim 1, wherein forking the first process comprises marking physical memory pages mapped by virtual pages of the first process as read-only.

### Claim 7 (depends on 1)

The method of claim 1, wherein forking the first process comprises generating a read-only version of a virtual disk of the first process and generating a delta disk for the first child process.

### Claim 8 (depends on 1)

The method of claim 1, further comprising quiescing the first virtual machine.

### Claim 9 (depends on 1)

The method of claim 1, further comprising creating the plurality of virtual machines and installing a guest operating system on each of the plurality of virtual machines based, at least in part, on a configuration file indicating one or more guest operating systems and operating system versions.

### Claim 10 (depends on 1)

The method of claim 1 further comprising determining a type of the first software sample, wherein identifying the first virtual machine is based, at least in part, on the determined type of the first software sample.

### Claim 11 (depends on 10)

The method of claim 10 further comprising:
inserting, based on the determined type of the first software sample, the first software sample into a first queue of a plurality of queues each of which corresponds to a different software type; and
determining a set of one or more operating systems compatible with the first software sample based on insertion of the first software sample into the first queue.

### Claim 12

A non-transitory, machine-readable medium having instructions stored thereon that are executable by a computing device, the instructions to:
determine a set of one or more operating systems compatible with a first software sample indicated for malware analysis;
identify which of a plurality of virtual machines has installed the set of one or more compatible operating systems as a guest operating system;
for each identified virtual machine of the plurality of virtual machines, fork a child process from a parent process corresponding to the identified virtual machine, which creates a child virtual machine based on the identified virtual machine; and
load the first software sample into each created child virtual machine for malware analysis in each created child virtual machine.

### Claim 13 (depends on 12)

The non-transitory, machine-readable medium of claim 12, further comprising instructions to indicate whether the first software sample is malware based on analysis of log data generated by each child virtual machine, wherein the log data comprise indications of behavior of the first software sample.

### Claim 14 (depends on 12)

The non-transitory, machine-readable medium of claim 12 further having instructions to determine type of the first software sample, wherein the instructions to determine the set of compatible operating systems comprise the instructions to determine the set of compatible operating systems based on the type of the first software sample.

### Claim 15 (depends on 12)

The non-transitory, machine-readable medium of claim 12, wherein the instructions to fork the child process from the parent process comprise instructions to mark physical memory pages mapped by virtual pages of the identified virtual machine corresponding to the parent process as read-only.

### Claim 16 (depends on 12)

The non-transitory, machine-readable medium of claim 12, wherein the instructions to fork the child process from the parent process comprise instructions to generate a read-only version of a virtual disk of the identified virtual machine corresponding to the parent process and generate a delta disk for the corresponding child virtual machine.

### Claim 17

An apparatus comprising:
a processor; and
a computer-readable medium having instructions stored thereon that are executable by the processor to cause the apparatus to,
based on identification of a software sample indicated for malware analysis, determine at least a first virtual machine of a plurality of virtual machines having installed a guest operating system with which the software sample is compatible;
fork a process of the first virtual machine to create a child process;
create a second virtual machine in the child process based, at least in part, on providing a read-only version of a virtual disk and memory corresponding to the process of the first virtual machine for access by the child process; and
load the software sample into the second virtual machine for monitoring of behavior.

### Claim 18 (depends on 17)

The apparatus of claim 17, further comprising instructions executable by the processor to cause the apparatus to determine the guest operating system with which the software sample is compatible based, at least in part, on a type of the software sample.

### Claim 19 (depends on 17)

The apparatus of claim 17, further comprising instructions executable by the processor to cause the apparatus to indicate whether the software sample is malware based on analysis of monitored behavior of the software sample in the second virtual machine.

### Claim 20 (depends on 19)

The apparatus of claim 19, further comprising instructions executable by the processor to cause the apparatus to collect log data generated by the second virtual machine, wherein the log data comprise indications of monitored behavior of the software sample, and wherein the analysis of monitored behavior is based on the log data.
