Log file-based processing method, electronic device, and storage medium

By backing up the backup points and comparison points of log files when detecting malicious programs, the problem of log files not being backed up in time during computer network attacks is solved, ensuring the traceability of attack behavior and the integrity of evidence.

CN115459999BActive Publication Date: 2024-10-29BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211104014.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2024-10-29
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

The existing technology fails to back up log files in time when a computer network is attacked, making it difficult to trace the source of the attack.

Method used

When a malicious program or a suspected malicious program is detected, the backup point and comparison point of the backup log file are used to determine its malicious content, prevent the log file from being tampered with or deleted, and record its operation behavior.

Benefits of technology

It realizes timely backup of log files when malicious programs attack, ensuring that security personnel can completely and specifically analyze and track attack behaviors and provide effective evidence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115459999B_ABST
    Figure CN115459999B_ABST
Patent Text Reader

Abstract

The present application discloses a processing method and electronic device based on log files, the method comprising: when it is determined that the target program is a malicious program or a suspected malicious program, backing up the log file associated with the operation information of the target program to generate a corresponding backup file, wherein the backup file has a backup point for indicating the operation information; when it is determined that the target program operates on the log file, obtaining the first operation information of the target program operating on the log file; obtaining the first backup point corresponding to the first operation information, and the second backup point adjacent to the first backup point, wherein the second backup point is adjacent to the generation time of the first backup point; comparing the first backup point with the second backup point, and determining the malicious content of the target program based on the comparison result. The method backs up the log file in time when the malicious program operates on the log file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security log backup, and in particular to a log file-based processing method, electronic device, and storage medium. Background Art

[0002] With the development of computer networks, network security has received more and more attention and concern from people. Computers will have some built-in defense devices or some operation record documents. These will protect the computer from being harmed, or there will be corresponding records when it is harmed, so that the computer can be maintained in time after being attacked to provide help. The system log is used to record information about hardware, software and system problems in the system, and can also monitor events that occur in the system. Users can use it to check the cause of the error or find traces left by the attacker when attacked. In the prior art, one or more backup processes are started to back up the log files corresponding to one or more instances, and the log files segmented by each backup process in the one or more backup processes are scanned at predetermined intervals, and the log files segmented by each backup process are stored. In this way, real-time backup of log files and centralized management of log files are achieved. However, the current log backup method does not consider how to back up the log before the log is changed when an attack comes. Summary of the invention

[0003] In order to solve the above technical problems, the embodiments of the present application provide a processing method, electronic device and storage medium based on log files. When a malicious program or suspected malicious program operates on the log file, the method can back up the log file in time, so as to facilitate the subsequent analysis and tracing of the attack behavior.

[0004] In order to achieve the above object, an embodiment of the present application provides a processing method based on a log file, characterized in that the method includes:

[0005] In the case where the target program is determined to be a malicious program or a suspected malicious program, backing up a log file associated with the operation information of the target program to generate a corresponding backup file, wherein the backup file has a backup point for indicating the operation information;

[0006] In the case where it is determined that the target program operates the log file, obtaining first operation information of the target program operating the log file;

[0007] Acquire a first backup point corresponding to the first operation information, and a second backup point adjacent to the first backup point, wherein the second backup point is adjacent to the generation time of the first backup point;

[0008] The first backup point is compared with the second backup point, and malicious content of the target program is determined based on the comparison result.

[0009] Preferably, the method further comprises determining whether the target program operates on the log file, including:

[0010] Detecting whether an interface for operating a log file is called by the target program;

[0011] If so, using a hook function to extract the indication content of the target program operating through the interface, wherein the indication content includes: the operation result generated by the function of tampering with and / or deleting the log file;

[0012] Based on the instruction content, first operation information of the target program operating the log file is determined.

[0013] Preferably, the method further comprises determining whether the target program is a malicious program or a suspected malicious program, including:

[0014] Determining whether the target program is a whitelist program;

[0015] If yes, determine whether the login address of the target program belongs to the address marked in the whitelist;

[0016] If so, determining whether the operation behavior of the target program is malicious behavior;

