Data leakage detection method and device
By analyzing the character distribution characteristic values in domain name system requests and using machine learning models, we solve the problem of difficulty in detecting data leakage with existing technology, improve the detection efficiency of malicious domain name system requests, and realize the detection of data leakage behavior. Effective identification and prevention.
Patent Information
- Application Number
- CN202110714805.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-06-25
AI Technical Summary
It is difficult for existing network security systems to detect or prevent data leakage by hackers through domain name system requests. In particular, most systems do not block domain name system requests, making it difficult to detect data entrainment by malicious programs.
By obtaining network connection data of electronic devices, analyzing log data in domain name system requests, extracting multiple character distribution characteristic values, and using machine learning models to determine whether domain name system requests are malicious requests, thereby detecting data leakage.
It improves the detection efficiency of domain name system requests used by hackers or malicious programs, and effectively identifies and prevents data leakage.
Smart Images

Figure CN115529147B
Abstract
Description
Technical Field
[0001] The present invention relates to a data leakage detection technology, and in particular to a data leakage detection method and device. Background Art
[0002] The Domain Name System (DNS) is a service of the Internet. It can be used as a distributed database that maps domain names to Internet Protocol (IP) addresses, making it easier for people to access the Internet. For example, when a terminal device needs to open a web page of a certain domain name, the terminal device can send a DNS request to the responsible DNS server. After receiving the DNS request, the DNS server can resolve the DNS request and send a DNS response to the terminal device, so as to inform the terminal device of the IP address corresponding to the domain name through the DNS response.
[0003] Generally speaking, DNS requests and DNS responses are not blocked by most network security systems (such as firewalls) to avoid affecting the normal network connection of terminal devices. However, because of this, once hackers or malicious programs send DNS requests to leak data, such as enclosing sensitive data of terminal devices in DNS requests and sending them to remote hosts, most network security systems may find it difficult to detect or prevent them. Summary of the invention
[0004] The present invention provides a data leakage detection method and device, which can improve the detection efficiency of domain name system requests and / or domain names used by hackers or malicious programs to perform data leakage.
[0005] An embodiment of the present invention provides a data leakage detection method, which includes: obtaining network connection data of an electronic device; obtaining log data related to a domain name system from the network connection data; analyzing a domain name system request in the log data and obtaining a plurality of character distribution feature values according to the analysis result, wherein the plurality of character distribution feature values reflect the character distribution state of a domain name in the domain name system request under different classification rules; and determining by a machine learning model whether the domain name system request is a malicious domain name system request according to the plurality of character distribution feature values, wherein the malicious domain name system request is used to carry leakage data to a remote host.
[0006] An embodiment of the present invention further provides a data leakage detection device, which includes a storage circuit and a processor. The storage circuit is used to store network connection data and a machine learning model of an electronic device. The processor is connected to the storage circuit and is used to: obtain log data related to the domain name system from the network connection data; analyze the domain name system request in the log data and obtain multiple character distribution feature values based on the analysis results, wherein the multiple character distribution feature values reflect the character distribution status of the domain name in the domain name system request under different classification rules; and determine whether the domain name system request is a malicious domain name system request based on the multiple character distribution feature values through the machine learning model, wherein the malicious domain name system request is used to carry leakage data to a remote host.
[0007] Based on the above, after obtaining the network connection data of the electronic device, the log data related to the domain name system can be obtained from the network connection data. Then, the domain name system request in the log data can be analyzed and a plurality of character distribution feature values can be obtained according to the analysis results, wherein the plurality of character distribution feature values reflect the character distribution state of the domain name in the domain name system request under different classification rules. Then, the machine learning model determines whether the domain name system request is a malicious domain name system request according to the plurality of character distribution feature values, wherein the malicious domain name system request is used to carry the leaked data to the remote host. Thereby, the detection efficiency of the domain name system request and / or domain name used by hackers or malicious programs to perform data leakage can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a schematic diagram of a domain name analysis system according to an embodiment of the present invention;
[0009] Figure 2 is a schematic diagram of a network traffic analysis device according to an embodiment of the present invention;
[0010] Figure 3 is a schematic diagram showing analyzing a domain name system request to obtain a plurality of character distribution feature values according to an embodiment of the present invention;
[0011] Figure 4 is a schematic diagram showing a method of determining whether a domain name system request is a malicious domain name system request based on a plurality of character distribution feature values according to an embodiment of the present invention;
[0012] Figure 5 is a schematic diagram showing the occurrence frequency of malicious domain name system requests corresponding to different time ranges according to an embodiment of the present invention;
[0013] Figure 6 is a flow chart of a data leakage detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0014] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0015] Figure 1 is a schematic diagram of a domain name analysis system according to an embodiment of the present invention. Figure 1 The domain name analysis system includes a network traffic analysis device (also known as a data leakage detection device) 11 and an electronic device 12. The electronic device 12 can be connected to a remote host 13 via the Internet 101. In particular, the electronic device 12 can be connected to the remote host 13 via one or more domain names. A domain name can be a string of characters separated by one or more dots (e.g., www.google.com).
[0016] In one embodiment, the electronic device 12 is a terminal device. For example, the electronic device 12 may include a smart phone, a notebook computer, a desktop computer, an industrial computer, a server, a game console, or various electronic devices with networking functions. In addition, the remote host 13 may be a domain name server. For example, a domain name server set up by a hacker.
[0017] In one embodiment, when the electronic device 12 is controlled by a hacker or a malicious program, the hacker or malicious program can access sensitive data of the electronic device 12, such as user account, password and / or fingerprint information. The hacker or malicious program can encode the sensitive data to generate a string of meaningless data similar to garbled characters. Then, the hacker or malicious program can generate a corresponding domain name system request based on the meaningless data. For example, the meaningless data can be carried in the domain name of the domain name system request. For example, assuming that the meaningless data generated by encoding is "fd12f3d1f23ds1f23sd1fsdf1", the generated domain name system request can be "fd12f3d1f23ds1f23sd1fsdf1.XXXX.XX". Then, the hacker or malicious program can control the electronic device 12 to transmit the domain name system request to the remote host 13. For example, the domain name system request is transmitted to the remote host 13 via the communication port 53 of the electronic device 12. After receiving the DNS request, the remote host 13 can decode the domain name in the DNS request to restore the sensitive data in the original electronic device 12. In this way, the purpose of data leakage can be achieved.
[0018] In one embodiment, the network traffic analysis device 11 may monitor the network traffic of the electronic device 12. The network traffic analysis device 11 may detect whether the electronic device 12 performs data leakage by enclosing sensitive data in a domain name system request through a machine learning model.
[0019] Figure 2 is a schematic diagram of a network traffic analysis device according to an embodiment of the present invention. Figure 2 The network traffic analysis device 11 may include a processor 21, a storage circuit 22, and an input / output interface 23. The processor 21 is responsible for the overall or partial operation of the network traffic analysis device 11. For example, the processor 21 may include a central processing unit (CPU) or other programmable general-purpose or special-purpose microprocessor, a digital signal processor (DSP), a programmable controller, an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or other similar devices or a combination of these devices.
[0020] The storage circuit 22 is connected to the processor 21 and is used to store data. For example, the storage circuit 22 may include a volatile storage circuit and a non-volatile storage circuit. The volatile storage circuit is used to store data volatilely. For example, the volatile storage circuit may include a random access memory (RAM) or a similar volatile storage medium. The non-volatile storage circuit is used to store data non-volatilely. For example, the non-volatile storage circuit may include a read-only memory (ROM), a solid state disk (SSD) and / or a traditional hard disk (HDD) or a similar non-volatile storage medium.
[0021] The input / output interface 23 is connected to the processor 21 and is used to perform signal input and output. For example, the input / output interface 23 may include various input / output devices such as a network interface card, a display, a mouse, a keyboard, a touch pad, a touch screen, a speaker, a microphone, and / or a power supply circuit. The present invention does not limit the type of the input / output device.
[0022] In one embodiment, the storage circuit 22 stores a feature acquisition module 201 and a machine learning model 202. For example, the feature acquisition module 201 and the machine learning model 202 can be stored in the storage circuit 22 in the form of program code. The processor 21 can run the feature acquisition module 201 to perform logical operations such as feature value calculations. The machine learning model 202 may include a multi-decision tree model such as an XGBoost model or other types of machine learning models.
[0023] In one embodiment, the processor 21 may obtain network connection data of the electronic device 12. The processor 21 may store the network connection data in the circuit 22. For example, the network connection data of the electronic device 12 may be obtained by monitoring the network traffic of the electronic device 12 or reading the network connection record of the electronic device 12.
[0024] In one embodiment, the processor 21 may obtain log data related to the domain name system from the network connection data. The processor 21 may analyze a domain name system request in the log data through the feature acquisition module 201 and obtain multiple character distribution feature values based on the analysis results. The multiple character distribution feature values may reflect the character distribution status of the domain name in the domain name system request under different classification rules. Then, the processor 21 may run the machine learning model 202 to determine whether the domain name system request is a malicious domain name system request based on the multiple character distribution feature values. In particular, the malicious domain name system request may be used to carry leaked data to a remote host (for example, Figure 1 remote host 13).
[0025] Figure 3 FIG. 1 is a schematic diagram showing a method of analyzing a domain name system request to obtain multiple character distribution feature values according to an embodiment of the present invention. Figure 3 , the processor 21 can obtain log data related to the domain name system (i.e., DNS log 301) from the network connection data. The processor 21 inputs a domain name system request (also referred to as a target domain name system request) in the DNS log 301 into the feature acquisition module 201 to perform feature value calculation. The feature acquisition module 201 can output a plurality of feature values V(1) to V(n) (i.e., character distribution feature values) according to the calculation results. n can be any positive integer greater than 1.
[0026] In one embodiment, the multiple character distribution feature values include multiple types of feature values. Taking the first type of feature values and the second type of feature values as examples, the first type of feature values can reflect the character distribution state (also called the first character distribution state) of the domain name (also called the target domain name) in the target domain name system request under a certain classification rule (also called the first classification rule), and the second type of feature values can reflect the character distribution state (also called the second character distribution state) of the same target domain name under another classification rule (also called the second classification rule), and the first classification rule is different from the second classification rule. In one embodiment, the classification rules can also be regarded as statistical rules or logical rules. In one embodiment, by simultaneously (or in parallel) analyzing the character distribution state of the target domain name in the target domain name system request under different classification rules, the detection efficiency (e.g., detection accuracy) of the malicious domain name system request can be effectively improved.
[0027] In one embodiment, the feature acquisition module 201 may analyze the target domain name system request to obtain multiple evaluation parameters. For example, the multiple evaluation parameters may reflect the total number of characters included in the meaningful string in the target domain name, the total number of all characters in the target domain name, the total number of numbers in the target domain name, the total number of non-repeated characters in the third-level domain name in the target domain name, the total number of all characters other than the first-level domain name and the second-level domain name in the target domain name, the number of occurrences of the most repeated characters in the third-level domain name in the target domain name, the number of occurrences of numbers and letters adjacent to each other in the third-level domain name in the target domain name, the total number of characters in the third-level domain name in the target domain name that meet specific conditions, the total number of characters in the third-level domain name in the target domain name that do not meet the specific conditions, and at least two of the entropy values of the third-level domain name in the target domain name. Then, the feature acquisition module 201 may obtain the multiple character distribution feature values (i.e., the entropy value) according to the multiple evaluation parameters. Figure 3 eigenvalues V(1)~V(n)).
[0028] In one embodiment, the feature acquisition module 201 can obtain the feature value V(1) based on the total number of characters included in the meaningful string in the target domain name and the total number of all characters in the target domain name. For example, the feature acquisition module 201 can query whether there is a meaningful string in the target domain name based on the dictionary provided by the online platform (such as Google). For example, the feature acquisition module 201 can obtain the feature value V(1) based on the ratio of the total number of characters included in the meaningful string in the target domain name to the total number of all characters in the target domain name. Taking "google.com" as an example, since "google" therein belongs to a meaningful string and it contains 6 characters, the feature acquisition module 201 can obtain the feature value V(1) of 0.67 (i.e., 6 / 9). In other words, the feature value V(1) can reflect the proportion of the characters included in the meaningful string in the target domain name in the entire target domain name.
[0029] In one embodiment, the feature acquisition module 201 can obtain the feature value V(2) based on the total number of digits in the target domain name and the total number of all characters in the target domain name. For example, the feature acquisition module 201 can obtain the feature value V(2) based on the ratio of the total number of digits in the target domain name to the total number of all characters in the target domain name. Taking "x123.com" as an example, there are 3 characters that are digits, and the total length of the target domain name is 4 (compared to "x123") or 7 (compared to "x123.com"), so the feature acquisition module 201 can obtain the feature value V(2) as 0.75 (i.e. 3 / 4) or 0.43 (i.e. 3 / 7). In other words, the feature value V(2) can reflect the proportion of digits appearing in the target domain name.
[0030] In one embodiment, the feature acquisition module 201 may obtain the feature value V(3) according to the total number of all characters in the target domain name. For example, assuming that the total number of all characters in the target domain name is 9, the feature acquisition module 201 may obtain the feature value V(3) as 9. In other words, the feature value V(3) may reflect the length of the target domain name.
[0031] In one embodiment, the feature acquisition module 201 can obtain the feature value V(4) according to the total number of non-repeating characters in the third-level domain name in the target domain name. Take "aabbcd11.google.com" as an example, the third-level domain name is "aabbcd11" and the non-repeating characters in "aabbcd11" are "a", "b", "c", "d" and "1". The feature acquisition module 201 can obtain the feature value V(4) of 5 according to the total number of non-repeating characters in "aabbcd11" (i.e. 5). In other words, the feature value V(4) can reflect the total number of non-repeating characters in the third-level domain name in the target domain name.
[0032] In one embodiment, the feature acquisition module 201 can obtain the feature value V(5) according to the total number of all characters in the target domain name except the first-level domain name and the second-level domain name. Take "x111.google.com" as an example, where the first-level domain name is "com", the second-level domain name is "google", and the third-level domain name is "x111". Therefore, the feature acquisition module 201 can obtain the feature value V(5) of 4 according to the total number of all characters in the target domain name except the first-level domain name and the second-level domain name (that is, the total number of all characters after the third-level domain name in the target domain name, for example, the length of "x111" is 4). In other words, the feature value V(5) can reflect the total number of all characters in the target domain name except the first-level domain name and the second-level domain name.
[0033] In one embodiment, the feature acquisition module 201 can obtain the feature value V(6) according to the number of occurrences of the character that appears most repeatedly in the target domain name. Take "ababaa.google.com" as an example, where the third-level domain name is "ababaa". In "ababaa", the character "a" appears 4 times, and the character "b" appears 2 times, so the feature acquisition module 201 can obtain the feature value V(6) of 4 according to the character "a" that appears 4 times in the target domain name. In other words, the feature value V(6) can reflect the number of occurrences of the character that appears most repeatedly in the target domain name.
[0034] In one embodiment, the feature acquisition module 201 can obtain the feature value V(7) according to the number of occurrences of adjacent numbers and letters in the third-level domain name in the target domain name. Take "c7e86e62.google.com" as an example, where the third-level domain name is "c7e86e62". In "c7e86e62", the characters of adjacent numbers and letters include "c7", "e8" and "6e", so the feature acquisition module 201 can obtain the feature value V(7) of 3 according to the number of occurrences of adjacent numbers and letters in the target domain name. In other words, the feature value V(7) can reflect the number of occurrences of adjacent numbers and letters in the third-level domain name in the target domain name.
[0035] In one embodiment, the feature acquisition module 201 can obtain the feature value V(8) based on the total number of characters that meet specific conditions in the third-level domain name in the target domain name. In one embodiment, the characters that meet specific conditions may include a plurality of letters with the highest preset frequency of occurrence and a plurality of letters with the lowest preset frequency of occurrence. Taking the frequency of occurrence of common letters counted by the online platform as an example, the letters "e", "t", "a", "o" and "i" have the highest frequency of occurrence, while the letters "z", "q", "x", "j" and "k" have the lowest frequency of occurrence. The feature acquisition module 201 can obtain the feature value V(8) based on the total number of letters with the highest frequency of occurrence and the total number of letters with the lowest frequency of occurrence in the target domain name. Taking "knowledge.google.com" as an example, the third-level domain name is "knowledge". In "knowledge", the letters with the highest frequency of occurrence include "o", "e" and "e", and their total number is 3, and the letter with the lowest frequency of occurrence includes "k", and its total number is 1. Therefore, the feature acquisition module 201 can obtain the feature value V(8) as 3 (i.e., 3 / 1) according to the ratio of the total number of the two. In other words, the feature value V(8) can reflect the ratio of the more frequently occurring characters to the less frequently occurring characters in the third-level domain name in the target domain name.
[0036] In one embodiment, the feature acquisition module 201 can obtain the feature value V(9) according to the entropy value of the third-level domain name in the target domain name. Taking "a1f5b6hds.google.com" as an example, the third-level domain name is "a1f5b6hds". The feature acquisition module 201 can obtain the feature value V(9) of 3.17 according to the entropy value of "a1f5b6hds" (for example, 3.17). In other words, the feature value V(9) can reflect the entropy value of the third-level domain name in the target domain name. In one embodiment, the entropy value can also be replaced by other values that can reflect the complexity or dispersion of multiple characters in the third-level domain name in the target domain name.
[0037] It should be noted that the above-mentioned feature values V(1) to V(9) are only examples. In one embodiment, more other types of feature values in the feature values V(1) to V(n) can also be obtained by analyzing the target domain name according to different classification rules, statistical rules or logical rules, and the present invention is not limited thereto.
[0038] Figure 4 FIG. 1 is a schematic diagram showing how to determine whether a domain name system request is a malicious domain name system request based on multiple character distribution feature values according to an embodiment of the present invention. Figure 4In one embodiment, the processor 21 may input the feature values V(1)-V(n) into the machine learning model 202 for analysis. The machine learning model 202 may generate a judgment result based on the feature values V(1)-V(n). This judgment result may reflect whether the target domain name system request is a malicious domain name system request 401 or a normal domain name system request 402. It should be noted that since the feature values V(1)-V(n) cover a variety of character distribution states of the target domain name under different classification rules, the detection efficiency (e.g., detection accuracy) of the machine learning model 202 for whether the target domain name system request is a malicious domain name system request can be improved. For example, assuming that the target domain name is "www.cht.com.tw", the machine learning model 202 has a high probability of determining that the target domain name is a normal domain name system request 402. However, if the target domain name is "er41d6s7f89rtr2s.com.tw", the machine learning model 202 has a high probability of determining that the target domain name is a malicious domain name system request 401. Among them, the leaked sensitive data may be smuggled to the remote host through the third-level domain name in the target domain name (such as "er41d6s7f89rtr2s"). In addition, during the training phase, the machine learning model 202 can also be trained by continuously using training data to improve the detection efficiency (such as detection accuracy) of the machine learning model 202 for malicious domain name system requests.
[0039] In one embodiment, Figure 2 The storage circuit 22 also stores a verification module 203. For example, the verification module 203 can be stored in the storage circuit 22 in the form of program code. The processor 21 can verify the judgment result of the machine learning model 202 through the verification module 203. For example, after the machine learning model 202 determines that the target domain name system request belongs to the malicious domain name system request 401, the verification module 203 can verify the judgment result of the machine learning model 202 according to the occurrence frequency of the malicious domain name system request 401 (also referred to as the first occurrence frequency).
[0040] In one embodiment, the verification module 203 can determine the first occurrence frequency of the malicious DNS request 401 according to the number of occurrences of the malicious DNS request 401 within a certain time range (also referred to as the first time range). The first time range includes the time point when the malicious DNS request 401 is currently detected.
[0041] In one embodiment, the verification module 203 may determine whether the first occurrence frequency is higher than a critical value. If the first occurrence frequency is higher than the critical value, the verification module 203 may determine that the judgment result of the current machine learning model 202 that the target domain name system request belongs to the malicious domain name system request 401 is correct. However, if the first occurrence frequency is not higher than the critical value, the verification module 203 may determine that the judgment result of the current machine learning model 202 that the target domain name system request belongs to the malicious domain name system request 401 is not correct. Therefore, the verification module 203 may mark the target domain name system request as a misjudgment of the machine learning model 202 for the malicious domain name system request 401. In addition, the verification module 203 may adjust the decision logic of the machine learning model 202 based on this misjudgment. For example, the verification module 203 may adjust the settings of certain weight parameters of the machine learning model 202 based on this misjudgment, in an attempt to reduce the probability of similar misjudgments of the machine learning model 202 in the future.
[0042] In one embodiment, the verification module 203 may obtain the occurrence frequency (also referred to as the second occurrence frequency) of the malicious DNS request 402 corresponding to another time range (also referred to as the second time range). For example, the verification module 203 may determine the second occurrence frequency of the malicious DNS request 401 according to the number of occurrences of the malicious DNS request 401 in the second time range. The second time range is different from the first time range, and the second time range does not include the time point when the malicious DNS request 401 is currently detected. The verification module 203 may determine the critical value according to the second occurrence frequency.
[0043] Figure 5 FIG. 1 is a schematic diagram showing the frequency of occurrence of malicious domain name system requests corresponding to different time ranges according to an embodiment of the present invention. Figure 5 , assuming that the time points T(0) to T(1) belong to the second time range, and the time points T(2) to T(3) belong to the first time range. The first time range includes the time point at which a new malicious DNS request is currently detected. The time length of the first time range (i.e., T(D)) is equal to the time length of the second time range (i.e., T(D)).
[0044] In one embodiment, the second time range corresponds to an off-peak period. That is, within the second time range, the number of occurrences of malicious DNS requests detected is relatively small (e.g., 3 times). However, the first time range corresponds to the current period. Within the first time range, the number of occurrences of malicious DNS requests detected is significantly larger (e.g., 200 times). In one embodiment, the verification module 203 may determine the critical value based on the number of occurrences of malicious DNS requests detected within the second time range (e.g., 3 times) (or the second occurrence frequency). Thereafter, the verification module 203 may determine whether the first occurrence frequency is higher than the critical value (or the second occurrence frequency). If the first occurrence frequency is higher than the critical value (e.g., the 200 malicious DNS requests detected within the current period are higher than 3 times), the verification module 203 may determine that the determination result that the target DNS request is a malicious DNS request is correct. Conversely, if the first occurrence frequency is not higher than the critical value, the verification module 203 may determine that the determination result that the target DNS request is a malicious DNS request is not correct and adjust the machine learning model 202 accordingly.
[0045] Figure 6 is a flow chart of a data leakage detection method according to an embodiment of the present invention. Figure 6 In step S601, network connection data of the electronic device is obtained. In step S602, log data related to the domain name system is obtained from the network connection data. In step S603, the domain name system request in the log data is analyzed and a plurality of character distribution feature values are obtained according to the analysis results, wherein the plurality of character distribution feature values reflect the character distribution status of the domain name in the domain name system request under different classification rules. In step S604, a machine learning model is used to determine whether the domain name system request is a malicious domain name system request according to the plurality of character distribution feature values, wherein the malicious domain name system request is used to carry leaked data to a remote host.
[0046] However, Figure 6 The steps in the above are described in detail, so I will not repeat them here. It is worth noting that Figure 6 Each step in the above process can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. Figure 6 The method can be used in conjunction with the above exemplary embodiments or can be used alone, and the present invention is not limited thereto.
[0047] In summary, the exemplary embodiment proposed by the present invention can obtain a variety of character distribution feature values according to the character distribution state of the domain name in the domain name system request under different classification rules, and then the machine learning model detects malicious domain name system requests that may carry leaked data according to the multiple character distribution feature values. In addition, the exemplary embodiment proposed by the present invention can also verify the judgment result of the machine learning model through the detection frequency of malicious domain name system requests in different detection time periods (such as off-peak and peak time periods). In this way, the detection efficiency of domain name system requests and / or domain names used by hackers or malicious programs to perform data leakage can be effectively improved.
[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data leakage detection method, It is characterized in that include: Obtaining network connection data of the electronic device; Obtaining log data related to the domain name system from the network connection data; Analyzing the domain name system request in the log data and obtaining a plurality of character distribution feature values according to the analysis result, wherein the plurality of character distribution feature values reflect the character distribution status of the domain name in the domain name system request under different classification rules; as well as The machine learning model determines whether the domain name system request is a malicious domain name system request according to the plurality of character distribution feature values, wherein the malicious domain name system request is used to carry the leaked data to the remote host, wherein the plurality of character distribution feature values include first-type feature values and second-type feature values, The first type of feature value reflects a first character distribution state of the domain name under a first classification rule, and the second type of feature value reflects a second character distribution state of the domain name under a second classification rule, and the first classification rule is different from the second classification rule. The step of analyzing the domain name system request in the log data and obtaining the plurality of character distribution feature values according to the analysis result comprises: analyzing the domain name system request to obtain a plurality of evaluation parameters; as well as Obtaining the plurality of character distribution feature values according to the plurality of evaluation parameters, The multiple evaluation parameters reflect at least two of the total number of characters contained in the meaningful string in the domain name, the total number of all characters in the domain name, the total number of numbers in the domain name, the total number of non-repeated characters in the third-level domain name in the domain name, the total number of all characters other than the first-level domain name and the second-level domain name in the domain name, the number of occurrences of the most repeated characters in the third-level domain name in the domain name, the number of occurrences of numbers and letters adjacent to each other in the third-level domain name in the domain name, the total number of characters with the highest or lowest occurrence frequency in the third-level domain name in the domain name, and the entropy value of the third-level domain name in the domain name.
2. The data leakage detection method according to claim 1, further comprising: include: After the machine learning model determines that the domain name system request belongs to the malicious domain name system request, the judgment result of the machine learning model is verified according to the first occurrence frequency of the malicious domain name system request.
3. The data leakage detection method according to claim 2, further comprising: include: The first occurrence frequency of the malicious domain name system request is determined according to the number of occurrences of the malicious domain name system request within a first time range.
4. The data leakage detection method according to claim 2, wherein the step of verifying the judgment result of the machine learning model according to the occurrence frequency of the malicious domain name system request include: If the occurrence frequency is not higher than a critical value, marking the domain name system request as a misjudgment of the malicious domain name system request; as well as Adjust the decision logic of the machine learning model according to the misjudgment.
5. The data leakage detection method according to claim 4, further comprising: include: Obtaining a second occurrence frequency of the malicious domain name system request; as well as The critical value is determined according to the second occurrence frequency.
6. A data leakage detection device, It is characterized in that include: A storage circuit for storing network connection data and a machine learning model of the electronic device; as well as A processor connected to the storage circuit and configured to: Obtaining log data related to the domain name system from the network connection data; Analyzing the domain name system request in the log data and obtaining a plurality of character distribution feature values according to the analysis result, wherein the plurality of character distribution feature values reflect the character distribution status of the domain name in the domain name system request under different classification rules; as well as determining, by the machine learning model, whether the domain name system request is a malicious domain name system request according to the plurality of character distribution feature values, wherein the malicious domain name system request is used to carry leaked data to a remote host, wherein the plurality of character distribution feature values include first-type feature values and second-type feature values, The first type of feature value reflects a first character distribution state of the domain name under a first classification rule, and the second type of feature value reflects a second character distribution state of the domain name under a second classification rule, and the first classification rule is different from the second classification rule. The operation of analyzing the domain name system request in the log data and obtaining the plurality of character distribution feature values according to the analysis result includes: analyzing the domain name system request to obtain a plurality of evaluation parameters; as well as Obtaining the plurality of character distribution feature values according to the plurality of evaluation parameters, The multiple evaluation parameters reflect at least two of the total number of characters contained in the meaningful string in the domain name, the total number of all characters in the domain name, the total number of numbers in the domain name, the total number of non-repeated characters in the third-level domain name in the domain name, the total number of all characters other than the first-level domain name and the second-level domain name in the domain name, the number of occurrences of the most repeated characters in the third-level domain name in the domain name, the number of occurrences of numbers and letters adjacent to each other in the third-level domain name in the domain name, the total number of characters with the highest or lowest occurrence frequency in the third-level domain name in the domain name, and the entropy value of the third-level domain name in the domain name.
7. The data leakage detection device according to claim 6, wherein the processor is further configured to: After the machine learning model determines that the domain name system request belongs to the malicious domain name system request, the judgment result of the machine learning model is verified according to the first occurrence frequency of the malicious domain name system request.
8. The data leakage detection device according to claim 7, wherein the processor is further configured to: The first occurrence frequency of the malicious domain name system request is determined according to the number of occurrences of the malicious domain name system request within a first time range.
9. The data leakage detection device according to claim 7, wherein the operation of verifying the judgment result of the machine learning model is based on the occurrence frequency of the malicious domain name system request. include: If the occurrence frequency is not higher than a critical value, marking the domain name system request as a misjudgment of the malicious domain name system request; as well as Adjust the decision logic of the machine learning model according to the misjudgment.
10. The data leakage detection device according to claim 9, wherein the processor is further configured to: Obtaining a second occurrence frequency of the malicious domain name system request; and The critical value is determined according to the second occurrence frequency.
