Hidden information processing method and system based on CFB document and medium

By traversing the OLE attribute structure in the CFB document and using preset names and attribute identifiers to encode hidden information, it solves the problem of insufficient embedding of hidden information and complexity of extraction in CFB documents, and achieves efficient and accurate hidden information processing. , maintaining file format integrity.

CN118690725AActive Publication Date: 2024-09-24中孚安全技术有限公司
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411171192.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-09-24
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The existing technology has a small amount of hidden information embedded in CFB documents, which affects user editing and is easily detected and removed. It is difficult to adapt after changing the file format, the extraction method is complex and inaccurate, and the hidden content is easily destroyed.

Method used

By obtaining the directory structure of the CFB document, traversing the OLE attribute structure, using the preset name and attribute identifier to determine the target attribute item, encoding and embedding or extracting hidden information, avoiding modification of the text content, and utilizing the OLE attribute structure of common office documents Perform coded insertion and extraction of hidden information.

Benefits of technology

It achieves efficient embedding and extraction of hidden information in CFB documents, avoids the impact of user editing, keeps the file format intact, has wide applicability and high extraction accuracy, and solves the problem of insufficient information embedding and easy destruction of hidden content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690725A
    Figure CN118690725A
Patent Text Reader

Abstract

The invention discloses a hidden information processing method and system based on a CFB document and a medium, mainly relates to the technical field of hidden information processing, and is used for solving the problems that in an existing scheme, the information embedding amount is small, user editing is affected, and user experience is poor. The problems that in the prior art, a user is easy to perceive by consulting, the opening mode of application software needs to be changed after the file format is changed, the extraction mode is complex due to the fact that information is embedded into a text, extraction accuracy is poor, applicability is poor, and hidden information is easy to damage are solved. Comprising the following steps: analyzing a CFB document to obtain a directory structure in the CFB document; searching a target directory of an OLE attribute structure; when the hidden information processing instruction is a hidden information embedding instruction, determining a target attribute item based on an attribute identifier in the attribute item; updating the content of the attribute value in the target attribute item into hidden information corresponding to the hidden information embedding instruction; when the hidden information processing instruction is a hidden information extraction instruction, obtaining an attribute item containing hidden information; and reading and returning hidden information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of hidden information processing, and in particular to a hidden information processing method, system and medium based on CFB documents. Background Art

[0002] A CFB document (Compound File Binary) is a file format used to organize and store complex data structures. CFB documents organize data into a series of storage blocks, which can contain various types of data, such as document content, objects, and metadata. The CFB document format is commonly used for Microsoft Office and WPS documents (such as .doc, .xls, .ppt, .wps, .et, .dsp, and vsd).

[0003] There are four main ways to embed hidden information in documents: one is to directly embed unreadable information in the file content, such as QR codes or barcodes; the second is to change the file format and add information to the head or tail, which requires technical means to decode when opened; the third is to embed information by modifying fonts and adjusting text; and the fourth is to modify and encode homophones, synonyms, and punctuation marks in the document.

[0004] However, all of the above solutions suffer from the problem of limited embedded information. Furthermore, the first type hinders user editing and is easily detected and removed by users who review it. The second type requires changing the opening method of application software after changing the file format, making adaptation more difficult. The third type has a complex extraction method and poor extraction accuracy. The third type is not suitable for more official documents, and the hidden content is easily destroyed. Summary of the Invention

[0005] In response to the above-mentioned deficiencies in the prior art, the present application provides a hidden information processing method, system, and medium based on CFB documents to address the problems of existing solutions, such as a small amount of embedded information, embedded unreadable information that affects user editing, easy detection and removal by users who review the information, the need to change the opening method of application software after changing the file format, greater difficulty in adaptation, more complex extraction methods, poor accuracy of extracted data corresponding to the content modification solution, unsuitability of the content modification solution for more official files, and easy destruction of hidden content.

[0006] In a first aspect, the present application provides a hidden information processing method based on a CFB document, the method comprising: obtaining a CFB document and a hidden information processing instruction; parsing the CFB document to obtain a directory structure in the CFB document; traversing the directory structure to search for a target directory of an OLE property structure according to a name; when the hidden information processing instruction is an embed hidden information instruction, traversing the attribute items of all attribute groups in the target directory, determining the target attribute item based on an attribute identifier in the attribute item, and ending the traversal; updating the content of the attribute value in the target attribute item to the hidden information corresponding to the embed hidden information instruction; when the hidden information processing instruction is an extract hidden information instruction, traversing the attribute items of all attribute groups in the target directory to obtain an attribute item containing hidden information; and reading and returning the hidden information.

