# US 2026/0099602 A1 · Training a malware scanner using training data that includes malware generated by an artificial intelligence (ai)

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

- Number: US 2026/0099602 A1
- Document ID: US20260099602A1
- Status: Published application
- Kind: A1
- Application number: 19/370,931
- Filed: 2025-10-28
- Published: 2026-04-09
- Earliest claimed: 2023-06-12
- Assignees: Endor Labs Inc
- Applicants: Endor Labs Inc
- Inventors: Henrik PLATE; Dimitrios STYLIADIS
- Web page: https://patentgrep.com/patent/US20260099602A1

## CPC

- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- G06F 40/20: Natural language analysis (semantic analysis of natural language G06F40/30)
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In some cases, malicious code is injected into a legitimate software package to create an injected package. An artificial intelligence (AI) extracts a plurality of parts of the injected package, mutates individual parts to create multiple mutated parts, and assembles at least a portion of them to create a mutated malware. A malware scanner determines a risk score associated with the mutated malware. If the risk score satisfies a predetermined threshold, the mutated malware is stored in a set of mutated malware. When a number of mutated malware in the set of mutated malware satisfies a requested number, the set of mutated malware are added to a set of training data that is used to train a particular malware scanner that includes a particular artificial intelligence component. After being trained, the particular malware scanner is deployed to detect malware.

## Claims

### Claim 1

A method comprising:
injecting, by one or more processors, malicious code into a legitimate software package to create an injected package;
extracting, by an artificial intelligence executed by the one or more processors, a plurality of parts of the injected package;
mutating, by the artificial intelligence executed by the one or more processors, individual parts of the plurality of parts to create multiple mutated parts;
assembling, by the one or more processors, at least a portion of the multiple mutated parts to create a mutated malware;
determining, by a malware scanner, a risk score associated with the mutated malware;
based at least in part on determining, by the one or more processors, that the risk score satisfies a predetermined threshold, storing the mutated malware in a set of mutated malware;
after determining, by the one or more processors, that a number of mutated malware in the set of mutated malware satisfies a requested number, adding the set of mutated malware to a set of training data;
training, using the set of training data, a particular malware scanner that includes a particular artificial intelligence component; and
deploying the particular malware scanner to detect malware.

### Claim 2 (depends on 1)

The method of claim 1, wherein mutating individual parts of the plurality of parts to create the multiple mutated parts comprises:
changing one or more variable identifiers;
changing one or more function identifiers based on a context vocabulary;
changing an application programming interface (API) from a first API to a second API;
insertion of one or more comments;
spreading one or more blocks of code across a plurality of functions;
inserting dead code that is never executed;
inserting of dummy functionality;
obfuscation of string literals using character encodings, encryption, string sampling, or minification;
modifying how a target component is accessed including replacing calls made to a component with calls made to a different component; or
any combination thereof.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
retrieving the malicious code from a set of code-test pairs, each code-test pair of the set of code-test pairs including a particular malware code and one or more malware tests, wherein the one or more malware tests are used to detect a behavior of the particular malware code to determine whether the mutated malware performs a malicious action of the particular malware code.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the artificial intelligence is trained using one or more programming languages to enable the artificial intelligence to extract and mutate both malicious code and source code.

### Claim 5 (depends on 1)

The method of claim 1, wherein extracting, by the artificial intelligence, the plurality of parts of the injected package comprises:
extracting context information, a natural language description of the injected package, features of the injected package, one or more use-cases of the injected package, an internal architecture of the injected package, one or more source code files, or any combination thereof.

### Claim 6 (depends on 1)

The method of claim 1, wherein based at least in part on determining, by the one or more processors, that the risk score fails to satisfy the predetermined threshold, the method further comprises:
creating a new injected package by injecting newly selected malicious code into a newly selected legitimate software package.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
training an artificial intelligence of the particular malware scanner using the set of mutated malware as training data to improve a malware detection capability of the particular malware scanner.

### Claim 8

A server comprising:
one or more processors; and
one or more non-transitory computer readable media storing instructions executable by the one or more processors to perform operations comprising:
injecting malicious code into a legitimate software package to create an injected package;
extracting, by an artificial intelligence, a plurality of parts of the injected package;
mutating, by the artificial intelligence, individual parts of the plurality of parts to create multiple mutated parts;
assembling at least a portion of the multiple mutated parts to create a mutated malware;
determining, by a malware scanner, a risk score associated with the mutated malware;
based at least in part on determining that the risk score satisfies a predetermined threshold, storing the mutated malware in a set of mutated malware;
after determining, by the one or more processors, that a number of mutated malware in the set of mutated malware satisfies a requested number, adding the set of mutated malware to a set of training data;
training, using the set of training data, a particular malware scanner that includes a particular artificial intelligence component; and
deploying the particular malware scanner to detect malware.

### Claim 9 (depends on 8)

