Encrypted compressed packet decompression behavior monitoring method and system
By intercepting file operation calls, establishing a cache queue for monitoring, judging the decompression relationship of encrypted compressed packages and blocking them, it solves the lack of auditing and monitoring of decompression of encrypted compressed packages in the existing technology, and achieves accurate decompression monitoring of encrypted compressed packages. and data security assurance.
Patent Information
- Application Number
- CN202410886990.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-10-08
AI Technical Summary
The existing technology lacks decompression auditing and monitoring blocking functions for encrypted compressed packages, and cannot effectively prevent information leakage.
By intercepting and screening file operation calls, it determines the compressed package decompression process and new file path, determines whether decompression is allowed, blocks the decompression process when necessary, and establishes a compressed package cache queue and a queue of temporary files to be decompressed for monitoring and auditing.
It achieves precise decompression monitoring and blocking of encrypted compressed packages to ensure data security, making up for the lack of related technologies in the market, and the monitoring results are accurate and reliable.
Smart Images

Figure CN118747381A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security technology, and in particular relates to a method and system for monitoring the decompression behavior of an encrypted compressed package. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the development of network technology, various electronic devices have been integrated into our lives, and electronic files and compressed files have become the main work materials. However, information leakage and network fraud are frequent, and information security and leakage prevention have become an important part of work.
[0004] The advantages of compressed files are that they save space and are easy to store. When using internal files, they need to be decompressed first. There are many compression software and compression formats. While decompressing files is flexible, it is easy to leak information.
[0005] The inventors have found that there is currently no auditing software on the market that can count decompressed files, and there is also no technology that does not allow decompression of important compressed packages that need to be prevented from leaking, so it is impossible to perform decompression auditing and monitoring blocking on encrypted compressed packages. Summary of the invention
[0006] In order to solve at least one technical problem in the above-mentioned background technology, the present invention provides a method and system for monitoring the decompression behavior of encrypted compressed packages, which can accurately determine the decompression process of compressed packages (including encrypted compressed packages) and the path and number of new files decompressed by intercepting and screening various file operation calls; at the same time, based on the data security perspective, it can timely block the decompression of sensitive compressed package files, and the monitoring results are accurate and reliable. At the same time, it can make up for the lack of relevant technologies in the market, and it is impossible to perform decompression auditing and monitoring blocking functions on encrypted compressed packages.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A first aspect of the present invention provides a method for monitoring the decompression behavior of an encrypted compressed package, comprising the following steps:
[0009] According to the file opening attribute and file attribute, the compressed package cache queue and the temporary file cache queue to be decompressed are obtained;
[0010] Check whether the file handle to be read is in the compression package cache queue. If it exists, update the current file handle to the last file handle read.
[0011] Check whether the file handle to be written is in the temporary cache file queue to be decompressed. If it exists, determine the decompression relationship between the compressed package and the new file based on the path of the new file and the path of the compressed package.
[0012] After confirming the decompression relationship of the compressed package, determine whether the compressed package is allowed to be decompressed. If so, add it to the decompressed file cache queue after decompression. Otherwise, block and terminate the process directly.
[0013] Further, the compressed package cache queue and the temporary file cache queue to be decompressed are obtained according to the file opening attribute and the file attribute, specifically including:
[0014] Determine the file's opening attributes. If it meets the compressed package opening attributes, determine whether it is a compressed package file based on the file path and suffix format. If it is a compressed package file, add it to the compressed package cache queue; if it does not meet the compressed package opening attributes, determine whether it is a decompressed file attribute. If so, add it to the temporary file cache queue to be decompressed.
[0015] Further, the determining the decompression relationship between the compressed package and the new file based on the path of the new file and the path of the compressed package includes:
[0016] Get the new file path and the handle of the last compressed package read. If the handle is not empty, query the information in the compressed package cache queue and get the corresponding compressed package path. If the file exists in the compressed package cache queue and the compressed package path is obtained, combined with the new file path, confirm that the compressed package and the new file are in a decompression relationship.
[0017] Furthermore, if the file handle to be read is not in the compression package cache queue, the file handle information read last is cleared.
[0018] Furthermore, the method further includes querying the compressed package cache queue to obtain the compressed package path, and if it is a compressed package and the path is obtained, reporting the new file queue decompressed by the compressed package as an audit log;
[0019] Traverse the compressed package cache queue, the temporary file cache queue to be decompressed, the last read compressed package cache queue and the decompressed file cache queue. If there is a closed handle, remove the cache.
[0020] A second aspect of the present invention provides a system for monitoring decompression behavior of an encrypted compressed package, comprising:
[0021] A file opening module, which is used to obtain a compressed package cache queue and a temporary file cache queue to be decompressed according to file opening attributes and file attributes;
[0022] The file reading module is used to query whether the file handle to be read is in the compression package cache queue. If it exists, the current file handle to be read is updated to the last file handle to be read;
[0023] A file writing module, which is used to query whether the file handle to be written is in the temporary cache file queue to be decompressed, and if so, determine the decompression relationship between the compressed package and the new file based on the path of the new file and the path of the compressed package;
[0024] The file closing module is used to determine whether the compressed package is allowed to be decompressed after confirming the decompression relationship of the compressed package. If so, it is added to the decompressed file cache queue after decompression, otherwise it is blocked and the process is terminated directly.
[0025] Furthermore, the system also includes a cache clearing module, which is used to query the compressed package cache queue to obtain the compressed package path, and if it is a compressed package and the path is obtained, report the new file queue decompressed by the compressed package as an audit log;
[0026] Traverse the compressed package cache queue, the temporary file cache queue to be decompressed, the last read compressed package cache queue and the decompressed file cache queue. If there is a closed handle, remove the cache.
[0027] A third aspect of the present invention provides a computer-readable storage medium.
[0028] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the above-mentioned method for monitoring the decompression behavior of an encrypted compressed package.
[0029] A fourth aspect of the present invention provides a computer device.
[0030] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the above-mentioned method for monitoring the decompression behavior of an encrypted compressed package are implemented.
[0031] A fifth aspect of the present invention provides a program product.
[0032] A program product, which is a computer program product, includes a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method for monitoring the decompression behavior of an encrypted compressed package are implemented.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] 1. The present invention can accurately determine the decompression process of compressed packages (including encrypted compressed packages) and the path and number of new files decompressed by the compressed packages by intercepting and screening various file operation calls; at the same time, based on data security considerations, it can timely block the decompression of sensitive compressed package files, and the monitoring results are accurate and reliable.
[0035] 2. The present invention can also make up for the lack of related technologies in the market such as being unable to perform decompression auditing and monitoring blocking on encrypted compressed packages.
[0036] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0038] Figure 1 It is a flow chart of a method for monitoring the decompression behavior of an encrypted compressed package provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0040] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0041] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0042] Regarding the problem mentioned in the background technology of this application that there is currently no audit software on the market to count decompressed files, and there is also no technology that does not allow decompression of important compressed packages that need to be prevented from being leaked, it is impossible to perform decompression auditing and monitoring blocking on encrypted compressed packages.
[0043] The present invention can accurately determine the decompression process of compressed packages (including encrypted compressed packages) and the path and number of new files decompressed by intercepting and screening various file operation calls; at the same time, based on data security considerations, it can timely block the decompression of sensitive compressed files, and the monitoring results are accurate and reliable. At the same time, it can make up for the lack of relevant technologies on the market, and it is impossible to perform decompression auditing and monitoring blocking functions on encrypted compressed packages.
[0044] Embodiment 1
[0045] like Figure 1As shown, the present invention is based on the file operation interface call of the system module, and monitors the operations of file opening / creation, file reading, file writing, file closing, etc. Based on intercepting the system file operation interface (file operation calls have no order), the file information that meets the conditions for different operations is added to the corresponding cache list; or a certain information is queried from the cache list for the next step of matching and added to a more accurate cache. Thus, the purpose of complete auditing is achieved.
[0046] The following flowchart introduces the specific functions of each operation step and the data screening method in detail, taking the compression of abc.zip to compress abc.txt as an example:
[0047] Step 1, file opening operation:
[0048] Determine the file's opening attributes. If it meets the compressed package opening attributes, determine whether it is a compressed package file based on the file path and suffix format. If it is a compressed package file, add it to the compressed package queue, otherwise it will be ignored. If it does not meet the compressed package opening attributes, determine whether it is a decompressed file attribute. If so, add it to the temporary file queue to be decompressed, otherwise it will be ignored.
[0049] In this embodiment, since each compression software is different and needs to be adapted, when the properties of opening, reading, etc. meet the requirements for opening a compressed package, it is considered to be a compressed package file to be decompressed, and then a determination is made as to whether the file path and suffix format are compressed package files (such as: .zip, etc.).
[0050] Through the above steps, it can be determined whether the file type of the file is a compressed package to be decompressed or a decompressed file.
[0051] Step 2, file reading operation: File reading only focuses on the files in the compression package queue.
[0052] To read a file, first check whether the file handle to be read is in the compression package queue. If the information exists, it is considered to be the compressed package to be read, and the current read handle is updated to the last read file handle; if the compression package queue does not exist, the last read file handle information is cleared.
[0053] Step 3, file writing operation:
[0054] Based on the decompression process, file writing only focuses on the files generated by decompression, that is, the files in the temporary file queue to be decompressed, which specifically includes the following steps:
[0055] Step 301, to write a file, first check whether the file handle to be written is in the temporary file queue to be decompressed. If the information exists, obtain the new file path (for example: D:\abc.txt) and proceed to the next step; otherwise ignore the write message.
[0056] Step 302, obtain the handle of the compressed package read last, if the handle is not empty, proceed to the next step; otherwise, ignore the write message.
[0057] In step 303, the last compressed package handle is obtained to query the information in the compressed package cache queue and obtain the corresponding compressed package path. If the file exists in the compressed package queue and the compressed package path is obtained, combined with the new file path obtained in step 301, it can be confirmed that the compressed package and the new file are in a decompression relationship.
[0058] Step 304, the compressed package decompression blocking mechanism, after confirming the compressed package decompression relationship, reports a message to inquire whether the compressed package is not allowed to be decompressed. If blocked, the process is terminated directly; if allowed, the compressed package is marked as allowed to be decompressed, and no blocking is asked again.
[0059] Step 305, decompression is allowed and the decompressed file relationship is confirmed, and added to the decompressed file cache (the cache that has been confirmed to be reported for decompression).
[0060] Through the above steps, the decompression process of the compressed package (including encrypted compressed package) and the path and number of files of the decompressed new files can be accurately determined; at the same time, based on data security considerations, the decompression of sensitive compressed package files can be blocked in time, and the monitoring results are accurate and reliable.
[0061] Step 4: Close the file operation
[0062] The main purpose of paying attention to the closing file operation is to clear invalid data in the cache in time, including the following steps:
[0063] Step 401, close the file, first query the compressed package queue to obtain the compressed package path, if it is a compressed package and the path is obtained, then report the new file queue of the compressed package decompression as an audit log.
[0064] Step 402, traverse all cache queues, and if the closed handle exists, remove the cache.
[0065] In this embodiment, the cleared cache includes a compressed package cache, a decompression temporary cache, and a last read cache.
[0066] Embodiment 2
[0067] This embodiment provides a system for monitoring decompression behavior of encrypted compressed packages, including:
[0068] A file opening module, which is used to obtain a compressed package cache queue and a temporary file cache queue to be decompressed according to file opening attributes and file attributes;
[0069] The file reading module is used to query whether the file handle to be read is in the compression package cache queue. If it exists, the current file handle to be read is updated to the last file handle to be read;
[0070] The file writing module is used to query whether the file handle to be written is in the temporary cache file queue to be decompressed. If so, the decompression relationship between the compressed package and the new file is determined based on the path of the new file and the path of the compressed package. After confirming the decompression relationship of the compressed package, it is determined whether the compressed package is allowed to be decompressed. If so, it is added to the decompression file cache queue after decompression, otherwise the process is blocked and ended directly.
[0071] Through the above scheme, the decompression process of compressed packages (including encrypted compressed packages) and the path and number of new files decompressed can be accurately determined; at the same time, based on data security considerations, the decompression of sensitive compressed package files can be blocked in time, and the monitoring results are accurate and reliable.
[0072] The system also includes a cache clearing module, which is used to query the compressed package cache queue to obtain the compressed package path, and if it is a compressed package and the path is obtained, report the new file queue decompressed by the compressed package as an audit log;
[0073] Traverse the compressed package cache queue, the temporary file cache queue to be decompressed, the last read compressed package cache queue and the decompressed file cache queue. If there is a closed handle, remove the cache.
[0074] In this embodiment, in the file opening module, the compressed package cache queue and the temporary file cache queue to be decompressed are obtained according to the file opening attribute and the file attribute, specifically including:
[0075] Determine the file's opening attributes. If it meets the compressed package opening attributes, determine whether it is a compressed package file based on the file path and suffix format. If it is a compressed package file, add it to the compressed package cache queue; if it does not meet the compressed package opening attributes, determine whether it is a decompressed file attribute. If so, add it to the temporary file cache queue to be decompressed.
[0076] In the file writing module, the decompression relationship between the compressed package and the new file is determined based on the path of the new file and the path of the compressed package, including:
[0077] Get the new file path and the handle of the last compressed package read. If the handle is not empty, query the information in the compressed package cache queue and get the corresponding compressed package path. If the file exists in the compressed package cache queue and the compressed package path is obtained, combined with the new file path, confirm that the compressed package and the new file are in a decompression relationship.
[0078] In the file writing module, if the file handle to be read is not in the compression package cache queue, clear the file handle information that was read last.
[0079] Embodiment 3
[0080] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the method for monitoring the decompression behavior of an encrypted compressed package as described above are implemented.
[0081] Embodiment 4
[0082] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for monitoring the decompression behavior of an encrypted compressed package as described above are implemented.
[0083] Embodiment 5
[0084] This embodiment provides a program product, which is a computer program product, including a computer program. When the computer program is executed by a processor, the steps in the method for monitoring the decompression behavior of an encrypted compressed package as described above are implemented.
[0085] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0086] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0087] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0089] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for monitoring the decompression behavior of an encrypted compressed package, characterized in that: The steps include: According to the file opening attribute and file attribute, the compressed package cache queue and the temporary file cache queue to be decompressed are obtained; Check whether the file handle to be read is in the compression package cache queue. If it exists, update the current file handle to the last file handle read. Check whether the file handle to be written is in the temporary cache file queue to be decompressed. If it exists, determine the decompression relationship between the compressed package and the new file based on the path of the new file and the path of the compressed package. After confirming the decompression relationship of the compressed package, determine whether the compressed package is allowed to be decompressed. If so, add it to the decompressed file cache queue after decompression. Otherwise, block and terminate the process directly.
2. A method for monitoring the decompression behavior of an encrypted compressed package as claimed in claim 1, characterized in that: The compressed package cache queue and the temporary file cache queue to be decompressed are obtained according to the file opening attribute and the file attribute, specifically including: Determine the file's opening attributes. If it meets the compressed package opening attributes, determine whether it is a compressed package file based on the file path and suffix format. If it is a compressed package file, add it to the compressed package cache queue; if it does not meet the compressed package opening attributes, determine whether it is a decompressed file attribute. If so, add it to the temporary file cache queue to be decompressed.
3. A method for monitoring the decompression behavior of an encrypted compressed package as claimed in claim 1, characterized in that: The step of determining the decompression relationship between the compressed package and the new file based on the path of the new file and the path of the compressed package includes: Get the new file path and the handle of the last compressed package read. If the handle is not empty, query the information in the compressed package cache queue and get the corresponding compressed package path. If the file exists in the compressed package cache queue and the compressed package path is obtained, combined with the new file path, confirm that the compressed package and the new file are in a decompression relationship.
4. The method for monitoring the decompression behavior of an encrypted compressed package according to claim 1, characterized in that: If the file handle to be read is not in the compression package cache queue, clear the file handle information that was read last.
5. The method for monitoring the decompression behavior of an encrypted compressed package according to claim 1, characterized in that: The method further includes querying the compressed package cache queue to obtain the compressed package path, and if it is a compressed package and the path is obtained, reporting the new file queue decompressed by the compressed package as an audit log; Traverse the compressed package cache queue, the temporary file cache queue to be decompressed, the last read compressed package cache queue and the decompressed file cache queue. If there is a closed handle, remove the cache.
6. A system for monitoring the decompression behavior of encrypted compressed packages, characterized in that: include: A file opening module, which is used to obtain a compressed package cache queue and a temporary file cache queue to be decompressed according to file opening attributes and file attributes; The file reading module is used to query whether the file handle to be read is in the compression package cache queue. If it exists, the current file handle to be read is updated to the last file handle to be read; The file writing module is used to query whether the file handle to be written is in the temporary cache file queue to be decompressed. If so, the decompression relationship between the compressed package and the new file is determined based on the path of the new file and the path of the compressed package. After confirming the decompression relationship of the compressed package, it is determined whether the compressed package is allowed to be decompressed. If so, it is added to the decompression file cache queue after decompression, otherwise the process is blocked and ended directly.
7. The encrypted compressed package decompression behavior monitoring system as claimed in claim 6, characterized in that: The system also includes a cache clearing module, which is used to query the compressed package cache queue to obtain the compressed package path, and if it is a compressed package and the path is obtained, report the new file queue decompressed by the compressed package as an audit log; Traverse the compressed package cache queue, the temporary file cache queue to be decompressed, the last read compressed package cache queue and the decompressed file cache queue. If there is a closed handle, remove the cache.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a method for monitoring the decompression behavior of an encrypted compressed package as described in any one of claims 1-5 are implemented.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the method for monitoring the decompression behavior of an encrypted compressed package as described in any one of claims 1-5 are implemented.
10. A program product, the program product being a computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps in the method for monitoring the decompression behavior of an encrypted compressed package as described in any one of claims 1-5 are implemented.
