Malware Detection System

The behavioral monitor in user space with kernel filters addresses the limitations of Unix/Linux malware detection by intercepting system calls, analyzing arguments, and taking corrective actions to stop malicious processes and restore files, enhancing security in Unix/Linux environments.

JP7550491B2Active Publication Date: 2024-09-13VALI CYBER INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023547348
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-02-08
Filing Date
2022-02-07
Publication Date
2024-09-13
Estimated Expiration
2042-02-07

Smart Images

  • Figure 0007550491000002
    Figure 0007550491000002
  • Figure 0007550491000005
    Figure 0007550491000005
  • Figure 0007550491000006
    Figure 0007550491000006
Patent Text Reader

Abstract

A behavior monitor executing in user space generates a plurality of filters corresponding to a plurality of processes executing in user space. A first process sends a system call to a corresponding filter of the plurality of filters in kernel space. The first process receives a signal from the corresponding filter. The first process analyzes arguments issued in the system call. The first process determines that the arguments may be associated with malicious activity. The first process generates an event and sends the event to the behavior monitor. The behavior monitor analyzes the event to determine whether the event is associated with malicious activity. The behavior monitor stops execution of a process group associated with the first process and restores a previous version of at least one file modified by the process group.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Provisional Application No. 63 / 146,975, filed February 8, 2021, which is incorporated by reference in its entirety.

[0002] FIELD OF THE DISCLOSURE The embodiments disclosed herein generally relate to malware detection systems and methods for their operation. [Background technology]

[0003] Malware may be developed to infiltrate a user's computing system and hopefully steal privileged information, such as, but not limited to, personally identifiable information or financial information. As malware detection continues to advance, fraudsters continue to seek ways to circumvent mechanisms that may be implemented to thwart malicious attacks. Much of this technology has been focused on Windows-based operating systems, with less advancement into Unix-like operating systems such as Unix / Linux. Summary of the Invention [Means for solving the problem]

[0004] In some embodiments, a method for detecting malicious activity is disclosed herein. A behavioral monitor executing in a user space generates a plurality of filters corresponding to a plurality of processes executing in the user space. A first process of the plurality of processes sends a system call to a corresponding filter of the plurality of filters in a kernel space. The first process of the plurality of processes receives a signal from the corresponding filter. The signal prompts the first process to analyze arguments issued in the system call. In response to receiving, the first process analyzes the arguments issued in the system call. Analyzing the arguments includes determining that at least one file and / or data has been modified by the first process or a process associated with the first process. The first process determines that the arguments may be associated with malicious activity. In response to the determination, the first process generates an event and sends the event to a behavioral monitor. The behavioral monitor analyzes the event to determine whether the event is associated with malicious activity. Analyzing the event includes generating a copy of the at least one file and / or data before it was modified by the first process and saving the copy of the at least one file and / or data to a backup folder or system. In response to determining that the event is associated with malicious activity, the behavior monitor stops execution of a process group associated with the first process and restores a previous version of the at least one file from the backup folder or system.

[0005] In some embodiments, a non-transitory computer readable medium is disclosed herein. The non-transitory computer readable medium includes instructions that, when executed by one or more processors, cause a computer system to perform operations. The operations include generating, by a behavior monitor executing in a user space, a plurality of filters corresponding to a plurality of processes executing in the user space. The operations further include sending, by a first process of the plurality of processes, a system call to a corresponding filter of the plurality of filters in the kernel space. The operations further include receiving, by the first process of the plurality of processes, a signal from the corresponding filter. The signal prompts the first process to analyze arguments issued in the system call. The operations further include, in response to receiving, analyzing, by the first process, the arguments issued in the system call by determining that at least one file has been modified by the first process or a process related to the first process. The operations further include determining, by the first process, that the arguments may be associated with malicious activity. The operations further include, in response to determining, generating, by the first process, an event and sending the event to the behavior monitor. The operations further include analyzing the event to determine whether the event is associated with malicious activity by generating, by the behavior monitor, a copy of the at least one file and / or data before it was modified by the first process and saving the copy of the at least one file and / or data to a backup folder or system. The operations further include, in response to determining that the event is associated with malicious activity, causing, by the behavior monitor, to stop execution of a process group associated with the first process, and restoring, by the behavior monitor, a previous version of the at least one file and / or data from the backup folder or system.

