Privacy leakage detection method, electronic equipment and storage medium

Acquire multi-modal data through the eBPF program and use deep learning detection models to identify privacy leak risks of applications, solving the problems of inability to fully cover privacy leaks and high false positive rates in existing technologies, and achieving more accurate and comprehensive privacy Data Protection.

CN118747378APending Publication Date: 2024-10-08EVERSEC BEIJING TECH

Patent Information

Application Number
CN202410822594.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

Existing privacy leak detection methods cannot fully cover all possible privacy leak situations, there is a high false positive rate and the risk of being counter-detected, and it is difficult to deal with complex applications and new attack methods.

Method used

The eBPF program is used to obtain the multi-modal data of the application, including network data and kernel data, and is input into the pre-trained detection model. Potential privacy leak risks are identified through deep learning technology, and the autoencoder model is used to reduce false positives and Cover all possible privacy breach scenarios.

Benefits of technology

It effectively identifies potential comprehensive privacy leak risks, improves detection accuracy and coverage, reduces false positive rates, and can be regularly updated to respond to emerging attack methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747378A_ABST
    Figure CN118747378A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides a privacy disclosure detection method, electronic equipment and a storage medium, the method comprises the following steps: using an eBPF program to obtain initial multi-modal data of at least one application program, the initial multi-modal data comprising network data and kernel data; inputting the initial multi-modal data into a pre-trained detection model to obtain privacy disclosure parameters; and judging whether privacy leakage occurs in the application program based on the privacy leakage parameter. The privacy leakage detection is carried out by using the multi-modal data, so that all possible privacy leakage conditions are covered, the potential comprehensive privacy leakage risk is effectively identified, and the user data security is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a privacy leakage detection method, an electronic device and a storage medium. Background Art

[0002] With the development of mobile information technology, the number of users of smart terminals and the number of various applications in smart terminals have also increased rapidly. Among these applications, some applications will obtain users' private data to make profits. In order to protect the interests of users, it is even more important to pay attention to the security of information and the protection of private data. It is crucial to detect the leakage of user privacy data.

[0003] In the related art, the methods for detecting privacy leakage behaviors mainly include: static analysis and dynamic analysis. Among them, static analysis is to check the application without running it. Potential privacy leakage problems are discovered by analyzing the source code or compiled binary code of the application. Dynamic analysis is to monitor the behavior of the application and analyze its execution path during its operation. Dynamic analysis can capture sensitive operations that the application may perform during runtime, such as accessing user privacy data, sending data to the server, etc.

[0004] Among the above-mentioned related technologies, both static analysis and dynamic analysis can only detect common privacy issues and cannot completely cover all possible privacy leakage situations, resulting in the risk of privacy data leakage. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a privacy leakage detection method, an electronic device and a storage medium, which use multimodal data to perform privacy leakage detection, cover all possible privacy leakage situations, effectively identify potential all-round privacy leakage risks, and ensure user data security.

[0006] In a first aspect, the present application provides a privacy leakage detection method, which includes: using an extended berkeley packet filter (eBPF) program to obtain initial multimodal data of at least one application, wherein the initial multimodal data includes: network data and kernel data; inputting the initial multimodal data into a pre-trained detection model to obtain privacy leakage parameters, and judging whether a privacy leakage occurs in the application based on the privacy leakage parameters.

[0007] In the second aspect, the present application provides a privacy leakage detection device, which includes: an initial multimodal data acquisition module, which is used to use an eBPF program to obtain initial multimodal data of at least one application, wherein the initial multimodal data includes: network data and kernel data; a privacy leakage parameter determination module, which is used to input the initial multimodal data into a pre-trained detection model to obtain privacy leakage parameters; and a privacy leakage judgment module, which is used to judge whether a privacy leakage occurs in the application based on the privacy leakage parameters.

[0008] In a third aspect, the present application provides an electronic device, which may include a privacy leakage detection device, the electronic device including: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the privacy leakage detection method as described in the first aspect above.

