IP Library Granted Patent US 12,724,895
Granted Patent B2
US 12,724,895 · App. 19/370,931 · Granted Sep 1, 2026

Training a malware scanner using training data that includes malware generated by an artificial intelligence (AI)

Inventors: Henrik Plate (Valbonne, FR); Dimitrios Styliadis (San Jose, CA)
Assignee: Endor Labs Inc
G06F21/566G06F40/20
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,724,895
App. No.
19/370,931
Filed
Oct 28, 2025
Granted
Sep 1, 2026
Kind
B2
Art Unit
2432
USPC
726/23
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 (118)

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;

performing a malware test on the mutated malware to determine if it shows the similar behavior as the malware code;

repeating the mutating step when the mutated malware fails the malware test;

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 from a set of malware scanners that includes an artificial intelligence component; and

deploying the particular malware scanner to detect malware.

2 . 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.

3 . 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.

4 . 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.

5 . 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.

6 . 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.

7 . 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.

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;

performing a malware test on the mutated malware to determine if it shows the similar behavior as the malware code;

repeating the mutating step when the mutated malware fails the malware test;

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 an artificial intelligence component; and

deploying the particular malware scanner to detect malware.

9 . 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.

10 . 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.

11 . 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.

12 . 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.

13 . 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.

14 . The server of claim 8 , wherein:

the artificial intelligence comprises a transformer-based deep neural network that accepts natural language prompts as input.

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;

performing a malware test on the mutated malware to determine if it shows the similar behavior as the malware code;

repeating the mutating step when the mutated malware fails the malware test;

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 an artificial intelligence component; and

deploying the particular malware scanner to detect malware.

16 . 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.

17 . 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.

18 . 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.

19 . 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.

20 . 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.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 29, 2026
From: PLATE, HENRIK; STYLIADIS, DIMITRIOS
To: ENDOR LABS INC
Reel/Frame 073633/0480 →
Continuity (4)
Continuation 19315759 · Sep 1, 2025
Continuation 18518958 · Nov 25, 2023
Provisional Application 63472559 · Jun 12, 2023
Related Publication 20260099602A1 · Apr 9, 2026
References Cited (52)
US 8433687B1 · Pydi · 2013 [cited by applicant]
US 8627327B2 · Dunshea et al. · 2014 [cited by applicant]
US 10108975B1 · Benner et al. · 2018 [cited by applicant]
US 10169208B1 · Moyes et al. · 2019 [cited by applicant]
US 10505960B2 · Kong · 2019 [cited by examiner]
US 10565377B1 · Zheng et al. · 2020 [cited by applicant]
US 10917415B2 · Chen · 2021 [cited by applicant]
US 11586436B1 · Jennings · 2023 [cited by applicant]
US 11704099B1 · Morse et al. · 2023 [cited by applicant]
US 11930013B1 · Zhang et al. · 2024 [cited by applicant]
US 20020097253A1 · Charisius et al. · 2002 [cited by applicant]
US 20040168152A1 · Kramer · 2004 [cited by applicant]
US 20050055565A1 · Fournet et al. · 2005 [cited by applicant]
US 20070294667A1 · Caceres et al. · 2007 [cited by applicant]
US 20130083030A1 · Fukuda et al. · 2013 [cited by applicant]
US 20140013315A1 · Genevski et al. · 2014 [cited by applicant]
US 20140173574A1 · Schmidt et al. · 2014 [cited by applicant]
US 20150169320A1 · Ahmed et al. · 2015 [cited by applicant]
US 20160217285A1 · Boutnaru · 2016 [cited by examiner]
US 20160253625A1 · Casey · 2016 [cited by applicant]
US 20170206123A1 · Kirkpatrick · 2017 [cited by applicant]
US 20170286099A1 · Wilkinson · 2017 [cited by applicant]
US 20180018459A1 · Zhang et al. · 2018 [cited by applicant]
US 20190042233A1 · Majumdar et al. · 2019 [cited by applicant]
US 20190278572A1 · Yoshida et al. · 2019 [cited by applicant]
US 20200053175A1 · Bodman et al. · 2020 [cited by applicant]
US 20200073781A1 · Falko · 2020 [cited by applicant]
US 20200218535A1 · Alomari · 2020 [cited by applicant]
US 20210149667A1 · Watson et al. · 2021 [cited by applicant]
US 20210173621A1 · Fender et al. · 2021 [cited by applicant]
US 20210182037A1 · Hu · 2021 [cited by applicant]
US 20210281597A1 · Guiroux et al. · 2021 [cited by applicant]
US 20220091842A1 · Murray · 2022 [cited by applicant]
US 20220222351A1 · Levin et al. · 2022 [cited by applicant]
US 20220383995A1 · O'Rourke et al. · 2022 [cited by applicant]
US 20230195901A1 · Allen · 2023 [cited by applicant]
US 20230305827A1 · Dai et al. · 2023 [cited by applicant]
US 20230418578A1 · Chen et al. · 2023 [cited by applicant]
US 20240370570A1 · Betthauser et al. · 2024 [cited by applicant]
US 20240411881A1 · Aday et al. · 2024 [cited by applicant]
CA 2900312A1 · 2014 [cited by applicant]
CN 104321782A · 2015 [cited by applicant]
CN 112083945A · 2020 [cited by applicant]
CN 116842522A · 2023 [cited by applicant]
CN 117556432A · 2024 [cited by applicant]
CN 118467790A · 2024 [cited by applicant]
JP 2011053966A · 2011 [cited by applicant]
Barthelemy Dagenais et al., SemDiff: Analysis and Recommendation Support for API Evolution, 2009 [retrieved Aug. 8, 2025], 2009 IEEE 31st International Conference on Software Engineering, pp. 599-602, downloaded from :h… [cited by applicant]
Istvan-Attila Csaszar and Radu Razvan Slavescu (Interactive call graph generation for software projects); pp. 8; Published on IEEE in Nov. 26, 2020. [cited by applicant]
Mehdi Keshani (Scalable Call Graph Constructor for Maven); pp. 3; Published in Mar. 28, 2021. [cited by applicant]
Mehdi Keshani, Georgios Gousios and Sebastian Proksch (Frankenstein: fast and lightweight call graph generation for softwarebuilds); pp. 47; Published in Nov. 16, 2023. [cited by applicant]
Riivo Kikas, Georgios Gousios, Marlon Dumas, and Dietmar Pfahl (Structure and Evolution of Package Dependency Networks)pp. 11; Published on IEEE Jul. 3, 2017. [cited by applicant]