File leakage detection method and device

The file leakage detection method uses file path and fingerprint analysis to accurately identify protected files, reducing false alarms and improving security by dynamically maintaining protected files.

JP7572109B2Active Publication Date: 2024-10-23DOUYIN VISION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023575345
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-11-29
Filing Date
2022-10-27
Publication Date
2024-10-23
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

Existing file leakage detection methods face challenges in accurately identifying file leaks due to reliance on specified keywords, leading to either false negatives or false positives, which compromises the security of corporate files.

Method used

A file leakage detection method that utilizes both file path and fingerprint analysis to determine if a file belongs to a designated library, dynamically maintaining protected files, by extracting the file path and performing a mapping process to obtain a unique fingerprint, and comparing it against an index information library.

Benefits of technology

This approach reduces false negatives and false positives, enhancing the accuracy of file leakage detection and improving the efficiency of identifying and preventing unauthorized file access or transfer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007572109000002
    Figure 0007572109000002
  • Figure 0007572109000003
    Figure 0007572109000003
  • Figure 0007572109000004
    Figure 0007572109000004
Patent Text Reader

Abstract

The present disclosure provides a file leakage detection method and device, which relates to the field of data security technology. The method includes: acquiring a file operation event on a terminal device, the file operation event being an event for performing a specified operation on a target file; extracting a file path of a target file related to the file operation event from the file operation event; searching file content of the target file based on the file path, and performing a mapping process on the file content of the target file to obtain a file fingerprint of the target file, the file fingerprint uniquely identifying the file content of the target file; determining whether the target file belongs to a specified file library for dynamically maintaining business files that need to be protected based on the file path and the file fingerprint; and determining that a file leakage in the specified file library is occurring if the target file belongs to the specified file library.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application claims priority to Chinese Patent Application No. 202111434476.2, entitled "File Leakage Detection Method and Apparatus," filed on November 29, 2021, the entire contents of which are incorporated herein by reference.

[0002] [Technical field] The present disclosure relates to the field of data security technology, and in particular to a method and apparatus for detecting file leakage. [Background technology]

[0003] Corporate files, including project source codes, profiles, document comments and other related files, are one of the core assets of a company. However, corporate files face various risks of leakage, such as theft by external attackers, uploading of codes to external platforms due to lack of care by internal employees, and copying by employees who have left the company. Therefore, it is very important to immediately detect and prevent leakage of corporate files to protect the core business and data security of a company. Summary of the Invention

[0004] The technical solutions according to the embodiments of the present disclosure are as follows:

[0005] According to a first aspect, an embodiment of the present disclosure includes:

[0006] Obtaining a file operation event on a terminal device, the file operation event being an event for performing a specified operation on a target file;

[0007] extracting, from the file operation event, a file path of a target file related to the file operation event;

[0008] searching file content of the target file based on the file path, and mapping the file content of the target file to obtain a file fingerprint of the target file, wherein the file fingerprint uniquely identifies the file content of the target file;

[0009] Determining whether the target file belongs to a designated file library based on the file path and the file fingerprint, the designated file library being used to dynamically maintain business files that need to be protected;

[0010] and determining that a file leak in the specified file library is in the process of occurring if the target file belongs to the specified file library.

[0011] In one alternative embodiment of the present disclosure, the step of determining whether the target file belongs to a specified file library based on the file path and the file fingerprint includes:

[0012] determining whether the file path is included in an index information library, the index information library storing a file path and a file fingerprint of at least one file in the specified file library;

[0013] determining that the target file belongs to the specified file library if the index information library contains the file path;

[0014] if the index information library does not contain the file path, determining whether the index information library contains the file fingerprint;

[0015] determining that the target file belongs to the specified file library if the index information library contains the file fingerprint.

[0016] In one alternative embodiment of the present disclosure, if the index information library does not contain the file fingerprint, the method further comprises:

[0017] determining whether the target file is from a pre-defined file hosting platform based on whether the file path includes a pre-defined field;

[0018] If the target file is from the pre-configured file hosting platform, determining a first file library that is a file warehouse of a project to which the target file belongs;

[0019] determining whether the first file library belongs to the specified file library;

[0020] The method further includes determining that the target file belongs to the designated file library if the first file library belongs to the designated file library.

[0021] In one alternative embodiment of the present disclosure, if it is determined that the first file library does not belong to the specified file library, the method further comprises:

[0022] determining whether a sibling file is from the preset file hosting platform based on whether a sibling path includes the preset field, the sibling path being a path of a sibling file whose parent file is the same as a parent file of the target file;

[0023] If the sibling file is from the pre-configured file hosting platform, determining a second file library which is a file warehouse of a project to which the sibling file belongs;

[0024] determining whether the second file library belongs to the specified file library;

[0025] The method further includes determining that the target file belongs to the designated file library if the second file library belongs to the designated file library.

[0026] In one alternative embodiment of the present disclosure, if it is determined that the second file library does not belong to the specified file library, the method further comprises:

[0027] determining whether at least one level of a parent file is from the predetermined file hosting platform based on whether a parent path includes the predetermined field, the parent path being a path of a parent file of the target file;

[0028] If any one of the parent files is from the preset file hosting platform, determining a third file library that is a file warehouse of a project to which the parent file from the preset file hosting platform belongs;

[0029] determining whether the third file library belongs to the specified file library;

[0030] If a third file library belongs to the designated file library, determining that the target file belongs to the designated file library.

[0031] In one alternative embodiment of the present disclosure, the method includes:

[0032] If it is determined that the target file belongs to the designated file library, the method further includes adding the file path and the file fingerprint to the index information library.

[0033] In one alternative embodiment of the present disclosure, before determining whether the target file belongs to a specified file library based on the file path and the file fingerprint, the method further comprises:

[0034] receiving at least one file library address transmitted from a server;