[0009] In a fourth aspect, the present application provides a storage medium, which may include a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the privacy leakage detection method in the first aspect described above is implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the privacy leakage detection method as described in any one of the above-mentioned first aspects is implemented.

[0011] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages:

[0012] The embodiment of the present application provides a privacy leakage detection method, electronic device and storage medium, the method comprising: using an eBPF program to obtain initial multimodal data of at least one application, wherein the initial multimodal data comprises: network data and kernel data; inputting the initial multimodal data into a pre-trained detection model to obtain privacy leakage parameters; and judging whether a privacy leakage occurs in the application based on the privacy leakage parameters. Because privacy leakage detection using multimodal data covers all possible privacy leakage situations, it effectively identifies potential all-round privacy leakage risks and ensures user data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 A flowchart of a privacy leakage detection method provided in an embodiment of the present application;

[0016] Figure 2 Provide a location diagram of the eBPF program in the system for the embodiment of the present application;

[0017] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0019] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.

[0020] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0021] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0023] With the development of mobile information technology, the number of users of smart terminals and the number of various applications in smart terminals have also increased rapidly. Among these applications, some applications will obtain users' private data to make profits. In order to protect the interests of users, it is even more important to pay attention to the security of information and the protection of private data. It is crucial to detect the leakage of user privacy data.

[0024] In the related technologies, the methods for detecting privacy leakage behaviors mainly include:

[0025] Static analysis: Static analysis is to check the application without running it. Static analysis methods analyze the source code or compiled binary code of the application to find potential privacy leaks. They can detect problems such as hard-coded sensitive information, insecure file storage, and insecure network communications.

[0026] Dynamic analysis: Dynamic analysis monitors the behavior of an application and analyzes its execution path while it is running. Dynamic analysis can capture sensitive operations that an application may perform while it is running, such as accessing user privacy data, sending data to a server, etc. It can also detect whether an application has unusual behavior, such as requesting high permissions for no apparent reason.

[0027] Data flow analysis: Data flow analysis focuses on the flow of data within an application and between external resources. By tracing the flow path of data, you can determine whether the application handles user data in an unsafe manner. This approach helps to discover data leakage points and potential privacy issues in the application.

[0028] Fuzz testing: Fuzz testing is a method of testing the robustness and security of an application by inputting incorrect, unusual, or unexpected data into it. Through fuzz testing, it is possible to detect whether there are loopholes in the way the application handles input data, which may lead to privacy leaks;

[0029] Manual review: Manual review is a method of detecting potential privacy issues by manually analyzing the application's code, permission requests, third-party library usage, etc. Although this method may be time-consuming and labor-intensive, it can discover some problems that automated tools cannot capture, such as privacy leakage risks hidden in complex logic.

[0030] However, the disadvantages of the above privacy leakage detection methods are mainly the following aspects:

[0031] 1. Anti-detection technologies such as various encryption interfaces and shells in applications make static analysis difficult.

[0032] 2. Software that monitors application behavior runs on the Android system and will be counter-detected, limiting the use of dynamic analysis.

[0033] 3. High false positive rate: Some automated detection tools may generate false positives, that is, mistakenly identifying legitimate behavior as privacy leakage issues, which may cause developers to spend time and resources to investigate and fix problems that do not exist.

[0034] 4. The above privacy leakage detection methods can detect many common privacy issues, but they still cannot fully cover all possible privacy leakage situations. Especially for some complex applications or new privacy attack methods, the above privacy leakage detection methods may have limitations.

[0035] 5. As applications and attack techniques continue to evolve, existing privacy detection methods may become outdated. Therefore, these methods need to be regularly updated and improved to address emerging privacy leakage risks.

[0036] In order to solve at least one or more of the above problems, an embodiment of the present application provides a privacy leakage detection method, which includes: using an eBPF program to obtain initial multimodal data of at least one application, wherein the initial multimodal data includes: network data and kernel data; inputting the initial multimodal data into a pre-trained detection model to obtain privacy leakage parameters; and judging whether the application has privacy leakage based on the privacy leakage parameters. Because privacy leakage detection using multimodal data covers all possible privacy leakage situations, it effectively identifies potential all-round privacy leakage risks and ensures user data security.