[0006] In some embodiments, a system is disclosed herein. The system includes a processor and a memory. The memory has programming instructions stored therein, which when executed by the processor, cause the system to perform operations. The operations include generating, by a behavior monitor executing in a user space, a plurality of filters corresponding to a plurality of processes executing in the user space. The operations further include sending, by a first process of the plurality of processes, a system call to a corresponding filter of the plurality of filters in the kernel space. The operations further include receiving, by the first process of the plurality of processes, a signal from the corresponding filter. The signal prompts the first process to analyze arguments issued in the system call. The operations further include, in response to receiving, analyzing, by the first process, the arguments issued in the system call by determining that at least one file has been modified by the first process or a process related to the first process. The operations further include, by the first process, determining that the arguments may be associated with malicious activity. The operations further include, in response to determining, generating, by the first process, an event and sending the event to the behavior monitor. The operations further include analyzing the event to determine whether the event is associated with malicious activity by generating, by the behavior monitor, a copy of the at least one file and / or data before it was modified by the first process and saving the copy of the at least one file and / or data to a backup folder or the system. The operations further include, in response to determining that the event is associated with malicious activity, stopping, by the behavior monitor, execution of a process group associated with the first process. The operations further include restoring, by the behavior monitor, a previous version of the at least one file from the backup folder or the system.

[0007] So that the above-mentioned features of the present disclosure can be understood in detail, a more particular description of the present disclosure briefly summarized above can be had by reference to embodiments, some of which are illustrated in the accompanying drawings. It should be noted, however, that the accompanying drawings illustrate only typical embodiments of the present disclosure and are therefore not to be considered as limiting its scope, since the present disclosure may admit of other equally effective embodiments. [Brief description of the drawings]

[0008] [Figure 1] FIG. 1 is a block diagram illustrating a computing system in accordance with an exemplary embodiment.

[0009] [Figure 2A] FIG. 1 is a flow diagram illustrating a method for detecting malware, according to an example embodiment.

[0010] [Figure 2B] FIG. 4 is a flow diagram illustrating a method for monitoring a process executing in a user space, according to an example embodiment.

[0011] [Diagram 3] 1 is a flow diagram illustrating a method for taking corrective action when malicious activity is detected, according to an example embodiment.

[0012] [Figure 4A] FIG. 1 illustrates a system bus computing system architecture according to an exemplary embodiment.

[0013] [Figure 4B] FIG. 1 illustrates a computer system having a chipset architecture according to an exemplary embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] For ease of understanding, the same reference numbers are used, wherever possible, to designate identical elements that are common to each of the figures. It is believed that elements disclosed in one embodiment can be beneficially utilized on other embodiments without specific reference.

[0015] One or more techniques described herein are generally directed to malware detection systems. For example, one or more techniques described herein provide a means for detecting malware in a Unix / Linux environment (e.g., Ubuntu, Red Hat, etc.). To detect malicious activity, one or more techniques described herein may utilize a behavior monitor configured to inject process code into various processes executing in a user space of a computing environment. Such process code injection may trigger the generation of a corresponding filter in a kernel space of the computing system. The filter in the kernel space may be used to intercept system calls from the associated processes and identify specific system calls that may be associated with malicious activity. If the current system determines that one or more processes or files are associated with malicious activity, the behavior monitor may terminate the execution of the process and restore a previous version of the process or file from a backup.

[0016] 1 is a block diagram illustrating a computing system 100, according to an example embodiment. In some embodiments, the computing system 100 may represent a server system configured to perform the operations discussed herein. In other embodiments, the computing system 100 may represent an IOT device or equipment. As shown, the computing system 100 may include a user space 102 and a kernel space 104. The user space 102 and the kernel space 104 may represent portions of memory associated with the computing system 100.

[0017] In general, user space 102 may represent a portion of memory that executes code outside of an operating system kernel. For example, user space 102 may represent a portion of memory configured to execute applications in computing system 100. In comparison, kernel space 104 may represent a portion of memory that executes an operating system kernel associated with computing system 100. For example, kernel space 104 may represent a portion of memory associated with the kernel and the operating system.

[0018] As shown, the user space 102 may include one or more client processes 106 (generally, client processes 106), a behavior monitor 108, and a backup folder 110. In some embodiments, each of the client processes 106 and the behavior monitor 108 may be comprised of one or more software modules. The one or more software modules may be a collection of code or instructions stored in the user space 102 that represent a series of machine instructions (e.g., program code) that implement one or more algorithmic steps. Such machine instructions may be actual computer code that a processor of the computing system 100 interprets to implement the instructions, or may be higher level coding of instructions that are interpreted to obtain the actual computer code. The one or more software modules may also include one or more hardware components. One or more aspects of the exemplary algorithm may be executed by the hardware components (e.g., circuitry) themselves, rather than as a result of instructions.

[0019] In some embodiments, client process 106 may refer to a program executing in computing system 100. In some embodiments, client process 106 may represent a program executing in a container solution such as Docker®, CRI-O, etc. In general, a program executing inside a container may appear as a separate program in computing system 100. For the purposes of computing system 100, there is no distinction between a process executing inside a container and any other process. In some embodiments, client process 106 may represent a program executing in a virtual machine.