[0035] and determining the designated file library based on the at least one file library address.

[0036] In one alternative embodiment of the present disclosure, the method includes:

[0037] The method further includes, when it is determined that a file leak in the specified file library is in the process of occurring, sending alert information to a server to indicate that a file leak in the specified file library is in the process of occurring.

[0038] In one alternative embodiment of the present disclosure, the method includes:

[0039] The method further includes transmitting attribute information of the file operation event to a server when it is determined that a file leak in the specified file library is occurring;

[0040] Here, the attribute information of the file operation event includes at least one of identifier information of the terminal device, identifier information of the target file, and account information logged in to the terminal device.

[0041] In one alternative embodiment of the present disclosure, the method includes:

[0042] The method further includes preventing execution of the file manipulation event if it is determined that a file leak in the specified file library is occurring.

[0043] According to a second aspect, an embodiment of the present disclosure includes:

[0044] A detection unit for obtaining a file operation event on a terminal device, the file operation event being an event for performing a specified operation on a target file;

[0045] an extraction unit for extracting from the file operation event a file path of a target file related to the file operation event;

[0046] an obtaining unit for searching file content of the target file according to the file path, and performing a mapping process on the file content of the target file to obtain a file fingerprint of the target file, the file fingerprint uniquely identifying the file content of the target file;

[0047] a determining unit for determining whether the target file belongs to a designated file library according to the file path and the file fingerprint, the designated file library being used for dynamically maintaining business files that need to be protected;

[0048] and a processing unit for determining that a file leak in the specified file library is in the process of occurring if the target file belongs to the specified file library.

[0049] As an optional embodiment of the present disclosure, the determination unit is specifically used to determine whether the file path is included in an index information library, and if the file path is included in the index information library, determine that the target file belongs to the specified file library; if the file path is not included in the index information library, determine whether the file fingerprint is included in the index information library, and if the file fingerprint is included in the index information library, determine that the target file belongs to the specified file library.

[0050] Here, the index information library stores a file path and a file fingerprint of at least one file in the specified file library.

[0051] As an optional embodiment of the present disclosure, the determination unit is further used to determine whether the target file is from a pre-configured file hosting platform based on whether the file path includes a pre-configured field when the index information library does not include the file fingerprint, and if the target file is from the pre-configured file hosting platform, determine a first file library which is a file warehouse of the project to which the target file belongs, determine whether the first file library belongs to the designated file library, and if the first file library belongs to the designated file library, determine that the target file belongs to the designated file library.

[0052] As an optional embodiment of the embodiment of the present disclosure, the determination unit is further used to determine whether a same-level file is from the predetermined file hosting platform based on whether a same-level path includes the predetermined field when it is determined that the first file library does not belong to the designated file library, and if the same-level path is a path of a same-level file whose parent file is the same as the target file and the same-level file is from the predetermined file hosting platform, determine a second file library which is a file warehouse of the project to which the same-level file belongs, determine whether the second file library belongs to the designated file library, and if the second file library belongs to the designated file library, determine that the target file belongs to the designated file library.

[0053] As an alternative embodiment of the present disclosure, the determination unit is further used to determine whether at least one level of parent file is from the preset file hosting platform based on whether a parent path includes the preset field when it is determined that the second file library does not belong to the designated file library, and if the parent path is a path of a parent file of the target file and any one level of parent file is from the preset file hosting platform, determine a third file library which is a file warehouse of a project to which a parent file from the preset file hosting platform belongs, determine whether the third file library belongs to the designated file library, and if the third file library belongs to the designated file library, determine that the target file belongs to the designated file library.

[0054] As one optional embodiment of the present disclosure, the determination unit is further used for adding the file path and the file fingerprint to the index information library when it is determined that the target file belongs to the specified file library.

[0055] As one optional embodiment of the embodiment of the present disclosure, the determination unit is further used to receive at least one file library address sent from a server, and determine the designated file library based on the at least one file library address, before determining whether the target file belongs to the designated file library based on the file path, the file fingerprint, and the index information library.

[0056] As one optional embodiment of the embodiment of the present disclosure, the processing unit is further used for, when it is determined that a file leak in the specified file library is in the process of occurring, sending alert information to a server to indicate that a file leak in the specified file library is in the process of occurring.

[0057] As an optional embodiment of the embodiment of the present disclosure, the processing unit is further adapted to send attribute information of the file operation event to a server when it is determined that a file leak in the specified file library is occurring; Here, the attribute information of the file operation event includes at least one of identifier information of the terminal device, identifier information of the target file, and account information logged in to the terminal device.

[0058] As an alternative embodiment of the present disclosure, the processing unit is further adapted to prevent the execution of the file operation event if it is determined that the target file belongs to the specified file library.

[0059] According to a third aspect, an embodiment of the present disclosure provides an electronic device including a memory and a processor, wherein the memory is adapted to store a computer program, and the processor, upon invoking the computer program, is adapted to cause the electronic device to realize a file leakage detection method described in the first aspect or any one of the selective embodiments of the first aspect.

[0060] According to a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer readable storage medium, the computer readable storage medium having a computer program, when executed by a processor, that causes the processor to implement a file leakage detection method described in the first aspect or any one of the optional embodiments of the first aspect.

[0061] According to a fifth aspect, an embodiment of the present disclosure provides a computer program product that, when run on a computer, causes the computer to implement a file leakage detection method described in the first aspect or any one of the optional embodiments of the first aspect.

[0062] According to a sixth aspect, an embodiment of the present disclosure provides a computer program, the computer program being configured to cause a processor to implement the file leakage detection method according to the first aspect or any one of the alternative embodiments of the first aspect when the computer program is executed by the processor. [Brief description of the drawings]

[0063] The drawings herein, which are incorporated in and constitute a part of this specification, illustrate preferred embodiments of the present disclosure and, together with the specification, serve to explain the principles of the present disclosure.