[0037] Using eBPF technology, the network data of the application can be captured non-invasively without being intercepted by anti-detection. The data type obtained includes network information such as source IP, destination IP, port number, protocol type, load, etc.; kernel information such as thread number, process number, function name, function parameters, stack information, etc. can also be obtained, and the data granularity is very fine.

[0038] Using deep learning technology, an autoencoder model is designed. It is an unsupervised deep learning model with powerful feature learning capabilities. Fine-grained data generated by data captured by the eBPF program is used for training. After training, abnormal traffic that does not conform to the normal traffic pattern can be accurately identified. Abnormal traffic is privacy-leaking traffic, reducing false positives. New traffic data is regularly collected to update the autoencoder model to cope with ever-changing attacks.

[0039] By simulating multiple modal data such as user interaction and network communication, all possible situations are covered.

[0040] The privacy leakage detection method provided by the present application is described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0041] Figure 1 This is a flowchart of a privacy leakage detection method in an embodiment of the present application. This embodiment can be applied to detecting whether an application leaks user privacy data. The method can be executed by a privacy leakage detection device. The privacy leakage detection device can be implemented in software and / or hardware. The privacy leakage detection device can be configured in an electronic device.

[0042] The privacy leakage detection is applied to electronic devices installed with various applications to detect whether each application has leaked user privacy data.

[0043] like Figure 1 As shown, the privacy leakage detection method provided in the embodiment of the present application mainly includes steps S101-S103.

[0044] S101. Obtain initial multimodal data of at least one application program using an eBPF program, wherein the initial multimodal data includes: network data and kernel data.

[0045] Among them, eBPF (Extended Berkeley Packet Filter) is a technology originally designed for network traffic filtering. However, over time, eBPF has evolved into a powerful and general program framework that allows users to run custom code at the kernel level without changing the kernel source code.

[0046] Multimodal fusion technology is a technology that integrates and utilizes information from different sensors, devices or data sources. In this technology, by combining data in various modes (such as images, text, sound, etc.), problems can be understood or analyzed more comprehensively, thereby improving the accuracy and efficiency of decision-making. This technology is widely used in the field of artificial intelligence, such as self-driving cars, smart voice assistants, image and video analysis, etc.

[0047] In the embodiments of the present application, multimodal data refers to a data set that combines multiple different types of data sources or data types. Initial multimodal data can be understood as various types of unprocessed or simply cleaned and normalized multimodal data obtained using the eBPF program.

[0048] Furthermore, the initial multimodal data is mainly divided into two categories: network data and kernel data, where network data mainly refers to the relevant data in the data packet captured by the eBPF program, and kernel data mainly refers to the relevant data of the kernel layer obtained by the eBPF program.

[0049] Application (Application, App), full name application software, refers to a software program designed for a specific purpose, usually used on smartphones, tablets, computers or other electronic devices. App can perform various tasks and provide different services and functions to meet the needs of users. Each application has its corresponding initial multimodal data. For each application installed in the electronic device, the eBPF program can obtain the initial multimodal data corresponding to each application.

[0050] In one possible implementation, using an eBPF program to obtain initial multimodal data of at least one application includes: mounting the eBPF program on a specified function; and using the eBPF program to obtain initial multimodal data of the application during the process of at least one application running the specified function.

[0051] The above-mentioned designated function may include functions and events. The designated function may be set by the staff according to the actual situation during the process of writing the eBPF program code, and is not specifically limited in the embodiments of the present application. Optionally, the above-mentioned designated function may include a kprobe function and / or a tracepoint function.

[0052] Kprobe is a function that allows the interception (probe) of kernel function execution. It enables developers to execute custom code when a kernel function is called. Tracepoint function is a function used to track and monitor kernel dynamics. Unlike kprobe, tracepoint function is a tracking point reserved during kernel development. Tracepoint function is designed to allow user space programs to obtain kernel events and status information without modifying kernel code.