The server of claim 8, wherein the plurality of parts of the injected package comprise:
a natural language description of the legitimate software package;
one or more features of the legitimate software package;
one or more use-cases of the legitimate software package;
an internal architecture of the legitimate software package;
one or more source code files of the legitimate software package; or
any combination thereof.

### Claim 10 (depends on 8)

The server of claim 8, wherein mutating individual parts of the plurality of parts to create the multiple mutated parts comprises:
changing one or more variable identifiers;
changing one or more function identifiers based on a context vocabulary;
changing an application programming interface (API) from a first API to a second API;
insertion of one or more comments;
spreading one or more blocks of code across a plurality of functions;
inserting dead code that is never executed;
inserting of dummy functionality;
obfuscation of string literals using character encodings, encryption, string sampling, or minification;
modifying how a target component is accessed including replacing calls made to a component with calls made to a different component; or
any combination thereof.

### Claim 11 (depends on 8)

The server of claim 8, further comprising:
retrieving the malicious code from a set of code-test pairs, each code-test pair of the set of code-test pairs including a particular malware code and one or more malware tests, wherein the one or more malware tests are used to detect a behavior of the particular malware code to determine whether the mutated malware performs a malicious action of the particular malware code.

### Claim 12 (depends on 8)

The server of claim 8, wherein:
the artificial intelligence comprises a transformer that tracks connections between code across sub-functions, functions, blocks of code, and larger software components; and
the operations further comprise:
training the artificial intelligence without labeling at least a portion of the training data prior to training the artificial intelligence.

### Claim 13 (depends on 8)

The server of claim 8, wherein mutating, by the artificial intelligence, the individual parts of the plurality of parts to create multiple mutated parts comprises:
modifying source code by modifying variable identifiers;
modifying function identifiers based on a context vocabulary;
inserting comments based on the context vocabulary;
spreading one or more statements across new or existing functions;
inserting dead code;
inserting dummy functionality;
obfuscating string literals using character encodings, encryption, string sampling, or minification;
adjusting a code style used to access a target component;
replacing an application programming interface (API) call to a call made in a target component; or
any combination thereof.

### Claim 14 (depends on 8)

The server of claim 8, wherein:
the artificial intelligence comprises a transformer-based deep neural network that accepts natural language prompts as input.

### Claim 15

One or more non-transitory computer readable media capable of storing instructions executable by one or more processors to perform operations comprising:
injecting malicious code into a legitimate software package to create an injected package;
extracting, by an artificial intelligence, a plurality of parts of the injected package;
mutating, by the artificial intelligence, individual parts of the plurality of parts to create multiple mutated parts;
assembling at least a portion of the multiple mutated parts to create a mutated malware;
determining, by a malware scanner, a risk score associated with the mutated malware;
based at least in part on determining that the risk score satisfies a predetermined threshold, storing the mutated malware in a set of mutated malware;
after determining, by the one or more processors, that a number of mutated malware in the set of mutated malware satisfies a requested number, adding the set of mutated malware to a set of training data;
training, using the set of training data, a particular malware scanner that includes a particular artificial intelligence component; and
deploying the particular malware scanner to detect malware.

### Claim 16 (depends on 15)

The one or more non-transitory computer readable media of claim 15, wherein mutating individual parts of the plurality of parts to create the multiple mutated parts comprises:
changing one or more variable identifiers;
changing one or more function identifiers based on a context vocabulary;
changing an application programming interface (API) from a first API to a second API;
insertion of one or more comments;
spreading one or more blocks of code across a plurality of functions;
inserting dead code that is never executed;
inserting of dummy functionality;
obfuscation of string literals using character encodings, encryption, string sampling, or minification;
modifying how a target component is accessed including replacing calls made to a component with calls made to a different component; or
any combination thereof.

### Claim 17 (depends on 15)

The one or more non-transitory computer readable media of claim 15, the operations further comprising:
downloading the malicious code from a malware repository; and
downloading the legitimate software package from a package registry.

### Claim 18 (depends on 15)

The one or more non-transitory computer readable media of claim 15, wherein based at least in part on determining that the risk score fails to satisfy the predetermined threshold, the operations further comprise:
creating a new injected package by injecting newly selected malicious code into a newly selected legitimate software package.

### Claim 19 (depends on 15)

The one or more non-transitory computer readable media of claim 15, wherein:
the injected package performs at least one legitimate function of the legitimate software package while, under certain circumstances, the malicious code surreptitiously performs one or more unwanted actions.

### Claim 20 (depends on 15)

The one or more non-transitory computer readable media of claim 15, the operations further comprising:
performing a functional test of the mutated malware;
determining, based on a result of the functional test, that the mutated malware is not semantically equivalent to the malicious code;
extracting, by the artificial intelligence, a second plurality of parts of the mutated malware;
mutating, by the artificial intelligence, the second plurality of parts to create second mutated parts; and
assembling the second mutated parts to create a second mutated malware.