[0020] The behavior monitor 108 may be configured to detect malware in the computing system 100. In some embodiments, to begin monitoring every process in the computing system 100, every program in the computing system 100 may be suspended except for the behavior monitor 108. In some embodiments, a subset of all processes in the computing system 100 may be suspended. Once the programs are suspended, the behavior monitor 108 may begin injecting processing code into each program. By initially suspending every process in the system, the behavior monitor 108 may inject processing code into every program and thread without worrying about race conditions that would be newly created for the programs and threads as the behavior monitor 108 attempts to inject into every program and thread. Additionally, the behavior monitor 108 may be configured to inject processing code into every process 106 and receive event information from the injected code. To inject processing code into every process 106, the behavior monitor 108 may use a system call. In some embodiments, the system call may be a ptrace or process_vm_writev system call. The ptrace system call may allow the behavior monitor 108 to attach to or control various processes 106. The process_vm_writev system call allows the behavior monitor 108 to inject processing code into any process 106.

[0021] In some embodiments, after a process is injected, the process may create a new program or thread within the target process. In general, there may be multiple ways in which processes and / or threads may be created in computing system 100. For example, a user or administrator may utilize one or more of the clone, fork, or vfork system calls to create a new program or thread.

[0022] In some embodiments, the execve and / or execveat system calls may be used to create a process within the target process 106 or program. The execve and / or execveat system calls may completely overwrite the original memory in the address space of the process 106, thereby creating a new program within the process 106. Once executed, the behavior monitor 108 may reinsert the processing code into the newly created program as if it were any other program.

[0023] In some embodiments, fork and / or vfork system calls may be used to create a program within the target process 106 or program. In some embodiments, the fork and / or vfork and / or clone system calls may create a program whose memory image may be a copy of the process that called fork. In some embodiments, execution may resume immediately after the location of the fork call. In some embodiments, the inserted processing code may cause the fork and / or vfork system calls to be initiated at a different location than originally intended by the program. Thus, the context of the newly created program may be set to match the originally intended location of the fork and / or vfork system calls. In some embodiments, the context may include the registers and state of the originally intended execution.

[0024] In some embodiments, this may be accomplished by inserting a setcontext function into the newly created program and executing the setcontext function in the newly created program. Setcontext may take the required new context as an argument. In some embodiments, the behavior monitor 108 may create the desired new context and provide the desired new context as an argument to the newly inserted setcontext function.

[0025] In some embodiments, this may be accomplished by executing a sigreturn system call in the newly created program and executing a sigreturn system call in the newly created program.

[0026] In some embodiments, the clone system call may be used to create a thread within a target process 106 or program. In some embodiments, the clone system call may operate similarly to the fork system call described above. Thus, the clone system call may be treated similarly to the fork system call. In some embodiments, rather than creating a new program within the process 106, the clone system call may create a new thread within the process 106. Similar to the fork system call, the new thread may begin execution immediately after the original call to clone. Because this system call may occur within the inserted processing code rather than where it was originally intended, the context of the new thread must be set appropriately to match the originally intended context.

[0027] In some embodiments, behavior monitor 108 may insert code in a non-damaging manner into the state of processes 106 executing in computing system 100. For example, during operation, before a program is inserted into a given process 106, the portion of the original state of process 106 that is to be changed may be stored. Once this portion of the original state of process 106 has been stored, behavior monitor 108 may begin inserting code into process 106. Once the insertion has occurred, behavior monitor 108 may restore the portion of the original state that was stored along with the inserted code.

[0028] In some embodiments, once an insertion has occurred and portions of the original state of each process 106 have been restored, copies of the files and / or data that the process 106 modifies or deletes may be made and stored in the backup folder 110. In some embodiments, the behavior monitor 108 may utilize system calls to copy these files and / or data to the backup folder 110. For example, the behavior monitor 108 may utilize the copy_file_range system call to copy the files and / or data to the backup folder 110.

[0029] In some embodiments, the behavior monitor 108 may use any combination of system calls that can access, read, and write data to copy files to the backup folder 110 .

[0030] In some embodiments, once an insertion has been made and portions of the original state of each process 106 have been restored, copies of the files and / or data that the process 106 modified or deleted may be made and stored in any system that may store data, such as a database, network attached storage, or an alternative machine.

[0031] In some embodiments, the injected code may rely on a secomp filter to establish filters for system calls that may be of interest. As illustrated, the secomp filter may be created in user space, while a corresponding filter 114 may be established in kernel space 104. In this manner, the computing system 100 does not require a kernel module to execute this process. The secomp filter may provide a means for a process to specify a filter 114 for an incoming system call. In some embodiments, the secomp filter may take the form of a Berkeley Packet Filter (BPF) program. Examples of system calls that may be of interest may include, but are not limited to, system calls associated with file manipulation, system calls associated with the creation of new programs, system calls related to the initiation of network connections, and the like. For example, system calls such as open and openat may be captured to track files that a given process is accessing. In addition, system calls such as execve, fork, and clone may be captured to track the creation of new threads, processes, and process groups. System calls such as accept4, accept, bind, and connect may be used to capture the initiation of network connections.

[0032] In some embodiments, the behavior monitor 108 may use auditd rules to establish filters for system calls that may be of interest.