[0053] In one possible implementation, the eBPF program is mounted on the kprobe function and / or the tracepoint function to monitor and track the kernel function. Specifically, the eBPF program can be hooked by means of the kprobe function and / or the tracepoint function, and the eBPF program can access the parameters and return values ​​of the kprobe function and / or the tracepoint function. The eBPF map is a special data structure that allows the eBPF program to share data between the kernel space and the user space. Mappings can be used to store, retrieve, and manipulate data. The eBPF program can access certain kernel variables, especially those exposed through the BPF API. The eBPF program can capture and analyze logs and events generated by the kernel, such as reading kernel memory through tracepoint or kprobe; through specific BPF auxiliary functions, the eBPF program can safely read specific data in the kernel memory. In the network subsystem, the eBPF program can access the contents of data packets passing through the network stack.

[0054] In one possible implementation, the eBPF program runs at the kernel layer, and the eBPF program is used to obtain the initial multimodal data of the application, including: using the eBPF program to obtain the initial multimodal data of the application at the kernel layer; and using the eBPF program to obtain the initial multimodal data of the application at the user layer.

[0055] like Figure 2 As shown, the eBPF program runs in the kernel layer, and the app in the Android system runs in the user layer. The app cannot perform anti-detection on the kernel layer, so that privacy leakage detection can circumvent the anti-detection technology in the app and improve the accuracy of privacy leakage detection.

[0056] The eBPF program is hung on the kprobe function and / or tracepoint function at the kernel layer, so that the eBPF program can obtain the initial multimodal data of the application at the kernel layer. In addition, the map function in the eBPF program is used to capture the initial multimodal data of the app at the user layer.

[0057] eBPF map is a powerful kernel data structure that acts as a bridge for data exchange between kernel space and user space. In the Android system, eBPF map can be used to capture and analyze user-level data.

[0058] In the related art, tcpdump and wireshark are usually used for packet capture and analysis. The above-mentioned packet capture tools can perform packet capture and filtering analysis based on the network port, but cannot be refined to the internal information of the program generating traffic, such as which function generated the traffic. The eBPF program provided in the embodiment of the present application can not only obtain which function generated the traffic flow, but also match the thread number, program name and program context information corresponding to the function, which can accurately determine the thread and function information triggered by the app program, with finer granularity, thereby making privacy leakage detection more accurate.

[0059] Furthermore, since the eBPF program usually captures some raw data, such as skb data, sock data, thread information, function information, etc., in order to facilitate the input of subsequent models, the raw data captured by the eBPF program needs to be preprocessed to obtain initial multimodal data. The above preprocessing mainly includes data cleaning and normalization.

[0060] Data cleaning mainly includes cleaning skb data and sock data, ensuring the consistency of data format, deleting abnormal values ​​or incomplete data, cleaning thread and function information, processing duplicate or unreliable information, and ensuring data quality.

[0061] Normalization mainly includes normalizing skb data and sock data to ensure the consistency of scale between different data, such as converting IP addresses into numeric types, standardizing packet lengths, etc. Normalization also includes normalizing thread and function information, which may require converting string type information into numeric types or encoding.

[0062] After the raw data obtained by the eBPF program is cleaned and normalized, it is input into the pre-trained detection model as initial multimodal data, so that the detection model can detect whether there is privacy data leakage in the initial multimodal data.

[0063] S102: Input the initial multimodal data into a pre-trained detection model to obtain privacy leakage parameters.

[0064] The privacy leakage parameter is an evaluation indicator that characterizes whether privacy data leakage occurs.

