# US 2023/0412639 A1 · Detection of malicious on-chain programs

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

- Number: US 2023/0412639 A1
- Document ID: US20230412639A1
- Status: Published application
- Kind: A1
- Application number: 17/845,694
- Filed: 2022-06-21
- Published: 2023-12-21
- Earliest claimed: 2022-06-21
- Assignees: Coinbase, Inc.
- Applicants: Coinbase, Inc.
- Inventors: Yifan XU; Ziqiang LIU; Indra RUSTANDI; Yao MA
- Web page: https://patentgrep.com/patent/US20230412639A1

## CPC

- H04L 63/145: {the attack involving the propagation of malware through the network, e.g. viruses, trojans or worms}
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 20/00: Machine learning
- G06N 20/20: Ensemble learning
- H04L 9/0891: {Revocation or update of secret information, e.g. encryption key update or rekeying}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L 41/0604: using filtering, e.g. reduction of information by using priority, element types, position or time
- H04L 41/082: the condition being updates or upgrades of network functionality
- H04L 41/145: {involving simulating, designing, planning or modelling of a network}
- H04L 41/16: using machine learning or artificial intelligence
- H04L 63/1416: {Event detection, e.g. attack signature detection}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods and systems are described herein for a malware detection system that detects whether an on-chain program associated with a cryptographic token is malicious based on output of a machine learning model. The malware detection system may retrieve or generate attributes associated with an on-chain program and input those into a plurality of scripts within a malware detection script database to determine whether the on-chain program is malicious. The scripts may be generated based on an output of a machine learning model indicating whether the on-chain program is malicious.

## Claims

### Claim 1

A system for detecting malicious on-chain programs using malware detection script databases that are updated based on outputs of machine learning models, the system comprising:
one or more processors; and
a non-transitory computer-readable storage medium storing instructions, which when executed by the one or more processors cause the one or more processors to perform operations comprising:
detecting a first on-chain program corresponding to a first cryptographic token for a first blockchain network;
processing the first on-chain program corresponding to the first cryptographic token using a plurality of scripts stored in a malware detection script database that identifies malicious on-chain programs corresponding to cryptographic tokens, wherein the plurality of scripts is based on outputs of a machine learning model, and wherein the machine learning model is trained by:
receiving a plurality of attribute sets associated with respective labeled on-chain programs corresponding to respective labeled cryptographic tokens, wherein each attribute set comprises a value for one or more of creation block data, number of holders, number of transfers, transfer duration, earliest transfer, or latest transfer for each labeled cryptographic token of the respective labeled cryptographic tokens;
generating a plurality of vectors based on the plurality of attribute sets; and
training the machine learning model on the plurality of vectors to generate outputs of whether attributes for inputted cryptographic tokens indicate a malicious on-chain program;
in response to processing the first on-chain program corresponding to the first cryptographic token using the plurality of scripts, generating a warning corresponding to the first cryptographic token.

### Claim 2

A method for detecting malicious cryptographic tokens using malware detection script databases that are updated based on outputs of machine learning models, the method comprising:
detecting a first on-chain program corresponding to a first cryptographic token for a first blockchain network;
determining a first attribute set for the first cryptographic token;
processing the first attribute set using a plurality of scripts stored in a malware detection script database that identifies cryptographic tokens as corresponding to a malicious on-chain program, wherein the plurality of scripts is based on outputs of a machine learning model; and
in response to processing the first attribute set using the plurality of scripts, generating a warning corresponding to the first cryptographic token.

### Claim 3 (depends on 2)

The method of claim 2, wherein the machine learning model is trained by:
receiving a plurality of attribute sets associated with respective labeled cryptographic tokens, wherein each attribute set comprises a value for one or more of creation block data, number of holders, number of transfers, transfer duration, earliest transfer, or latest transfer for each labeled cryptographic token of the respective labeled cryptographic tokens;
generating a plurality of vectors based on the plurality of attribute sets; and
training the machine learning model on the plurality of vectors to generate outputs of whether attributes for inputted cryptographic tokens indicate the malicious on-chain program.

### Claim 4 (depends on 3)

The method of claim 3, wherein the outputs comprise a probability of whether a set of inputted plurality of attributes corresponds to the malicious on-chain program, and wherein the method further comprises comparing the probability to a probability threshold for determining whether the cryptographic tokens correspond to the malicious on-chain program.

### Claim 5 (depends on 2)

The method of claim 2, further comprising:
generating a recommendation to generate a new script for the malware detection script database;
receiving a user input to generate the new script;
in response to the user input, retrieving the first attribute set; and
generating the new script to identify cryptographic tokens comprising the first attribute set as malicious.

### Claim 6 (depends on 5)

The method of claim 5, wherein generating the new script further comprises:
determining a type of malware type for the first cryptographic token;
selecting a decision tree for generating the new script based on the type; and
using the decision tree to automatically generate the new script.

### Claim 7 (depends on 2)

The method of claim 2, wherein detecting the first on-chain program comprises receiving a request for a first blockchain operation, and wherein the first blockchain operation comprises exchanging the first cryptographic token with a second cryptographic token.

### Claim 8 (depends on 2)