[0033] In some embodiments, the behavior monitor 108 may use fanotify to establish a filter for system calls that may be of interest.

[0034] In some embodiments, the behavior monitor 108 may use the extended Berkeley Packet Filter (eBPF) to establish a filter of system calls that may be of interest.

[0035] In some embodiments, the behavior monitor 108 may use the system call prtctl with argument PR_SET_SYSCALL_USER_DISPATCH to establish a filter of system calls that may be of interest.

[0036] In some embodiments, the behavior monitor 108 may use an SELinux module to establish a filter of system calls that may be of interest.

[0037] In some embodiments, the behavior monitor 108 may use an AppArmour profile to establish filters for system calls that may be of interest.

[0038] In some embodiments, the behavior monitor 108 may use the system call ptrace to establish a filter for system calls that may be of interest.

[0039] In some embodiments, the inserted code may register or establish a signal handler 112 in each process. The signal handler 112 may be configured to handle signals received from the kernel space 104. For example, the signal handler 112 may be configured to handle a SIGSYS signal sent from a corresponding filter 114 in the kernel space 104. In some embodiments, upon receiving a SIGSYS signal, the signal handler 112 may obtain relevant information from the signal and perform one or more actions based on the particular type of system call. For example, during operation, the client process 106 may open or delete files and / or data with the intent of modifying the files and / or data. Such actions may trigger the signal handler 112 to send data about the files and / or data being accessed to the behavior monitor 108. The behavior monitor 108 may make a copy of the files and / or data and store the files and / or data in the backup folder 110. In some embodiments, the behavior monitor 108 may make copies of the files and / or data and store the files and / or data in any system that may store data, such as a database, network attached storage, or an alternative machine.

[0040] As illustrated, with reference to the kernel space 104, the kernel space 104 may include one or more filters 114 established therein. 1 ~114 n(generally, a filter 114 or multiple filters 114). Each filter 114 may correspond to a respective process 106 into which the behavior monitor 108 has inserted code. For example, as previously described, the insertion of code into each process 106 may result in the registration or establishment of a respective filter 114 in kernel space 104. Each filter 114 may define one or more rules based on a system call received from the respective process 106. For example, depending on the type of system call received from the process 106, the filter 114 may choose to kill the process 106, allow the process 106 to complete, or send a SIGSYS signal back to the process 106. Examples of system calls that generate a SIGSYS signal include all system calls that may be intercepted. Examples may include, but are not limited to, system calls that manipulate files, system calls that create new programs, system calls that modify existing programs, system calls that initiate network connections, etc.

[0041] In some embodiments, a SIGSYS signal may be sent back to the process 106 to prompt or cause the execution of the signal handler 112. The SIGSYS signal may indicate to the signal handler 112 that the process 106 has taken some action. Exemplary actions may include, but are not limited to, opening a file, saving a file, requesting access to a file, and the like. The signal handler 112 may be configured to inspect the system call arguments sent to the filter 114 to ensure that the arguments are safe. In some embodiments, the signal handler 112 may allow the system call to proceed based on a determination that the arguments are sufficiently safe. Examples of disallowed system calls include, but are not limited to, system calls that access protected programs or files. The determination of safety may vary from system call to system call and is dependent on the type of one or more arguments provided to the system call. In some embodiments, a system call whose execution, when considered in parallel with the execution of other system calls, may be used to determine malicious activity may be sent back to the monitoring program for aggregation and further analysis. In some embodiments, the signal handler 112 may send a message to the behavior monitor 108 to notify the behavior monitor 108 of the system call.

[0042] The behavior monitor 108 may further be configured to receive one or more events from the signal handler 112. In some embodiments, the one or more events may refer to messages sent from the signal handler 112 to the behavior monitor 108 to inform the behavior monitor 108 of the system call that triggered the SIGSYS signal from the filter 114. In some embodiments, the behavior monitor 108 may collect event information from the signal handler 112 and group the event information according to the process group that triggered each event. In general, a process group may refer to a collection of processes that share a child / parent relationship. In some embodiments, events initiated by each process 106 in a group may be grouped together as if they were initiated by the same process. The behavior monitor 108 may then use a behavior detection algorithm 116 to analyze and evaluate the process group data. The behavior detection algorithm 116 may be configured to analyze the process group data to determine whether the process group itself is malicious. If the behavior detection algorithm 116 determines that the process group is malicious, the behavior monitor may initiate killing of the malicious process group.

[0043] In some embodiments, the behavior detection algorithm 116 may be configured to maintain counts and relationships between system calls that a process group performs inside the behavior monitor 108. Such a configuration is an improvement over storing the entire information about the original system calls for various reasons. For example, the behavior detection algorithm 116 may be configured to aggregate the system call information into a summary format. By aggregating the system call information into a summary format, the memory overhead of the computing system 100 may be significantly reduced. In addition, such aggregation may also significantly reduce the analysis time required to examine a data structure that may represent a process group. For example, if a process opens thousands of files, the behavior detection algorithm 116 may store a count representing the number of files that are open, instead of detailed information about the specific thousands of system calls. Furthermore, the behavior detection algorithm 116 may track how these actions occur and keep counts related to those facts. For example, if 500 files are opened for writing and 500 files are opened for reading, the behavior detection algorithm 116 may keep a count of the different types of file accesses, instead of detailed information about each individual access. In some embodiments, behavior algorithms may be represented as data rather than code so that they can be updated without changing the code.