[0065] The initial multimodal data is input into a pre-trained detection model, and the detection model is used to reconstruct the initial multimodal data to obtain reconstructed multimodal data. The degree of difference between the reconstructed multimodal data and the initial multimodal data is compared to identify potential privacy leakage risks or abnormal behaviors. Furthermore, a correspondence between the degree of difference and the privacy leakage parameter is established in advance, and based on the degree of difference between the reconstructed multimodal data and the initial multimodal data, a query is performed in the correspondence between the degree of difference and the privacy leakage parameter to obtain the privacy leakage parameter corresponding to the initial multimodal data. In addition, the degree of difference between the reconstructed multimodal data and the initial multimodal data can also be directly used as the privacy leakage parameter corresponding to the initial multimodal data.

[0066] The above-mentioned detection model includes: an encoder, a decoder and an error unit. After the initial multimodal data is input into the detection model, the feature representation of the initial multimodal data is obtained through the encoder part. Use the source IP address, destination IP address, protocol type, etc. Then, the extracted feature representation is input into the decoder, and the decoder decodes the feature representation into the initial multimodal data, that is, the reconstructed multimodal data of the model is obtained. For example: the user privacy data in the initial multimodal data, the privacy data pattern is inconsistent with the normal data pattern. Since the detection model is trained using normal data during the training process, the user privacy data cannot accurately reconstruct the initial multimodal data after the detection model performs data reconstruction, that is, the difference between the reconstructed multimodal data and the initial multimodal data is very large.

[0067] Finally, the error unit is used to calculate the difference between the input data and the model reconstruction data. The reconstruction error is usually used as a measure of the privacy leakage parameter. If the reconstruction error exceeds a pre-defined threshold, it can be considered that the data packet is abnormal.

[0068] In a possible implementation, since the input of the detection model is multimodal data, the detection model includes multiple branch networks. That is, the number of modalities of the data is consistent with the number of branch networks. In other words, each modality of data has its corresponding branch network.

[0069] The initial multimodal data is input into a pre-trained detection model to obtain privacy leakage parameters, including: for the initial data of each modality, the initial data of the modality is input into the corresponding branch network to obtain the detection parameters corresponding to the initial data; the privacy leakage parameters are determined based on the detection parameters corresponding to the initial data of each modality.

[0070] For example, if the initial multimodal data includes network data and kernel data, then the detection model also includes two branch networks. One branch network is used to reconstruct the network data and obtain the difference between the reconstructed data and the network data as the detection parameter. The other branch network is used to reconstruct the kernel data and obtain the difference between the reconstructed data and the kernel data as the detection parameter. The detection parameters output by the two branch networks are weighted averaged to obtain the final privacy leakage parameter.

[0071] In one possible implementation, initial data of the modality is input into a corresponding branch network to obtain detection parameters corresponding to the initial data, including: inputting the initial data of the modality into a corresponding branch network; reconstructing the initial data using the branch network to obtain reconstructed data; determining the degree of difference between the reconstructed data and the initial data using the branch network; and determining the detection parameters corresponding to the initial data based on the degree of difference.

[0072] On the basis of the above embodiments, the embodiments of the present application divide the data captured by the eBPF program into more fine-grained parts. The network data includes at least one of the following: data flow data, network behavior data, and the kernel data includes at least one of the following: function call data, security policy data, and abnormal behavior data; wherein the data flow data includes at least one of the following: source Internet Protocol IP address, destination IP address, protocol type between source IP address and destination IP address, and port number; the network behavior data includes at least one of the following: server identifier communicating with the application, and communication protocol between the application and its corresponding server; the function call data includes at least one of the following: function call chain, name of each function in the call chain, parameters of each function in the call chain, and return value, process number, and thread number of each function in the call chain; the security policy data includes at least one of the following: user access rights, whether there is unauthorized access; the abnormal behavior data includes at least one of the following: data transmission volume is greater than the set transmission threshold, and file operation frequency is greater than the set operation threshold.