[0007] Furthermore, the directory structure is traversed and the target directory of the OLE property structure is searched according to the name, specifically including: traversing the directory structure and obtaining the names of each directory under the directory structure; determining the directory with the directory name as the preset name as the target directory; wherein the preset name includes at least: \005SummaryInformation and \005DocumentSummaryInformation.

[0008] Furthermore, the attribute items of all attribute groups in the target directory are traversed, and the target attribute item is determined based on the attribute identifier in the attribute item, specifically including: traversing the attribute items of all attribute groups in the target directory, and when the attribute identifier in the current attribute item is a preset identifier, determining the current attribute item as the target attribute item; when the attribute identifier in no attribute item is the preset identifier, adding a new attribute item as the target attribute item, and the attribute identifier in the newly added attribute item is the preset identifier.

[0009] Furthermore, the preset identifiers are PIDSI_TITLE (0x00000002), PIDSI_KEYWORDS (0x00000005), and PIDSI_TEMPLATE (0x00000007).

[0010] Furthermore, before updating the content of the attribute value in the target attribute item to the hidden information corresponding to the embedded hidden information instruction, the method also includes: obtaining initial hidden information; after encoding the initial hidden information, adding a preset specific prefix and / or suffix to the hidden information after encoding to obtain the final hidden information.

[0011] Furthermore, the encoding process is BASE64 encoding process, HEX encoding process, SM4 encoding process or SM2 encoding process; the preset specific prefix and suffix are CFBLABEL or ZFLABEL.

[0012] Furthermore, the attribute items of all attribute groups in the target directory are traversed to obtain attribute items containing hidden information, specifically including: traversing the attribute items of all attribute groups in the target directory, obtaining attribute items whose attribute identifiers are preset identifiers, and reading embedded content from the attribute values ​​of the attribute items according to preset specific prefixes and / or suffixes; when the embedded content does not exist in the attribute value, continuing to read the next attribute item; when the embedded content exists in the attribute value, decoding the embedded content; when the decoding fails, determining that the current embedded content is not hidden information, and continuing to read the next attribute item; when the decoding is successful, determining that the decoded current embedded content is hidden information, and ending the traversal.

[0013] In a second aspect, the present application provides a hidden information processing system based on a CFB document, the system including: a directory acquisition module for acquiring a CFB document and a hidden information processing instruction; parsing the CFB document to obtain a directory structure in the CFB document; traversing the directory structure to search for a target directory of an OLE attribute structure according to a name; an information embedding module for traversing the attribute items of all attribute groups in the target directory when the hidden information processing instruction is an embed hidden information instruction, determining the target attribute item based on an attribute identifier in the attribute item, and ending the traversal; updating the content of the attribute value in the target attribute item to the hidden information corresponding to the embed hidden information instruction; an information extraction module for traversing the attribute items of all attribute groups in the target directory when the hidden information processing instruction is an extract hidden information instruction to obtain an attribute item containing hidden information; and reading and returning the hidden information.

[0014] Furthermore, the information embedding module includes a hidden information acquisition unit for acquiring initial hidden information; after encoding the initial hidden information, a preset specific prefix and / or suffix is ​​added to the encoded hidden information to obtain final hidden information.

[0015] In a third aspect, the present application provides a non-volatile computer storage medium having computer instructions stored thereon, which, when executed, implement any of the above-mentioned methods for processing hidden information based on CFB documents.

[0016] Those skilled in the art will appreciate that this application has at least the following beneficial effects: This application proposes a hidden information processing method, system, and medium based on CFB documents. This application can embed encoded hidden information in common CFB documents (such as documents with extensions like wps, et, dsp, doc, xls, and ppt). The embedded hidden information is embedded in a target directory of an OLE property structure, i.e., a binary property stream, without modifying the underlying text. Modifying the underlying text does not affect the hidden information. Furthermore, this application identifies the target property item based on the property identifier within the property item. Because a series of target property items exist (e.g., PIDSI_KEYWORDS (0x00000005)), the target property item remains unchanged even after changing the file format. This addresses the difficulty of adapting existing solutions, which require changing the application software's opening method after changing the file format. Furthermore, this application utilizes the parseable OLE property structures common to common office documents in CFB documents (e.g., directories named \005SummaryInformation and \005DocumentSummaryInformation) to encode the hidden information and insert it into the attribute value within the OLE property structure. This does not destroy the format of the CFB document. The office editing software will parse and read the embedded information as an attribute string, and write it synchronously when saving or editing. The office editing software will not display this attribute to users who view it (after embedding hidden information, ordinary users cannot view it through ordinary office editing software). This solves the problems of complex extraction methods, poor extraction accuracy, unsuitability for more official documents, and easy destruction of hidden content. In addition, hidden information of more than 2000 bytes can be embedded by embedding attribute values, which solves the problem of small amount of information embedded in existing solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Some embodiments of the present disclosure are described below with reference to the accompanying drawings, in which: Figure 1 This is a schematic diagram of the structure of a CFB file provided in an embodiment of the present application; Figure 2 This is a flow chart of a hidden information processing method based on CFB documents provided in an embodiment of the present application; Figure 3 This is a schematic diagram of the internal structure of a hidden information processing system based on CFB documents provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] It should be understood by those skilled in the art that the embodiments described below are merely preferred embodiments of the present disclosure and do not imply that the present disclosure can only be implemented through these preferred embodiments. These preferred embodiments are merely intended to explain the technical principles of the present disclosure and are not intended to limit the scope of protection of the present disclosure. Based on the preferred embodiments provided by the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present disclosure.