[0064] In order to more clearly describe the technical solutions in the embodiments or related technologies of the present disclosure, the following briefly introduces the drawings that need to be used in the description of the embodiments or related technologies. Those skilled in the art can also obtain other drawings based on these drawings without any creative effort.

[0065] [Figure 1] FIG. 2 is a scenario architecture diagram of a file leakage detection method according to an embodiment of the present disclosure.

[0066] [Diagram 2] 1 is a step flowchart of a file leakage detection method according to an embodiment of the present disclosure.

[0067] [Diagram 3] 2 is a second step flowchart of a file leakage detection method according to an embodiment of the present disclosure.

[0068] [Figure 4] 11 is a third step flowchart of a file leakage detection method according to an embodiment of the present disclosure.

[0069] [Diagram 5] 4 is a fourth step flowchart of a file leakage detection method according to an embodiment of the present disclosure.

[0070] [Figure 6] 5 is a fifth step flowchart of a file leakage detection method according to an embodiment of the present disclosure.

[0071] [Figure 7] 6 is a sixth step flowchart of a file leakage detection method according to an embodiment of the present disclosure.

[0072] [Figure 8] 7 is a seventh step flowchart of a file leakage detection method according to an embodiment of the present disclosure.

[0073] [Figure 9] 8 is a flowchart showing the steps of a file leakage detection method according to an embodiment of the present disclosure.

[0074] [Figure 10] 1 is a schematic diagram of a file leakage detection device according to an embodiment of the present disclosure.

[0075] [Figure 11] FIG. 2 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0076] In order to make the above objectives, features and advantages of the present disclosure more clearly understandable, the present disclosure will be further described below. It should be noted that, if there is no conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0077] In order to fully understand the present disclosure, numerous details are specifically set forth in the following description; however, the present disclosure may be embodied in forms different from those described herein, and it is to be understood that the embodiments in the specification are merely some embodiments of the present disclosure, and not all embodiments.

[0078] It should be explained that, in order to clearly describe the technical solutions of the embodiments of the present disclosure, the embodiments of the present disclosure employ expressions such as "first", "second", etc. to distinguish between equivalent or similar items having essentially the same functions and actions, but as can be understood by those skilled in the art, the expressions such as "first", "second", etc. do not limit the quantity and execution order, for example, the first feature image set and the second feature image set are merely intended to distinguish between different feature image sets, and are not intended to limit the order of the feature image sets, etc.

[0079] In the embodiments of the present disclosure, terms such as "exemplary" or "for example" are used to denote an example, illustration, or explanation. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present disclosure should not be construed as being preferred or advantageous over other embodiments or design solutions. Rather, the use of terms such as "exemplary" or "for example" is intended to present the relevant concept in a concrete manner. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more than two.

[0080] A commonly used file leakage detection method in the related art is to recognize whether a file is a privacy file by detecting whether the file contains a specified keyword, and to determine whether a file leakage is occurring. However, in the process of recognizing whether a file is a privacy file based on whether the file contains a specified keyword, if the range of the specified keyword is too small, a report will be missed and the leakage of the privacy file will not be detected, while if the range of the specified keyword is too large, a false report will occur, affecting the execution of normal file operation events.

[0081] The file leakage detection method according to the embodiment of the present disclosure includes: firstly, acquiring a file operation event, which is an event of performing a specified operation on a target file on a terminal device, and extracting a file path of a target file related to the file operation event from the file operation event, searching for file content of the target file based on the file path, and performing mapping processing on the file content of the target file to obtain a file fingerprint of the target file, and finally, determining whether the target file belongs to a specified file library for dynamically maintaining business files that need to be protected based on the file path and the file fingerprint, and determining that a file leakage in the specified file library is occurring if the target file belongs to the specified file library. Compared with detecting file leakage by a specified keyword, the file leakage detection method according to the embodiment of the present disclosure can determine whether a file belongs to a specified file library based on two dimensions of the file path and the file fingerprint of the file, so that the embodiment of the present disclosure can reduce missed detections and false positives in the process of detecting whether a file belongs to a specified file library, and further improve the accuracy of file leakage detection.

[0082] In the following, a scenario architecture of a file leakage detection method according to an embodiment of the present disclosure will first be described.

[0083] Referring to FIG. 1, a scenario architecture of a file leakage detection method according to an embodiment of the present disclosure includes: a server 11 and a terminal device 12 .

[0084] Here, the server 11 includes a privacy file management module 111 and a communication module 112. The privacy file management module 111 exposes an application program interface (API) to the outside. The administrator can use the API exposed to the outside of the privacy file management module 111 to arrange a file library address, such as a Git project address or an SVN project address, that contains a file that the administrator does not want to disclose to the outside, and can also perform operations such as adding, deleting, and modifying the arranged file library address. The communication module 112 is used to transmit the file library address arranged by the administrator to the terminal device 11, and to receive information such as alert information of a file leak in a specified file library reported by the terminal device 11, and attribute information of an operation event that leaks a file in a specified file library.

[0085] The terminal device 12 includes an event monitoring module 121, a file search module 122, an index information library 123, a file library recognition module 124, and a communication module 125. The event monitoring module 121 performs detection on all process events on the terminal device, and determines whether each process event is an operation event that may cause the leakage of a file in a specified file library, such as file external transmission and file copy, and when an event is determined to be an event that may cause the leakage of a file in a specified file library, it is used to send related information of this operation event to the file search module 122, so as to further determine whether the file in the specified file library is being leaked. The file search module 122 obtains the file path and file fingerprint of the target file operated by the operation event that may cause the leakage of a file in the specified file library, and determines whether the target file is a file in the specified file library based on the path and hash value stored in the index information library 123, and when it is determined that the target file is a file in the specified file library, it determines that the file in the specified file library is being leaked. When the file search module 122 determines that the index information library 123 does not contain the file path and file fingerprint of the target file, the file library recognition module 124 further determines whether the file at the same level of the target file and the file warehouse of the project to which the parent file belongs belong to the designated file library, and if the file at the same level of the target file or the file warehouse of the project to which the parent file belongs belong to the designated file library, it determines that a file leak in the designated file library is occurring, and is used to add the file path and file fingerprint of the target file to the index information library 123.The communication module 125 is used to receive a file library address sent from the server 11, and to send information such as alert information and attribute information of file operation events to the server 11.