[0073] Correspondingly, the detection model also includes 5 branch networks. Specifically, for each modal data, the modal data is input into the corresponding branch network to obtain the detection parameters corresponding to the modal data, including: inputting the data flow data into the first branch network in the detection model to obtain the first detection parameter; inputting the network behavior data into the second branch network in the detection model to obtain the second detection parameter; inputting the function call data into the third branch network in the detection model to obtain the third detection parameter; inputting the security policy data into the fourth branch network in the detection model to obtain the fourth detection parameter; inputting the abnormal behavior data into the fifth branch network in the detection model to obtain the fifth detection parameter.

[0074] Furthermore, the detection model includes an input layer, a branch encoding layer, a merging layer and a decoder. The input layer is used to receive five input data, corresponding to five types of pre-processed data of the branch sub-networks, namely data flow data, network behavior data, function call data, security policy data, and abnormal behavior data.

[0075] The branch encoder consists of five independent neural network branches, each of which processes a type of detection data and encodes the data into a low-dimensional latent representation. The merging layer merges the five latent representations into a global latent representation, which can be achieved by weighted averaging, concatenation, or other fusion methods. The decoder consists of a single neural network that receives the global latent representation and decodes it to obtain the original five data modal forms. For each data modality, the degree of difference between the reconstructed data and the initial data is calculated and used as the detection parameter of each branch network.

[0076] It should be noted that each branch network has an independent branch encoder, and each branch network shares a merging layer and a decoder, which can decode 5 data modal forms.

[0077] In deep learning, hidden representation refers to the output of the hidden layers in a neural network. These layers do not directly correspond to the input or output, but are used to learn abstract features of the data. For example, in an image classification task, the hidden layers may learn features such as edges, colors, and textures.

[0078] The first branch network is mainly used to analyze data flow data. By monitoring the network data packets sent by the application, the obtained skb structure information can be used to analyze the source IP, destination IP, port number, protocol type, etc. of the data packet, and check whether it contains sensitive information of the user. For example, monitor whether unencrypted user credentials, personal identity information, and other data are sent to external servers.

[0079] The second branch network is mainly used to monitor the network behavior of applications, including which servers they communicate with, which protocols they use, etc. The network activity patterns of applications can be used to determine whether there is a risk of privacy leakage. For example, whether the application sends the user's location information to the advertising server.

[0080] The third branch network is mainly used to monitor the function call chain of the application, including key function calls such as process creation, file operations, and network communications. By monitoring function parameters and return values, possible privacy leakage behaviors of the application can be identified. For example, it can detect whether there are applications that store sensitive user information in files.

[0081] The fourth branch network is used to monitor whether the security policy of the application meets expectations. For example, it checks whether the application accesses the user's sensitive data according to the expected permissions and whether there is any unauthorized access.

[0082] The fifth branch network is used to monitor abnormal behaviors of applications, such as sudden large amounts of data transfer, frequent file operations, etc. These abnormal behaviors may indicate that the application is leaking privacy.

[0083] Among them, the loss function of the detection model usually selects the mean square error (MSE) or cross entropy loss to measure the difference between the reconstructed multimodal data and the initial multimodal data. The training method of the detection model can use the back propagation algorithm to optimize the loss function through gradient descent and adjust the model parameters.

[0084] The loss function is a function used to measure the difference between the model's prediction and the true value. For example, Mean Squared Error (MSE) and Cross-Entropy Loss are common loss functions.

[0085] Mean Squared Error (MSE): Commonly used in regression problems, it calculates the average of the squares of the differences between the model's predicted values ​​and the true values.

[0086] Cross entropy loss: Commonly used in classification problems, it measures the difference between the probability distribution predicted by the model and the true label. For example, in a binary classification problem, if the true label is 1 and the model predicts a probability of 0.8, then the cross entropy loss will be -log(0.8).

[0087] The following is a brief introduction to the training process of the detection model.

[0088] The preprocessed dataset is divided into a training set and a validation set. The detection model is trained using the training set. In each iteration, a batch of 5 types of initial data is input into the detection model, and the model parameters are updated to minimize the loss function. The model performance is evaluated on the validation set, such as reconstruction error, recall rate, precision and other indicators. When the performance of the detection model on the validation set no longer improves (converges) or reaches the preset number of training rounds, stop training.

