Privacy disclosure early warning method and device, equipment and medium
By analyzing the response message and matching the privacy data type, the real-time detection of the privacy data leakage of the system during application has solved the problem that static detection cannot detect privacy leakage in real time in the existing technology, and improved the privacy protection effect and early warning accuracy.
Patent Information
- Application Number
- CN202411221924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-06
AI Technical Summary
In the prior art, privacy detection based on static methods cannot dynamically check the privacy data leakage problem of the system during application, resulting in poor privacy protection effect.
By analyzing the response message to be sent, each response data and transaction interface identifier carried in the response message is determined, and the privacy data contained in the response message is determined based on the privacy data type and response data format of the pre-saved data format, the privacy data contained in the response message is determined according to the privacy data type and response data format of the pre-saved data format. The target type of the transaction interface identifier does not contain the target type, and a privacy leakage warning will be issued.
Dynamic privacy detection of the system is realized, privacy leakage caused by the system sending messages is avoided, and privacy protection effect and early warning accuracy are improved.
Smart Images

Figure CN119094203A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a privacy leakage warning method, device, equipment and medium. Background Art
[0002] With the development of technology, the requirements for privacy protection are getting higher and higher. For existing systems and systems under development, how to effectively manage personal privacy data and prevent unintentional leakage of privacy data or data leakage due to insufficient system authority control is a difficult problem.
[0003] At present, the detection of privacy data mainly focuses on the detection of privacy data in files, including the detection of privacy data that may be involved in mobile applications or files stored in office computers. However, this privacy detection method is a static method and cannot dynamically check the privacy data leakage problem of the system during application in real time, resulting in poor privacy protection effect. Summary of the invention
[0004] The present application provides a privacy leakage warning method, device, equipment and medium to solve the problem that the existing technology uses static privacy detection methods to perform privacy detection, which cannot dynamically check the privacy data leakage of the system in real time during application, resulting in poor privacy protection effect.
[0005] The present application provides a privacy leakage warning method, the method comprising:
[0006] Parsing the response message to be sent, and determining each response data and transaction interface identifier carried in the response message;
[0007] Determine the target type of each private data included in the response message according to the type of the private data in each data format stored in advance and the data format of each response data;
[0008] If it is determined that the types of private data that the pre-saved transaction interface identifier is allowed to send do not include at least one of the target types, a privacy leakage warning is issued.
[0009] Further, the determining that the types of private data that the pre-saved transaction interface identifier is allowed to send does not include at least one of the target types includes:
[0010] Acquire a first vector corresponding to the transaction interface identifier saved in advance, wherein each dimension of the first vector corresponds to a type of private data, and a value written in each dimension indicates whether private data of the type corresponding to the dimension is allowed to be sent;
[0011] For each target type, determine the first target dimension corresponding to the target type in the first vector, and obtain the target value written in the first target dimension; if the target value is a second value used to indicate that privacy data of the corresponding type of the dimension is not allowed to be sent, then determine that the type of privacy data that the transaction interface identifier is allowed to send does not include the target type.
[0012] Further, after determining the target type of the private data contained in the response message, the method further includes:
[0013] Get a pre-saved vector template;
[0014] For each target type, according to the target type, the value of the dimension corresponding to the target type in the vector template is set to the first value, and the values corresponding to other dimensions are set to the second value to obtain a second vector;
[0015] The determining that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types includes:
[0016] The first vector corresponding to the pre-saved transaction interface identifier is compared with the second vector. If any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the types of privacy data allowed to be sent by the transaction interface identifier do not include at least one of the target types.
[0017] Furthermore, the process of determining the first vector includes:
[0018] Obtaining a pre-saved development file, parsing the development file, and determining development data corresponding to the transaction interface identifier in the development file;
[0019] Acquire the type of private data that the transaction interface identifier carried in the development data is allowed to send;
[0020] A first vector corresponding to the transaction interface identifier is determined according to the type and a pre-saved vector template.
[0021] Furthermore, the privacy leakage warning includes:
[0022] Sending an alarm message containing the target type and corresponding privacy data that are not allowed to be sent to the administrator device;
[0023] The method further comprises:
[0024] If a sending instruction for the response message sent by the administrator device is received, the response message is sent to the corresponding receiving device.
[0025] Further, after determining the target type of the private data contained in the response message, the method further includes:
[0026] Obtaining the request message corresponding to the response message;
[0027] The response message, the request message and the target type are correspondingly saved in a database for generating a log.
[0028] Furthermore, if the response message does not contain private data, the method further includes:
[0029] Send the response message to the corresponding receiving device.
[0030] The embodiment of the present application also provides a privacy leakage warning device, the device comprising:
[0031] A processing module, used to parse the response message to be sent, determine each response data and transaction interface identifier carried in the response message; determine the target type of each private data contained in the response message according to the type of private data in each data format stored in advance and the data format of each response data;
[0032] The early warning module is used to issue a privacy leakage early warning if it is determined that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types.
[0033] Furthermore, the processing module is specifically used to obtain a first vector corresponding to the pre-saved transaction interface identifier, wherein each dimension of the first vector corresponds to a type of privacy data, and the numerical value written in each dimension indicates whether the privacy data of the type corresponding to the dimension is allowed to be sent; for each target type, determine the first target dimension corresponding to the target type in the first vector, and obtain the target numerical value written in the first target dimension; if the target numerical value is a second numerical value indicating that the privacy data of the type corresponding to the dimension is not allowed to be sent, it is determined that the type of privacy data allowed to be sent by the transaction interface identifier does not include the target type.
[0034] Furthermore, the processing module is further used to obtain a pre-saved vector template; for each target type, according to the target type, the value of the dimension corresponding to the target type in the vector template is set to the first value, and the values corresponding to other dimensions are set to the second value to obtain a second vector;
[0035] The processing module is specifically used to compare the first vector corresponding to the pre-saved transaction interface identifier with the second vector. If any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the types of privacy data allowed to be sent by the transaction interface identifier do not include at least one of the target types.
[0036] Furthermore, the processing module is specifically used to obtain a pre-saved development file, parse the development file, determine the development data corresponding to the transaction interface identifier in the development file; obtain the type of privacy data that the transaction interface identifier carried in the development data is allowed to send; and determine the first vector corresponding to the transaction interface identifier based on the type and a pre-saved vector template.
[0037] Furthermore, the warning module is specifically used to send warning information carrying target types and corresponding privacy data that are not allowed to be sent to the administrator device;
[0038] The processing module is further configured to send the response message to the corresponding receiving device if a sending instruction for the response message is received from the administrator device.
[0039] Furthermore, the processing module is also used to obtain the request message corresponding to the response message; and save the response message, the request message and the target type correspondingly into a database for generating a log.
[0040] Furthermore, the processing module is further configured to send the response message to a corresponding receiving device if the response message does not contain the privacy data.
[0041] An embodiment of the present application also provides an electronic device, which includes a processor, and the processor is used to implement the steps of any of the privacy leakage warning methods described above when executing a computer program stored in a memory.
[0042] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the privacy leakage warning methods described above.
[0043] An embodiment of the present application also provides a computer program product, which includes: a computer program code, when the computer program code is executed on a computer, enables the computer to execute the steps of any of the above-mentioned privacy leakage warning methods.
[0044] In the embodiment of the present application, by performing privacy detection on the response message, dynamic privacy detection of the system is achieved, privacy leakage caused by the system sending messages is avoided, and the effect of privacy protection is improved. In addition, in the embodiment of the present application, the type of privacy data allowed to be sent corresponding to each transaction interface identifier is pre-stored. If the response message carries at least one privacy data, the electronic device determines whether there is a target type that is not allowed to be sent by the transaction interface identifier corresponding to the response message based on the type and the target type of at least one privacy data carried in the response message. If so, a privacy warning is issued, thereby improving the accuracy of the privacy warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 A schematic diagram of a privacy leakage warning process provided in an embodiment of the present application;
[0047] Figure 2 A flowchart of privacy data detection provided in an embodiment of the present application;
[0048] Figure 3 A flowchart of a privacy leakage warning provided in an embodiment of the present application;
[0049] Figure 4 A schematic diagram of the structure of a privacy leakage warning device provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0052] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0053] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0054] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0055] Currently, there are basically the following methods for detecting privacy data: one is to detect privacy data in files, including APP applications or files stored in office computers that may involve privacy data; the other is to perform traffic analysis through traffic capture to determine whether there is privacy data.
[0056] However, only analyzing or detecting a single channel of the system cannot cover all channels, resulting in privacy leakage caused by insufficient coverage; and, checking the privacy data of files is more inclined to static methods, which cannot dynamically check the privacy data leakage of the system when it is applied in real time; in addition, analyzing the leakage of privacy data involved in the system after the fact through traffic cannot analyze the encryption using digital certificates or the privacy data leakage during application layer transmission encryption.
[0057] Therefore, the embodiment of the present application provides a privacy leakage warning method, device, equipment and medium. In the embodiment of the present application, the response message to be sent is parsed to determine each response data and transaction interface identifier carried in the response message; according to the type of privacy data in each data format saved in advance and the data format of each response data, the target type of each privacy data contained in the response message is determined; if it is determined that the types of privacy data allowed to be sent by the pre-saved transaction interface identifier do not contain at least one target type, a privacy leakage warning is issued.
[0058] Embodiment 1:
[0059] Figure 1 A privacy leakage warning process diagram provided in an embodiment of the present application includes:
[0060] S101: Parse the response message to be sent, and determine each response data and transaction interface identifier carried in the response message.
[0061] A privacy leakage warning method provided in an embodiment of the present application is applied to an electronic device in which an existing system or a system under development is deployed. The electronic device may be a PC or a server.
[0062] In an embodiment of the present application, the program corresponding to the developed acquisition module is injected into the electronic device by means of bytecode injection, so that the electronic device can monitor and collect response messages to be sent. Among them, the program corresponding to the acquisition module can be injected into the gateway of the electronic device. If the electronic device does not have a gateway, the program can be injected into the program corresponding to the unified response logic function of the electronic device message. In an embodiment of the present application, non-invasive modification of the electronic device can be achieved by means of bytecode injection, and unified monitoring of all channels of the electronic device can be achieved by injecting the program corresponding to the acquisition module into the gateway of the electronic device or the program corresponding to the unified response logic function of the message.
[0063] Specifically, in an embodiment of the present application, each message carries information about the message type, and the acquisition module injected into the electronic device can determine the message type as a response message based on the information about the message type carried in each generated message.
[0064] When the electronic device monitors the response message to be sent, the electronic device can parse the response message to determine each response data and transaction interface identifier carried in the response message. The response data is the data to be sent, which can be account information, product information, etc., or privacy data. The transaction interface identifier is used to indicate the service process that generates the response data, such as a product query service process. The transaction interface identifier can be the name of the service process, etc.
[0065] S102: Determine the target type of each private data included in the response message according to the type of the private data in each data format stored in advance and the data format of each response data.
[0066] The electronic device is pre-configured with privacy data filtering rules, which record the type of each privacy data and the data format of the corresponding privacy data. The electronic device can filter each response data carried in the response message according to the privacy data filtering rules to determine whether there is privacy data in the response message.
[0067] In the embodiment of the present application, the private data may be a string of ID card number, mobile phone number, bank card number, etc. The electronic device stores the data format of each type of private data, specifically the format of the string corresponding to each type of private data. For example, the data format corresponding to the mobile phone number is a string consisting of 11 digits.
[0068] After the electronic device determines each response data carried in the response message, for each response data carried in the response message, the electronic device determines the data format of the response data, and determines whether the data format of each type of privacy data recorded in the privacy data filtering rule includes the data format of the response data. If the electronic device determines that the privacy data filtering rule includes the data format, the electronic device determines that the response data is privacy data, and determines the type of privacy data corresponding to the data format in the privacy data filtering rule as the target type corresponding to the response data.
[0069] S103: If it is determined that the types of private data allowed to be sent by the pre-saved transaction interface identifier do not include at least one of the target types, a privacy leakage warning is issued.
[0070] In actual application, some special service processes may need to provide private data. For example, the account information query service process needs to request account information. The response messages sent by these special service processes are allowed to carry certain specific types of private data.
[0071] Based on this, in order to avoid the electronic device from giving false warnings for response messages that are allowed to carry private data and improve the accuracy of privacy leakage warnings, in the embodiment of the present application, the types of private data that are allowed to be sent by the transaction interface identifier corresponding to each service process are pre-configured in the electronic device. Among them, the transaction interface identifier corresponding to each service process is the service process name.
[0072] After determining the target type of each private data carried in the response message, the electronic device obtains the pre-saved type of private data that the transaction interface identifier corresponding to the response message is allowed to send, and determines whether the target type of the private data belongs to the type of private data that the transaction interface identifier is allowed to send. If the electronic device determines that there is at least one target type that is not included in the type of private data that is allowed to be sent, it is determined that the response message has a risk of privacy leakage, and the electronic device issues a privacy leakage warning.
[0073] In the embodiment of the present application, by performing privacy detection on the response message, dynamic privacy detection of the system is achieved, privacy leakage caused by the system sending messages is avoided, and the effect of privacy protection is improved. In addition, in the embodiment of the present application, the type of privacy data that is allowed to be sent corresponding to each transaction interface identifier is pre-saved. If the response message carries at least one privacy data, the electronic device determines whether there is a target type that is not allowed to be sent by the transaction interface identifier corresponding to the response message based on the type and the target type of at least one privacy data carried in the response message. If so, a privacy warning is issued, thereby improving the accuracy of privacy warnings. The embodiment of the present application can discover the risk of privacy data leakage in real time, timely warn of insufficient design or development, and timely discover privacy leakage problems caused by defects in authority control; it can also guide the development and protection of personal privacy data protection in the system under development.
[0074] Embodiment 2:
[0075] In order to accurately identify whether private data can be sent, based on the above embodiment, in the embodiment of the present application, the determination that the types of private data that the pre-saved transaction interface identifier is allowed to send does not include at least one of the target types includes:
[0076] Acquire a first vector corresponding to the transaction interface identifier saved in advance, wherein each dimension of the first vector corresponds to a type of private data, and a value written in each dimension indicates whether private data of the type corresponding to the dimension is allowed to be sent;
[0077] For each target type, determine the first target dimension corresponding to the target type in the first vector, and obtain the target value written in the first target dimension; if the target value is a second value used to indicate that privacy data of the type corresponding to the dimension is not allowed to be sent, then determine that the type of privacy data that the transaction interface identifier is allowed to send does not include the target type.
[0078] In order to better preserve the type of privacy data that is allowed to be sent corresponding to each transaction interface identifier and improve the efficiency of privacy data detection, in an embodiment of the present application, the electronic device may preserve the type of privacy data that is allowed to be sent corresponding to each transaction interface identifier in the form of a vector, where each dimension of the vector corresponds to a type of privacy data, and the numerical value written into each dimension is used to indicate whether the type of privacy data corresponding to the dimension is allowed to be sent by the transaction interface identifier corresponding to the vector.
[0079] The electronic device pre-stores a first vector corresponding to the transaction interface identifier carried in the response message. For each target type corresponding to the privacy data carried in the response message, the electronic device determines the first target dimension corresponding to the target type in the first vector, and obtains the target value written in the first target dimension; if the target value is a second value used to indicate that the privacy data of the corresponding type of the dimension is not allowed to be sent, it is determined that the type of privacy data allowed to be sent by the transaction interface identifier does not include the target type; if the target value is a first value used to indicate that the privacy data of the corresponding type of the dimension is allowed to be sent, it is determined that the type of privacy data allowed to be sent by the transaction interface identifier includes the target type.
[0080] Generally, the second value used to indicate that the privacy data of the type corresponding to the dimension is not allowed to be sent is 0, and the first value used to indicate that the privacy data of the type corresponding to the dimension is allowed to be sent is 1.
[0081] Embodiment 3:
[0082] In order to improve the effect of privacy protection, on the basis of the above embodiments, in the embodiment of the present application, after determining the target type of the privacy data contained in the response message, the method further includes:
[0083] Get a pre-saved vector template;
[0084] For each target type, the value of the dimension corresponding to the target type in the vector template is set to the first value, and the values corresponding to other dimensions are set to the second values to obtain a second vector;
[0085] The determining that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types includes:
[0086] The first vector corresponding to the pre-saved transaction interface identifier is compared with the second vector. If any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the types of privacy data allowed to be sent by the transaction interface identifier do not include at least one of the target types.
[0087] In an embodiment of the present application, the electronic device may also construct a second vector corresponding to the response message, and determine whether the types of private data that the transaction interface identifier is allowed to send include at least one target type based on the second vector and the first vector corresponding to the transaction interface identifier carried in the response message.
[0088] In order to construct the second vector, a vector template is stored in the electronic device. The length of the vector template is the same as the length of the first vector, and the type of privacy data corresponding to each dimension of the vector template is consistent with the type of privacy data corresponding to each dimension of the first vector.
[0089] For each target type of privacy data carried in the response message, the electronic device determines the dimension corresponding to the target type in the vector template, and sets the value written in the dimension to a first value. The electronic device sets the values written in other dimensions except the dimension corresponding to the target type to a second value. Generally, the first value is 1 and the second value is 0.
[0090] After determining the second vector corresponding to the response message, the electronic device compares the first vector corresponding to the transaction interface identifier with the second vector. If it is determined that any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the type of privacy data allowed to be sent by the transaction interface identifier does not include at least one target type.
[0091] For example, the first vector is [1,1,0,1], and the second vector is [1,1,1,1]. The electronic device recognizes that the third dimension corresponds to the first value in the second vector and the second value in the first vector. Then, the type of privacy data that the transaction interface identifier is allowed to send does not include the target type corresponding to the third dimension.
[0092] Embodiment 4:
[0093] In order to improve the effect of privacy protection, on the basis of the above embodiments, in the embodiment of the present application, the process of determining the first vector includes:
[0094] Obtaining a pre-saved development file, parsing the development file, and determining development data corresponding to the transaction interface identifier in the development file;
[0095] Acquire the type of private data that the transaction interface identifier carried in the development data is allowed to send;
[0096] A first vector corresponding to the transaction interface identifier is determined according to the type and a pre-saved vector template.
[0097] In the embodiment of the present application, a development file is stored in the electronic device, and the development file records the development data corresponding to each transaction interface identifier, and the development data carries the original code of the service process corresponding to each transaction interface identifier, the type of private data allowed to be sent, etc. The electronic device can construct a first vector corresponding to each transaction interface identifier according to the development file.
[0098] Specifically, for each transaction interface identifier, the electronic device obtains the type of private data that the transaction interface identifier carried in the development data is allowed to send, and determines the first vector corresponding to the transaction interface identifier based on the type and a pre-saved vector template.
[0099] Among them, the process of the electronic device determining the first vector corresponding to the transaction interface identifier according to the type and the pre-saved vector template is consistent with the process of determining the second vector based on the target type in the above embodiment, and will not be repeated here.
[0100] Embodiment 5:
[0101] In order to improve the effect of privacy protection, on the basis of the above embodiments, in the embodiment of the present application, the privacy leakage warning includes:
[0102] Sending an alarm message containing the target type and corresponding privacy data that are not allowed to be sent to the administrator device;
[0103] The method further comprises:
[0104] If a sending instruction for the response message sent by the administrator device is received, the response message is sent to the corresponding receiving device.
[0105] In an embodiment of the present application, when an electronic device issues a privacy leakage warning, the privacy leakage warning method of the electronic device may be to send an alarm message carrying a target type that is not allowed to be sent and the corresponding privacy data to an administrator device.
[0106] When an electronic device detects privacy data, it may misidentify, that is, the electronic device identifies non-privacy data as privacy data. Based on this, in order to improve the accuracy of privacy data detection, in an embodiment of the present application, after the electronic device sends an alarm message to the administrator device, the administrator device rechecks the privacy data carried in the alarm message. If the administrator device determines that the privacy data carried in the alarm message is non-privacy data, the administrator device sends a sending instruction for a response message to the electronic device, and the electronic device sends the response message to the corresponding receiving device.
[0107] Specifically, the administrator device may be pre-configured with privacy data inspection rules, and the administrator device detects the privacy data carried in the warning message according to the privacy data inspection rules; the administrator device may also display the privacy data, and the staff may inspect the privacy data and upload the inspection results.
[0108] Embodiment 6:
[0109] In order to improve the effect of privacy protection, on the basis of the above embodiments, in the embodiment of the present application, after determining the target type of the privacy data contained in the response message, the method further includes:
[0110] Obtaining the request message corresponding to the response message;
[0111] The response message, the request message and the target type are correspondingly saved in a database for generating a log.
[0112] In order to be able to analyze the privacy leakage problem, in an embodiment of the present application, after the electronic device determines the target type of the privacy data contained in the response message, the electronic device obtains the request message corresponding to the response message, and saves the response message, request message and target type correspondingly in a database for generating a log.
[0113] In order to improve the effect of privacy protection, on the basis of the above embodiments, in the embodiment of the present application, if the response message does not contain privacy data, the method further includes:
[0114] Send the response message to the corresponding receiving device.
[0115] In an embodiment of the present application, if the electronic device determines that the response message does not contain privacy data, the electronic device sends the response message to the corresponding receiving device.
[0116] Specifically, the response message carries the IP address of the receiving device. If the electronic device determines that the response message does not contain privacy data, the electronic device obtains the IP address carried in the response message and sends the response message to the receiving device corresponding to the IP address.
[0117] Figure 2 A flowchart of privacy data detection provided in an embodiment of the present application, such as the Figure 2 As shown, the process includes:
[0118] S201: Inject the program corresponding to the acquisition module.
[0119] The program corresponding to the developed acquisition module is injected into the electronic device by means of bytecode injection, so that the electronic device can monitor and collect the response messages to be sent. Among them, the program corresponding to the acquisition module can be injected into the gateway of the electronic device. If the electronic device does not have a gateway, the program can be injected into the program corresponding to the unified response logic function of the electronic device message. In an embodiment of the present application, non-invasive modification of the electronic device can be achieved by means of bytecode injection, and unified monitoring of all channels of the electronic device can be achieved by injecting the program corresponding to the acquisition module into the gateway of the electronic device or the program corresponding to the unified response logic function of the message.
[0120] S202: Filter the response message.
[0121] In the embodiment of the present application, the electronic device filters each response data in the response message according to the data format of each type of private data recorded in the private data filtering rule: the response message is filtered for private data such as ID card number, bank card number, mobile phone number, etc. Among them, in order to prevent detection omissions, as long as a response message hits a private data, it is considered that the response message carries private data.
[0122] S203: Collect the request message and response message corresponding to the hit response data.
[0123] The electronic device collects response messages containing private data, and simultaneously collects request messages corresponding to the private data.
[0124] S204: Storing the collected data in a database.
[0125] To facilitate analysis, the electronic device saves the response message containing the privacy data, the corresponding request message, and the transaction interface identifier into the database for persistent storage to facilitate subsequent centralized analysis.
[0126] In addition, electronic devices can also collect time and hit privacy data and save them into a database.
[0127] Figure 3 A flowchart of a privacy leakage warning provided in an embodiment of the present application, such as the Figure 3 As shown, the process includes:
[0128] S301: Parse development documents.
[0129] The electronic device parses the development document and extracts each transaction interface identifier and the corresponding development data.
[0130] S302: Standardize transaction interface format.
[0131] The extracted transaction interface parameters are standardized, and for each transaction interface identifier, the electronic device determines a first vector corresponding to each transaction interface identifier according to a vector template pre-saved in development data corresponding to the transaction interface identifier.
[0132] S303: Standardize the response message format.
[0133] In the embodiment of the present application, the electronic device performs standardized processing on the response message, and determines the second vector corresponding to the response message according to the transaction interface name, the target type of the private data hit by the response message, and the pre-saved vector template. The existence of the private data can be marked with "0" or "1". "0" means no, and "1" means yes.
[0134] S304: Transaction interface comparison.
[0135] The electronic device compares the transaction interface identifier carried in the response message with the transaction interface identifier standardized from the development document, and compares whether the first vector and the second vector corresponding to the same transaction interface identifier match.
[0136] S305: Timely warning.
[0137] If the electronic device determines that the first vector does not match the second vector, it determines that there is a privacy data leakage, that is, the actual situation of the electronic device is not correctly developed according to the development document, and there is a privacy data leakage, then the electronic device issues a privacy leakage warning.
[0138] Embodiment 7:
[0139] Based on the same inventive concept, the embodiment of the present application provides a privacy leakage warning device. Figure 4 For a schematic diagram of a privacy leakage warning device provided in an embodiment of the present application, please refer to Figure 4 , the device comprises:
[0140] The processing module 401 is used to parse the response message to be sent, determine each response data and transaction interface identifier carried in the response message; determine the target type of each private data contained in the response message according to the type of private data in each data format stored in advance and the data format of each response data;
[0141] The warning module 402 is used to issue a privacy leakage warning if it is determined that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types.
[0142] In one possible implementation, the processing module 401 is specifically used to obtain a first vector corresponding to the pre-saved transaction interface identifier, wherein each dimension of the first vector corresponds to a type of privacy data, and the numerical value written in each dimension indicates whether the privacy data of the type corresponding to the dimension is allowed to be sent; for each target type, determine the first target dimension corresponding to the target type in the first vector, and obtain the target numerical value written in the first target dimension; if the target numerical value is a second numerical value indicating that the privacy data of the type corresponding to the dimension is not allowed to be sent, it is determined that the type of privacy data allowed to be sent by the transaction interface identifier does not include the target type.
[0143] In a possible implementation, the processing module 401 is further used to obtain a pre-saved vector template; for each target type, according to the target type, the value of the dimension corresponding to the target type in the vector template is set to a first value, and the values corresponding to other dimensions are set to a second value to obtain a second vector;
[0144] The processing module 401 is specifically used to compare the first vector corresponding to the pre-saved transaction interface identifier with the second vector. If any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the types of privacy data allowed to be sent by the transaction interface identifier do not include at least one of the target types.
[0145] In a possible implementation, the processing module 401 is specifically used to obtain a pre-saved development file, parse the development file, determine the development data corresponding to the transaction interface identifier in the development file; obtain the type of privacy data that the transaction interface identifier carried in the development data is allowed to send; and determine the first vector corresponding to the transaction interface identifier based on the type and a pre-saved vector template.
[0146] In a possible implementation, the warning module 402 is specifically configured to send a warning message carrying a target type that is not allowed to be sent and corresponding privacy data to the administrator device;
[0147] The processing module is further configured to send the response message to the corresponding receiving device if a sending instruction for the response message is received from the administrator device.
[0148] In a possible implementation, the processing module 401 is further configured to obtain a request message corresponding to the response message; and save the response message, the request message, and the target type correspondingly in a database for generating a log.
[0149] In a possible implementation manner, the processing module 401 is further configured to send the response message to a corresponding receiving device if the response message does not contain the privacy data.
[0150] Embodiment 8:
[0151] Based on the same inventive concept, an embodiment of the present application provides an electronic device, which can implement the steps of the verification method discussed above. Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, it includes: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;
[0152] The memory 503 stores a computer program. When the program is executed by the processor 501, the processor 501 performs the following steps:
[0153] Parsing the response message to be sent, and determining each response data and transaction interface identifier carried in the response message;
[0154] Determine the target type of each private data included in the response message according to the type of the private data in each data format stored in advance and the data format of each response data;
[0155] If it is determined that the types of private data that the pre-saved transaction interface identifier is allowed to send do not include at least one of the target types, a privacy leakage warning is issued.
[0156] In a possible implementation manner, the determining that the types of private data that the pre-stored transaction interface identifier is allowed to send does not include at least one of the target types includes:
[0157] Acquire a first vector corresponding to the transaction interface identifier saved in advance, wherein each dimension of the first vector corresponds to a type of private data, and a value written in each dimension indicates whether private data of the type corresponding to the dimension is allowed to be sent;
[0158] For each target type, determine the first target dimension corresponding to the target type in the first vector, and obtain the target value written in the first target dimension; if the target value is a second value used to indicate that privacy data of the corresponding type of the dimension is not allowed to be sent, then determine that the type of privacy data that the transaction interface identifier is allowed to send does not include the target type.
[0159] In a possible implementation manner, after determining the target type of the private data included in the response message, the method further includes:
[0160] Get a pre-saved vector template;
[0161] For each target type, according to the target type, the value of the dimension corresponding to the target type in the vector template is set to the first value, and the values corresponding to other dimensions are set to the second value to obtain a second vector;
[0162] The determining that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types includes:
[0163] The first vector corresponding to the pre-saved transaction interface identifier is compared with the second vector. If any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the types of privacy data allowed to be sent by the transaction interface identifier do not include at least one of the target types.
[0164] In a possible implementation manner, the process of determining the first vector includes:
[0165] Obtaining a pre-saved development file, parsing the development file, and determining development data corresponding to the transaction interface identifier in the development file;
[0166] Acquire the type of private data that the transaction interface identifier carried in the development data is allowed to send;
[0167] A first vector corresponding to the transaction interface identifier is determined according to the type and a pre-saved vector template.
[0168] In a possible implementation, the performing of a privacy leakage warning includes:
[0169] Sending an alarm message containing the target type and corresponding privacy data that are not allowed to be sent to the administrator device;
[0170] The method further comprises:
[0171] If a sending instruction for the response message sent by the administrator device is received, the response message is sent to the corresponding receiving device.
[0172] In a possible implementation manner, after determining the target type of the private data included in the response message, the method further includes:
[0173] Obtaining the request message corresponding to the response message;
[0174] The response message, the request message and the target type are correspondingly saved in a database for generating a log.
[0175] In a possible implementation manner, if the response message does not include private data, the method further includes:
[0176] Send the response message to the corresponding receiving device.
[0177] Since the principle of solving the problem by the above electronic device is similar to that of the privacy leakage warning method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.
[0178] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 502 is used for communication between the above electronic device and other devices. The memory may include a random access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0179] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0180] Embodiment 9:
[0181] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor executes any of the privacy leakage warning methods discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the privacy leakage warning method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0182] Embodiment 10:
[0183] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any privacy leakage warning method discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the privacy leakage warning method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0184] In the embodiment of the present application, by performing privacy detection on the response message, dynamic privacy detection of the system is achieved, privacy leakage caused by the system sending messages is avoided, and the effect of privacy protection is improved. In addition, in the embodiment of the present application, the type of privacy data allowed to be sent corresponding to each transaction interface identifier is pre-stored. If the response message carries at least one privacy data, the electronic device determines whether there is a target type that is not allowed to be sent by the transaction interface identifier corresponding to the response message based on the type and the target type of at least one privacy data carried in the response message. If so, a privacy warning is issued, thereby improving the accuracy of the privacy warning.
[0185] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0186] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0187] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0188] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0189] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A privacy leakage warning method, characterized in that: The method comprises: Parsing the response message to be sent, and determining each response data and transaction interface identifier carried in the response message; Determine the target type of each private data included in the response message according to the type of the private data in each data format stored in advance and the data format of each response data; If it is determined that the types of private data that the pre-saved transaction interface identifier is allowed to send do not include at least one of the target types, a privacy leakage warning is issued.
2. The method according to claim 1, characterized in that: The determining that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types includes: Acquire a first vector corresponding to the transaction interface identifier saved in advance, wherein each dimension of the first vector corresponds to a type of private data, and a value written in each dimension indicates whether private data of the type corresponding to the dimension is allowed to be sent; For each target type, determine the first target dimension corresponding to the target type in the first vector, and obtain the target value written in the first target dimension; if the target value is a second value used to indicate that privacy data of the corresponding type of the dimension is not allowed to be sent, then determine that the type of privacy data that the transaction interface identifier is allowed to send does not include the target type.
3. The method according to claim 1, characterized in that After determining the target type of the private data contained in the response message, the method further includes: Get a pre-saved vector template; For each target type, according to the target type, the value of the dimension corresponding to the target type in the vector template is set to the first value, and the values corresponding to other dimensions are set to the second value to obtain a second vector; The determining that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types includes: The first vector corresponding to the pre-saved transaction interface identifier is compared with the second vector. If any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the types of privacy data allowed to be sent by the transaction interface identifier do not include at least one of the target types.
4. The method according to claim 2 or 3, characterized in that: The process of determining the first vector includes: Obtaining a pre-saved development file, parsing the development file, and determining development data corresponding to the transaction interface identifier in the development file; Acquire the type of private data that the transaction interface identifier carried in the development data is allowed to send; A first vector corresponding to the transaction interface identifier is determined according to the type and a pre-saved vector template.
5. The method according to claim 1, characterized in that The privacy leakage warning includes: Sending an alarm message containing the target type and corresponding privacy data that are not allowed to be sent to the administrator device; The method further comprises: If a sending instruction for the response message sent by the administrator device is received, the response message is sent to the corresponding receiving device.
6. The method according to claim 1, characterized in that After determining the target type of the private data contained in the response message, the method further includes: Obtaining the request message corresponding to the response message; The response message, the request message and the target type are correspondingly saved in a database for generating a log.
7. The method according to claim 1, characterized in that If the response message does not contain private data, the method further includes: Send the response message to the corresponding receiving device.
8. A privacy leakage warning device, characterized in that: The device comprises: A processing module, used to parse the response message to be sent, determine each response data and transaction interface identifier carried in the response message; determine the target type of each private data contained in the response message according to the type of private data in each data format stored in advance and the data format of each response data; The early warning module is used to issue a privacy leakage early warning if it is determined that the types of private data allowed to be sent by the pre-stored transaction interface identifier do not include at least one of the target types.
9. The device according to claim 8, characterized in that The processing module is specifically used to obtain a first vector corresponding to the pre-saved transaction interface identifier, wherein each dimension of the first vector corresponds to a type of privacy data, and the numerical value written in each dimension indicates whether the privacy data of the type corresponding to the dimension is allowed to be sent; for each target type, determine the first target dimension corresponding to the target type in the first vector, and obtain the target numerical value written in the first target dimension; if the target numerical value is a second numerical value indicating that the privacy data of the type corresponding to the dimension is not allowed to be sent, it is determined that the type of privacy data allowed to be sent by the transaction interface identifier does not include the target type.
10. The device according to claim 8, characterized in that The processing module is further used to obtain a pre-saved vector template; for each target type, according to the target type, the value of the dimension corresponding to the target type in the vector template is set to the first value, and the values corresponding to other dimensions are set to the second value to obtain a second vector; The processing module is specifically used to compare the first vector corresponding to the pre-saved transaction interface identifier with the second vector. If any dimension corresponds to a first value in the second vector and a second value in the first vector, it is determined that the types of privacy data allowed to be sent by the transaction interface identifier do not include at least one of the target types.
11. The device according to claim 9 or 10, characterized in that The processing module is specifically used to obtain a pre-saved development file, parse the development file, and determine the development data corresponding to the transaction interface identifier in the development file; The type of private data that the transaction interface identifier carried in the development data is allowed to send is obtained; and a first vector corresponding to the transaction interface identifier is determined according to the type and a pre-saved vector template.
12. The device according to claim 8, characterized in that The warning module is specifically used to send warning information containing target types and corresponding privacy data that are not allowed to be sent to the administrator device; The processing module is further configured to send the response message to the corresponding receiving device if a sending instruction for the response message is received from the administrator device.
13. The device according to claim 8, characterized in that The processing module is further used to obtain the request message corresponding to the response message; and save the response message, the request message and the target type correspondingly into a database for generating a log.
14. The device according to claim 8, characterized in that The processing module is further configured to send the response message to a corresponding receiving device if the response message does not contain the privacy data.
15. An electronic device, characterized in that: The electronic device includes a processor, and the processor is used to implement the steps of the privacy leakage warning method as described in any one of claims 1 to 7 when executing a computer program stored in a memory.
16. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the privacy leakage warning method as described in any one of claims 1 to 7.
17. A computer program product, characterized in that The computer program product includes: computer program code, when the computer program code is run on a computer, it enables the computer to execute the steps of the privacy leakage warning method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and terminal for application software malicious behavior dynamic alarm
CN110447215A
Method and apparatus for detecting data leakage interface, device, and storage medium
WO2018086293A1
