Suspicious process detection method and terminal
By receiving process action requests and triggering callbacks in the operating system, the memory data of abnormal processes is obtained and marked, which solves the problem of hard-coded dependencies, realizes dynamic detection and analysis of hidden processes, and improves the maintainability and security of the system. sex.
Patent Information
- Application Number
- CN202410483302.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-08-23
AI Technical Summary
Existing process detection technology relies on hard-coded detection rules, which requires frequent updates and maintenance when the operating system is updated or modified. It is also difficult to detect malware hidden using VT and PATCH PG technology, which increases software complexity and maintenance costs.
By receiving process action requests and triggering callbacks, we obtain data information associated with process actions, identify abnormal processes, and mark their memory data as suspicious processes in user-level memory objects to avoid hard-coded dependencies and adopt dynamic monitoring and analysis of the behavior of the execution environment. .
It improves the maintainability and security of the system, can dynamically detect hidden malicious processes, reduces dependence on hard coding, and enhances the detection capability of suspicious processes.
Smart Images

Figure CN118536110A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security, and in particular to a suspicious process detection method and terminal. Background Art
[0002] With the rapid development of computer technology, security issues have become increasingly prominent, especially security protection at the operating system level. In particular, in the Windows operating system, malware and viruses use various concealment techniques, such as VT technology, which allows attackers to hide their activities at the virtual level of the system, making the process invisible to monitoring tools. At the same time, by modifying the attributes of page table entries, PATCH PG technology allows malware to modify memory access permissions to further hide its traces. These advanced hiding techniques make it difficult for these malicious entities to be detected by traditional security software, and also affect the performance and reliability of regular software.
[0003] Current process detection techniques often rely on hard-coded detection rules, which involve directly writing specific data offsets and behavior patterns to identify malicious behavior. The disadvantage of this approach is that when the operating system is updated or modified, the previous hard-coded detection rules may no longer apply, requiring frequent updates and maintenance. In addition, the differences between each system require different detection codes to be written for systems with different versions or configurations, increasing the complexity and maintenance costs of the software. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a suspicious process detection method and terminal to avoid using a hard-coded method to detect the suspicious process.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A method for detecting a suspicious process includes the following steps:
[0007] S1. Receive process action request and trigger callback to obtain data information associated with the process action;
[0008] S2. The action process is judged according to the data information. If the action process is abnormal, the memory data information associated with the action process is obtained from the user layer memory object and marked as suspicious process data.
[0009] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0010] A suspicious process detection terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor completes the following steps when executing the computer program:
[0011] S1. Receive process action request and trigger callback to obtain data information associated with the process action;
[0012] S2. The action process is judged according to the data information. If the action process is abnormal, the memory data information associated with the action process is obtained from the user layer memory object and marked as suspicious process data.
[0013] The beneficial effects of the present invention are: providing a suspicious process detection method and terminal, by calling back the data associated with the process action and verifying it, marking the memory data associated with the user-level memory object that fails the verification as suspicious process data, thereby detecting the suspicious process, and utilizing dynamic monitoring and analysis of the behavior of the execution environment to avoid pre-hard coding of specific data or behavior patterns, reduce dependence on hard coding, and thus improve the maintainability and security of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a flow chart of a suspicious process detection method in an embodiment of the present invention;
[0015] Figure 2 is a specific flow chart of a suspicious process detection method in an embodiment of the present invention;
[0016] Figure 3 is a schematic diagram of a suspicious process detection terminal in an embodiment of the present invention;
[0017] Description of labels:
[0018] 1. A suspicious process detection terminal; 2. A memory; 3. A processor. DETAILED DESCRIPTION
[0019] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0020] Please refer to Figure 1 , a suspicious process detection method, comprising the steps of:
[0021] S1. Receive process action request and trigger callback to obtain data information associated with the process action;
[0022] S2. The action process is judged according to the data information. If the action process is abnormal, the memory data information associated with the action process is obtained from the user layer memory object and marked as suspicious process data.
[0023] From the above description, it can be seen that the beneficial effects of the present invention are: by calling back the data associated with the process action and verifying it, the memory data associated with the user-level memory object that fails the verification is marked as suspicious process data, thereby detecting the suspicious process, and utilizing dynamic monitoring and analysis of the behavior of the execution environment to avoid pre-hardcoding of specific data or behavior patterns, reduce dependence on hard coding, and thus improve the maintainability and security of the system.
[0024] Please refer to Figure 2 In an embodiment of the present invention, the process actions include accessing a process, creating or destroying a thread, and creating or destroying a process.
[0025] From the above description, it can be seen that the actions of modules, threads and processes in the execution environment are received respectively, and the relevant information of suspicious processes is obtained by using multi-dimensional features to improve the comprehensiveness of detection.
[0026] It should be noted that the process object is composed of three main structural objects, namely module, thread and process. The user-level memory objects of the above three are obtained through PspCIdTable, process module and Activeprocesslinks.
[0027] In an embodiment of the present invention, step S1 specifically includes the following steps:
[0028] Receive process action requests. When it is detected that any process is accessed, perform module callback and obtain module information data; when it is detected that a thread is destroyed or created, perform thread callback and obtain thread information data; when it is detected that a process is destroyed or created, perform process callback and obtain process information data.
[0029] It should be noted that module, process, and thread callbacks are key mechanisms for monitoring and analyzing behavior in the system to identify and respond to suspicious or abnormal activities. Using module callbacks, monitor module loading and unloading events, obtain module information, and check whether these modules comply with system security policies; using thread callbacks, monitor thread creation and destruction; using process callbacks, monitor process creation and destruction, identify and record process activities, especially those processes that cannot obtain information directly from API calls. The relationship and role of callbacks provide a detailed view of system activities and can support each other to build a comprehensive security protection network.
[0030] In an embodiment of the present invention, step S2 specifically includes the steps of:
[0031] Verify the module information data, and when it is detected that the module information data does not conform to the system preset data, obtain the memory data of the segment where the module is located from the user layer memory object, and mark the hash value corresponding to the memory data as suspicious process data;
[0032] Verifying the thread information data, when it is detected that the application cannot access the thread and the thread information data exists, obtaining a memory address corresponding to the thread address, and marking a hash value corresponding to the memory address as suspicious process data;
[0033] Verify the process information data, and when it is detected that the application cannot access this thread and the process information data exists, obtain the page directory table base address of the process, and mark the hash value corresponding to the page directory table base address as suspicious process data.
[0034] From the above description, it can be seen that the hash values of memory objects are marked at the three levels of module, thread and process. Specifically, for module callback, when the obtained module information data does not conform to the system preset data (that is, the module does not belong to the system specified category), the hash value of the memory data of the module segment in the user-layer memory object is marked; for thread callback, when it is detected that the application cannot access this thread, but the thread callback can obtain the thread address, it means that this thread is hidden, and the hash value of the memory address corresponding to the thread address is marked; for process callback, when it is detected that the application cannot access this process, but the process callback can obtain the base address of the page directory table of the process, it means that this process is hidden, and the hash value corresponding to the base address of the page directory table of the process is marked.
[0035] In an embodiment of the present invention, the step S2 further includes a step S3:
[0036] The suspicious process data is stored, and when the suspicious process data is detected again, an alarm is performed.
[0037] From the above description, it can be seen that in order to facilitate monitoring of suspicious processes, the suspicious process data obtained above is cached, and when the cached suspicious process data is detected again in the execution environment, an alarm is processed to improve processing efficiency.
[0038] Please refer to Figure 3 A suspicious process detection terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned suspicious process detection method are completed.
[0039] From the above description, it can be seen that the carrier of the suspicious process detection method is provided, by calling back the attribute data of the execution environment and verifying it, the characteristic data of the user-level memory object that fails the verification is marked as suspicious process data, thereby detecting the suspicious process, and utilizing dynamic monitoring and analysis of the behavior of the execution environment to avoid pre-hardcoding of specific data or behavior patterns, reduce dependence on hard coding, and thus improve the maintainability and security of the system.
[0040] The present invention provides a suspicious process detection method and terminal, which are mainly used for detecting suspicious processes under Windows architecture, and are specifically described below in conjunction with embodiments.
[0041] Please refer to Figure 1 , Embodiment 1 of the present invention is:
[0042] A method for detecting a suspicious process includes the following steps:
[0043] S1. Receive process action request and trigger callback to obtain data information associated with the process action;
[0044] S2. The action process is judged according to the data information. If there is an abnormality in the action process, the memory data information associated with the action process is obtained from the user layer memory object and marked as suspicious process data.
[0045] That is, in this embodiment, the data associated with the process action is called back and verified, and the memory data associated with the user-level memory object that fails the verification is marked as suspicious process data, thereby detecting the suspicious process. By dynamically monitoring and analyzing the behavior of the execution environment, it is possible to avoid pre-hardcoding specific data or behavior patterns and reduce dependence on hard coding, thereby improving the maintainability and security of the system.
[0046] Please refer to Figure 2 , Embodiment 2 of the present invention is:
[0047] Based on the first embodiment, the process actions include accessing a process, creating or destroying a thread, and creating or destroying a process.
[0048] Step S1 specifically includes the following steps:
[0049] Receive process action requests. When it is detected that any process is accessed, perform module callback and obtain module information data; when it is detected that a thread is destroyed or created, perform thread callback and obtain thread information data; when it is detected that a process is destroyed or created, perform process callback and obtain process information data.
[0050] Step S2 specifically includes the following steps:
[0051] Verify the module information data. When it is detected that the module information data does not conform to the system preset data, obtain the memory data of the module segment from the user layer memory object, and mark the hash value corresponding to the memory data as suspicious process data;
[0052] Verify the thread information data. When it is detected that the application cannot access this thread and the thread information data exists, obtain the memory address corresponding to the thread address and mark the hash value corresponding to the memory address as suspicious process data.
[0053] Verify the process information data. When it is detected that the application cannot access this thread and the process information data exists, obtain the page directory table base address of the process and mark the hash value corresponding to the page directory table base address as suspicious process data.
[0054] Preferably, the application can use the Thread function to traverse the threads to solve the problem of enumerating threads; or, use the SystemInformation function to query the upper and lower associations of the process for enumerating the upper and lower process information. However, in order to fight against these functions, the suspicious process uses VT and other technologies to prevent the above API (application) from traversing its own data, but the existence of the above process object can be found in the callback process, and the suspicious process is found by comparing the application and the callback result. Specifically, for module callback, when the obtained module information data does not meet the system preset data (that is, the module does not belong to the system specified category), the hash value of the memory data of the module in the user layer memory object is marked; for thread callback, when it is detected that the application cannot access this thread, but the thread callback can obtain the thread address, indicating that this thread is hidden, and the hash value of the memory address corresponding to the thread address is marked; for process callback, when it is detected that the application cannot access this process, but the process callback can obtain the base address of the page directory table of the process, indicating that this process is hidden, and the hash value corresponding to the base address of the page directory table of the process is marked.
[0055] Step S2 further includes step S3:
[0056] Suspicious process data is stored, and when suspicious process data is detected again, an alarm is issued.
[0057] That is, in this embodiment, the hash values of the memory data are marked respectively from three levels: module, thread and process; at the same time, in order to facilitate the monitoring of suspicious processes, the suspicious process data obtained above is cached, and when the cached suspicious process data is detected again in the execution environment, an alarm is performed to improve processing efficiency.
[0058] Please refer to Figure 2 , Embodiment 3 of the present invention is: A suspicious process detection method is applied as follows:
[0059] 1. Set up the monitoring environment: When the system is initialized, it is set to receive all the process action requests from the game clients, including all loaded modules, running threads and processes. Through system API hooks or other technical means, the modules, threads and processes of the game program can be monitored in real time.
[0060] 2. Setting of callback events and data acquisition:
[0061] Module monitoring and callback: When the game client loads a new module (such as DLL injection, etc.), the system automatically calls back and obtains detailed information about the module, including file path, size, hash value, etc.
[0062] Thread monitoring and callback: monitor newly created or destroyed threads in the game process. Whenever a new thread is created or destroyed, the system automatically captures and records the detailed information of the thread, such as thread ID, startup address, etc.
[0063] Process monitoring and callback: Real-time monitoring of the main game process and its subprocesses. Once the creation or destruction of a process is detected, the system will obtain basic information about the process, such as process ID, memory usage, page directory table base address, etc.
[0064] 3. Verification and suspicious process marking:
[0065] Data Verification: Compare the acquired module, thread, and process information with the legal data preset by the system. If the module information is found not to meet the standards required for the normal operation of the game (such as unsigned modules or hash value mismatch), it will be marked as suspicious.
[0066] For threads and processes, if the system cannot normally access the relevant information of these threads or processes, and this information exists in the system log, this usually indicates potential covert operations or plug-in behaviors, so it is also marked as suspicious.
[0067] 4. Data storage and alarm processing:
[0068] Storage and re-detection: All processes, threads, and modules marked as suspicious are stored in a secure database. When the system detects the same suspicious data again, it automatically triggers an alarm and notifies the game administrator for further review and processing.
[0069] Please refer to Figure 3 , Embodiment 4 of the present invention is:
[0070] A suspicious process detection terminal 1 includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, the steps of any one of the suspicious process detection methods in the above-mentioned embodiments 1 to 3 are completed.
[0071] In summary, the present invention provides a suspicious process detection method and terminal, which calls back the data associated with the process action and verifies it, and marks the memory data associated with the user-layer memory object that fails the verification as suspicious process data, thereby detecting the suspicious process, and utilizing dynamic monitoring and analysis of the behavior of the execution environment to avoid pre-hardcoding of specific data or behavior patterns, reduce dependence on hard coding, and thus improve the maintainability and security of the system.
[0072] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting a suspicious process, characterized in that: Includes steps: S1. Receive process action request and trigger callback to obtain data information associated with the process action; S2. The action process is judged according to the data information. If the action process is abnormal, the memory data information associated with the action process is obtained from the user layer memory object and marked as suspicious process data.
2. The method for detecting a suspicious process according to claim 1, characterized in that: The process actions include accessing a process, creating or destroying a thread, and creating or destroying a process.
3. The method for detecting a suspicious process according to claim 2, characterized in that: The step S1 specifically includes the following steps: Receive process action requests. When it is detected that any process is accessed, perform module callback and obtain module information data; when it is detected that a thread is destroyed or created, perform thread callback and obtain thread information data; when it is detected that a process is destroyed or created, perform process callback and obtain process information data.
4. The method for detecting a suspicious process according to claim 3, characterized in that: The step S2 specifically includes the following steps: Verify the module information data, and when it is detected that the module information data does not conform to the system preset data, obtain the memory data of the segment where the module is located from the user layer memory object, and mark the hash value corresponding to the memory data as suspicious process data; Verifying the thread information data, when it is detected that the application cannot access the thread and the thread information data exists, obtaining a memory address corresponding to the thread address, and marking a hash value corresponding to the memory address as suspicious process data; Verify the process information data, and when it is detected that the application cannot access this thread and the process information data exists, obtain the page directory table base address of the process, and mark the hash value corresponding to the page directory table base address as suspicious process data.
5. A method for detecting a suspicious process according to any one of claims 1 to 4, characterized in that: The step S2 further includes a step S3: The suspicious process data is stored, and when the suspicious process data is detected again, an alarm is performed.
6. A suspicious process detection terminal, characterized in that: The invention comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are performed: S1. Receive process action request and trigger callback to obtain data information associated with the process action; S2. The action process is judged according to the data information. If the action process is abnormal, the memory data information associated with the action process is obtained from the user layer memory object and marked as suspicious process data.
7. A suspicious process detection terminal according to claim 6, characterized in that: The process actions include accessing a process, creating or destroying a thread, and creating or destroying a process.
8. The suspicious process detection terminal according to claim 7, characterized in that: The step S1 specifically includes the following steps: Receive process action requests. When it is detected that any process is accessed, perform module callback and obtain module information data; when it is detected that a thread is destroyed or created, perform thread callback and obtain thread information data; when it is detected that a process is destroyed or created, perform process callback and obtain process information data.
9. A suspicious process detection terminal according to claim 8, characterized in that: The step S2 specifically includes the following steps: Verify the module information data, and when it is detected that the module information data does not conform to the system preset data, obtain the memory data of the segment where the module is located from the user layer memory object, and mark the hash value corresponding to the memory data as suspicious process data; Verifying the thread information data, when it is detected that the application cannot access the thread and the thread information data exists, obtaining a memory address corresponding to the thread address, and marking a hash value corresponding to the memory address as suspicious process data; Verify the process information data, and when it is detected that the application cannot access this thread and the process information data exists, obtain the page directory table base address of the process, and mark the hash value corresponding to the page directory table base address as suspicious process data.
10. A suspicious process detection terminal according to any one of claims 6 to 9, characterized in that: The step S2 further includes a step S3: The suspicious process data is stored, and when the suspicious process data is detected again, an alarm is performed.