[0089] Reconstruction error, recall rate, and precision are all indicators for evaluating model performance. In unsupervised learning, such as autoencoders, reconstruction error measures the model's ability to reconstruct input data. It is usually calculated using MSE. In classification problems, recall rate is the proportion of true positive samples (correctly identified positive samples) to all positive samples. For example, if the model identifies 90 of 100 virus samples, but 10 are missed, then the recall rate is 90 / 100=0.9. Precision is the proportion of correctly identified positive samples to all samples identified as positive. In the above example, if the model identifies a total of 110 samples as viruses (including 90 correct and 20 false positives), then the precision is 90 / 110≈0.818.

[0090] In order to adapt to the ever-changing network environment and APP traffic patterns, the detection model provided in the embodiment of the present application can regularly collect new multimodal data for updating the autoencoder model. In addition, other machine learning algorithms can also be introduced to optimize anomaly detection performance and improve the accuracy and adaptability of the platform.

[0091] S103: Determine whether privacy leakage occurs in the application based on the privacy leakage parameter.

[0092] In one possible implementation, determining whether a privacy leakage occurs in an application based on a privacy leakage parameter includes: determining whether the privacy leakage parameter exceeds a set threshold; if the privacy leakage parameter exceeds the set threshold, determining that a privacy leakage occurs in the application; if the privacy leakage parameter does not exceed the set threshold, determining that no privacy leakage occurs in the application.

[0093] Furthermore, when the privacy leakage parameter is greater than the set threshold, it indicates that privacy data leakage has occurred. At this time, it is necessary to record information related to the privacy leakage, such as: the source of the abnormal traffic, the purpose of the abnormal traffic, the timestamp, etc., in order to further analyze which interface of the application has leaked the user's privacy data.

[0094] Furthermore, a security policy may be pre-set, and when the privacy leakage parameter is greater than the set threshold, the response measures corresponding to the security policy are executed. The response measures include: isolating the source of abnormal traffic, notifying the administrator, etc.

[0095] The embodiment of the present application provides a privacy leakage detection method, which includes: using an eBPF program to obtain initial multimodal data of at least one application, wherein the initial multimodal data includes: network data and kernel data; inputting the initial multimodal data into a pre-trained detection model to obtain privacy leakage parameters; and judging whether the application has privacy leakage based on the privacy leakage parameters. Because privacy leakage detection is performed using multimodal data, all possible privacy leakages are covered. The eBPF program can be attached to various kernel events, such as system calls, network events, or kernel timers. When these events occur, the relevant eBPF program is triggered to execute. During execution, the data structure in the kernel is accessed to obtain relevant data, such as network data packets, system call parameters, and kernel logs. This information can be used to determine key information such as threads, functions, and parameters of the app, providing a broader perspective for the model to analyze and improve accuracy.

[0096] Figure 3 is a schematic diagram of the structure of an electronic device provided in this embodiment. The electronic device may include a privacy leakage detection device, such as Figure 3 As shown, the electronic device 300 includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of the processor 310 in the electronic device can be one or more. Figure 3 A processor 310 is taken as an example; the processor 310, the memory 320, the input device 330 and the output device 340 in the electronic device can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0097] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the privacy leakage detection method in the embodiment of the present invention. The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 320, that is, implements the privacy leakage detection method provided in the embodiment of the present invention.

[0098] The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0099] The input device 330 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device, and may include a keyboard, a mouse, etc. The output device 340 may include a display device such as a display screen.

[0100] This embodiment also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to implement the privacy leakage detection method provided in the embodiment of the present invention.

[0101] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the operations of the method described above, but can also execute related operations in the privacy leakage detection method provided by any embodiment of the present invention.

[0102] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0103] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0104] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A privacy leakage detection method, characterized in that: The method comprises: Obtaining initial multimodal data of at least one application using an extensible packet filter (eBPF) program, wherein the initial multimodal data includes: network data and kernel data; Inputting the initial multimodal data into a pre-trained detection model to obtain a privacy leakage parameter; Whether privacy leakage occurs in the application is determined based on the privacy leakage parameter.