[0086] Based on the above, an embodiment of the present disclosure provides a file leakage detection method for a terminal device. Referring to FIG. 2, the file leakage detection method according to the embodiment of the present disclosure includes the following steps.

[0087] S21: Acquire a file operation event on the terminal device.

[0088] Here, the file operation event is an event that executes a specified operation on a target file.

[0089] The specified operations in the embodiment of the present disclosure may include each file operation that may cause the leakage of a file in the specified file library. Exemplarily, the specified operations may include an operation of copying a file, an event of uploading a file to a network platform, an operation of sending a file to an external network, etc.

[0090] The files in the embodiments of the present disclosure may be any type of file, for example, the files may include source code, documents, profiles, images, video files, audio files, compilation products, etc.

[0091] Optionally, the terminal device may detect in real time whether each operation event on the terminal device is an operation event related to a file, and when it is determined that a certain operation event is an operation event related to a file, it further determines whether the operation related to this operation event is a specified operation, and when it is determined that the operation related to this operation event is a specified operation, it determines that this operation event is a file operation event in an embodiment of the present disclosure.

[0092] S22: Extracting a file path of a target file related to the file operation event from the file operation event.

[0093] Specifically, the file path of the target file is the memory route that is passed through when reading the target file. For example, when reading a file named "First Draft", if the memory route that needs to be passed through sequentially includes the system C drive, Users folder, zhangsan folder, Desktop folder, and KP2116216.4 folder, the file path of this file is C:\Users\zhangsan\Desktop\KP2116216.4\First Draft.

[0094] S23, searching for file content of the target file according to the file path, and performing mapping processing on the file content of the target file to obtain a file fingerprint of the target file.

[0095] Here, the file fingerprint uniquely identifies the file content of the target file.

[0096] Optionally, the file fingerprint of the target file may be a hash value of the target file.

[0097] That is, firstly, the target file is read based on the file path of the target file, and then the file content of the target file is mapped to obtain the file fingerprint of the target file.

[0098] S24, determining whether the target file belongs to a specified file library based on the file path and the file fingerprint.

[0099] Here, the specified file library is used to dynamically maintain business files that need to be protected.

[0100] In the embodiment of the present disclosure, the business files that need to be protected refer to files that do not want to be leaked. The business files that need to be protected may include files such as enterprise source code, documents, profiles, images, video files, audio files, compilation products, etc. The designated file library is used to dynamically maintain the business files that need to be protected, which means that the business files that need to be protected can be dynamically managed by dynamically adding, modifying, and deleting files in the designated file library.

[0101] As an optional embodiment of the present disclosure, the above step S24 (determining whether the target file belongs to a specified file library based on the file path and the file fingerprint) can be

[0102] determining whether the file path and the file fingerprint are included in an index information library, the index information library storing a file path and a file fingerprint of at least one file in the specified file library;

[0103] determining that the target file belongs to a specified file library if the file path and / or the file fingerprint is included in an index information library.

[0104] Optionally, the index information library may store the path and fingerprint of a file in a specified file library according to the scheme shown in Table 1 below. Table 1 [Table 1]

[0105] As shown in Table 1, the index information library may be a key-value database, storing the file name as the key and the file path and fingerprint as the value.

[0106] Optionally, the implementation manner of determining whether the target file belongs to a specified file library according to the file path, the file fingerprint, and the index information library is:

[0107] The method may include traversing file paths and file fingerprints in the index database, and determining that a target file belongs to a specified file library if the index database contains the file path and / or the file fingerprint, and determining that the target file does not belong to a specified file library if the index database does not contain the file path or the file fingerprint.

[0108] It should be noted that the file path in the embodiment of the present disclosure refers to the full path of the file, that is, the file path includes the name of the file, so determining whether the target file belongs to a specified file library based on the file path, the file fingerprint, and the index information library may be understood as determining whether the target file belongs to a specified file library based on the name of the target file, the file path, the file fingerprint, and the index information library.

[0109] As an optional embodiment of the embodiment of the present disclosure, before the above step S24 (determining whether the target file belongs to the specified file library based on the file path and the file fingerprint), the file leakage detection method according to the embodiment of the present disclosure includes:

[0110] receiving at least one file library address transmitted from a server;

[0111] determining the designated file library based on the at least one file library address.

[0112] That is, the terminal device must first obtain from the server which file library the files in which should be prevented from leaking are located. A specific method of obtaining this information is to receive the file library address sent from the server and determine the file identified by each file library address as the designated file library.

[0113] If it is determined in step S24 above that the target file belongs to the specified file library, the following step S25 is executed.

[0114] S25, it is determined that a file leak in the specified file library is occurring.

[0115] The file leakage detection method according to the embodiment of the present disclosure includes: firstly, acquiring a file operation event, which is an event of performing a specified operation on a target file on a terminal device, and extracting a file path of a target file related to the file operation event from the file operation event, searching for file content of the target file based on the file path, and performing mapping processing on the file content of the target file to obtain a file fingerprint of the target file, and finally, determining whether the target file belongs to a specified file library for dynamically maintaining business files that need to be protected based on the file path and the file fingerprint, and determining that a file leakage in the specified file library is occurring if the target file belongs to the specified file library. Compared with detecting file leakage by a specified keyword, the file leakage detection method according to the embodiment of the present disclosure can determine whether a file belongs to a specified file library based on two dimensions of the file path and the file fingerprint of the file, so that the embodiment of the present disclosure can reduce missed detections and false positives in the process of detecting whether a file belongs to a specified file library, and further improve the accuracy rate of file leakage detection.

