Kernel-level monitoring for software applications
The systems and methods disclosed herein monitor application (e.g., artificial intelligence (AI) model) operations using interactions between the application and a kernel. The systems and methods disclosed herein intercept, using a kernel interface, one or more function invocations transmitted from the application (e.g., an AI model without model modification). Event record(s) are generated for one or more functions to define process identifiers, resource interaction types, timestamps, and/or resource identifiers. Observed pattern(s) for the application are identified by comparing current event record(s) with previous record(s), and the identified observed pattern(s) are evaluated against reference pattern(s) to generate score(s). Data packet(s) that indicate observed pattern(s), corresponding score(s), and/or cryptographic digital fingerprint(s) of the one or more functions are generated. The data packet(s) are transmitted to distributed ledgers for immutable storage.
1 . A system for tracking artificial intelligence (AI) application data operations using kernel commands comprising:
at least one hardware processor; and
at least one non-transitory memory storing instructions, which, when executed by the at least one hardware processor, cause the system to:
intercept, using a system hook associated with a kernel interface configured to manage communications with a kernel of an operating system, function invocations transmitted from an AI application, wherein the kernel interface is configured to manage communications with the kernel of the operating system, and wherein each of the function invocations represents a request to execute a function set using the kernel;
determine, using the system hook, that the AI application has requested a data operation corresponding to a subset of data accessible by the operating system, wherein the system hook comprises an extended Berkeley Packet Filter (eBPF) program attached to one or more of a system call entry point or a system call exit point within the kernel and configured to execute when the function invocations are received by the kernel respectively;
generate a data access event record for each of the function invocations, wherein the data access event record includes one or more access parameters indicative of the data operation and one or more agent parameters indicative of the AI application;
generate a data package for each of the function invocations, wherein the data package includes the data access event record encoded into a format associated with a distributed ledger;
transmit the data package of each of the function invocations to the distributed ledger, wherein the distributed ledger is configured to store the data package of each of the function invocations across multiple nodes;
constructing a cryptographic hash tree over the data package of each of the function invocations by applying one or more hash operations to each of the data packages to generate a plurality of hash values; and
maintaining a representation of the plurality of hash values within the distributed ledger.
2 . The system of claim 1 , wherein the data access event record is encoded into the distributed ledger format by applying one or more hash operations to the data access event record to generate at least one cryptographic hash.
3 . The system of claim 1 , wherein the system is further caused to:
maintain a lineage graph structure representing one or more data dependencies between multiple data operations performed by the AI application,
wherein the lineage graph structure includes a node set representing one or more subsets of data accessible by the operating system and an edge set representing one or more transformations of the one or more subsets of data.
4 . The system of claim 3 ,
wherein the lineage graph structure is a directed acyclic graph (DAG), and
wherein each edge in the lineage graph structure includes metadata indicating one or more of: an operation type, a timestamp, or an agent identifier associated with a corresponding transformation.
5 . The system of claim 1 ,
wherein the one or more access parameters comprise one or more of: a data size, a timestamp, a source identifier, a destination identifier, a process identifier, a user identifier, or an agent identifier.
6 . A non-transitory computer-readable storage medium comprising instructions stored thereon for tracking artificial intelligence (AI) application data operations using kernel commands, wherein the instructions when executed by at least one data processor of a system, cause the system to:
intercept, using a system hook associated with a kernel interface configured to manage communications with a kernel of an operating system, function invocations transmitted from an AI application, wherein the kernel interface is configured to manage communications with the kernel of the operating system, and wherein each of the function invocations represents a request to execute a function set using the kernel;
determine, using the system hook, that the AI application has requested a data operation corresponding to a subset of data accessible by the operating system, wherein the system hook comprises an extended Berkeley Packet Filter (eBPF) program attached to one or more of a system call entry point or a system call exit point within the kernel and configured to execute when the function invocations are received by the kernel respectively;
cause generation of a data access event record for each of the function invocations, wherein the data access event record includes one or more access parameters indicating the data operation and one or more agent parameters indicating the AI application;
cause generation of a data package for each of the function invocations, wherein the data package includes the data access event record encoded into a format associated with a distributed ledger;
cause transmission of the data package of each of the function invocations to the distributed ledger, wherein the distributed ledger is configured to store the data package of each of the function invocations across multiple nodes;
construct a cryptographic hash tree over the data package of each of the function invocations by applying one or more hash operations to each of the data packages to generate a plurality of hash values; and
maintain a representation of the plurality of hash values within the distributed ledger.
7 . The non-transitory computer-readable storage medium of claim 6 , wherein the data access event record is encoded into the distributed ledger format by applying one or more hash operations to the data access event record to generate at least one cryptographic hash.
8 . The non-transitory computer-readable storage medium of claim 6 , wherein the eBPF program is attached to one or more of: a file operation system call, a network operation system call, a process operation system call, or a resource allocation system call.
9 . The non-transitory computer-readable storage medium of claim 6 , wherein the data operation includes one or more of: a file read operation, a file write operation, a network send operation, a network receive operation, a database query operation, or a memory allocation operation.
10 . The non-transitory computer-readable storage medium of claim 6 ,
generating a hash chain by including a hash of a previous data package in the data package,
wherein the hash chain indicates a sequence of data access event records.
11 . The non-transitory computer-readable storage medium of claim 6 , wherein the instructions further cause the system to:
generate a root hash of the cryptographic hash tree.
12 . The non-transitory computer-readable storage medium of claim 6 , wherein the instructions further cause the system to:
correlate the data access event record with one or more related data access event records associated with a common time period.
13 . The non-transitory computer-readable storage medium of claim 6 , wherein the instructions further cause the system to:
enrich the data access event record with contextual information including one or more of: a process name, a parent-child relationship, a system state information, or a current resource utilization level.
14 . A computer-implemented method for tracking artificial intelligence (AI) application data operations using kernel commands, the computer-implemented method comprising:
obtain, using a system hook associated with a kernel interface configured to manage communications with a kernel of an operating system, function invocations transmitted from an AI application, wherein the kernel interface is configured to manage communications with the kernel of the operating system, and wherein each of the function invocations represents a request to execute a function set using the kernel;
determine, using the system hook, that the AI application has requested a data operation corresponding to a subset of data accessible by the operating system, wherein the system hook comprises an extended Berkeley Packet Filter (eBPF) program attached to one or more of a system call entry point or a system call exit point within the kernel and configured to execute when the function invocations are received by the kernel respectively;
cause generation of a data access event record for each of the function invocations;
cause generation of a data package for each of the function invocations, wherein the data package indicates the data access event record encoded into a format associated with a distributed ledger and wherein the data access event record includes one or more access parameters corresponding to the data operation and one or more agent parameters corresponding to the AI application;
cause transmission of the data package of each of the function invocations to the distributed ledger, wherein the distributed ledger is configured to store the data package of each of the function invocations across multiple nodes;
construct a cryptographic hash tree over the data package of each of the function invocations by applying one or more hash operations to each of the data packages to generate a plurality of hash values; and
maintain a representation of the plurality of hash values within the distributed ledger.
15 . The computer-implemented method of claim 14 , further comprising:
validating the data access event record by:
generating a hash of new data, and
comparing the hash to a stored hash value in the data access event record.
16 . The computer-implemented method of claim 14 , further comprising:
determining one or more of: the AI application reading data from a source data object or the AI application writing the data to a destination data object; and
creating a lineage link from the source data object to the destination data object in response to the determination.
17 . The computer-implemented method of claim 14 , wherein the data operation includes one or more of: a file read operation, a file write operation, a network send operation, a network receive operation, a data storage location access operation, or a memory mapping operation.
18 . The computer-implemented method of claim 14 , wherein the eBPF program is attached to a kernel function associated with the function invocations.
19 . The computer-implemented method of claim 14 , wherein the data access event record is encoded into the distributed ledger format by applying one or more hash operations to the data access event record to generate at least one cryptographic hash.
20 . The computer-implemented method of claim 14 , further comprising:
generating a digital signature for the data package using a private key, wherein the digital signature is validated using a corresponding public key.