2. The method according to claim 1, characterized in that The obtaining of initial multimodal data of at least one application using an eBPF program includes: Mount the eBPF program on a specified function; In the process of at least one of the applications running the specified function, the eBPF program is used to obtain initial multimodal data of the application.

3. The method according to claim 2, characterized in that The eBPF program runs at the kernel layer, and using the eBPF program to obtain the initial multimodal data of the application program includes: Using the eBPF program to obtain initial multimodal data of the application at the kernel layer; and, The eBPF program is used to obtain initial multimodal data of the application program at the user layer.

4. The method according to any one of claims 1, characterized in that The network data includes at least one of the following: data flow data, network behavior data, and the kernel data includes at least one of the following: function call data, security policy data, abnormal behavior data; The data stream data includes at least one of the following: a source Internet Protocol IP address, a destination IP address, a protocol type between the source IP address and the destination IP address, and a port number; The network behavior data includes at least one of the following: an identification of a server communicating with the application, a communication protocol between the application and its corresponding server; The function call data includes at least one of the following: a function call chain, the name of each function in the call chain, the parameter of each function in the call chain, and the return value, process number, and thread number of each function in the call chain; The security policy data includes at least one of the following: user access rights, whether there is unauthorized access; The abnormal behavior data includes at least one of the following: a data transmission volume greater than a set transmission threshold, and a file operation frequency greater than a set operation threshold.

5. The method according to claim 4, characterized in that The detection model includes multiple branch networks. The step of inputting the initial multimodal data into a pre-trained detection model to obtain a privacy leakage parameter includes: For each modality of initial data, the initial data of the modality is input into the corresponding branch network to obtain the detection parameters corresponding to the initial data; The privacy leakage parameters are determined based on the detection parameters corresponding to the initial data of each modality.

6. The method according to claim 5, characterized in that For each modal data, the modal data is input into the corresponding branch network to obtain the detection parameters corresponding to the modal data, including: Inputting the data stream data into a first branch network in the detection model to obtain a first detection parameter; Inputting the network behavior data into the second branch network in the detection model to obtain a second detection parameter; Inputting the function call data into a third branch network in the detection model to obtain a third detection parameter; Inputting the security policy data into a fourth branch network in the detection model to obtain a fourth detection parameter; The abnormal behavior data is input into a fifth branch network in the detection model to obtain a fifth detection parameter.

7. The method according to claim 5, characterized in that The step of inputting the initial data of the modality into the corresponding branch network to obtain the detection parameters corresponding to the initial data includes: Inputting the initial data of the modality into the corresponding branch network; Reconstructing the initial data using the branch network to obtain reconstructed data; Determining the degree of difference between the reconstructed data and the initial data using the branch network; A detection parameter corresponding to the initial data is determined based on the difference degree.

8. The method according to any one of claims 1 to 7, characterized in that: The determining whether privacy leakage occurs in the application based on the privacy leakage parameter includes: Determining whether the privacy leakage parameter exceeds a set threshold; If the privacy leakage parameter exceeds the set threshold, it is determined that the application has privacy leakage; If the privacy leakage parameter does not exceed the set threshold, it is determined that no privacy leakage occurs in the application.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the privacy leakage detection method as described in any one of claims 1 to 8.

10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the privacy leakage detection method as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method and device for detecting privacy leakage of mobile terminal

    CN105939359A

  • Application multidimensional privacy leak detection method and system for iOS platform

    CN106845236A

  • An Android privacy disclosure behavior detection method and technology based on information flow

    CN109145603A

  • Face recognition method and device for protecting user privacy

    CN111310734A

  • Method and device for processing model parameters in federated learning process and related equipment

    CN112765559A

Cited By

  • Data leakage disposal method and device, storage medium and electronic equipment

    CN119442224A

  • A data leakage handling method and device, a storage medium and an electronic device

    CN119442224B