[0019] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0020] A CFB document, short for "Compound File Binary," is a file format used to organize and store complex data structures. CFB files organize data into a series of storage blocks, which can contain various types of data, such as document content, objects, and metadata. The CFB document format is commonly used for Microsoft Office and WPS documents (such as .doc, .xls, .ppt, .wps, .et, .dsp, and vsd).

[0021] The technical solutions proposed in the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0022] The embodiment of the present application provides a method for processing hidden information based on CFB documents, such as Figure 1 and Figure 2 As shown, the method provided in the embodiment of the present application mainly includes the following steps: Step 110: Obtain the CFB document and the hidden information processing instruction; parse the CFB document to obtain the directory structure in the CFB document; traverse the directory structure and search for the target directory of the OLE property structure according to the name.

[0023] It should be noted that if Figure 1As shown in the figure, the structure of the CFB document contains many directories, some of which are OLE property structures. The directories of the OLE property structure contain many property groups. Each property group contains several property items. Each property item contains a property identifier and a property value. Some property identifiers are defined for office documents, and some can be customized. The property values ​​can contain encoded hidden information.

[0024] In this step, the directory structure is traversed to find the target directory of the OLE property structure according to the name, which can be: Traverse the directory structure and obtain the names of each directory under the directory structure; determine the directory with the preset name as the target directory.

[0025] It should be noted that the preset name is the name of the OLE property structure. For example, the preset name includes but is not limited to: \005SummaryInformation and \005DocumentSummaryInformation. In addition, those skilled in the art can add preset names based on the name of the actual OLE property structure.

[0026] Step 120: When the hidden information processing instruction is an embedded hidden information instruction, traverse the attribute items of all attribute groups in the target directory, determine the target attribute item based on the attribute identifier in the attribute item, and end the traversal; update the content of the attribute value in the target attribute item to the hidden information corresponding to the embedded hidden information instruction.

[0027] In this step, the attribute items of all attribute groups in the target directory are traversed, and the target attribute item is determined based on the attribute identifier in the attribute item, specifically including: Traverse the attribute items of all attribute groups in the target directory, and when the attribute identifier in the current attribute item is the preset identifier, determine the current attribute item as the target attribute item; when the attribute identifier in the non-existent attribute item is the preset identifier, add a new attribute item as the target attribute item, and the attribute identifier in the newly added attribute item is the preset identifier.

[0028] It should be noted that the preset identifiers may be PIDSI_TITLE (0x00000002), PIDSI_KEYWORDS (0x00000005), or PIDSI_TEMPLATE (0x00000007). Furthermore, those skilled in the art may determine the specific content of the preset identifiers based on actual needs. Furthermore, when an existing attribute item has a preset identifier, the hidden information is updated. When a new attribute item is added as a target attribute item, the empty content of the target attribute item's attribute value is updated with the hidden information in an appended manner.

[0029] In addition, the present application can encode the hidden information and mark it with prefixes and suffixes to facilitate locating the specific location of the hidden information. The specific process can be: Before updating the content of the attribute value in the target attribute item to the hidden information corresponding to the embedded hidden information instruction, initial hidden information is obtained; after encoding the initial hidden information, a preset specific prefix and / or suffix is ​​added to the encoded hidden information to obtain the final hidden information.