[0044] In some embodiments, in response to determining that a process group is malicious, behavior monitor 108 may terminate the entire process group associated with the malicious behavior. Since a copy of each file and / or data has been generated and stored in backup folder 110 or in any system capable of storing data, such as a database, network attached storage, or an alternative machine, behavior monitor 108 may be configured to delete files and / or data dropped by the malicious process group and restore files and / or data previously modified by the malicious process group.

[0045] 2A is a flow diagram illustrating a method 200 for detecting malware, according to an example embodiment. Method 200 may begin at step 202.

[0046] In step 202, the behavior monitor 108 may generate a number of filters 114 in the kernel space 104 corresponding to a number of processes executing in the user space 102. To generate the number of filters 114, the behavior monitor 108 may insert processing code into all processes 106 executing in the computing system 100. Such a process may result in the generation of a number of filters 114 in the kernel space 104. In some embodiments, each filter 114 may correspond to a respective process 106 executing in the user space 102.

[0047] In step 204, the process 106 may send a system call to the kernel space 104. In some embodiments, the system call may include one or more arguments associated with it. Exemplary system calls may include, but are not limited to, a system call associated with file operations and a system call associated with creating a new program. In some embodiments, the system call may be intercepted by a respective filter 114 associated with the process 106 that initiated the system call.

[0048] In step 206, filter 114 may analyze the system call to determine how to handle the system call. For example, depending on the type of system call received from process 106, filter 114 may choose to kill process 106, allow process 106 to complete, or send a SIGSYS signal back to process 106.

[0049] In step 208, filter 114 may send a signal to process 106 based on the analysis. For example, in response to analyzing a system call received from process 106, filter 114 may generate a SIGSYS signal to send back to process 106. The SIGSYS signal may prompt process 106 to further analyze arguments issued in the system call.

[0050] In step 210, process 106 may receive a signal from filter 114 and analyze one or more arguments in the associated system call. For example, signal handler 112 may inspect one or more system call arguments sent to filter 114 to ensure that the one or more arguments are safe. In some embodiments, signal handler 112 may allow the system call to proceed based on a determination that the one or more arguments are sufficiently safe. In some embodiments, signal handler 112 may send a message to behavior monitor 108 to notify behavior monitor 108 of the system call.

[0051] In step 212, the process 106 may send a message to the behavior monitor 108. For example, the signal handler 112 may send a message to the behavior monitor 108 in response to an analysis of arguments in a system call to notify the behavior monitor 108 of a suspicious system call.

[0052] In step 214, the behavior monitor 108 may collect event information (e.g., messages) from the signal handler 112 and group the event information according to the process group that triggered each event. In general, a process group may refer to a collection of processes that share a child / parent relationship. In some embodiments, events initiated by each process 106 in a group may be grouped as if they were initiated by the same process.

[0053] In step 216, the behavior monitor 108 may analyze and evaluate the process group data using a behavior detection algorithm 116. The behavior detection algorithm 116 may be configured to analyze the process group data to determine whether the process group itself is malicious.

[0054] In step 218, the behavior monitor 108 may determine whether the process group is malicious. If in step 218, the behavior monitor 108 determines that the process group is not malicious, in step 220, the behavior monitor may allow the process group to continue execution. However, if in step 218, the behavior monitor 108 determines that the process group is malicious, in step 222, the behavior monitor may kill the malicious process group.

[0055] 2B is a flow diagram illustrating a method 250 for monitoring processes executing in a user space, according to an example embodiment. The method 250 may begin as step 252.

[0056] In step 252, the behavior monitor 108 may generate a number of filters 114 in the kernel space 104 corresponding to a number of processes executing in the user space 102. To generate the number of filters 114, the behavior monitor 108 may insert processing code into all processes 106 executing in the computing system 100. Such a process may result in the generation of a number of filters 114 in the kernel space 104. In some embodiments, each filter 114 may correspond to a respective process 106 executing in the user space 102.

[0057] In step 254, the process 106 may send a system call to the kernel space 104. In some embodiments, the system call may include one or more arguments associated with it. Exemplary system calls may include, but are not limited to, a system call associated with file operations and a system call associated with the creation of a new program. In some embodiments, the system call may be intercepted by a respective filter 114 associated with the process 106 that initiated the system call.

[0058] In step 256, filter 114 may analyze the system call to determine how to handle the system call. For example, depending on the type of system call received from process 106, filter 114 may choose to kill process 106, allow process 106 to complete, or send a SIGSYS signal back to process 106.