[0017] If so, it is determined that the target program is a malicious program or a suspected malicious program.

[0018] Preferably, the method further comprises:

[0019] When it is determined that the target program is a malicious program or a suspected malicious program, obtaining a first time point when the target program enters the system;

[0020] Based on the first time point, start backing up the log file associated with the operation information of the target program.

[0021] Preferably, comparing the first backup point with the second backup point and determining the malicious content of the target program based on the comparison result includes:

[0022] Based on the comparison result, determining whether the target program tampers with and / or deletes the log file;

[0023] If so, obtaining the content of the target program tampering with and / or deleting the log file;

[0024] The contents of the log file tampered with and / or deleted by the target program and the comparison result are backed up in the log file.

[0025] Preferably, the method further comprises:

[0026] When the target program is determined to be a malicious program or a suspected malicious program, marking operation information of the target program;

[0027] The marked operation information is recorded in the log file.

[0028] Preferably, the method further comprises:

[0029] In the case where it is determined that the target program is a malicious program or a suspected malicious program, obtaining a second time point at which the target program leaves the system;

[0030] Based on the second time point, backing up the log file associated with the operation information of the target program is stopped.

[0031] The purpose of the embodiment of the present application is to provide an electronic device, characterized by comprising:

[0032] A backup module configured to, when determining that a target program is a malicious program or a suspected malicious program, back up a log file associated with the operation information of the target program to generate a corresponding backup file, wherein the backup file has a backup point for indicating the operation information;

[0033] a determination module configured to, when determining that the target program operates the log file, obtain first operation information of the target program operating the log file;

[0034] an acquisition module configured to acquire a first backup point corresponding to the first operation information and a second backup point adjacent to the first backup point, wherein the second backup point is adjacent to the generation time of the first backup point;

[0035] A comparison module is configured to compare the first backup point with the second backup point, and determine the malicious content of the target program based on the comparison result.

[0036] An embodiment of the present application aims to provide an electronic device, characterized in that it comprises a memory and a processor, wherein an executable program is stored in the memory, and the processor executes the executable program to implement the steps of the method according to any one of claims 1 to 7.

[0037] An object of an embodiment of the present application is to provide a storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are executed.

[0038] Compared with the prior art, the beneficial effect of the embodiment of the present application is that: the processing method based on the log file, first, when the target program is determined to be a malicious program or a suspected malicious program, the log file associated with the operation information of the target program is backed up, and when it is determined that the target program operates the log file, the first backup point corresponding to the first operation information of the target program operating the log file and the second backup point adjacent to the first backup point are obtained, and the first backup point is compared with the second backup point to determine the malicious content of the target program. The method can start to back up the log file when the malicious program or the suspected malicious program enters the system to avoid deleting or modifying the backed-up log file during its malicious operation. By comparing the first backup point that characterizes the malicious program starting to operate the log file and the second backup point adjacent to the first backup point, it can be determined whether the malicious program modifies the log file, and then analyze the actual operation behavior of the malicious program or the suspected malicious program in the system. The content of the target program operating the log file and the corresponding comparison results are backed up in the log file, and the behavior that the target program really wants to hide can be recorded. The above log backup method can provide complete and specific log files for security personnel to judge and trace the source for evidence collection. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flowchart of a log file-based processing method according to an embodiment of the present application;

[0040] Figure 2 This is a flowchart of an embodiment of step S500 of the embodiment of the present application;

[0041] Figure 3 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S400;

[0042] Figure 4 A structural block diagram of a specific embodiment of an electronic device of an embodiment of the present application;

[0043] Figure 5 A flowchart of a specific embodiment of the log file processing method according to an embodiment of the present application;

[0044] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present application;

[0045] Figure 7This is a structural block diagram of another electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0047] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0048] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0049] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0050] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0051] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0052] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0053] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0054] like Figure 1 As shown, an embodiment of the present application provides a processing method based on a log file, the method comprising:

[0055] S100, when it is determined that the target program is a malicious program or a suspected malicious program, backing up the log file associated with the operation information of the target program to generate a corresponding backup file;