[0030] It should be noted that the encoding process can be BASE64 (Base64 Encoding), HEX (Hexadecimal) encoding, SM4 (Symmetric Key Block Cipher 4 Commercial Cryptographic Algorithm 4), SM2 (Symmetric Key Block Cipher 2 Commercial Cryptographic Algorithm 2), or any other feasible encoding method. The preset specific prefix and suffix can be CFBLABEL or ZFLABEL, or any other feasible identifier. When only the prefix is ​​present, the hidden information is all information after the prefix; when only the suffix is ​​present, the hidden information is all information before the suffix. Those skilled in the art can pre-configure prefix and suffix extraction rules based on actual needs, and automatically apply them when triggering information extraction or embedding.

[0031] Step 130: When the hidden information processing instruction is a hidden information extraction instruction, traverse the attribute items of all attribute groups in the target directory to obtain the attribute items containing hidden information; read and return the hidden information.

[0032] In the step, the attribute items of all attribute groups in the target directory are traversed to obtain the attribute items containing hidden information, which can be specifically: Traverse the attribute items of all attribute groups in the target directory, obtain the attribute item whose attribute identifier is the preset identifier, and read the embedded content from the attribute value of the attribute item according to the preset specific prefix and / or suffix (if embedded, only the prefix is ​​identified, here the embedded content is read from the attribute value of the attribute item according to the preset specific prefix; if embedded, only the suffix is ​​identified, here the embedded content is read from the attribute value of the attribute item according to the preset specific suffix; if embedded, the preset specific prefix and suffix are identified, here the embedded content is read from the attribute value of the attribute item according to the preset specific prefix and suffix).

[0033] When there is no embedded content in the attribute value, continue to read the next attribute item; when there is embedded content in the attribute value, decode the embedded content; when decoding fails, determine that the current embedded content is not hidden information, and continue to read the next attribute item; when decoding succeeds, determine that the decoded current embedded content is hidden information, and end the traversal.

[0034] It should be noted that the decoding method here is consistent with the encryption method for embedding hidden information.

[0035] besides, Figure 3 The embodiment of the present application provides a hidden information processing system based on CFB documents. Figure 3 As shown, the system provided in the embodiment of the present application mainly includes: The directory acquisition module 210 is used to acquire the CFB document and the hidden information processing instruction; parse the CFB document to obtain the directory structure in the CFB document; traverse the directory structure and search for the target directory of the OLE property structure according to the name.

[0036] It should be noted that the directory acquisition module 210 is a device or apparatus that can acquire documents and instructions, and can search for a target directory of an OLE property structure from a CFB document.

[0037] The information embedding module 220 is used to traverse the attribute items of all attribute groups in the target directory when the hidden information processing instruction is an embed hidden information instruction, determine the target attribute item based on the attribute identifier in the attribute item, and end the traversal; and update the content of the attribute value in the target attribute item to the hidden information corresponding to the embed hidden information instruction.

[0038] It should be noted that the information embedding module 220 is a device or apparatus capable of updating the content of the attribute value in the target attribute item to the hidden information corresponding to the embedded hidden information instruction.

[0039] In addition, the present application can encode the hidden information and mark it with prefixes and suffixes to facilitate locating the specific location of the hidden information. The specific process can be: The initial hidden information is obtained by the hidden information obtaining unit in the information embedding module 220 ; after encoding the initial hidden information, a preset specific prefix and / or suffix is ​​added to the encoded hidden information to obtain the final hidden information.

[0040] The information extraction module 230 is configured to, when the hidden information processing instruction is a hidden information extraction instruction, traverse the attribute items of all attribute groups in the target directory to obtain the attribute items containing hidden information; and read and return the hidden information.

[0041] It should be noted that the information extraction module 230 is a device or apparatus that can obtain attribute items containing hidden information, and read and return the hidden information.

[0042] In addition, an embodiment of the present application further provides a non-volatile computer storage medium on which executable instructions are stored. When the executable instructions are executed, the above-mentioned CFB document-based hidden information processing method is implemented.

[0043] Thus far, the technical solutions of the present disclosure have been described in conjunction with the foregoing multiple embodiments. However, it is easy for those skilled in the art to understand that the scope of protection of the present disclosure is not limited to these specific embodiments. Without departing from the technical principles of the present disclosure, those skilled in the art may split and combine the technical solutions in the above-mentioned various embodiments, and may also make equivalent changes or replacements to the relevant technical features. Any changes, equivalent replacements, improvements, etc. made within the technical concepts and / or technical principles of the present disclosure will fall within the scope of protection of the present disclosure.

Claims