[0059] In step 258, filter 114 may send a signal to process 106 based on the analysis. For example, in response to analyzing a system call received from process 106, filter 114 may generate a SIGSYS signal to send back to process 106. The SIGSYS signal may prompt process 106 to further analyze the arguments submitted in the system call.

[0060] In step 260, the process 106 may receive a signal from the filter 114 and analyze one or more arguments in the associated system call. For example, the signal handler 112 may inspect one or more system call arguments sent to the filter 114 to determine whether the process 106 deleted or modified a file.

[0061] In response to the signal handler 112 determining that the process 106 deleted or modified files and / or data in step 262, the signal handler 112 may send data to the behavior monitor 108. The data may represent an instruction of the process 106 to modify or delete existing files and / or data.

[0062] In step 264, in response to the behavior monitor 108 receiving an indication that a process 106 has deleted or modified files and / or data, the behavior monitor 108 may create a copy of the files and / or data in the backup folder 110. The copy of the file may represent a version of the file and / or data before the modification or deletion. In this manner, the behavior monitor 108 can restore the files and / or data to their original state if the files and / or data are damaged or deleted by a malicious process.

[0063] FIG. 3 is a flow diagram illustrating a method 300 for taking corrective action when malicious activity is detected, according to an example embodiment.

[0064] As previously described, when an injection occurs and portions of the original state of the respective process 106 are restored, the behavior monitor 108 may cause the computing system 100 to generate copies of files and / or data that the process 106, or any child processes of the process 106, modified or deleted. Such functionality allows the behavior monitor to restore files and / or data to their original state if they are corrupted or deleted. In some embodiments, the behavior monitor 108 may utilize a system call called copy_file_range to copy the files or processes 106 to the backup folder 110. In some embodiments, the backup folder 110 may further include a previous version of the files or processes 106 executing in the user space 102.

[0065] In step 302, the behavior monitor 108 may determine that the process group is malicious. For example, the behavior monitor 108 may use a behavior detection algorithm 116 to analyze and evaluate the process group data sent by one or more signal handlers 112. The behavior detection algorithm 116 may be configured to analyze the process group data to determine whether the process group itself is malicious.

[0066] In response to determining that the process group is malicious in step 304, the behavior monitor 108 may kill the malicious process group. For example, the behavior monitor 108 may send a signal to the process 106 that causes the process 106 to stop operating. In some embodiments, the signal to the process 106 may take the form of a kill command.

[0067] In step 306, the behavior monitor 108 may delete files or processes associated with the malicious activity. For example, based on the analysis, the behavior monitor 108 may be able to identify multiple processes or multiple files associated with the malicious behavior. Based on this determination, the behavior monitor 108 may delete the identified files and / or data or processes.

[0068] At step 308, the behavior monitor 108 may restore files and / or data affected by the malicious activity. For example, in response to identifying files and / or data associated with the malicious activity, the behavior monitor 108 may identify previous versions of the files and / or data that may have been previously stored in the backup folder 110. The behavior monitor 108 may then overwrite or initiate a restoration of the files and / or data based on the previously stored versions.

[0069] FIG. 4A illustrates a system bus architecture of a computing system 400, according to an exemplary embodiment. One or more components of the system 400 may be in electrical communication with each other using a bus 405. The system 400 may include a processor (e.g., one or more CPUs, GPUs, or other types of processors) 410 and a system bus 405 that couples various system components to the processor 410, including a system memory 415, such as a read-only memory (ROM) 420 and a random access memory (RAM) 425. The system 400 may include a cache of high-speed memory that is directly, closely connected to the processor 410, or integrated as part of the processor 410. The system 400 may copy data from the memory 415 and / or storage device 430 to the cache 412 for quick access by the processor 410. In this manner, the cache 412 may provide a performance boost that avoids delays to the processor 410 while waiting for data. These and other modules may control or be configured to control the processor 410 to perform various actions. Other system memories 415 may be available as well. Memory 415 may include multiple different types of memory with different performance characteristics. Processor 410 may represent a single processor or multiple processors. Processor 410 may include one or more of general purpose processors or hardware or software modules, such as service 1 432, service 2 434, and service 4 436 stored in storage device 430, configured to control processor 410, as well as special purpose processors where software instructions are embedded in the actual processor design. Processor 410 may be essentially a fully self-contained computing system including multiple cores or processors, buses, memory controllers, caches, etc. Multi-core processors may be symmetric or asymmetric.

[0070] To allow user interaction with the computing system 400, the input device 445 can be any number of input mechanisms, such as a microphone for audio, a touch-sensitive screen for gesture or graphic input, a keyboard, a mouse, motion input, voice, etc. The output device 435 (e.g., a display) can also be one or more of many output mechanisms known to those skilled in the art. In some cases, a multimodal system can allow a user to provide multiple types of input to communicate with the computing system 400. The communication interface 440 can generally govern and manage user input and system output. There is no limitation to operation in a particular hardware configuration, so the basic features herein can be easily substituted for improved hardware or firmware configurations as they are developed.