[0056] In this embodiment, after the target program enters the system, the system will detect whether the target program is a malicious program or a suspected malicious program. The target program can be a network user or a network program. When the target program enters the system, it will perform corresponding operations on the system. For example, after the network program enters the system, it will load the application program into the system. In the case of determining that the target program is a malicious program or a suspected malicious program, the system will record the operation information of the target program in a log file, and the backup module will back up the log file associated with the operation information of the target program to generate a corresponding backup file. The backup module continuously backs up the log file during the operation of the target program. The backup file has a backup point for indicating the operation information. The backup point corresponds to the specific operation information of the target program, that is, the backup point is continuously generated based on the specific operation information of the target program. Using the backup point to back up the log, every operation of the application program on the system will be recorded.

[0057] S200, when it is determined that the target program operates the log file, obtaining first operation information of the target program operating the log file;

[0058] In this embodiment, after the target program enters the system, if the target program is determined to be a malicious program or a suspected malicious program, the target program may operate on the log file, for example, tamper with the log file. In the case where it is determined that the target program operates on the log file, first operation information of the target program operating on the log file is obtained. The first operation information can be regarded as the operation information corresponding to the time point when the target program starts to operate on the log file.

[0059] S300, acquiring a first backup point corresponding to the first operation information, and a second backup point adjacent to the first backup point;

[0060] In this embodiment, when the target program operates on the log file, after obtaining the first operation information of the target program operating on the log file, the first backup point corresponding to the first operation information is obtained. Since the first operation information can be regarded as the operation information corresponding to the time point when the target program starts to operate on the log file, the first backup point represents the operation behavior when the target program starts to operate on the log file. Based on the first backup point, the operations performed by the target program on the log file will begin to be backed up in the log file. A second backup point adjacent to the first backup point is obtained, and the second backup point is adjacent to the generation time of the first backup point. Specifically, the generation time of the second backup point is before the first backup point. That is, the second backup point represents the operation behavior of the target program operating on the system, but does not represent the operation behavior of the target program operating on the log file.

[0061] S400, comparing the first backup point with the second backup point, and determining malicious content of the target program based on the comparison result.

[0062] In this embodiment, the first backup point representing the target program starting to operate on the log file is compared with the second backup point representing the target program operating on the system to generate a comparison result. Since the first backup point represents the operating behavior when the target program starts to operate on the log file, the generation time of the second backup point is before the first backup point, the content corresponding to the first backup point in the backed up log file is different from the content corresponding to the second backup point in the backed up log file. The first backup point indicates that the target program has modified the log file, and the second backup point only indicates that the target program has operated on the system. Based on the comparison result, the malicious content of the target program can be determined, specifically, the modification operation of the target program on the log file can be determined.

[0063] The processing method based on log files first backs up the log file associated with the operation information of the target program when it is determined that the target program is a malicious program or a suspected malicious program. When it is determined that the target program operates the log file, the first backup point corresponding to the first operation information of the target program operating the log file and the second backup point adjacent to the first backup point are obtained, and the first backup point is compared with the second backup point to determine the malicious content of the target program. The method can start backing up the log file when a malicious or suspected malicious program enters the system to prevent the backup log file from being deleted or modified during its malicious operation. By comparing the first backup point that represents the malicious program starting to operate the log file and the second backup point adjacent to the first backup point, it can be determined whether the malicious program modifies the log file, and then analyze the actual operation behavior of the malicious program in the system. The above-mentioned log backup method can provide complete and specific log files for security personnel to judge and trace the source for evidence collection.

[0064] In one embodiment of the present application, Figure 2 As shown, the method also includes:

[0065] S500, determining whether the target program operates on the log file;

[0066] In this embodiment, when it is determined that the target program is a malicious program or a suspected malicious program, and after backing up the log file associated with the operation information of the target program, it is determined whether the target program operates the log file, including:

[0067] S501, detecting whether an interface for operating a log file is called by the target program;

[0068] In this embodiment, it is first detected whether the interface for operating the log file is called by the target program. Specifically, the interface for operating the log file may be a Windows API (Windows application program interface). Since the target program is a malicious program or a suspected malicious program, if the interface for operating the log file is called by the target program, it indicates that the target program has operated on the log file, for example, tampered with the log file.