1. A hidden information processing method based on CFB documents, It is characterized in that The method comprises: Get CFB documents and hidden information processing instructions; Parse the CFB document and obtain the directory structure in the CFB document; Traverse the directory structure and find the target directory of the OLE attribute structure according to the name; When the hidden information processing instruction is an embedded hidden information instruction, traverse the attribute items of all attribute groups in the target directory, determine the target attribute item based on the attribute identifier in the attribute item, and end the traversal; update the content of the attribute value in the target attribute item to the hidden information corresponding to the embedded hidden information instruction; When the hidden information processing instruction is an instruction for extracting hidden information, the attribute items of all attribute groups in the target directory are traversed to obtain the attribute items containing hidden information; the hidden information is read and returned.

2. The method for processing hidden information based on CFB documents according to claim 1, It is characterized in that Traverse the directory structure and find the target directory of the OLE property structure by name, including: Traverse the directory structure and obtain the names of each directory under the directory structure; Determine that the directory with the preset name is the target directory; The preset names include at least: \005SummaryInformation and \005DocumentSummaryInformation.

3. The hidden information processing method based on CFB document according to claim 1, It is characterized in that Traverse the attribute items of all attribute groups in the target directory and determine the target attribute item based on the attribute identifier in the attribute item, including: Traversing the attribute items of all attribute groups in the target directory, and when the attribute identifier in the current attribute item is a preset identifier, determining the current attribute item as the target attribute item; When the attribute identifier in the non-existent attribute item is the preset identifier, a new attribute item is added as the target attribute item, and the attribute identifier in the newly added attribute item is the preset identifier.

4. The method for processing hidden information based on CFB documents according to claim 3, It is characterized in that The preset identifiers are PIDSI_TITLE (0x00000002), PIDSI_KEYWORDS (0x00000005), and PIDSI_TEMPLATE (0x00000007).

5. The method for processing hidden information based on CFB documents according to claim 1, It is characterized in that Before updating the content of the attribute value in the target attribute item to the hidden information corresponding to the embedding hidden information instruction, the method further includes: Get initial hidden information; After the initial hidden information is encoded, a preset specific prefix and / or suffix is ​​added to the encoded hidden information to obtain the final hidden information.

6. The method for processing hidden information based on CFB documents according to claim 5, It is characterized in that The encoding process is BASE64 encoding process, HEX encoding process, SM4 encoding process or SM2 encoding process; The default specific prefix and suffix are CFBLABEL or ZFLABEL.

7. The hidden information processing method based on CFB document according to claim 5, It is characterized in that Traverse the attribute items of all attribute groups in the target directory to obtain the attribute items containing hidden information, including: Traversing the attribute items of all attribute groups in the target directory, obtaining the attribute item whose attribute identifier is the preset identifier, and reading the embedded content from the attribute value of the attribute item according to the preset specific prefix and / or suffix; When there is no embedded content in the attribute value, continue reading the next attribute item; When there is embedded content in the attribute value, the embedded content is decoded; When decoding fails, it is determined that the current embedded content is not hidden information, and the next attribute item is read; When the decoding is successful, the decoded current embedded content is determined to be hidden information, and the traversal ends.

8. A hidden information processing system based on CFB documents, It is characterized in that The system comprises: The acquisition module is used to obtain CFB documents and hidden information processing instructions; Get module, used to parse CFB document and get the directory structure in CFB document; The search module is used to traverse the directory structure and find the target directory of the OLE attribute structure according to the name; The embedding module is used for traversing the attribute items of all attribute groups in the target directory when the hidden information processing instruction is an embed hidden information instruction, determining the target attribute item based on the attribute identifier in the attribute item, and ending the traversal; updating the content of the attribute value in the target attribute item to the hidden information corresponding to the embed hidden information instruction; The extraction module is used for traversing the attribute items of all attribute groups in the target directory to obtain the attribute items containing the hidden information when the hidden information processing instruction is an instruction to extract the hidden information; and reading and returning the hidden information.

9. The hidden information processing system based on CFB documents according to claim 8, It is characterized in that The embedding module includes a hidden information acquisition unit, Used to obtain initial hidden information; after encoding the initial hidden information, a preset specific prefix and / or suffix is ​​added to the encoded hidden information to obtain the final hidden information.

10. A non-volatile computer storage medium, It is characterized in that Computer instructions are stored thereon, and when the computer instructions are executed, the method for processing hidden information based on a CFB document as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • File encryption method

    CN101819618A

  • File hiding method and device

    CN111913915A

  • Document management and operation method and system

    CN112667563A

  • Secret information hiding method, secret information extraction method and transmission system

    CN114386103A

  • Hidden information embedding and extracting method based on OOXML document

    CN114741717A