[0071] The storage device 430 may be a non-volatile memory and may be a hard disk or other type of computer-readable medium capable of storing data accessible by a computer, such as a magnetic cassette, a flash memory card, a solid-state memory device, a digital versatile disk, a cartridge, a random access memory (RAM) 425, a read-only memory (ROM) 420, and hybrids thereof.

[0072] The storage device 430 may include services 432, 434, and 436 for controlling the processor 410. Other hardware or software modules are also contemplated. The storage device 430 may be connected to the system bus 405. In one aspect, a hardware module that performs a particular function may include software components stored in a computer readable medium in association with the necessary hardware components, such as the processor 410, the bus 405, the output device 435, etc., to perform the function.

[0073] FIG. 4B illustrates a computer system 450 having a chipset architecture according to an exemplary embodiment. The computer system 450 may be an example of computer hardware, software, and firmware that may be used to implement the disclosed techniques. The system 450 may include one or more processors 455, which represent any number of physically and / or logically distinct resources capable of executing software, firmware, and hardware configured to perform the identified computations. The one or more processors 455 may communicate with a chipset 460, which may control input to and output from the one or more processors 455. In this example, the chipset 460 may output information to an output 465, such as a display, and may read and write information to a storage device 470, which may include, for example, magnetic media and solid-state media. The chipset 460 may read data from and write data to a RAM 475. To interface with the chipset 460, a bridge 480 may be provided for interfacing with various user interface components 485. Such user interface components 485 may include a keyboard, a microphone, touch detection and processing circuitry, a pointing device such as a mouse, etc. In general, input to the system 450 may come from any of a variety of sources, including machine-generated and / or human-generated.

[0074] The chipset 460 may also interface with one or more communication interfaces 490, which may have different physical interfaces. Such communication interfaces may include interfaces for wired and wireless local area networks, for broadband wireless networks, and for personal area networks. Some applications of the methods for generating, displaying, and using GUIs disclosed herein may include receiving an ordered data set via a physical interface, or generated by the machine itself by one or more processors 455 analyzing data stored in the storage device 470 or RAM 475. Additionally, the machine may receive inputs from a user via the user interface components 485 and perform appropriate functions, such as browsing functions, by interpreting these inputs using one or more processors 455.

[0075] It will be appreciated that the exemplary systems 400 and 450 may have multiple processors 410 or may be part of a group or cluster of computing devices networked together to provide greater processing power.

[0076] While the above is directed to the embodiments described herein, other further embodiments may be devised without departing from the basic scope thereof. For example, aspects of the disclosure may be implemented in hardware or software, or a combination of hardware and software. One embodiment described herein may be implemented as a program product for use with a computer system. The programs of the program product define the functions of the embodiments (including the methods described herein) and may be included in various computer-readable storage media. Exemplary computer-readable storage media include, but are not limited to, (i) non-writable storage media in which information is permanently stored (e.g., a read-only memory (ROM) device in a computer, such as a CD-ROM disk readable by a CD-ROM drive, a flash memory, a ROM chip, or any type of solid-state non-volatile memory), and (ii) writable storage media in which changeable information is stored (e.g., a floppy disk in a diskette drive or hard disk drive, or any type of solid-state random access memory). Such computer-readable storage media, when carrying computer-readable instructions that direct the functions of the disclosed embodiments, are embodiments of the disclosure.

[0077] Those skilled in the art will understand that the above-mentioned embodiments are illustrative and not limiting. All permutations, extensions, equivalents, and improvements thereto will be apparent to those skilled in the art upon reading the specification and studying the drawings, and are intended to be included within the true spirit and scope of the present disclosure. Accordingly, the following appended claims are intended to cover all such modifications, permutations, and equivalents that are included within the true spirit and scope of these teachings.

Claims

1. 1. A method for detecting malicious activity, comprising: generating, by a behavior monitor executing in a user space, a plurality of filters corresponding to a plurality of processes executing in the user space; sending a system call by a first process of the plurality of processes to a corresponding filter of the plurality of filters in kernel space; receiving, by the first process of the plurality of processes, a signal from the corresponding filter, the signal prompting the first process to analyze arguments issued in the system call; analyzing the arguments issued in the system call by the first process in response to the receiving, the analyzing the arguments comprising: determining that at least one file and / or data has been modified by the first process or a process associated with the first process; determining, by the first process, that the argument may be associated with malicious activity; generating, by the first process, an event in response to said determining, and sending the event to the behavior monitor; analyzing, by the behavior monitor, the event to determine whether the event is associated with malicious activity, the analyzing the event comprising: generating a copy of the at least one file and / or data before it was modified by the first process; storing said copy and / or data of said at least one file in a backup folder or system; In response to determining that the event is associated with malicious activity, stopping, by the behavior monitor, execution of a process group associated with the first process; and restoring, by the behavior monitor, a previous version of the at least one file from the backup folder or from the system.

