# US 11,120,131 B2 · Ransomware infection detection in filesystems

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

- Number: US 11,120,131 B2
- Document ID: US11120131B2
- Status: Granted
- Kind: B2
- Application number: 16/049,574
- Filed: 2018-07-30
- Published: 2020-01-30
- Granted: 2021-09-14
- Earliest claimed: 2018-07-30
- Assignees: Rubrik, Inc.
- Applicants: Rubrik, Inc.
- Inventors: Oscar Chen; Di Wu; Benjamin Reisner; Matthew E. Noe
- Web page: https://patentgrep.com/patent/US11120131B2

## CPC

- G06F 21/56: Computer malware detection or handling, e.g. anti-virus arrangements
- G06F 21/565: {by checking file integrity}
- G06F 11/1458: {Management of the backup or restore process}
- G06F 16/128: {Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion (error detection or correction of the data by redundancy in operations or in hardware G06F11/14, G06F11/16)}
- G06F 11/1469: {Backup restoration techniques}
- G06F 21/568: {eliminating virus, restoring damaged files}
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F 2221/034: Test or assess a computer or a system
- G06F 2221/2107: File encryption
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Described herein is a system that detects ransomware infection in filesystems. The system detects ransomware infection by using backup data of machines. The system detects ransomware infection in two stages. In the first stage, the system analyzes a filesystem's behavior. The filesystem's behavior can be obtained by loading the backup data and crawling the filesystem to create a filesystem metadata including information about file operations during a time interval. The filesystem determines a pattern of the file operations and compares the pattern to a normal patter to analyze the filesystem's behavior. If the filesystem's behavior is abnormal, the system proceeds to the second stage to analyze the content of the files to look for signs of encryption in the filesystem. The system combines the analysis of both stages to determine whether the filesystem is infected by ransomware.

## Claims

### Claim 1

A method for detecting ransomware infection in filesystems, the method comprising:
recording changes in a filesystem during a time interval, the changes including file operations within the time interval;
determining whether the filesystem behaves abnormally in the time interval by determining a pattern of the file operations in the time interval and comparing the pattern of the file operations to a normal pattern, wherein determining whether the filesystem behaves abnormally includes applying a set of machine learning models to the changes, the set of machine learning models trained to determine the pattern of the file operations and to compare the pattern of the file operations to the normal pattern based on features representing the filesystem's behavior, the features including a ratio of modify operations to file operations and a modify operation is a type of the file operation, and extracting the features from the changes;
responsive to determining the filesystem's behavior is abnormal, determining whether files corresponding to the file operations in the time interval are encrypted by analyzing content of the files; and
determining whether the filesystem is infected based on the determinations that the filesy stem behaves abnormally and that the files are encrypted.

### Claim 2 (depends on 1)

The method of claim 1, wherein recording changes in the filesystem comprises:
retrieving backup data of a machine including the filesystem, the backup data copying data of the machine corresponding to the time interval; and
crawling the backup data of the machine to create the changes.

### Claim 3 (depends on 2)

The method of claim 2, further comprising generating the backup data of the machine by generating a snapshot of the machine.

### Claim 4 (depends on 1)

The method of claim 1, wherein the changes in the filesystem is recorded in filesystem metadata, the filesystem metadata including a list of entries corresponding to data changes in the filesystem.

### Claim 5 (depends on 1)

The method of claim 1, wherein each machine learning model of the set is configured to calculate an abnormal score indicating a probability of the filesy stem behaves abnormally.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining whether the filesystem behaves abnormally comprises generating a combined abnormal score by combining the abnormal scores outputted by the set of machine learning models.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining whether files are encrypted comprises extracting entropy features from the files and calculating an encryption score representing a likelihood of the files being encrypted using the entropy features, the entropy features measuring randomness of the files.

### Claim 8 (depends on 7)

The method of claim 7, wherein determining whether the filesystem behaves abnormally comprises generating an abnormal score measuring a probability of the filesystem behaves abnormally, wherein determining the filesystem is infected comprises: averaging the abnormal score and the encryption score to generate an infection score indicating a probability of the filesystem infected by ransomware.

### Claim 9 (depends on 8)

The method of claim 8, wherein determining whether the filesystem is infected comprises: responsive to determining the infection score greater than a threshold, determining that the filesystem is infected.

### Claim 10 (depends on 1)

The method of claim 1, further comprising training one or more machine learning models using training data, the training data including at least one of filesystem data of filesystems owned by multiple users, filesystem data of filesystems owned by a user, and filesystem data of a filesystem owned by the user.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
responsive to determining that the filesystem is infected, generating a user interface for presenting the determination that the filesystem is infected; and
presenting the user interface.

### Claim 12