[0116] As an alternative embodiment of the present disclosure, based on the embodiment shown in FIG. 2, and referring to FIG. 3, one implementation form of the above step S24 (determining whether the target file belongs to a specified file library based on the file path and the file fingerprint) includes the following steps S31 to S34.

[0117] S31, determining whether the file path is included in an index information library.

[0118] Here, the index information library stores a file path and a file fingerprint of at least one file in the specified file library.

[0119] Specifically, the index information library may determine whether a file path is included in the index information library by traversing each file path stored in the index information library and determining whether the index information library contains a file path that is exactly the same as the file path.

[0120] If it is determined in step S31 that the file path is included in the index information library, the following step S32 is executed.

[0121] S32, determining that the target file belongs to a specified file library.

[0122] If it is determined in step S31 above that the file path is not included in the index information library, the following step S33 is executed.

[0123] S33, determining whether the file fingerprint is included in an index information library.

[0124] Similarly, it may be determined whether the index information library contains a file fingerprint by traversing each file fingerprint stored in the index information library and determining whether there is a file fingerprint in the index information library that is exactly the same as the file fingerprint.

[0125] If it is determined in step S33 above that the file fingerprint is included in the index information library, the following step S34 is executed.

[0126] S34, determining that the target file belongs to the specified file library.

[0127] On the other hand, if the index information library does not contain the file path, the above embodiment further determines whether the index information library contains the file fingerprint, and if the index information library contains the file fingerprint, determines that the target file belongs to the designated file library. Therefore, the above embodiment can avoid the file leaking by first copying the file in the designated file library to another storage location (where the file path changes) and then copying or external transmission, and further improve the security of the file in the designated file library.

[0128] On the other hand, the embodiment of the present disclosure first detects whether the file path belongs to the search database, and directly determines whether the file path belongs to the search database when the file path belongs to the search database, and does not further determine whether the file fingerprint belongs to the search database, so that the embodiment can reduce the amount of data processing during file searching and further improve the efficiency of data file leakage detection.

[0129] As an optional embodiment of the embodiment of the present disclosure, based on the embodiment shown in FIG. 3, and referring to FIG. 4, when the index information library does not include the file fingerprint, the file leakage detection method according to the embodiment of the present disclosure further includes the following steps S41 to S44.

[0130] S41, determining whether the target file is from a preset file hosting platform based on whether the file path includes a preset field.

[0131] Illustratively, the pre-populated fields may include .git and .svn.

[0132] Specifically, enterprises often upload files to their internal file hosting platforms according to the needs of research and development, operation and maintenance, etc., and when these files need to be used, they can be directly retrieved from the internal file hosting platform, and the path of the file retrieved from the file hosting platform will have the corresponding field written in. For example, if code is hosted on a git platform or an svn platform, the path of the code retrieved from the git platform or the svn platform will have the field .git or .svn.

[0133] Specifically, determining whether the target file is from a preset file hosting platform based on whether the file path includes a preset field includes:

[0134] determining that the target file belongs to a preset file hosting platform if the file path includes the preset field;

[0135] determining that the target file does not belong to a preset file hosting platform if the file path does not include the preset field.

[0136] In the above step S41, if it is determined that the target file is from the pre-configured file hosting platform, the following step S42 is executed.

[0137] S42, a first file library is determined.

[0138] Here, the first file library is a file warehouse of a project to which the target file belongs.

[0139] Specifically, when the preset field is .git, the first warehouse can be determined by parsing the .git directory to obtain the file warehouse address of the project to which the target file belongs, and when the preset field is .svn, the first warehouse can be determined by parsing the .svn directory to obtain the file warehouse address of the project to which the target file belongs.

[0140] S43, determining whether the first file library belongs to the designated file library.

[0141] Specifically, by checking whether the address of the first file library belongs to the address of the designated file library, it can be determined whether the first file library belongs to the designated file library.

[0142] If it is determined in step S43 that the first file library belongs to the specified file library, the following step S44 is executed.

[0143] S44, determining that the target file belongs to the specified file library.

[0144] In the above embodiment, when the index information library does not include the file fingerprint, it further determines whether the target file is from a preset file hosting platform based on whether the file path includes a preset field, and if the target file is from the preset file hosting platform, obtains a file warehouse of the project to which the target file belongs, determines whether the file warehouse of the project to which the target file belongs belongs to a designated file library, and if the file warehouse of the project to which the target file belongs belongs to the designated file library, determines that the target file belongs to the designated file library. Therefore, the above embodiment can prevent confidential files in the designated file library from being uploaded to the file hosting platform and then downloaded from the file hosting platform to leak confidential files, and can more comprehensively detect the file leak behavior in the designated file library.

[0145] As one alternative embodiment of the embodiment of the present disclosure, a file leakage detection method according to the embodiment of the present disclosure includes:

[0146] The method further includes adding the file path and the file fingerprint to the index information library if the first file library is determined to belong to the designated file library.

[0147] Once it is determined that the target file belongs to the designated file library, the file path and the file fingerprint are added to the index information library, so that the file leakage behavior in the designated file library can be easily detected later directly based on the index information library, and the efficiency of file leakage detection is further improved.

[0148] As one optional embodiment of the embodiment of the present disclosure, based on the embodiment shown in FIG. 4, and referring to FIG. 5, when it is determined that the first file library does not belong to the specified file library, the file leakage detection method according to the embodiment of the present disclosure further includes the following steps S51 to S54.

[0149] S51, determining whether the file at the same level is from a preset file hosting platform based on whether the path at the same level includes a preset field.