[0069] S502, if yes, extracting the instruction content of the target program operating through the interface by using the hook function;

[0070] In this embodiment, when it is determined that the interface for operating the log file is called by the target program, the hook function is used to extract the indication content of the target program operating through the interface. The hook function is part of the Windows message processing mechanism. By setting the "hook", the application can filter all messages and events at the system level and access messages that cannot be accessed under normal circumstances. The essence of the hook is a program for processing system messages, which is hung into the system through a system call. The hook function intercepts messages using the hook mechanism when the system is performing message transmission processing, and can process some specific messages. Specifically, after the target program calls the interface and operates the log file, the hook function will extract the indication content of the target program operating through the interface, and the indication content includes: the operation results generated by the function that tampers with and / or deletes the log file. For example, the target program deletes and modifies the log file through the Windows application program interface. The related functions of the deletion and modification operations include ClearEventLog() (clear the specified log file) and ReportEvent() (write the system log file). Then, the hook function is used to extract some operations such as ClearEventLog() (clear the specified log) and ReportEvent() (write the system log) that delete and modify the log file.

[0071] S503: Determine first operation information of the target program operating the log file based on the instruction content.

[0072] In this embodiment, after the hook function is used to extract the indication content of the target program performing the deletion and modification operation on the log file through the interface, it can be determined that the target program has operated on the log file. For example, based on the operation result generated by the function that tampers with and / or deletes the log file, the first operation information of the target program operating on the log file can be determined. The first operation information can be regarded as the operation information corresponding to the time point when the target program starts to operate on the log file.

[0073] In one embodiment of the present application, Figure 4and Figure 5 As shown, the method further includes determining whether the target program is a malicious program or a suspected malicious program, including:

[0074] Determine whether the target program is a whitelist program;

[0075] If yes, determine whether the login address of the target program belongs to the address marked in the whitelist;

[0076] If so, determining whether the operation behavior of the target program is malicious behavior;

[0077] If so, it is determined that the target program is a malicious program or a suspected malicious program.

[0078] In this embodiment, when the target program enters the system, first, the judgment module determines whether the program is a malicious program or a suspected malicious program. When it is determined to be a malicious program or a suspected malicious program, the time of its entry point is marked, and the log file is backed up. If not, no backup is required. Specifically, judging whether the target program is a malicious program or a suspected malicious program is divided into three parts. First, it is determined whether the target program is the default program of the system, that is, whether it is in the white list. If the target program is not a white list program, the time of its entry point is marked, and the log file is started to be backed up. If the target program is a white list program, it is determined whether the login address of the target program belongs to the address marked in the white list. If the login address of the target program does not belong to the address marked in the white list, the backup point is marked, and the log file is backed up. If the login address of the target program belongs to the address marked in the white list, it is determined whether the operation behavior of the target program is a malicious behavior. Specifically, in combination with the preset rule library, it is determined whether the operation behavior of the target program is a malicious behavior. If the operation behavior of the target program belongs to a malicious behavior, the backup point is marked, and the log file is backed up. When it is determined that the target program has malicious behavior, the judgment module is switched to the marking module for marking.

[0079] In one embodiment of the present application, Figure 4 and Figure 5 As shown, the method also includes:

[0080] In the case where the target program is determined to be a malicious program or a suspected malicious program, obtaining a first time point when the target program enters the system;

[0081] Based on the first time point, start backing up the log file associated with the operation information of the target program.

[0082] In the present embodiment, when the judgment module determines that the target program is a malicious program or a suspected malicious program, the first time point at which the target program enters the system is obtained. Specifically, when the target program enters the system, when the judgment module determines that the target program is a malicious program or a suspected malicious program, the first time point at which the target program enters the system is obtained, and the marking module will mark the first time point at which the target program enters the system. Then, based on the first time point at which the target program enters the system, the log file associated with the operation information of the target program is started to be backed up. Every operation of the target program on the system will be recorded, and the marking module will mark its time point. If the target program operates on the log file, every operation of the target program on the log file will be recorded, and the marking module will mark its time point. In the process of backing up the log file, a backup point corresponding to the specific operation information of the target program can be generated based on the marked time point, which can facilitate the comparison module to compare different backup points.