A system comprising:
a processor for executing computer program instructions; and
a non-transitory computer-readable storage medium storing computer program instructions executable by the processor, the computer program instructions configured to cause the processor to perform:
recording changes in a filesystem during a time interval, the changes including file operations within the time interval;
determining whether the filesystem behaves abnormally in the time interval by determining a pattern of the file operations in the time interval and comparing the pattern of the file operations to a normal pattern, wherein determining whether the filesystem behaves abnormally includes applying a set of machine learning models to the changes, the set of machine learning models trained to determine the pattern of the file operations and to compare the pattern of the file operations to the normal pattern based on features representing the files Tstem's behavior, the features including a ratio of modify operations to file operations and a modify operation is a type of the file operation, and extracting the features from the changes;
responsive to determining the filesystem's behavior is abnormal, determining whether files corresponding to the file operations in the time interval are encrypted by analyzing content of the files; and
determining whether the filesystem is infected based on the determinations that the filesystem behaves abnormally and that the files are encrypted.

### Claim 13 (depends on 12)

The system of claim 12, wherein the computer program instructions configured to cause the processor to record changes in the filesystems are configured to cause the processor to perform:
retrieving backup data of a machine including the filesystem, the backup data copying data of the machine corresponding to the time interval; and
crawling the backup data of the machine to create the changes.

### Claim 14 (depends on 12)

The system of claim 12, wherein determining whether files are encrypted comprises extracting entropy features from the files and calculating an encryption score representing a likelihood of the files being encrypted using the entropy features, the entropy features measuring randomness of the files.

### Claim 15

A non-transitory computer-readable storage medium storing computer program instructions executable by a processor, the computer program instructions configured to cause the processor to perform:
recording changes in a filesystem during a time interval, the changes including file operations within the time interval;
determining whether the filesystem behaves abnormally in the time interval by determining a pattern of the file operations in the time interval and comparing the pattern of the file operations to a normal pattern, wherein determining whether the filesystem behaves abnormally includes applying a set of machine learning models to the changes, the set of machine learning models trained to determine the pattern of the file operations and to compare the pattern of the file operations to the normal pattern based on features representing the filesystem's behavior, the features including a ratio of modify operations to file operations and a modify operation is a type of the file operation, and extracting the features from the changes;
responsive to determining the filesystem's behavior is abnormal, determining whether files corresponding to the file operations in the time interval are encrypted by analyzing content of the files; and
determining whether the filesystem is infected based on the determinations that the filesystem behaves abnormally and that the files are encrypted.

### Claim 16

A method for detecting ransomware infection in filesystems, the method comprising:
recording changes in a filesystem during a time interval, the changes including file operations within the time interval;
determining whether the filesystem behaves abnormally in the time interval by determining a pattern of the file operations in the time interval and comparing the pattern of the file operations to a normal pattern, and applying a set of machine learning models to the changes, the set of machine learning models trained to determine the pattern of the file operations and to compare the pattern of the file operations to the normal pattern based on features representing the filesystem's behavior, the features including a ratio of create operations to delete operations, wherein a create operation and a delete operation are respective types of the file operations, and extracting the features from the changes;
responsive to determining the filesystem's behavior is abnormal, determining whether files corresponding to the file operations in the time interval are encrypted by analyzing content of the files; and
determining whether the filesystem is infected based on the determinations that the filesystem behaves abnormally and that the files are encrypted.

### Claim 17

A method for detecting ransomware infection in filesystems, the method comprising:
recording changes in a filesystem during a time interval, the changes including file operations within the time interval;
determining whether the filesystem behaves abnormally in the time interval by determining a pattern of the file operations in the time interval and comparing the pattern of the file operations to a normal pattern, wherein determining whether the filesystem behaves abnormally includes applying a set of machine learning models to the changes, the set of machine learning models trained to determine the pattern of the file operations and to compare the pattern of the file operations to the normal pattern based on features representing the filesystem's behavior, the features including a ratio of create operations to delete operations, wherein a create operation and a delete operation are respective types of the file operations, and extracting the features from the changes;
responsive to determining the filesystem's behavior is abnormal, determining whether files corresponding to the file operations in the time interval are encrypted by analyzing content of the files; and
determining whether the filesystem is infected based on the determinations that the filesystem behaves abnormally and that the files are encrypted.

### Claim 18

A method for detecting ransom ware infection in filesystems, the method comprising:
recording changes in a filesystem during a time interval, the changes including file operations within the time interval;
determining whether the filesystem behaves abnormally in the time interval by determining a pattern of the file operations in the time interval and comparing the pattern of the file operations to a normal pattern, wherein determining whether the filesystem behaves abnormally includes applying a set of machine learning models to the changes, the set of machine learning models trained to determine the pattern of the file operations and to compare the pattern of the file operations to the normal pattern based on features representing the filesystem's behavior, the features a weighted-average delete operation ratio, the weighted-average delete operation ratio is a ratio between delete operations across files of a set of file types to delete operations within the time interval, each file type being associated with a weight, and extracting the features from the changes;
responsive to determining the filesystem's behavior is abnormal, determining whether files corresponding to the file operations in the time interval are encrypted by analyzing content of the files; and
determining whether the filesystem is infected based on the determinations that the filesystem behaves abnormally and that the files are encrypted.