[0150] Here, the path of the same layer is the path of a file of the same layer whose parent file is the same as the target file.

[0151] For example, if the file "first draft" is a target file in an embodiment of the present disclosure, and the file path of the file "first draft" is C:\Users\zhangsan\Desktop\KP2116216.4\first draft, in this case, the parent file of the file "first draft" is KP2116216.4, and if there is also a file with the file name "second draft" under the parent file KP2116216.4 of the file "first draft", then the file "second draft" is a file at the same level as the file "first draft", and the path of the file "second draft", C:\Users\zhangsan\Desktop\KP2116216.4\second draft, is a path at the same level in an embodiment of the present disclosure.

[0152] If it is determined in step S51 that the file in the same hierarchy is from the pre-configured file hosting platform, the following step S52 is executed.

[0153] S52, a second file library is determined.

[0154] Here, the second file library is a file warehouse for the project to which the file at the same hierarchical level belongs.

[0155] S53, determining whether the second file library belongs to the specified file library.

[0156] If it is determined in step S53 that the second file library belongs to the specified file library, the following step S54 is executed.

[0157] S54, determining that the target file belongs to the specified file library.

[0158] In the above embodiment, when it is determined that the first file library does not belong to the designated file library, it further determines whether the file at the same level is from the predetermined file hosting platform according to whether the path at the same level includes the predetermined field, and if the file at the same level is from the predetermined file hosting platform, it obtains the file warehouse of the project to which the file at the same level belongs, and determines whether the file warehouse of the project to which the file at the same level belongs belongs to the designated file library, and if the file warehouse of the project to which the file at the same level belongs belongs to the designated file library, it determines that the target file belongs to the designated file library. Therefore, the above embodiment can further detect the leakage behavior of files in the designated file library more comprehensively.

[0159] As one alternative embodiment of the embodiment of the present disclosure, a file leakage detection method according to the embodiment of the present disclosure includes:

[0160] The method further includes adding the file path and the file fingerprint to the index information library if the second file library is determined to belong to the designated file library.

[0161] Once it is determined that the second file library belongs to the designated file library, the file path and the file fingerprint are added to the index information library, so that the file leakage behavior in the designated file library can be easily detected later directly based on the index information library, and the efficiency of file leakage detection is further improved.

[0162] As one alternative embodiment of the embodiment of the present disclosure, based on the embodiment shown in FIG. 5, and referring to FIG. 6, when it is determined that the second file library does not belong to the specified file library, the file leakage detection method according to the embodiment of the present disclosure further includes the following steps S61 to S64.

[0163] S61, determining whether at least one level of a parent file is from the preset file hosting platform according to whether a parent path includes the preset field.

[0164] Here, the parent path is the path of the parent file of the target file.

[0165] For example, the parent path of at least one level may be three levels, i.e., directories are sequentially searched up to the top three levels.

[0166] In the above step S61, if any one of the parent files in one hierarchy is from the preset file hosting platform, the following step S62 is executed.

[0167] S62, determining a third file library.

[0168] Here, the third file library is a file warehouse of a project to which a parent file from the pre-configured file hosting platform belongs.

[0169] S63, determining whether the third file library belongs to the specified file library.

[0170] If it is determined in step S63 that the third file library belongs to the specified file library, the following step S64 is executed.

[0171] S64, determining that the target file belongs to the specified file library.

[0172] In the above embodiment, when it is determined that the second file library does not belong to the designated file library, it further determines whether at least one parent path contains a preset field, and if any one parent path contains a preset field, it obtains the file warehouse of the project to which the parent file belongs corresponding to the parent path of the hierarchy, and determines whether the file warehouse of the project to which the parent file belongs belongs to the designated file library, and if the file warehouse of the project to which the parent file belongs belongs to the designated file library, it determines that the target file belongs to the designated file library. Therefore, the above embodiment can more comprehensively detect the file leakage behavior in the designated file library.

[0173] As one alternative embodiment of the embodiment of the present disclosure, a file leakage detection method according to the embodiment of the present disclosure includes:

[0174] The method further includes adding the file path and the file fingerprint to the index information library if it is determined that the third file library belongs to the designated file library.

[0175] Once it is determined that the third file library belongs to the designated file library, the file path and the file fingerprint are added to the index information library, so that the file leakage behavior in the designated file library can be easily detected later directly based on the index information library, and the efficiency of file leakage detection is further improved.

[0176] As one optional embodiment of the embodiment of the present disclosure, based on the embodiment shown in FIG. 1 and referring to FIG. 7, when it is determined that a file leak in the specified file library is occurring, the file leak detection method according to the embodiment of the present disclosure further includes:

[0177] S71, the alert information is transmitted to the server.

[0178] Here, the alert information is used to indicate that a file leak in the specified file library is occurring.

[0179] When it is discovered that a file leak in a specified file library is in progress, alert information is immediately sent to the server, allowing an information security officer to immediately stop the leaking behavior.

[0180] As one optional embodiment of the embodiment of the present disclosure, based on the embodiment shown in FIG. 1 and referring to FIG. 8, when it is determined that a file leak in the specified file library is occurring, the file leak detection method according to the embodiment of the present disclosure further includes:

[0181] S81: Attribute information of the file operation event is transmitted to a server.

[0182] Here, the attribute information of the file operation event includes at least one of identifier information of the terminal device, identifier information of the target file, and account information logged in to the terminal device.

[0183] In the above embodiment, when it is discovered that a file leak in a specified file library is occurring, identifier information of the terminal device, identifier information of the target file, and account information logged in to the terminal device are sent to the server, so that the above embodiment can easily trace the responsibility for the leaking behavior.

[0184] As one optional embodiment of the embodiment of the present disclosure, based on the embodiment shown in FIG. 1 and referring to FIG. 9, when it is determined that a file leak in the specified file library is occurring, the file leak detection method according to the embodiment of the present disclosure further includes:

