# US 2020/0004965 A1 · Method and system for generating a request for information on a file to perform an antivirus scan

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

- Number: US 2020/0004965 A1
- Document ID: US20200004965A1
- Status: Published application
- Kind: A1
- Application number: 16/188,449
- Filed: 2018-11-13
- Published: 2020-01-02
- Earliest claimed: 2018-06-29
- Assignees: AO Kaspersky Lab
- Applicants: AO Kaspersky Lab
- Inventors: Denis O. Vlaznev; Sergey V. Kubrin
- Web page: https://patentgrep.com/patent/US20200004965A1

## CPC

- G06F 21/564: {by virus signature recognition}
- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F 21/567: {using dedicated hardware}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed herein are systems and methods for generating a request for information on a file to perform an antivirus scan. In one aspect, an exemplary method comprises, intercepting the file, synchronously calculating a first hash of a portion of the file, searching in a verdict cache, when the hash is found, determining whether the hash belongs to a list of malicious files, when it belongs to the list of malicious files, synchronously calculating a second hash, searching for the second hash in the verdict cache, and pronouncing a final decision as to harmfulness of the file, when the first hash does not belong to the list of malicious files, granting access to the file, asynchronously generating a request for information about the file, calculating a second hash, searching for the information in a verdict cache, and pronouncing a decision as to harmfulness of the file.

## Claims

### Claim 1

A method for generating a request for information on a file, the method comprising:
intercepting the file during the launching of the file;
synchronously calculating a first hash of a portion of the file;
synchronously searching for the first hash in a verdict cache;
when the first hash is found in the verdict cache, determining whether the first hash belongs to a list of malicious files;
when the first hash belongs to the list of malicious files, synchronously calculating a second hash of the file, synchronously searching for the second hash in the verdict cache and/or a remote server, and pronouncing a final decision as to a harmfulness or safety of the file based on the results of the synchronous search; and
when the first hash does not belong to the list of malicious files, granting access to the file, asynchronously generating a request for the information about the file including at least an indication as to harmfulness of the file, asynchronously calculating a second hash of the file, asynchronously searching for the information about the file in a verdict cache located on a remote server according to the second hash, and pronouncing a decision as to harmfulness or safety of the file based on the results of the asynchronous search.

### Claim 2 (depends on 1)

The method of claim 1, the verdict cache being a part of a local database, the verdict cache containing at least information about first hash values and second hash values of files and the local database further containing decisions on malicious files and trusted files.

### Claim 3 (depends on 1)

The method of claim 1, wherein a mechanism for the calculation of the first hash is generated, the generated mechanism containing criteria for a selection of a most preferable portion of the file for use during the calculation of the first hash, the criteria being based on an analysis of metadata of the file.

### Claim 4 (depends on 1)

The method of claim 1, when the final decision indicates that the file is a safe file, the method further comprising:
asynchronously scanning for a false alarm in the pronouncing of the final decision, the asynchronous scanning for the false alarm including: making a request to the remote server, with the request containing the second hash, and after receiving a response for the request from the remote server, making a decision as to the harmfulness or safety of the file on the basis of the information contained in the response, the decision being either to uphold the previous decision pronouncing the file as being a safe file or to alter the previous decision, the alteration being to indicate the file as being a malicious file.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
when the first hash sum does not belong to the list of malicious files, prior to the asynchronously searching for the information about the file in the verdict cache located on the remote server, performing an antivirus scanning of the file with a local database based on the second hash, the local database containing information about malicious and safe files.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
determining whether the second hash sum is found in the local database, and when the second hash is not found in the local database, sending the request to the remote server.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
when the second hash sum is found in the local database and the second hash is determined as being a hash of a malicious file, halting an execution of the file, sending a request to the remote server to rule out a false alarm in the pronouncing of the decision, and synchronously scanning the file; and
when the second hash sum is found in the local database and the second hash is determined as being a hash of a safe file, terminating the scanning of the file, asynchronously sending the request to the remote server for the second hash, receiving a response from the remote server based on a search of the second hash, and pronouncing a final decision as to the harmfulness of the file based on the received response.

### Claim 8

A system for generating a request for information on a file, comprising:
at least one processor configured to:
intercept the file during the launching of the file;
synchronously calculate a first hash of a portion of the file;
synchronously search for the first hash in a verdict cache;
when the first hash is found in the verdict cache, determine whether the first hash belongs to a list of malicious files;
when the first hash belongs to the list of malicious files, synchronously calculate a second hash of the file, synchronously search for the second hash in the verdict cache and/or a remote server, and pronounce a final decision as to a harmfulness or safety of the file based on the results of the synchronous search; and
when the first hash sum does not belong to the list of malicious files, grant access to the file, asynchronously generate a request for the information about the file including at least an indication as to harmfulness of the file, asynchronously calculate a second hash of the file, asynchronously search for the information about the file in a verdict cache located on a remote server according to the second hash, and pronounce a decision as to harmfulness or safety of the file based on the results of the asynchronous search.

### Claim 9 (depends on 8)