[0083] In one embodiment of the present application, Figure 3 As shown, comparing the first backup point with the second backup point, and determining the malicious content of the target program based on the comparison result, includes:

[0084] S401, based on the comparison result, determining whether the target program tampers with and / or deletes the log file;

[0085] In this embodiment, first, the comparison module compares the first backup point representing the target program starting to operate the log file with the second backup point representing the target program operating the system, and generates a comparison result. The first backup point represents the operation behavior of the target program operating the log file, and the operation behavior includes: tampering with the log file and deleting the log file. The generation time of the second backup point is before the first backup point, and the second backup point only indicates that the target program has an operation behavior on the system. For example, in the process of loading an application, the malicious program will delete the content corresponding to the behavior of loading the application from the log file, and the first backup point represents the behavior of the malicious program deleting the content. The first backup point and the second backup point adjacent to the first backup point are compared. Since the second backup point only indicates that the target program has an operation behavior on the system, the comparison result will represent the difference between the first backup point and the second backup point. The first backup point corresponds to the behavior of the malicious program tampering with and / or deleting the log file, and the second backup point does not have the behavior of the malicious program operating the log file. By comparing the first backup point with the second backup point, it can be determined whether the malicious program tampers with and / or deletes the log file, which can be identified as the behavior that the malicious program wants to hide. In a preferred embodiment, if it is found that the interface of the operation log file is called by the target program, a backup point is marked using the marking module, and the contents corresponding to the two backup points before and after the marked backup point are compared to check and analyze whether the log file has been tampered with or deleted. If the log file has been tampered with or deleted, the location where the log file has been modified is specially marked.

[0086] S402, if yes, obtain the content of the target program tampering with and / or deleting the log file;

[0087] In this embodiment, when it is determined that the target program tampers with and / or deletes the log file, the content tampered with and / or deleted by the target program in the log file is obtained. Specifically, during the process of loading the application, the malicious program will delete the content corresponding to the behavior of loading the application from the log file, or tamper with the log file. In this embodiment, when it is determined that the malicious program tampers with and / or deletes the log file, the content tampered with and / or deleted by the malicious program in the log file is obtained to perform subsequent backup operations.

[0088] S403, backing up the contents of the log file tampered with and / or deleted by the target program and the comparison result in the log file.

[0089] In this embodiment, after obtaining the content of the log file that has been tampered with and / or deleted by the target program, and the comparison results that characterize the difference between the first backup point and the second backup point, the content and the comparison results are backed up in the log file. Specifically, the content of the log file that has been tampered with and / or deleted by the target program indicates that the target program has performed an operation on the log file; the comparison results of the first backup point and the second backup point show that there will be differences in the backup points generated before the target program operates on the log file and after the target program operates on the log file. By backing up the content of the target program's operation on the log file and the corresponding comparison results in the log file, the behavior that the target program really wants to hide can be recorded. In the above manner, a complete and specific log file can be provided for security personnel to judge and trace the source of malicious programs.

[0090] In one embodiment of the present application, Figure 4 and Figure 5 As shown, the method also includes:

[0091] When the target program is determined to be a malicious program or a suspected malicious program, marking operation information of the target program;

[0092] The marked operation information is recorded in the log file.

[0093] In this embodiment, when the judgment module determines that the target program is a malicious program or a suspected malicious program, the marking module marks the operation information of the target program. Specifically, the operation information of the target program can be specific information corresponding to the malicious behavior of operating the system. Based on the time point corresponding to each operation of the target program on the system, the marking module will mark each operation information of the target program. The marked operation information is recorded in a log file to record each operation information of the target program, and it is convenient to back up the log file that records the operation information of the target program later.

[0094] In one embodiment of the present application, Figure 4 and Figure 5 As shown, the method also includes:

[0095] In the case where it is determined that the target program is a malicious program or a suspected malicious program, obtaining a second time point at which the target program leaves the system;

[0096] Based on the second time point, backing up the log file associated with the operation information of the target program is stopped.