[0185] S91, the execution of the file operation event is prevented.

[0186] In the above embodiment, when it is discovered that a file leak in a specified file library is about to occur, the execution of the file operation event is prevented, so in the above embodiment, when it is discovered that a file leak in a specified file library is about to occur, the occurrence of a file leak in a specified file library can be immediately prevented.

[0187] Based on the same inventive concept, as a realization of the above method, an embodiment of the present disclosure further provides a file leakage detection apparatus, the embodiment of the apparatus corresponds to the embodiment of the above-mentioned method, and for ease of reading, the embodiment of the apparatus omits the details of the embodiment of the above-mentioned method, but it should be understood that the file leakage detection apparatus in this embodiment can realize all the contents of the embodiment of the above-mentioned method.

[0188] An embodiment of the present disclosure provides a file leakage detection device, and FIG. 10 is a structural schematic diagram of the file leakage detection device. As shown in FIG. 10, the file leakage detection device 100 includes:

[0189] A detection unit 101 for obtaining a file operation event on a terminal device, the file operation event being an event for performing a specified operation on a target file;

[0190] an extracting unit 102 for extracting from the file operation event a file path of a target file related to the file operation event;

[0191] an acquiring unit 103 for searching file content of the target file according to the file path, and performing a mapping process on the file content of the target file to obtain a file fingerprint of the target file, where the file fingerprint uniquely identifies the file content of the target file;

[0192] a determining unit 104 for determining whether the target file belongs to a designated file library according to the file path and the file fingerprint, the designated file library being used for dynamically maintaining business files that need to be protected;

[0193] and a processing unit 105 for determining that a file leak in the designated file library is occurring if the target file belongs to the designated file library.

[0194] As an optional embodiment of the present disclosure, the determination unit 104 is specifically used to determine whether the file path is included in an index information library, and if the file path is included in the index information library, determine that the target file belongs to the designated file library; if the file path is not included in the index information library, determine whether the file fingerprint is included in the index information library, and if the file fingerprint is included in the index information library, determine that the target file belongs to the designated file library.

[0195] Here, the index information library stores a file path and a file fingerprint of at least one file in the specified file library.

[0196] As an optional embodiment of the present disclosure, the determination unit 104 is further used to determine whether the target file is from a pre-configured file hosting platform based on whether the file path includes a pre-configured field when the index information library does not include the file fingerprint, and if the target file is from the pre-configured file hosting platform, determine a first file library which is a file warehouse of the project to which the target file belongs, and determine whether the first file library belongs to the designated file library, and if the first file library belongs to the designated file library, determine that the target file belongs to the designated file library.

[0197] As an optional embodiment of the present disclosure, when it is determined that the first file library does not belong to the designated file library, the determination unit 104 further uses the same path to determine whether the same-level file is from the predetermined file hosting platform based on whether the same-level path includes the predetermined field, and if the same-level path is a path of a same-level file whose parent file is the same as the target file and the same-level file is from the predetermined file hosting platform, determines a second file library which is a file warehouse of the project to which the same-level file belongs, determines whether the second file library belongs to the designated file library, and if the second file library belongs to the designated file library, determines that the target file belongs to the designated file library.

[0198] As an optional embodiment of the present disclosure, when it is determined that the second file library does not belong to the designated file library, the determination unit 104 further determines whether at least one level of parent file is from the predetermined file hosting platform based on whether a parent path includes the predetermined field, and if the parent path is a path of a parent file of the target file and any one level of parent file is from the predetermined file hosting platform, determines a third file library which is a file warehouse of a project to which a parent file from the predetermined file hosting platform belongs, and determines whether the third file library belongs to the designated file library, and if the third file library belongs to the designated file library, determines that the target file belongs to the designated file library.

[0199] As an optional embodiment of the present disclosure, the determining unit 104 is further used for adding the file path and the file fingerprint to the index information library when it is determined that the target file belongs to the specified file library.

[0200] As an optional embodiment of the present disclosure, the determination unit 104 is further used to receive at least one file library address sent from a server, and determine the designated file library based on the at least one file library address, before determining whether the target file belongs to the designated file library based on the file path, the file fingerprint, and the index information library.

[0201] As one optional embodiment of the present disclosure, the processing unit 105 is further used for, when it is determined that a file leak in the specified file library is occurring, sending alert information to a server to indicate that a file leak in the specified file library is occurring.

[0202] As an optional embodiment of the present disclosure, the processing unit 105 is further adapted to send attribute information of the file operation event to a server when it is determined that a file in the designated file library is being leaked;

[0203] Here, the attribute information of the file operation event includes at least one of identifier information of the terminal device, identifier information of the target file, and account information logged in to the terminal device.

[0204] As an optional embodiment of the present disclosure, the processing unit 105 is further adapted to block the execution of the file operation event if it is determined that the target file belongs to the specified file library.

[0205] The file leakage detection apparatus according to this embodiment can execute the file leakage detection method according to the above-mentioned method embodiment, and the implementation principle and technical effect are similar, so they will not be described further here.

[0206] Based on the same inventive concept, the embodiment of the present disclosure further provides an electronic device. Figure 11 is a structural schematic diagram of an electronic device according to the embodiment of the present disclosure. As shown in Figure 11, the electronic device according to the embodiment includes a memory 111 and a processor 112, the memory 111 is used to store a computer program, and the processor 112 is used to execute the file leakage detection method according to the above embodiment when calling up the computer program. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers.

[0207] Based on the same inventive concept, an embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the processor realizes the file leakage detection method according to the above embodiment.

[0208] Based on the same inventive concept, an embodiment of the present disclosure further provides a computer program product, which, when the computer program product is run on a computer, causes the computer to realize the file leakage detection method according to the above embodiment.