The method of claim 2, further comprising:
detecting a second on-chain program corresponding to a second cryptographic token for a second blockchain network;
determining a second attribute set for the second cryptographic token;
processing the second attribute set using the plurality of scripts stored in the malware detection script database that identifies the cryptographic tokens associated with the malicious on-chain program, wherein the plurality of scripts is based on the outputs of the machine learning model; and
in response to processing the second attribute set, generating an approval to perform a second blockchain operation corresponding to the second cryptographic token.

### Claim 9 (depends on 2)

The method of claim 2, further comprising:
receiving attribute sets corresponding to the cryptographic tokens identified by the machine learning model as corresponding to any malicious on-chain program;
generating a supplemental training data set based on the attribute sets corresponding to the cryptographic tokens identified by the machine learning model as corresponding to any malicious on-chain program; and
retraining the machine learning model based on the supplemental training data set.

### Claim 10 (depends on 2)

The method of claim 2, wherein determining the first attribute set further comprises:
performing a discovery script routine on the first on-chain program corresponding to the first cryptographic token; and
receiving the first attribute set based on the discovery script routine.

### Claim 11 (depends on 2)

The method of claim 2, wherein generating the warning corresponding to the first cryptographic token further comprising:
determining a probability that the first on-chain program is malicious; and
generating a request to update the malware detection script database based on the probability.

### Claim 12

A non-transitory, computer-readable medium storing instructions for detecting malicious cryptographic tokens using malware detection script databases that are updated based on outputs of machine learning models, when executed by one or more processors, cause the one or more processors to perform operations comprising:
detecting a first on-chain program corresponding to a first cryptographic token for a first blockchain network;
determining a first attribute set for the first cryptographic token;
processing the first attribute set using a plurality of scripts stored in a malware detection script database that identifies cryptographic tokens as corresponding to a malicious on-chain program, wherein the plurality of scripts is based on outputs of a machine learning model; and
in response to processing the first attribute set using the plurality of scripts, generating a warning corresponding to the first cryptographic token.

### Claim 13 (depends on 12)

The non-transitory, computer-readable medium of claim 12, wherein the machine learning model is trained by:
receiving a plurality of attribute sets associated with respective labeled cryptographic tokens, wherein each attribute set comprises a value for one or more of creation block data, number of holders, number of transfers, transfer duration, earliest transfer, or latest transfer for each labeled cryptographic token of the respective labeled cryptographic tokens;
generating a plurality of vectors based on the plurality of attribute sets; and
training the machine learning model on the plurality of vectors to generate outputs of whether attributes for inputted cryptographic tokens indicate the malicious on-chain program.

### Claim 14 (depends on 13)

The non-transitory, computer-readable medium of claim 13, wherein the outputs comprise a probability of whether a set of inputted plurality of attributes corresponds to the malicious on-chain program, and wherein the one or more processors further compare the probability to a probability threshold for determine whether the cryptographic tokens correspond to the malicious on-chain program.

### Claim 15 (depends on 12)

The non-transitory, computer-readable medium of claim 12, wherein the instructions further cause the one or more processors to perform operations comprising:
generating a recommendation to generate a new script for the malware detection script database;
receiving a user input to generate the new script;
in response to the user input, retrieving the first attribute set; and
generating the new script to identify cryptographic tokens comprising the first attribute set as malicious.

### Claim 16 (depends on 15)

The non-transitory, computer-readable medium of claim 15, wherein the instructions for generating the new script further cause the one or more processors to perform operations comprising:
determining a type of malware type for the first cryptographic token;
selecting a decision tree for generating the new script based on the type; and
using the decision tree to automatically generate the new script.

### Claim 17 (depends on 12)

The non-transitory, computer-readable medium of claim 12, wherein the instructions for detecting the first on-chain program further cause the one or more processors to receive a request for a first blockchain operation, and wherein the first blockchain operation comprises exchanging the first cryptographic token with a second cryptographic token.

### Claim 18 (depends on 12)

The non-transitory, computer-readable medium of claim 12, wherein the instructions further cause the one or more processors to perform operations comprising:
detecting a second on-chain program corresponding to a second cryptographic token for a second blockchain network;
determining a second attribute set for the second cryptographic token;
processing the second attribute set using the plurality of scripts stored in the malware detection script database that identifies the cryptographic tokens associated with the malicious on-chain program, wherein the plurality of scripts is based on the outputs of the machine learning model; and
in response to processing the second attribute set, generating an approval to perform a second blockchain operation corresponding to the second cryptographic token.

### Claim 19 (depends on 12)

The non-transitory, computer-readable medium of claim 12, where the instructions further cause the one or more processors to perform operations comprising:
receiving attribute sets corresponding to the cryptographic tokens identified by the machine learning model as corresponding to any malicious on-chain program;
generating a supplemental training data set based on the attribute sets corresponding to the cryptographic tokens identified by the machine learning model as corresponding to any malicious on-chain program; and
retraining the machine learning model based on the supplemental training data set.

### Claim 20 (depends on 12)

The non-transitory, computer-readable medium of claim 12, wherein the instructions for determining the first attribute set further cause the one or more processors to perform operations comprising:
performing a discovery script routine on the first on-chain program corresponding to the first cryptographic token; and
receiving the first attribute set based on the discovery script routine.