[0097] In this embodiment, when the judgment module determines that the target program is a malicious program or a suspected malicious program, the second time point when the target program leaves the system is obtained, for example, after the target program is detected to be offline from the system, the second time point when the target program is offline from the system is obtained, and the marking module marks the second time point, and the second time point indicates that the target program has stopped operating the system. Based on the second time point, the log file associated with the operation information of the target program is stopped from being backed up, and the backup module stops the backup operation and saves the backed-up log file.

[0098] Based on the same inventive concept, the present application embodiment also provides an electronic device, such as Figure 6 As shown, including:

[0099] A backup module configured to, when determining that a target program is a malicious program or a suspected malicious program, back up a log file associated with the operation information of the target program to generate a corresponding backup file, wherein the backup file has a backup point for indicating the operation information;

[0100] a determination module configured to, when determining that the target program operates the log file, obtain first operation information of the target program operating the log file;

[0101] an acquisition module configured to acquire a first backup point corresponding to the first operation information and a second backup point adjacent to the first backup point, wherein the second backup point is adjacent to the generation time of the first backup point;

[0102] A comparison module is configured to compare the first backup point with the second backup point, and determine the malicious content of the target program based on the comparison result.

[0103] In one embodiment of the present application, the electronic device further includes:

[0104] Processing module, which is configured as:

[0105] Determining whether the target program operates on the log file;

[0106] Detecting whether an interface for operating a log file is called by the target program;

[0107] If so, using a hook function to extract the indication content of the target program operating through the interface, wherein the indication content includes: the operation result generated by the function of tampering with and / or deleting the log file;

[0108] Based on the instruction content, first operation information of the target program operating the log file is determined.

[0109] In one embodiment of the present application, the electronic device further includes:

[0110] The judgment module is configured as follows:

[0111] Determining whether the target program is a malicious program or a suspected malicious program;

[0112] Determine whether the target program is a whitelist program;

[0113] If yes, determine whether the login address of the target program belongs to the address marked in the whitelist;

[0114] If so, determining whether the operation behavior of the target program is malicious behavior;

[0115] If so, it is determined that the target program is a malicious program or a suspected malicious program.

[0116] In one embodiment of the present application, the backup module is further used to:

[0117] In the case where the target program is determined to be a malicious program or a suspected malicious program, obtaining a first time point when the target program enters the system;

[0118] Based on the first time point, start backing up the log file associated with the operation information of the target program.

[0119] In one embodiment of the present application, the comparison module is also used for:

[0120] comparing the first backup point with the second backup point, and determining malicious content of the target program based on the comparison result;

[0121] Based on the comparison result, determining whether the target program tampers with and / or deletes the log file;

[0122] If so, obtaining the content of the target program tampering with and / or deleting the log file;

[0123] The contents of the log file tampered with and / or deleted by the target program and the comparison result are backed up in the log file.

[0124] In one embodiment of the present application, the electronic device further includes:

[0125] Annotation module, whose configuration is:

[0126] When the target program is determined to be a malicious program or a suspected malicious program, marking operation information of the target program;

[0127] The marked operation information is recorded in the log file.

[0128] In one embodiment of the present application, the processing module is further configured to:

[0129] In the case where it is determined that the target program is a malicious program or a suspected malicious program, obtaining a second time point at which the target program leaves the system;

[0130] Based on the second time point, backing up the log file associated with the operation information of the target program is stopped.

[0131] Based on the same inventive concept, Figure 7 As shown, this embodiment also includes an electronic device, including:

[0132] A memory for storing executable programs;

[0133] The processor is used to execute the executable program to implement the above method.

[0134] Since the principle of solving the problem by the electronic device in the present application is similar to the above-mentioned method in the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0135] An embodiment of the present application provides a storage medium, which is a computer-readable medium and stores a computer program. When the computer program is executed by a processor, the method provided by any embodiment of the present application is implemented, including the method steps described above.

