PE file information integrity verification method and device, storage medium and equipment
By automatically verifying the integrity of PE file information in the target window, the problem of cumbersome and inefficient verification process in the existing technology is solved, efficient and accurate file information integrity verification and tampering risk identification are achieved, and user experience and security are improved sex.
Patent Information
- Application Number
- CN202410888997.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-22
AI Technical Summary
In the prior art, the PE file information integrity verification process is cumbersome, inefficient and prone to errors, and the risks of file tampering and malware cannot be effectively identified.
Provide a method and device for verifying the integrity of PE file information. By adding PE files to be verified in the target window, automatically call the information extraction interface for information extraction and integrity verification, and display the results in the window, supporting multi-threaded processing and Real-time progress update.
It improves the efficiency and accuracy of PE file information integrity verification, can automatically identify file tampering and malware, and improves user experience and security.
Smart Images

Figure CN119004544A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for verifying the integrity of PE file information, a storage medium, and a computer device. Background Art
[0002] PE (Portable Executable) files, also known as portable executable files, are program files mainly used on 32-bit and 64-bit Windows operating systems. Common PE file formats include DLL, EXE, SYS, OCX, COM, etc.
[0003] PE files contain the code and data required for the program to run. The integrity of the PE file information is the basis for ensuring that the program can run correctly. If the PE file information is incomplete, the program may fail to start, run incorrectly, crash, or produce unexpected behavior, such as the lack of information such as the file name and file version in the PE file information. In addition, incomplete PE file information may also mean that the PE file has been tampered with or infected with malware such as viruses and Trojans, such as the lack of information such as digital signatures in the PE file information. Therefore, before the PE file is released, the tester will first test its information integrity. By testing the integrity of the PE file information, the tester can identify these potential security risks.
[0004] In the prior art, when verifying the integrity of PE file information, testers usually right-click on each PE file one by one, and obtain the file name, file version, digital signature, file description, product name and other information of the PE file by right-clicking and viewing the file properties, and then manually determine whether the file information of each PE file is complete. This method is cumbersome, inefficient, and prone to errors. Summary of the invention
[0005] In view of this, the present application provides a method and device, storage medium, and computer device for verifying the integrity of PE file information. After the user adds the PE file to be verified to the target window, the file information integrity of the PE file to be verified is automatically verified, and the verification result is displayed in the target window, which can greatly improve the efficiency and accuracy of the file information integrity verification of the PE file.
[0006] According to one aspect of the present application, a method for verifying the integrity of PE file information is provided, comprising:
[0007] In response to an operation instruction to add a PE file to be verified to the target window, calling an information extraction interface corresponding to each target extraction category;
[0008] Through the information extraction interface, information is extracted from the PE file to be verified to obtain information extraction results corresponding to each target extraction category;
[0009] Based on the information extraction result, determining whether the file information corresponding to the PE file to be verified is complete, and obtaining an integrity verification result;
[0010] The information to be displayed is obtained according to the integrity verification result and the information extraction result, and the information to be displayed is displayed in the target window.
[0011] According to another aspect of the present application, a device for verifying the integrity of PE file information is provided, comprising:
[0012] An interface calling module, for calling an information extraction interface corresponding to each target extraction category in response to an operation instruction of adding a PE file to be verified to a target window;
[0013] An information extraction module, used to extract information from the PE file to be verified through the information extraction interface, and obtain information extraction results corresponding to each target extraction category;
[0014] A judgment module, used to judge whether the file information corresponding to the PE file to be verified is complete based on the information extraction result, and obtain an integrity verification result;
[0015] A display module is used to obtain the information to be displayed according to the integrity verification result and the information extraction result, and display the information to be displayed in the target window.
[0016] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned PE file information integrity verification method is implemented.
[0017] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned PE file information integrity verification method when executing the program.
[0018] By means of the above technical scheme, the present application provides a method and device for verifying the information integrity of a PE file, a storage medium, and a computer device, and the user can add the PE file to be verified to the target window. After the PE file to be verified is added to the target window, the information extraction interface corresponding to each target extraction category can be called, and through each information extraction interface, information extraction can be performed on the PE file to be verified, and then the information extraction result corresponding to each target extraction interface can be obtained. Afterwards, it can be determined whether each target extraction category of the above PE file to be verified has successfully extracted the information extraction result, and the integrity verification result of the PE file to be verified is obtained after the determination. Furthermore, the integrity verification result and the information extraction result can be used to obtain the information to be displayed, and the information to be displayed can be displayed in the target window. After the user adds the PE file to be verified to the target window, the embodiment of the present application automatically verifies the file information integrity of the PE file to be verified, and displays the verification result in the target window, which can greatly improve the efficiency and accuracy of the file information integrity verification of the PE file.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 A schematic diagram of a process for verifying the integrity of PE file information provided by an embodiment of the present application is shown;
[0022] Figure 2 A schematic diagram showing the structure of a PE file information integrity verification device provided by an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0025] In this embodiment, a method for verifying the integrity of PE file information is provided. Figure 1 As shown, the method includes:
[0026] Step 101, in response to an operation instruction of adding a PE file to be verified to a target window, calling an information extraction interface corresponding to each target extraction category.
[0027] A method for verifying the integrity of PE file information provided by an embodiment of the present application can automatically determine whether the PE file information is complete. Generally speaking, PE file information can include information such as file name, file version, digital signature, file description, product name, etc. Before verifying the integrity of PE file information, a user's startup instruction can be responded to, and then a target window can be displayed on the client. Then, the user can add the PE file to be verified to the target window. Specifically, the user can add the PE file to be verified to the target window by dragging the PE file to be verified; the user can also click on the target window and jump to the preset interface through the preset path, and then the user directly selects the PE file to be verified in the preset interface, or jumps to the specified interface through the preset interface, directly selects the PE file to be verified in the specified interface, and then adds the selected PE file to be verified to the target window. In addition, the PE file to be verified can also be added to the target window in other ways, which are not limited here. After the PE file to be verified is added to the target window, the information extraction interface corresponding to each target extraction category can be called. Here, each target extraction category can correspond to an information extraction interface. The target extraction category can be determined according to the demand. For example, when the file information of the PE file to be verified includes the three types of information, namely, the file name, file version, and digital signature, it indicates that the PE file information to be verified is complete. In this case, the target extraction category can be the file name, file version, and digital signature; when the file information of the PE file to be verified includes the four types of information, namely, the file name, file version, digital signature, and product name, it indicates that the PE file information to be verified is complete. In this case, the target extraction category can be the file name, file version, digital signature, and product name. The embodiment of the present application sets an information extraction interface for each target extraction category, and the target extraction category can be adjusted according to the demand, which can make the setting of the information extraction category more flexible and can be flexibly adjusted according to business needs.
[0028] Step 102: extract information from the PE file to be verified through the information extraction interface to obtain information extraction results corresponding to each target extraction category.
[0029] In this embodiment, information extraction can be performed on the PE file to be verified through each information extraction interface, and then the information extraction result corresponding to each target extraction interface can be obtained.
[0030] Step 103: Based on the information extraction result, determine whether the file information corresponding to the PE file to be verified is complete, and obtain an integrity verification result.
[0031] In this embodiment, after obtaining the information extraction results corresponding to each target extraction category, it can be determined whether each target extraction category of the PE file to be verified has successfully extracted information extraction results. If yes, it means that the file information of the PE file to be verified is complete; if there is one or more target extraction categories that have not successfully extracted information extraction results, it means that the file information of the PE file to be verified is incomplete. After the above judgment, the integrity verification result of the PE file to be verified can be obtained.
[0032] Step 104: obtaining the information to be displayed according to the integrity verification result and the information extraction result, and displaying the information to be displayed in the target window.
[0033] In this embodiment, further, the integrity verification result and the information extraction result can be used to obtain the information to be displayed, and the information to be displayed can be displayed in the target window. In this way, the user can directly know whether the file information of the PE file to be verified is complete through the information to be displayed displayed in the target window.
[0034] By applying the technical solution of this embodiment, the user can add the PE file to be verified to the target window. After adding the PE file to be verified to the target window, the information extraction interface corresponding to each target extraction category can be called. Through each information extraction interface, information extraction can be performed on the PE file to be verified, and then the information extraction result corresponding to each target extraction interface can be obtained. Afterwards, it can be determined whether each target extraction category of the above-mentioned PE file to be verified has successfully extracted the information extraction result, and the integrity verification result of the PE file to be verified is obtained after the determination. Further, the integrity verification result and the information extraction result can be used to obtain the information to be displayed, and the information to be displayed can be displayed in the target window. After the user adds the PE file to be verified to the target window, the embodiment of the present application automatically verifies the file information integrity of the PE file to be verified, and displays the verification result in the target window, which can greatly improve the efficiency and accuracy of the file information integrity verification of the PE file.
[0035] In an embodiment of the present application, optionally, when the target extraction category includes a digital signature, after the "extracting information from the PE file to be verified through the information extraction interface" in step 102, the method also includes: when the information extraction interface corresponding to the digital signature successfully extracts the information extraction result, identifying a first hash value from the PE file to be verified, and identifying a second hash value from the information extraction result corresponding to the digital signature, and judging whether the first hash value is the same as the second hash value; when the judgment result is different, displaying file tampering prompt information in the target window; when the judgment result is the same, obtaining the digital certificate corresponding to the PE file to be verified, verifying the information extraction result corresponding to the digital signature through the digital certificate, and when the verification fails, displaying file tampering prompt information in the target window.
[0036] In this embodiment, when the target extraction category includes a digital signature, the called information extraction interface may include an information extraction interface corresponding to the digital signature. After the digital signature information of the PE file to be verified is extracted through the information extraction interface corresponding to the digital signature, and the information extraction result is successfully extracted, it means that the file information of the PE file to be verified contains the digital signature related information. Then, the digital signature related information can be automatically verified to determine whether the PE file to be verified has been tampered with. Specifically, a first hash value can be identified from the PE file to be verified, and a second hash value can be identified from the information extraction result corresponding to the digital signature, and it can be further determined whether the first hash value is the same as the second hash value. Generally speaking, if the PE file to be verified has not been tampered with, the first hash value is consistent with the second hash value. If it is found through judgment that the first hash value and the second hash value are different, it means that the PE file to be verified has been tampered with. At this time, the file tampering prompt information can be displayed in the target window to prompt the user that the PE file to be verified is at risk of being tampered with. If it is determined that the first hash value and the second hash value are the same, it does not mean that the PE file to be verified has not been tampered with. At this time, further verification can be performed, and the digital certificate corresponding to the PE file to be verified can be obtained, and the information extraction result corresponding to the above digital signature can be verified using the obtained digital certificate. Here, the method of verifying the information extraction result corresponding to the digital signature through a digital certificate can be a verification method in the prior art, which is not required here. If the verification fails, the file tampering prompt information can also be displayed in the target window to remind the user that the PE file to be verified is at risk of being tampered with. Otherwise, the file security-related information can be displayed in the target window, or not displayed. After extracting the information extraction result of the digital signature of the PE file to be verified, the embodiment of the present application directly verifies the information extraction result, and if there is a risk of tampering, the file tampering prompt information is directly displayed in the target window, which can effectively identify the PE file to be verified that has been tampered with and maliciously modified, thereby ensuring the integrity and security of the PE file to be verified.
[0037] In an embodiment of the present application, optionally, when adding a batch of PE files to be verified to the target window, after the "response to the operation instruction of adding PE files to be verified to the target window" in step 101, the method also includes: creating a processing progress update task; grouping the batch of PE files to be verified based on the current task processing status of each thread in multiple threads, assigning a first target thread to each group, and assigning a second target thread to the processing progress update task; step 102 includes: for each of the first target threads, extracting information from the assigned PE files to be verified through the information extraction interface to obtain information extraction results corresponding to each of the target extraction categories; for the second target thread, sending processing progress inquiry information to each of the first target threads at a preset frequency, updating the processing progress of the batch of PE files to be verified based on the feedback information of each of the first target threads, and displaying the updated processing progress in the target window.
[0038] In this embodiment, if the user adds a batch of PE files to be verified to the target window, a progress update task can be created in response to the user's operation instructions. Then, the current task processing status corresponding to each thread in the multiple threads can be determined. According to the current task processing status corresponding to each thread, an idle target thread or a target thread with fewer current processing tasks is selected from the multiple threads, and one of the target threads is used as the second target thread, and the remaining ones are used as the first target threads, and the batch of PE files to be verified are grouped according to the number of first target threads. For example, if there are 3 first target threads, the batch of PE files to be verified can be divided into 3 groups. After grouping, a first target thread is assigned to each group of PE files to be verified. Through the first target thread, the step of extracting information from the PE files to be verified in the group through the information extraction interface can be executed, thereby obtaining the information extraction results under each target extraction category for each PE file to be verified in the group. In the process of extracting information from the PE file to be verified through the first target thread, the second target thread can also send processing progress inquiry information to each first target thread at a preset frequency. After receiving the processing progress inquiry information, the first target thread can generate feedback information and return the feedback information to the second target thread. The second target thread can know how many PE files to be verified the first target thread has processed through the received feedback information, thereby updating the processing progress of the batch of PE files to be verified according to the feedback information of each first target thread, and displaying it in the target window after the update. The embodiment of the present application processes the PE files to be verified through multi-threading and updates the processing progress information in real time, which not only ensures the smoothness of the information extraction process of the PE files to be verified, but also can display the processing progress, so that the user can timely understand the information extraction status of the PE files to be verified, which is conducive to improving the user experience.
[0039] In an embodiment of the present application, optionally, the "obtaining the information to be displayed according to the integrity verification result and the information extraction result" in step 104 includes: using the integrity verification result and the information extraction result as the information to be displayed; or, when any integrity verification result indicates that the file information corresponding to the PE file to be verified is incomplete, using any integrity verification result and the information extraction result corresponding to any integrity verification result as the information to be displayed; or, when any integrity verification result indicates that the file information corresponding to the PE file to be verified is incomplete, using any integrity verification result and the target extraction category corresponding to the information extraction interface that failed to successfully extract the information extraction result as the information to be displayed.
[0040] In this embodiment, the information to be displayed may be in various forms.
[0041] The first method is to directly use the integrity verification results and information extraction results as the information to be displayed, that is, directly display the integrity verification results and information extraction results of the PE file to be verified in the target window, so that the user can intuitively understand whether the file information of the PE file to be verified is complete, as well as the information extraction results under each target extraction category.
[0042] The second method is that after verification, it is found that the corresponding information extraction results are not successfully extracted under one or more target extraction categories corresponding to a PE file to be verified, indicating that the file information of the PE file to be verified is incomplete. At this time, the integrity verification result and information extraction result corresponding to the PE file to be verified can be used as the information to be displayed, that is, the integrity verification result and information extraction result corresponding to the PE file to be verified with incomplete file information are directly displayed in the target window. For example, the information to be displayed can be: PE file a to be verified, file information is incomplete, file name: A; file version: empty; digital signature: 111101101110. Then it can be known that the PE file to be verified lacks file version information. This method of directly displaying the relevant information of the PE file to be verified with incomplete file information in the target window can make the user more intuitively understand which PE files to be verified have incomplete file information, and which target extraction categories lack information extraction results, which is more convenient and more intuitive.
[0043] The third method is that after verification, it is found that the corresponding information extraction results are not successfully extracted under one or more target extraction categories corresponding to a PE file to be verified, indicating that the file information of the PE file to be verified is incomplete. At this time, it can be further determined under which target extraction categories of the PE file to be verified the information extraction results are missing, and the integrity verification results corresponding to the PE file to be verified and the target extraction categories lacking the information extraction results are used as the information to be displayed, that is, the integrity verification results of the PE file to be verified with incomplete file information and the target extraction categories lacking the information extraction results are directly displayed in the target window. For example, the information to be displayed may be: PE file a to be verified, incomplete file information, file version. Then the user can know that the PE file to be verified lacks file version information. Compared with the second method, this method of directly displaying the integrity verification results of the PE file to be verified with incomplete file information and the target extraction categories lacking the information extraction results in the target window can be more concise and intuitive.
[0044] By displaying the information to be displayed in the target window, the embodiment of the present application allows the user to directly learn from the information to be displayed the integrity verification result of the PE file to be verified, as well as which target extraction categories lack information extraction results, thereby making the result display more intuitive and helping to improve the user experience.
[0045] In an embodiment of the present application, optionally, after information extraction is performed on each PE file to be verified, the method further includes: generating a first verification result file according to a preset file format based on the information to be displayed in the target window, and storing the first verification result file in a preset storage space; and / or, in response to a verification result export instruction, modifying the state of each piece of information to be displayed in the target window to a selectable state, determining the target display information according to the user's selection instruction for the information to be displayed in the selectable state, generating a second verification result file according to a preset file format based on the target display information, and storing the second verification result file in a preset storage space.
[0046] In this embodiment, after all the PE files to be verified added to the target window have undergone information extraction, a verification result file can be further generated, and the integrity verification result can be backed up through the verification result file. Specifically, after the information to be displayed is displayed in the target window, a first verification result file can be generated according to the information to be displayed in a preset file format. The content in the first verification result file can change according to the change of the information to be displayed. Here, the preset file format can be a CSV file, an EXCEL file, etc. After the first verification result file is generated, the first verification result file can be stored in a preset storage space.
[0047] In addition, the second verification result file can also be customized and generated according to the needs of the user. For example, a verification result export icon can be displayed on the target window interface, and the icon can be an interactive icon. After the user clicks the icon, the state of each piece of information to be displayed in the target window can be modified in response to the verification result export instruction. The modified state is a selectable state, so that the user can select the information to be displayed in the selectable state and select the target information to be displayed that is to be stored in the second verification result file. Then, according to the target information to be displayed, a second verification result file is generated according to a preset file format, and the second verification result file is stored in a preset storage space.
[0048] The embodiment of the present application automatically generates a first result verification file after the target window displays the information to be displayed, or generates a second result verification file according to user needs, so that the user can export the extracted information to other formats, facilitate subsequent analysis and backup, and the whole process is more convenient.
[0049] In an embodiment of the present application, optionally, the method also includes: in response to an operation instruction to add a PE file to be verified to the target window, identifying whether the file identifier corresponding to the PE file to be verified is included in the file identifier record; if the file identifier corresponding to the PE file to be verified is included in the file identifier record, and the file information corresponding to the PE file to be verified is verified to be complete, then removing the file identifier corresponding to the PE file to be verified from the file identifier record; if the file identifier corresponding to the PE file to be verified is not included in the file identifier record, and the file information corresponding to the PE file to be verified is incomplete, then adding the file identifier corresponding to the PE file to be verified to the file identifier record.
[0050] In this embodiment, after the user adds a PE file to be verified to the target window, it is also possible to identify whether the file identifier of the added PE file to be verified is included in the file identifier record. Here, the file identifier of a PE file that is determined to have incomplete information after historical verification can be stored in the file identifier record. The user can modify the information of the PE file with incomplete information, and then add it again to the target window to automatically verify whether the file information is complete. Therefore, whenever the user adds a new PE file to be verified in the target window, it is possible to first identify whether the file identifier of the PE file to be verified is included in the file identifier record. If it is included in the file identification record, it means that the PE file to be verified has undergone an information integrity verification once, and the verification failed. At this time, the integrity verification result of the PE file to be verified after this verification can be further determined. If the file information of the PE file to be verified is found to be complete after this verification, then the file identification of the PE file to be verified can be deleted from the file identification record this time; if it is not included in the file identification record, it can be said that the PE file to be verified is undergoing integrity verification for the first time. Therefore, the integrity verification result of the PE file to be verified after this verification can be further determined. If the file information of the PE file to be verified is found to be incomplete after this verification, then the file identification of the PE file to be verified can be added to the file identification record this time. Through the file identification record, the embodiment of the present application allows the user to directly view which PE files in the historically verified PE files have incomplete file information, and in the subsequent PE file information integrity verification process, the file identification record can be automatically updated, so that the file identification recorded in the file identification record is the latest result after each verification, so that the user can quickly determine which PE files have incomplete information up to now.
[0051] In an embodiment of the present application, optionally, the method further includes: in response to an operation instruction to add a PE file to be verified to the target window, identifying the file extension corresponding to the PE file to be verified, and determining whether the file extension belongs to the extension corresponding to the PE file; when the result is yes, executing the step of calling the information extraction interface corresponding to each target extraction category.
[0052] In this embodiment, after the user adds the PE files to be verified to the target window, the file extensions of these PE files to be verified can be identified first, and the file extensions of each PE file to be verified can be judged in turn whether they belong to the extensions corresponding to the PE file. For example, there are multiple files in a folder on the computer. For convenience, the user chooses to add all these files to the target window. After that, in response to the user's added operation instructions, it can be judged whether these PE files to be verified are real PE files. Only when they are determined to be real PE files, information extraction is performed on these real PE files. Here, the file extensions of PE files can include DLL, EXE, SYS, OCX, COM, etc. In the embodiment of the present application, after the user adds the PE files to be verified to the target window, it first verifies whether these PE files to be verified are real PE files, and only after confirmation does information extraction perform, which can help users automatically filter the files that need to be extracted. Compared with the user selecting and then adding them to the target window, the selection efficiency and accuracy of PE files can be greatly improved, which is conducive to improving user experience.
[0053] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a PE file information integrity verification device, such as Figure 2 As shown, the device comprises:
[0054] An interface calling module, for calling an information extraction interface corresponding to each target extraction category in response to an operation instruction of adding a PE file to be verified to a target window;
[0055] An information extraction module, used to extract information from the PE file to be verified through the information extraction interface, and obtain information extraction results corresponding to each target extraction category;
[0056] A judgment module, used to judge whether the file information corresponding to the PE file to be verified is complete based on the information extraction result, and obtain an integrity verification result;
[0057] A display module is used to obtain the information to be displayed according to the integrity verification result and the information extraction result, and display the information to be displayed in the target window.
[0058] Optionally, when the target extraction category includes a digital signature, the apparatus further includes:
[0059] The identification module is further used for, after extracting information from the PE file to be verified through the information extraction interface, when the information extraction interface corresponding to the digital signature successfully extracts the information extraction result, identifying a first hash value from the PE file to be verified, and identifying a second hash value from the information extraction result corresponding to the digital signature, and determining whether the first hash value is the same as the second hash value;
[0060] The display module is also used to display file tampering prompt information in the target window when the judgment result is different; when the judgment result is the same, obtain the digital certificate corresponding to the PE file to be verified, verify the information extraction result corresponding to the digital signature through the digital certificate, and when the verification fails, display the file tampering prompt information in the target window.
[0061] Optionally, when adding PE files to be verified to the target window in batches, the device further includes:
[0062] A task creation module, used for creating a processing progress update task in response to the operation instruction of adding the PE file to be verified to the target window;
[0063] A grouping module, used for grouping the batch of PE files to be verified based on the current task processing status of each thread in the multiple threads, assigning a first target thread to each group, and assigning a second target thread to the processing progress update task;
[0064] The information extraction module is used to:
[0065] For each of the first target threads, extract information from the assigned PE file to be verified through the information extraction interface to obtain an information extraction result corresponding to each of the target extraction categories;
[0066] For the second target thread, processing progress inquiry information is sent to each of the first target threads at a preset frequency, and based on the feedback information of each of the first target threads, the processing progress of the batch of PE files to be verified is updated, and the updated processing progress is displayed in the target window.
[0067] Optionally, the display module is used to:
[0068] Using the integrity verification result and the information extraction result as the information to be displayed; or,
[0069] When any integrity verification result indicates that the file information corresponding to the PE file to be verified is incomplete, the any integrity verification result and the information extraction result corresponding to the any integrity verification result are used as the information to be displayed; or,
[0070] When any integrity verification result indicates that the file information corresponding to the PE file to be verified is incomplete, the any integrity verification result and the target extraction category corresponding to the information extraction interface that has not successfully extracted the information extraction result are used as the information to be displayed.
[0071] Optionally, the device further comprises:
[0072] A file generation module is used to generate a first verification result file in accordance with a preset file format based on the information to be displayed in the target window after information extraction has been performed on each PE file to be verified, and store the first verification result file in a preset storage space; and / or, in response to a verification result export instruction, modify the state of each information to be displayed in the target window to a selectable state, determine the target display information according to the user's selection instruction for the information to be displayed in the selectable state, generate a second verification result file in accordance with a preset file format based on the target display information, and store the second verification result file in a preset storage space.
[0073] Optionally, the device further comprises:
[0074] The identification module is further used to identify whether the file identifier corresponding to the PE file to be verified is included in the file identifier record in response to an operation instruction to add the PE file to be verified to the target window;
[0075] a removal module, configured to remove the file identifier corresponding to the PE file to be verified from the file identifier record if the file identifier corresponding to the PE file to be verified is included in the file identifier record and the file information corresponding to the PE file to be verified is verified to be complete;
[0076] The adding module is used to add the file identifier corresponding to the PE file to be verified to the file identifier record if the file identifier corresponding to the PE file to be verified is not included in the file identifier record and the file information corresponding to the PE file to be verified is incomplete.
[0077] Optionally, the identification module is further used to:
[0078] In response to an operation instruction to add a PE file to be verified to the target window, the file extension corresponding to the PE file to be verified is identified, and it is determined whether the file extension belongs to the extension corresponding to the PE file. When the result is yes, the step of calling the information extraction interface corresponding to each target extraction category is executed.
[0079] It should be noted that for other corresponding descriptions of the functional units involved in the PE file information integrity verification device provided in the embodiment of the present application, reference can be made to Figure 1The corresponding description in the method will not be repeated here.
[0080] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 3 As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0081] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0082] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0083] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0084] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0086] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for verifying the integrity of PE file information. It is characterized in that include: In response to an operation instruction to add a PE file to be verified to the target window, calling an information extraction interface corresponding to each target extraction category; Through the information extraction interface, information is extracted from the PE file to be verified to obtain information extraction results corresponding to each target extraction category; Based on the information extraction result, determining whether the file information corresponding to the PE file to be verified is complete, and obtaining an integrity verification result; The information to be displayed is obtained according to the integrity verification result and the information extraction result, and the information to be displayed is displayed in the target window.
2. The method according to claim 1, It is characterized in that When the target extraction category includes a digital signature, after extracting information from the PE file to be verified through the information extraction interface, the method further includes: When the information extraction interface corresponding to the digital signature successfully extracts the information extraction result, identifying a first hash value from the PE file to be verified, identifying a second hash value from the information extraction result corresponding to the digital signature, and determining whether the first hash value is the same as the second hash value; When the judgment result is different, displaying a file tampering prompt message in the target window; When the judgment result is the same, the digital certificate corresponding to the PE file to be verified is obtained, and the information extraction result corresponding to the digital signature is verified through the digital certificate. When the verification fails, the file tampering prompt information is displayed in the target window.
3. The method according to claim 1 or 2, It is characterized in that When adding PE files to be verified to the target window in batches, after responding to the operation instruction of adding PE files to be verified to the target window, the method further includes: Create a task to process progress updates; Based on the current task processing status of each thread in the multiple threads, the batch of PE files to be verified are grouped, a first target thread is assigned to each group, and a second target thread is assigned to the processing progress update task; The information extraction is performed on the PE file to be verified through the information extraction interface to obtain the information extraction result corresponding to each target extraction category, including: For each of the first target threads, extract information from the assigned PE file to be verified through the information extraction interface to obtain an information extraction result corresponding to each of the target extraction categories; For the second target thread, processing progress inquiry information is sent to each of the first target threads at a preset frequency, and based on the feedback information of each of the first target threads, the processing progress of the batch of PE files to be verified is updated, and the updated processing progress is displayed in the target window.
4. The method according to claim 3, It is characterized in that The obtaining the information to be displayed according to the integrity verification result and the information extraction result includes: Using the integrity verification result and the information extraction result as the information to be displayed; or, When any integrity verification result indicates that the file information corresponding to the PE file to be verified is incomplete, the any integrity verification result and the information extraction result corresponding to the any integrity verification result are used as the information to be displayed; or, When any integrity verification result indicates that the file information corresponding to the PE file to be verified is incomplete, the any integrity verification result and the target extraction category corresponding to the information extraction interface that has not successfully extracted the information extraction result are used as the information to be displayed.
5. The method according to claim 4, It is characterized in that After information extraction is performed on each PE file to be verified, the method further includes: Based on the information to be displayed in the target window, generating a first verification result file in a preset file format, and storing the first verification result file in a preset storage space; and / or, In response to the verification result export instruction, the state of each piece of information to be displayed in the target window is modified to a selectable state, and according to the user's selection instruction for the information to be displayed in the selectable state, the target display information is determined, and based on the target display information, a second verification result file is generated in a preset file format, and the second verification result file is stored in a preset storage space.
6. The method according to claim 1, It is characterized in that The method further comprises: In response to an operation instruction of adding a PE file to be verified to a target window, identifying whether a file identifier corresponding to the PE file to be verified is included in a file identifier record; If the file identifier corresponding to the PE file to be verified is included in the file identifier record and the file information corresponding to the PE file to be verified is verified to be complete, then the file identifier corresponding to the PE file to be verified is removed from the file identifier record; If the file identifier corresponding to the PE file to be verified is not included in the file identifier record and the file information corresponding to the PE file to be verified is incomplete, the file identifier corresponding to the PE file to be verified is added to the file identifier record.
7. The method according to claim 1, It is characterized in that The method further comprises: In response to an operation instruction to add a PE file to be verified to the target window, the file extension corresponding to the PE file to be verified is identified, and it is determined whether the file extension belongs to the extension corresponding to the PE file. When the result is yes, the step of calling the information extraction interface corresponding to each target extraction category is executed.
8. A verification device for PE file information integrity, It is characterized in that include: An interface calling module, for calling an information extraction interface corresponding to each target extraction category in response to an operation instruction of adding a PE file to be verified to a target window; An information extraction module, used to extract information from the PE file to be verified through the information extraction interface, and obtain information extraction results corresponding to each target extraction category; A judgment module, used to judge whether the file information corresponding to the PE file to be verified is complete based on the information extraction result, and obtain an integrity verification result; A display module is used to obtain the information to be displayed according to the integrity verification result and the information extraction result, and display the information to be displayed in the target window.
9. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