The system of claim 8, the verdict cache being a part of a local database, the verdict cache containing at least information about first hashes and second hashes of files and the local database further containing decisions on malicious files and trusted files.

### Claim 10 (depends on 8)

The system of claim 8, wherein the processor is further configured to generate a mechanism for the calculation of the first hash, the generated mechanism containing criteria for a selection of a most preferable portion of the file for use during the calculation of the first hash, the criteria being based on an analysis of metadata of the file.

### Claim 11 (depends on 8)

The system of claim 8, when the final decision indicates that the file is a safe file, the processor further being configured to:
asynchronously scan for a false alarm in the pronouncing of the final decision, the asynchronous scanning for the false alarm including: making a request to the remote server, with the request containing the second hash, and after receiving a response for the request from the remote server, making a decision as to the harmfulness or safety of the file on the basis of the information contained in the response, the decision being either to uphold the previous decision pronouncing the file as being a safe file or to alter the previous decision, the alteration being to indicate the file as being a malicious file.

### Claim 12 (depends on 8)

The system of claim 8, the processor further being configured to:
when the first hash does not belong to the list of malicious files, prior to the asynchronously search for the information about the file in the verdict cache located on the remote server, perform an antivirus scanning of the file with a local database based on the second hash, the local database containing information about malicious and safe files.

### Claim 13 (depends on 12)

The system of claim 12, the processor further being configured to:
determine whether the second hash is found in the local database, and when the second hash is not found in the local database, send the request to the remote server.

### Claim 14 (depends on 13)

The system of claim 13, the processor further being configured to:
when the second hash is found in the local database and the second hash is determined as being a hash of a malicious file, halt an execution of the file, send a request to the remote server to rule out a false alarm in the pronouncing of the decision, and synchronously scan the file; and
when the second hash is found in the local database and the second hash is determined as being a hash of a safe file, terminate the scanning of the file, asynchronously send the request to the remote server for the second hash, receive a response from the remote server based on a search of the second hash, and pronounce a final decision as to the harmfulness of the file based on the received response.

### Claim 15

A non-transitory computer readable medium storing thereon computer executable instructions for generating a request for information on a file, including instructions for:
intercepting the file during the launching of the file;
synchronously calculating a first hash of a portion of the file;
synchronously searching for the first hash in a verdict cache;
when the first hash is found in the verdict cache, determining whether the first hash belongs to a list of malicious files;
when the first hash belongs to the list of malicious files, synchronously calculating a second hash of the file, synchronously searching for the second hash in the verdict cache and/or a remote server, and pronouncing a final decision as to a harmfulness or safety of the file based on the results of the synchronous search; and
when the first hash does not belong to the list of malicious files, granting access to the file, asynchronously generating a request for the information about the file including at least an indication as to harmfulness of the file, asynchronously calculating a second hash of the file, asynchronously searching for the information about the file in a verdict cache located on a remote server according to the second hash, and pronouncing a decision as to harmfulness or safety of the file based on the results of the asynchronous search.

### Claim 16 (depends on 15)

The non-transitory computer readable medium of claim 15, the verdict cache being a part of a local database, the verdict cache containing at least information about first hashes and second hashes of files and the local database further containing decisions on malicious files and trusted files.

### Claim 17 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein the instructions further comprise instructions for generating a mechanism for the calculation of the first hash, the generated mechanism containing criteria for a selection of a most preferable portion of the file for use during the calculation of the first hash, the criteria being based on an analysis of metadata of the file.

### Claim 18 (depends on 15)

The non-transitory computer readable medium of claim 15, when the final decision indicates that the file is a safe file, the instructions further comprising instructions for:
asynchronously scanning for a false alarm in the pronouncing of the final decision, the asynchronous scanning for the false alarm including: making a request to the remote server, with the request containing the second hash, and after receiving a response for the request from the remote server, making a decision as to the harmfulness or safety of the file on the basis of the information contained in the response, the decision being either to uphold the previous decision pronouncing the file as being a safe file or to alter the previous decision, the alteration being to indicate the file as being a malicious file.

### Claim 19 (depends on 15)

The non-transitory computer readable medium of claim 15, the instructions further comprising instructions for:
when the first hash sum does not belong to the list of malicious files, prior to the asynchronously searching for the information about the file in the verdict cache located on the remote server, performing an antivirus scanning of the file with a local database based on the second hash, the local database containing information about malicious and safe files.

### Claim 20 (depends on 19)

The non-transitory computer readable medium of claim 19, the instructions further comprising instructions for:
determining whether the second hash sum is found in the local database, and when the second hash is not found in the local database, sending the request to the remote server;
when the second hash is found in the local database and the second hash is determined as being a hash of a malicious file, halting an execution of the file, sending a request to the remote server to rule out a false alarm in the pronouncing of the decision, and synchronously scanning the file; and
when the second hash is found in the local database and the second hash is determined as being a hash of a safe file, terminating the scanning of the file, asynchronously sending the request to the remote server for the second hash, receiving a response from the remote server based on a search of the second hash, and pronouncing a final decision as to the harmfulness of the file based on the received response.