[0136] Optionally, in this embodiment, the above-mentioned storage medium may include, but is not limited to, various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk. Optionally, in this embodiment, the processor executes the method steps recorded in the above-mentioned embodiment according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment can refer to the examples described in the above-mentioned embodiment and the optional implementation mode, and this embodiment is not repeated here. Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented with a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Optionally, they can be implemented with executable program codes of computing devices, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from here, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps in them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0137] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0138] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A processing method based on log files, characterized in that: The method comprises: In the case where the target program is determined to be a malicious program or a suspected malicious program, backing up a log file associated with the operation information of the target program to generate a corresponding backup file, wherein the backup file has a backup point for indicating the operation information; In the case where it is determined that the target program operates the log file, obtaining first operation information of the target program operating the log file; Acquire a first backup point corresponding to the first operation information, and a second backup point adjacent to the first backup point, wherein the second backup point is adjacent to the generation time of the first backup point, the first backup point represents the operation behavior when the target program starts to operate the log file, the generation time of the second backup point is before the first backup point, the second backup point represents the operation behavior of the target program operating the system, but does not represent the operation behavior of the target program operating the log file; Comparing the first backup point with the second backup point, and determining malicious content of the target program based on the comparison result; The comparing the first backup point with the second backup point, and determining the malicious content of the target program based on the comparison result, includes: Based on the comparison result, determining whether the target program tampers with and / or deletes the log file; If so, obtaining the content of the target program tampering with and / or deleting the log file; The contents of the log file tampered with and / or deleted by the target program and the comparison result are backed up in the log file.

2. The method according to claim 1, characterized in that The method further includes determining whether the target program operates on the log file, including: Detecting whether an interface for operating a log file is called by the target program; If so, using a hook function to extract the indication content of the target program operating through the interface, wherein the indication content includes: the operation result generated by the function of tampering with and / or deleting the log file; Based on the instruction content, first operation information of the target program operating the log file is determined.

3. The method according to claim 1, characterized in that The method further includes determining whether the target program is a malicious program or a suspected malicious program, including: Determining whether the target program is a whitelist program; If yes, determine whether the login address of the target program belongs to the address marked in the whitelist; If so, determining whether the operation behavior of the target program is malicious behavior; If so, it is determined that the target program is a malicious program or a suspected malicious program.

4. The method according to claim 1, characterized in that: The method further comprises: When it is determined that the target program is a malicious program or a suspected malicious program, obtaining a first time point when the target program enters the system; Based on the first time point, start backing up the log file associated with the operation information of the target program.

5. The method according to claim 1, characterized in that The method further comprises: When the target program is determined to be a malicious program or a suspected malicious program, marking operation information of the target program; The marked operation information is recorded in the log file.

6. The method according to claim 1, characterized in that The method further comprises: In the case where it is determined that the target program is a malicious program or a suspected malicious program, obtaining a second time point at which the target program leaves the system; Based on the second time point, backing up the log file associated with the operation information of the target program is stopped.

7. An electronic device, characterized in that: include: A backup module configured to, when determining that a target program is a malicious program or a suspected malicious program, back up a log file associated with the operation information of the target program to generate a corresponding backup file, wherein the backup file has a backup point for indicating the operation information; a determination module configured to, when determining that the target program operates the log file, obtain first operation information of the target program operating the log file; an acquisition module configured to acquire a first backup point corresponding to the first operation information, and a second backup point adjacent to the first backup point, wherein the second backup point is adjacent to a generation time of the first backup point, the first backup point represents an operation behavior when the target program starts to operate on a log file, the generation time of the second backup point is before the first backup point, the second backup point represents an operation behavior of the target program operating on the system, but does not represent an operation behavior of the target program operating on the log file; a comparison module configured to compare the first backup point with the second backup point, and determine malicious content of the target program based on the comparison result; Wherein, the comparison module is further configured to determine, based on the comparison result, whether the target program tampers with and / or deletes the log file; If so, obtaining the content of the target program tampering with and / or deleting the log file; The contents of the log file tampered with and / or deleted by the target program and the comparison result are backed up in the log file.

8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein an executable program is stored in the memory, and the processor executes the executable program to implement the steps of the method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • System and method for protecting computer system from being infringed by activities of malicious objects

    CN102629310A

  • Website tamper-proofing method and apparatus

    CN106953874A