# US 2024/0202338 A1 · Method and a system for detecting malware activity in a .net platform

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

- Number: US 2024/0202338 A1
- Document ID: US20240202338A1
- Status: Published application
- Kind: A1
- Application number: 18/536,826
- Filed: 2023-12-12
- Published: 2024-06-20
- Earliest claimed: 2022-12-16
- Assignees: Group Ib Tds, Ltd
- Applicants: Group IB TDS, Ltd
- Inventors: Ilya Konstantinovich SACHKOV; Yury Alekseevich TRETYAKOV
- Web page: https://patentgrep.com/patent/US20240202338A1

## CPC

- G06F 21/566: {Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities}
- G06F 21/54: by adding security routines or objects to programs
- G06F 21/568: {eliminating virus, restoring damaged files}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and a system for detecting malware activity in a .NET platform are provided. The method comprises: determining an architecture of the .NET platform; modifying contents of a given .NET method by adding thereto an executable payload, thereby generating a respective modified .NET method, the executable payload being configured for logging and storing data of current activities in the .NET platform; storing the respective modified .NET method in the .NET platform; in response to calling, by a .NET application, the respective modified .NET method: executing the executable payload to cause the logging the current activity in the .NET platform to generate an activity log; and transmitting the activity log for analysis to determine presence of the malware activity in the .NET platform.

## Claims

### Claim 1

A computer-implemented method for detecting malware activity in a .NET platform, the method comprising:
during a preparation stage:
determining an architecture of the .NET platform, the determining comprising:
identifying a plurality of libraries in the .NET platform;
determining, for each version of each library of the plurality of libraries, a respective class from a set of predetermined classes;
determining, for each class of the predetermined set of classes, a respective .NET method of a set of predetermined .NET methods;
modifying contents of a given .NET method of the set of predetermined .NET methods by adding thereto an executable payload, thereby generating a respective modified .NET method,
the executable payload being configured for logging and storing data of current activities in the .NET platform;
storing the respective modified .NET method in the .NET platform;
in response to determining, in a native image directory of the architecture of the .NET platform, at least one native image library of one of the predetermined set of classes, hiding the at least one native image library in the native image directory;
generating, for each one of the at least one native image library, a respective modified native image library having the executable payload; and
adding respective modified native image libraries to the native image directory to be used instead of the at least one native image library; and
during an operation stage, following the preparation stage:
in response to calling, by a .NET application, at least one of: the respective modified .NET method and the respective modified native image library in the .NET platform:
executing the executable payload to cause the logging the current activity in the .NET platform to generate an activity log; and
transmitting the activity log for analysis to determine presence of the malware activity in the .NET platform.

### Claim 2 (depends on 1)

The method of claim 1, wherein the set of predetermined classes comprises:
Assembly;
Process; and
WebRequest.

### Claim 3 (depends on 1)

The method of claim 1, wherein the set of predetermined .NET methods comprises:
Load;
GetProcesses; and
Create.

### Claim 4 (depends on 1)

The method of claim 1, wherein, prior to the modifying the contents of the given .NET method, the method further comprises accessing the respective class of the given .NET method.

### Claim 5 (depends on 4)

The method of claim 4, wherein the accessing the respective class comprises executing a takeown utility.

### Claim 6 (depends on 1)

The method of claim 1, wherein, the modifying the contents of the given .NET method comprises modifying a behavior thereof.

### Claim 7 (depends on 1)

The method of claim 1, wherein, prior to the hiding the at least one native image library in the native image directory, the method further comprises accessing the at least one native image library.

### Claim 8 (depends on 7)

The method of claim 7, wherein the accessing the at least one native image library comprises executing a takeown utility.

### Claim 9 (depends on 1)

The method of claim 1, wherein the generating the respective modified native image library comprises executing an ngen.exe utility.

### Claim 10

A system for detecting malware activity in a .NET platform, the system comprising at least one processor and at least one non-transitory computer-readable medium storing executable instructions, which, when executed by the at least one processor, cause the system to:
during a preparation stage:
determine an architecture of the .NET platform, by:
identifying a plurality of libraries in the .NET platform;
determining, for each version of each library of the plurality of libraries, a respective class from a set of predetermined classes;
determining, for each class of the predetermined set of classes, a respective .NET method of a set of predetermined .NET methods;
modify contents of a given .NET method of the set of predetermined .NET methods by adding thereto an executable payload, thereby generating a respective modified .NET method,
the executable payload being configured for logging and storing data of current activities in the .NET platform;
store the respective modified .NET method in the .NET platform;
in response to determining, in a native image directory of the architecture of the .NET platform, at least one native image library of one of the predetermined set of classes, hide the at least one native image library in the native image directory;
generate, for each one of the at least one native image library, a respective modified native image library having the executable payload; and
add respective modified native image libraries to the native image directory to be used instead of the at least one native image library; and
during an operation stage, following the preparation stage:
in response to calling, by a .NET application, at least one of: the respective modified .NET method and the respective modified native image library in the .NET platform:
execute the executable payload to cause the logging the current activity in the .NET platform to generate an activity log; and
transmit the activity log for analysis to determine presence of the malware activity in the .NET platform.

### Claim 11 (depends on 10)

The system of claim 10, wherein the set of predetermined classes comprises:
Assembly;
Process; and
WebRequest.

### Claim 12 (depends on 10)

The system of claim 10, wherein the set of predetermined .NET methods comprises:
Load;
GetProcesses; and
Create.

### Claim 13 (depends on 10)

The system of claim 10, wherein, prior to modifying the contents of the given .NET method, the at least one processor further causes the system to access the respective class of the given .NET method.

### Claim 14 (depends on 13)

The system of claim 13, wherein to access the respective class comprises, the at least one processor causes the system to execute a takeown utility.

### Claim 15 (depends on 10)

The system of claim 10, wherein, by modifying the contents of the given .NET method, the at least one processor causes the system to modify a behavior of the given .NET method.

### Claim 16 (depends on 10)

The system of claim 10, wherein, prior to hiding the at least one native image library in the native image directory, the at least one processor causes the system to access the at least one native image library.

### Claim 17 (depends on 16)

The system of claim 16, wherein to access the at least one native image library, the at least one processor causes the system to execute a takeown utility.

### Claim 18 (depends on 10)

The system of claim 10, wherein to generate the respective modified native image library, the at least one processor causes the system to execute an ngen.exe utility.