[0209] Based on the same inventive concept, the embodiment of the present disclosure further provides a computer program, which, when executed by a processor, causes the processor to realize the file leakage detection method according to the above embodiment.

[0210] As will be appreciated by those skilled in the art, the embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Thus, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer usable storage mediums containing computer usable program code.

[0211] The processor may be a Central Processing Unit (CPU) or other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The general purpose processor may be a microprocessor, or any conventional processor, etc.

[0212] The memory may include any form of computer readable medium, such as volatile memory, random access memory (RAM) and / or non-volatile memory, such as read only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer readable medium.

[0213] Computer-readable media includes non-volatile and volatile, portable and non-portable storage media. Storage media may implement information storage in any manner or technology, and information may be computer-readable instructions, data structures, units of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only optical disk read-only memory (CD-ROM), digital versatile optical disk (DVD) or other optical memory, cassette tape, magnetic disk memory or other magnetic storage device, or any other non-transmission medium used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carriers.

[0214] Finally, it should be noted that the above embodiments are merely for illustrating the technical solutions of the present disclosure, and are not intended to limit the same. Although the present disclosure has been described in detail with reference to the above embodiments, those skilled in the art can still understand that the technical solutions described in the above embodiments can be modified or equivalently substituted for part or all of the technical features, and such modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. Obtaining a file operation event on a terminal device, the file operation event being an event for performing a specified operation on a target file; extracting, from the file operation event, a file path of a target file related to the file operation event; searching file content of the target file based on the file path, and mapping the file content of the target file to obtain a file fingerprint of the target file, wherein the file fingerprint uniquely identifies the file content of the target file; Determining whether the target file belongs to a designated file library based on the file path and the file fingerprint, the designated file library being used to dynamically maintain business files that need to be protected; and determining that a file leak in the specified file library is in the process of occurring if the target file belongs to the specified file library.

2. determining whether the target file belongs to a specified file library based on the file path and the file fingerprint, determining whether the file path is included in an index information library, the index information library storing a file path and a file fingerprint of at least one file in the specified file library; determining that the target file belongs to the specified file library if the index information library contains the file path; if the index information library does not contain the file path, determining whether the index information library contains the file fingerprint; 2. The computer-implemented method of claim 1, further comprising: determining that the target file belongs to the specified file library if the index information library contains the file fingerprint.

3. If the index information library does not contain the file fingerprint, the method further comprises: determining whether the target file is from a pre-defined file hosting platform based on whether the file path includes a pre-defined field; If the target file is from the pre-configured file hosting platform, determining a first file library that is a file warehouse of a project to which the target file belongs; determining whether the first file library belongs to the specified file library; 3. The computer-implemented method of claim 2, further comprising: if a first file library belongs to the specified file library, determining that the target file belongs to the specified file library.

4. If it is determined that the first file library does not belong to the specified file library, the method further comprises: determining whether a sibling file is from the preset file hosting platform based on whether a sibling path includes the preset field, the sibling path being a path of a sibling file whose parent file is the same as a parent file of the target file; If the sibling file is from the pre-configured file hosting platform, determining a second file library which is a file warehouse of a project to which the sibling file belongs; determining whether the second file library belongs to the specified file library; 4. The computer-implemented method of claim 3, further comprising: if a second file library belongs to the specified file library, determining that the target file belongs to the specified file library.

5. If it is determined that the second file library does not belong to the specified file library, the method further comprises: determining whether at least one level of a parent file is from the predetermined file hosting platform based on whether a parent path includes the predetermined field, the parent path being a path of a parent file of the target file; If any one of the parent files is from the preset file hosting platform, determining a third file library that is a file warehouse of a project to which the parent file from the preset file hosting platform belongs; determining whether the third file library belongs to the specified file library; 5. The computer-implemented method of claim 4, further comprising: if a third file library belongs to the specified file library, determining that the target file belongs to the specified file library.

6. 4. The computer-implemented method of claim 3, further comprising adding the file path and the file fingerprint to the index information library if the target file is determined to belong to the specified file library.

7. 2. The computer-implemented method of claim 1, further comprising, when it is determined that a file leak in the specified file library is in the process of occurring, sending alert information to a server to indicate that a file leak in the specified file library is in the process of occurring.

8. The method further includes transmitting attribute information of the file operation event to a server when it is determined that a file leak in the specified file library is occurring; A method implemented by a computer as described in claim 1, characterized in that the attribute information of the file operation event includes at least one of identifier information of the terminal device, identifier information of the target file, and account information logged in to the terminal device.

9. 2. The computer-implemented method of claim 1, further comprising: preventing execution of the file operation event if it is determined that a file leak in the specified file library is occurring.

10. A detection unit for obtaining a file operation event on a terminal device, the file operation event being an event for performing a specified operation on a target file; an extraction unit for extracting from the file operation event a file path of a target file related to the file operation event; an obtaining unit for searching file content of the target file according to the file path, and performing a mapping process on the file content of the target file to obtain a file fingerprint of the target file, the file fingerprint uniquely identifying the file content of the target file; a determining unit for determining whether the target file belongs to a designated file library according to the file path and the file fingerprint, the designated file library being used for dynamically maintaining business files that need to be protected; and a processing unit for determining that a file leak in the specified file library is in the process of occurring if the target file belongs to the specified file library.

11. An electronic device including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to cause the electronic device to realize a file leakage detection method described in any one of claims 1 to 9 when the computer program is executed.

12. A computer-readable storage medium having a computer program stored therein, the computer program causing a computing device to realize the file leakage detection method according to any one of claims 1 to 9 when executed by the computing device.

Citation Information

Patent Citations

  • Method and system for preventing information leakage

    JP2013246463A

  • Information leakage preventing device, information leakage preventing method and information leakage preventing program

    JP2018147203A

  • Systems and methods for monitoring, controlling and per-document encryption of corporate information stored on cloud computing services (ccs)

    JP2018516025A