2. The method of claim 1 , further comprising saving, by the behavior monitor, copies of files and / or data modified by the first process.

3. The method of claim 1 , further comprising saving, by the behavior monitor, copies of files and / or data deleted by the first process.

4. generating, by the behavior monitor executing in the user space, the plurality of filters corresponding to the plurality of processes executing in the user space, Suspending execution of the first process; and inserting code into the first process, the code creating a local handler in the first process and the corresponding filter in the kernel space.

5. Injecting the code into the first process includes: overwriting at least a first portion of code associated with the first process; and restoring the first portion of the code after the corresponding filter has been generated in the kernel space.

6. The method of claim 1 , wherein the first process executes in a container.

7. The method of claim 1 , wherein the process group is a collection of processes that share a child / parent relationship.

8. 1. A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause a computer system to perform operations, the operations including: generating, by a behavior monitor executing in a user space, a plurality of filters corresponding to a plurality of processes executing in the user space; sending a system call by a first process of the plurality of processes to a corresponding filter of the plurality of filters in kernel space; receiving, by the first process of the plurality of processes, a signal from the corresponding filter, the signal prompting the first process to analyze arguments issued in the system call; analyzing the arguments issued in the system call by the first process in response to the receiving, the analyzing the arguments comprising: determining that at least one file has been modified by the first process or a process related to the first process; determining, by the first process, that the argument may be associated with malicious activity; generating, by the first process, an event in response to said determining, and sending the event to the behavior monitor; analyzing, by the behavior monitor, the event to determine whether the event is associated with malicious activity, the analyzing the event comprising: generating a copy of the at least one file and / or data before it was modified by the first process; storing said copy of said at least one file and / or data in a backup folder or system; In response to determining that the event is associated with malicious activity, stopping, by the behavior monitor, execution of a process group associated with the first process; and restoring, by the behavior monitor, a previous version of the at least one file and / or data from the backup folder or the system.

9. The non-transitory computer-readable medium of claim 8 , further comprising saving, by the behavior monitor, copies of files and / or data modified by the first process.

10. The non-transitory computer-readable medium of claim 8 , further comprising saving, by the behavior monitor, copies of files and / or data deleted by the first process.

11. generating, by the behavior monitor executing in the user space, the plurality of filters corresponding to the plurality of processes executing in the user space, Suspending execution of the first process; and inserting code into the first process, the code creating a local handler in the first process and the corresponding filter in the kernel space.

12. The non-transitory computer-readable medium of claim 8 , wherein the first process executes in a container.

13. Injecting the code into the first process includes: overwriting at least a first portion of code associated with the first process; and restoring the first portion of the code after the corresponding filter is generated in the kernel space.

14. The non-transitory computer-readable medium of claim 8 , wherein the process group is a collection of processes that share a child / parent relationship.

15. 1. A system comprising: A processor; and a memory having stored programming instructions that, when executed by the processor, cause the system to perform operations, the operations including: generating, by a behavior monitor executing in a user space, a plurality of filters corresponding to a plurality of processes executing in the user space; sending a system call by a first process of the plurality of processes to a corresponding filter of the plurality of filters in kernel space; receiving, by the first process of the plurality of processes, a signal from the corresponding filter, the signal prompting the first process to analyze arguments issued in the system call; analyzing the arguments issued in the system call by the first process in response to the receiving, the analyzing the arguments comprising: determining that at least one file has been modified by the first process or a process related to the first process; determining, by the first process, that the argument may be associated with malicious activity; generating, by the first process, an event in response to said determining, and sending the event to the behavior monitor; analyzing, by the behavior monitor, the event to determine whether the event is associated with malicious activity, the analyzing the event comprising: generating a copy of the at least one file and / or data before it was modified by the first process; storing said copy of said at least one file and / or data in a backup folder or system; In response to determining that the event is associated with malicious activity, stopping, by the behavior monitor, execution of a process group associated with the first process; restoring, by the behavior monitor, a previous version of the at least one file from the backup folder or from the system.

16. The system of claim 15 , wherein the action further comprises saving, by the behavior monitor, a copy of a file modified by the first process.

17. The system of claim 16 , wherein the actions further include saving, by the behavior monitor, a copy of files and / or data deleted by the first process.

18. generating, by the behavior monitor executing in the user space, the plurality of filters corresponding to the plurality of processes executing in the user space, Suspending execution of the first process; and inserting code into the first process, the code creating a local handler in the first process and the corresponding filter in the kernel space.

19. The system of claim 15 , wherein the first process executes in a container.

20. Injecting the code into the first process includes: overwriting at least a first portion of code associated with the first process; and restoring the first portion of the code after the corresponding filter is generated in the kernel space.

Citation Information

Patent Citations

  • Analyzer, analyzing method and analyzing program

    JP2017102823A

  • Malware detection method and system

    JP2017527931A

  • Real-time detection and protection against malware and steganography in kernel mode

    JP2020522808A