Method and device for accessing domain name
By calculating and selecting the domain name response message with the smallest target suspicious value in the domain name system, the problem of low security of the domain name system in the existing technology is solved, the effective identification and filtering of forged messages is realized, and the security of domain name access is improved. sex.
Patent Information
- Application Number
- CN202111612396.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-12-27
AI Technical Summary
In the existing technology, the domain name system has low security when facing poisoning attacks and cannot effectively identify and filter forged domain name response messages, allowing attackers to contaminate the cache of the domain name system first.
By obtaining domain name response messages corresponding to domain name access messages in the domain name system, if the specified conditions are met (port and access identifier match) and the number exceeds the threshold, the target suspicious value of each response message is calculated and the target suspicious value is selected. The smallest response message is regarded as a legal response message and sent to the user terminal device to improve the legality analysis and security of the domain name response message.
Effectively identify and filter forged domain name response messages, improve the security of domain name access, and prevent poisoning attacks from contaminating the domain name system.
Smart Images

Figure CN114401246B
Abstract
Description
Background Art
[0002] The domain name resolution service of the domain name system is the most important basic service of the Internet. In recent years, attacks on the domain name system have become more and more frequent. The domain name system has become a weak link in Internet security. How to ensure the security of the domain name system is an urgent problem to be solved. Among the security risks faced by the domain name system, poisoning attacks on the domain name system are the most frequent, the most hidden, and the most destructive.
[0003] In the prior art, the domain name system only uses a simple trust mechanism to access domain names in order to prevent poisoning. The port and access identifier of the first received domain name response message are identified without any analysis of the legitimacy of the domain name response message. If the port and access identifier of the domain name response message match the port and access identifier in the domain name access message, it is sent to the user's terminal device as a correct domain name response message. Then all subsequent domain name response messages are discarded. This allows attackers to send forged messages and strive to complete the response first to pollute the cache of the domain name system. Therefore, the method of accessing domain names in the prior art leads to low security when accessing domain names. Summary of the invention
[0004] In an exemplary embodiment of the present disclosure, a method and apparatus for accessing a domain name are provided to improve security when accessing a domain name.
[0005] A first aspect of the present disclosure provides a method for accessing a domain name, the method comprising:
[0006] In response to a domain name access message sent by a user, obtaining at least one domain name response message corresponding to the domain name access message in the domain name system;
[0007] If it is determined that the number of domain name response messages that meet the first specified condition is greater than the first specified threshold, then for any domain name response message that meets the first specified condition, a target suspicious value of the domain name response message is obtained based on the domain name response message; wherein the first specified condition is that a parameter of the domain name response message is equal to a parameter of the domain name access message, and the parameter includes a port and an access identifier;
[0008] Determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message;
[0009] The target domain name response message is used to obtain a domain name corresponding to the domain name access message, and the domain name is sent to a terminal device corresponding to the user, so that the user can access the domain name through the terminal device.
[0010] In this embodiment, if the number of domain name response messages that meet the first specified condition (i.e., the parameters of the domain name response message are equal to the parameters of the domain name access message, and the parameters include the port and the access identifier) is greater than the first specified threshold, then for any domain name response message that meets the first specified condition, it is necessary to obtain the target suspicious value of the domain name response message based on the domain name response message, and determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message, so that the user can access the domain name in the target domain name response message. Therefore, in this embodiment, not only the port and access identifier of the domain name response message are identified and judged, but also the legitimacy of the domain name response message itself is analyzed, thereby improving the security when accessing the domain name.
[0011] In one embodiment, the domain name response message includes at least one of a domain name, an Internet protocol lifetime value, and a domain name lifetime value;
[0012] The obtaining, based on the domain name response message, a target suspicious value of the domain name response message includes:
[0013] If the domain name response message includes an Internet protocol lifetime value, the Internet protocol lifetime value is compared with a first specified range to obtain a first comparison result; and based on the first comparison result, a first suspicious value is obtained, and the first suspicious value is determined as the target suspicious value; wherein the first suspicious value is used to identify whether the Internet protocol lifetime value of the domain name response message is within the first specified range; or,
[0014] If the domain name response message includes a domain name lifetime value, the domain name lifetime value is compared with a second specified range to obtain a second comparison result, and based on the second comparison result, a second suspicious value is obtained, and the second suspicious value is determined as the target suspicious value; wherein the second suspicious value is used to identify whether the domain name lifetime value of the domain name response message is within the second specified range; or,
[0015] If the domain name response message includes the domain name, the domain name is compared with the target domain name to obtain a third comparison result, and based on the third comparison result, a third suspicious value is obtained, and the third suspicious value is determined as the target suspicious value; wherein the target domain name is obtained by performing domain name conversion on the domain name in the domain name access message using a preset domain name conversion rule, and the third suspicious value is used to identify whether the domain name of the domain name response message is the same as the target domain name; or,
[0016] If the domain name response message includes an Internet protocol lifetime value and the domain name lifetime value, then using the first suspicious value and the second suspicious value to obtain the target suspicious value; or,
[0017] If the domain name response message includes the Internet protocol lifetime value and the domain name, the target suspicious value is obtained by using the first suspicious value and the third suspicious value; or,
[0018] If the domain name response message includes the domain name lifetime value and the domain name, the target suspicious value is obtained by using the second suspicious value and the third suspicious value; or,
[0019] If the domain name response message includes an Internet protocol lifetime value, the domain name lifetime value and the domain name, the Internet protocol lifetime value is compared with a target Internet protocol lifetime value to obtain a fourth comparison result, and the domain name lifetime value is compared with a target domain name lifetime value to obtain a fifth comparison result; a fourth suspicious value is obtained using the fourth comparison result and the fifth comparison result, and the target suspicious value is obtained based on the first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value; wherein the target Internet protocol lifetime value and the target domain name lifetime value are both obtained through the domain name.
[0020] This embodiment determines the target suspicious value through at least one of the domain name, Internet protocol lifetime value and domain name lifetime value in the domain name response message. Therefore, in this embodiment, the target suspicious value can be determined through various dimensions, so that the determined target response message is more accurate, further improving the security of accessing the domain name.
[0021] In one embodiment, obtaining a first suspicious value based on the first comparison result includes:
[0022] If the first comparison result is that the Internet protocol lifetime value is not within the first specified range, adding a first preset initial value to a first preset threshold value to obtain the first suspicious value;
[0023] If the first comparison result is that the Internet protocol lifetime value is within the first specified range, the first preset initial value is determined as the first suspicious value.
[0024] In one embodiment, obtaining a second suspicious value based on the second comparison result includes:
[0025] If the second comparison result is that the domain name lifetime value is not within the second specified range, then adding the second preset initial value to the second preset threshold to obtain the second suspicious value;
[0026] If the second comparison result is that the domain name lifetime value is within the second specified range, the second preset initial value is determined as the second suspicious value.
[0027] In one embodiment, obtaining a third suspicious value based on the third comparison result includes:
[0028] If the third comparison result is that the domain name is the same as the target domain name, determining the third preset initial value as the third suspicious value;
[0029] If the third comparison result is that the domain name is different from the target domain name, the third preset initial value is added to the third preset threshold to obtain the third suspicious value.
[0030] In one embodiment, the using the fourth comparison result and the fifth comparison result to obtain a fourth suspicious value includes:
[0031] If the fourth comparison result is that the difference between the Internet protocol lifetime value and the target Internet protocol lifetime value is within the first specified difference range, and the fifth comparison result is that the difference between the domain name lifetime value and the target domain name lifetime value is within the second specified difference range, the fourth preset initial value is determined as the fourth suspicious value;
[0032] Otherwise, the fourth preset initial value is added to the fourth preset threshold to obtain the fourth suspicious value.
[0033] In one embodiment, the domain name response message further includes parsing the Internet protocol;
[0034] The target Internet protocol lifetime value and the target domain name lifetime value are determined by:
[0035] If the domain name and the resolved Internet protocol are in a preset database, the Internet protocol lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target Internet protocol lifetime value, and the domain name lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target domain name lifetime value; or,
[0036] If the domain name or the resolved Internet protocol is not in the preset database, the Internet protocol lifetime value in the designated domain name response message is determined as the target Internet protocol lifetime value, and the domain name lifetime value in the designated domain name response message is determined as the target domain name lifetime value; wherein, the designated domain name response message is a response message obtained by sending the domain name access message to a designated domain name system, and the domain name of the designated domain name response message is the same as the domain name of the domain name response message, and the resolved Internet protocol of the target response message is the same as the resolved Internet protocol of the domain name response message.
[0037] In one embodiment, after determining the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message, the method further includes:
[0038] A poisoning alarm message is sent to a designated terminal device, wherein the poisoning alarm message includes other domain name response messages except the target domain name response message.
[0039] In this implementation, a poisoning alarm message is sent to a designated terminal device so that the staff can implement corresponding measures, thereby further improving the security of the domain name system.
[0040] A second aspect of the present disclosure provides a device for accessing a domain name, the device comprising:
[0041] A domain name response message determination module, configured to obtain at least one domain name response message corresponding to the domain name access message in the domain name system in response to the domain name access message sent by the user;
[0042] A target suspicious value determination module, configured to obtain a target suspicious value of a domain name response message based on the domain name response message for any domain name response message that meets the first specified condition, if it is determined that the number of domain name response messages that meet the first specified condition is greater than a first specified threshold; wherein the first specified condition is that a parameter of the domain name response message is equal to a parameter of the domain name access message, and the parameter includes a port and an access identifier;
[0043] A target domain name response message determination module, used to determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message;
[0044] The domain name determination module is used to use the target domain name response message to obtain the domain name corresponding to the domain name access message, and send the domain name to the terminal device corresponding to the user, so that the user can access the domain name through the terminal device.
[0045] In one embodiment, the domain name response message includes at least one of a domain name, an Internet protocol lifetime value, and a domain name lifetime value;
[0046] The target suspicious value determination module is specifically used to:
[0047] If the domain name response message includes an Internet protocol lifetime value, the Internet protocol lifetime value is compared with a first specified range to obtain a first comparison result; and based on the first comparison result, a first suspicious value is obtained, and the first suspicious value is determined as the target suspicious value; wherein the first suspicious value is used to identify whether the Internet protocol lifetime value of the domain name response message is within the first specified range; or,
[0048] If the domain name response message includes a domain name lifetime value, the domain name lifetime value is compared with a second specified range to obtain a second comparison result, and based on the second comparison result, a second suspicious value is obtained, and the second suspicious value is determined as the target suspicious value; wherein the second suspicious value is used to identify whether the domain name lifetime value of the domain name response message is within the second specified range; or,
[0049] If the domain name response message includes the domain name, the domain name is compared with the target domain name to obtain a third comparison result, and based on the third comparison result, a third suspicious value is obtained, and the third suspicious value is determined as the target suspicious value; wherein the target domain name is obtained by performing domain name conversion on the domain name in the domain name access message using a preset domain name conversion rule, and the third suspicious value is used to identify whether the domain name of the domain name response message is the same as the target domain name; or,
[0050] If the domain name response message includes an Internet protocol lifetime value and the domain name lifetime value, then using the first suspicious value and the second suspicious value to obtain the target suspicious value; or,
[0051] If the domain name response message includes the Internet protocol lifetime value and the domain name, the target suspicious value is obtained by using the first suspicious value and the third suspicious value; or,
[0052] If the domain name response message includes the domain name lifetime value and the domain name, the target suspicious value is obtained by using the second suspicious value and the third suspicious value; or,
[0053] If the domain name response message includes an Internet protocol lifetime value, the domain name lifetime value and the domain name, the Internet protocol lifetime value is compared with a target Internet protocol lifetime value to obtain a fourth comparison result, and the domain name lifetime value is compared with a target domain name lifetime value to obtain a fifth comparison result; a fourth suspicious value is obtained using the fourth comparison result and the fifth comparison result, and the target suspicious value is obtained based on the first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value; wherein the target Internet protocol lifetime value and the target domain name lifetime value are both obtained through the domain name.
[0054] In one embodiment, the target suspicious value determination module performs the step of obtaining the first suspicious value based on the first comparison result, specifically for:
[0055] If the first comparison result is that the Internet protocol lifetime value is not within the first specified range, adding a first preset initial value to a first preset threshold value to obtain the first suspicious value;
[0056] If the first comparison result is that the Internet protocol lifetime value is within the first specified range, the first preset initial value is determined as the first suspicious value.
[0057] In one embodiment, the target suspicious value determination module performs the step of obtaining a second suspicious value based on the second comparison result, specifically for:
[0058] If the second comparison result is that the domain name lifetime value is not within the second specified range, then adding the second preset initial value to the second preset threshold to obtain the second suspicious value;
[0059] If the second comparison result is that the domain name lifetime value is within the second specified range, the second preset initial value is determined as the second suspicious value.
[0060] In one embodiment, the target suspicious value determination module performs the step of obtaining the third suspicious value based on the third comparison result, specifically for:
[0061] If the third comparison result is that the domain name is the same as the target domain name, determining the third preset initial value as the third suspicious value;
[0062] If the third comparison result is that the domain name is different from the target domain name, the third preset initial value is added to the third preset threshold to obtain the third suspicious value.
[0063] In one embodiment, the target suspicious value determination module performs the use of the fourth comparison result and the fifth comparison result to obtain the fourth suspicious value, specifically for:
[0064] If the fourth comparison result is that the difference between the Internet protocol lifetime value and the target Internet protocol lifetime value is within the first specified difference range, and the fifth comparison result is that the difference between the domain name lifetime value and the target domain name lifetime value is within the second specified difference range, the fourth preset initial value is determined as the fourth suspicious value;
[0065] Otherwise, the fourth preset initial value is added to the fourth preset threshold to obtain the fourth suspicious value. In one embodiment, the domain name response message also includes parsing the Internet protocol; the device also includes:
[0066] The target determination module is used to determine the target Internet protocol lifetime value and the target domain name lifetime value by:
[0067] If the domain name and the resolved Internet protocol are in a preset database, the Internet protocol lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target Internet protocol lifetime value, and the domain name lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target domain name lifetime value; or,
[0068] If the domain name or the resolved Internet protocol is not in the preset database, the Internet protocol lifetime value in the designated domain name response message is determined as the target Internet protocol lifetime value, and the domain name lifetime value in the designated domain name response message is determined as the target domain name lifetime value; wherein, the designated domain name response message is a response message obtained by sending the domain name access message to a designated domain name system, and the domain name of the designated domain name response message is the same as the domain name of the domain name response message, and the resolved Internet protocol of the target response message is the same as the resolved Internet protocol of the domain name response message.
[0069] In one embodiment, the apparatus further comprises:
[0070] The poisoning alarm message sending module is used to send a poisoning alarm message to a designated terminal device after determining the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message, wherein the poisoning alarm message includes other domain name response messages except the target domain name response message.
[0071] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0072] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executed by the at least one processor; the instructions are executed by the at least one processor so that the at least one processor can execute the method as described in the first aspect.
[0073] According to a fourth aspect provided by an embodiment of the present disclosure, a computer storage medium is provided, wherein the computer storage medium stores a computer program, and the computer program is used to execute the method as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0075] Figure 1 A schematic diagram of an applicable scenario in an embodiment of the present disclosure;
[0076] Figure 2 This is one of the flowcharts of a method for accessing a domain name according to an embodiment of the present disclosure;
[0077] Figure 3 is a schematic diagram of a preset database according to an embodiment of the present disclosure;
[0078] Figure 4 The second flowchart of the method for accessing a domain name according to an embodiment of the present disclosure;
[0079] Figure 5 A device for accessing a domain name according to an embodiment of the present disclosure;
[0080] Figure 6 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0082] In the embodiments of the present disclosure, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0083] The application scenarios described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems. In the description of the present disclosure, unless otherwise specified, the meaning of "multiple" is two or more.
[0084] In the prior art, the domain name system only uses a simple trust mechanism to access domain names in order to prevent poisoning. The port and access identifier of the first received domain name response message are identified without any analysis of the legitimacy of the domain name response message. If the port and access identifier of the domain name response message match the port and access identifier in the domain name access message, it is sent to the user's terminal device as a correct domain name response message. Then all subsequent domain name response messages are discarded. This allows attackers to send forged messages and strive to complete the response first to pollute the cache of the domain name system. Therefore, the method of accessing domain names in the prior art leads to low security when accessing domain names.
[0085] Therefore, the present disclosure provides a method for accessing a domain name, by which if the number of domain name response messages that meet the first specified condition (i.e., the parameters of the domain name response message are equal to the parameters of the domain name access message, and the parameters include the port and the access identifier) is greater than the first specified threshold, then for any domain name response message that meets the first specified condition, it is necessary to obtain the target suspicious value of the domain name response message based on the domain name response message, and determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message, so that the user can access the domain name in the target domain name response message. Therefore, in this embodiment, not only the port and access identifier of the domain name response message are judged, but also the legitimacy of the domain name response message itself is analyzed, thereby improving the security when accessing the domain name. Below, the scheme of the present disclosure is described in detail in conjunction with the accompanying drawings.
[0086] like Figure 1 As shown, an application scenario of a method for accessing a domain name includes a user terminal device 110, a cache server 120, a recursive server 130, multiple authoritative servers 140 and a poisoning analysis server 150. Figure 1In the figure, one user terminal device 110 is taken as an example, but in fact, the number of user terminal devices 110 is not limited. The user terminal device 110 can be a mobile phone, a tablet computer, a personal computer, etc.
[0087] Among them, the cache server 120, the recursive server 130, and the authoritative server 140 are domain name systems.
[0088] In a possible application scenario, if user A uses terminal device 110 to send a domain name access message to cache server 120, if there is no domain name corresponding to the domain name access message in cache server 120, the domain name access message is sent to recursive server 130. After recursive server 130 forwards the domain name access message to authoritative server 140, poisoning analysis server 150 responds to the domain name access message sent by the user and obtains at least one domain name response message corresponding to the domain name access message in the domain name system through the communication network; if it is determined that the number of domain name response messages that meet the first specified condition is greater than the first specified threshold, poisoning analysis server 150, for any domain name response message that meets the first specified condition, based on the first specified threshold, The target suspicious value of the domain name response message is obtained by using the domain name response message; wherein the first specified condition is that the parameters of the domain name response message are equal to the parameters of the domain name access message, and the parameters include the port and the access identifier; and the domain name response message with the smallest target suspicious value is determined as the target domain name response message corresponding to the domain name access message; finally, the poisoning analysis server 150 uses the target domain name response message to obtain the domain name corresponding to the domain name access message, and sends the domain name to the cache server 120 through the recursive server 130. After the cache server 120 stores the domain name, it sends the domain name to the user terminal device 110, so that the user can access the domain name through the user terminal device 110.
[0089] like Figure 2 FIG. 1 is a flow chart of a method for accessing a domain name disclosed in the present invention, which may include the following steps:
[0090] Step 201: In response to a domain name access message sent by a user, obtaining at least one domain name response message corresponding to the domain name access message in a domain name system;
[0091] The domain name response message includes at least one of a domain name, an Internet protocol lifetime value, and a domain name lifetime value. In this embodiment, the domain name response message corresponding to the domain name access message is obtained by mirroring.
[0092] Step 202: If it is determined that the number of domain name response messages that meet the first specified condition is greater than the first specified threshold, then for any domain name response message that meets the first specified condition, a target suspicious value of the domain name response message is obtained based on the domain name response message; wherein the first specified condition is that a parameter of the domain name response message is equal to a parameter of the domain name access message, and the parameter includes a port and an access identifier;
[0093] The first specified threshold in this embodiment is 1. The specific value of the first specified threshold can be set according to actual conditions, and this embodiment does not limit the first specified threshold.
[0094] In one embodiment, if it is determined that the number of domain name response messages that meet the first specified condition is not greater than the first specified threshold, it is determined whether the domain name in the domain name response message is a key protected domain name, and if so, it is determined whether the resolution Internet protocol in the domain name response message is stored in a preset database, and if so, the domain name response message is determined as the target domain name response message, and the preset database is updated using the target domain name response message. If not, a poisoning alarm message is sent to a specified terminal device, and the poisoning alarm message includes the target domain name response message.
[0095] It should be noted that the key protected domain names are pre-set.
[0096] Step 203: Determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message;
[0097] Step 204: using the target domain name response message, obtain a domain name corresponding to the domain name access message, and send the domain name to the terminal device corresponding to the user, so that the user can access the domain name through the terminal device.
[0098] In order to further improve the security of the domain name system, in one embodiment, a poisoning alarm message is sent to a designated terminal device, and the poisoning alarm message includes other domain name response messages except the target domain name response message.
[0099] In order to make the suspicious value determined by each domain name response message more accurate, in one embodiment, the target suspicious value of each domain name response message can be obtained by the following methods:
[0100] Method 1: If the domain name response message includes an Internet protocol lifetime value, the Internet protocol lifetime value is compared with a first specified range to obtain a first comparison result; and based on the first comparison result, a first suspicious value is obtained, and the first suspicious value is determined as the target suspicious value; wherein the first suspicious value is used to identify whether the Internet protocol lifetime value of the domain name response message is within the first specified range.
[0101] The first specified range is determined based on the standard Internet Protocol lifetime value obtained by PING, and the Internet Protocol lifetime is the number of hops between the authoritative server and the cache server. The number of hops between the authoritative server and the cache server will be reduced by the number of switches between them.
[0102] For example, the specified hop count is 65. If there are ten switches between the authoritative server and the cache server, the hop count is 55, that is, the standard Internet Protocol lifetime value is 55. However, since the poisoner does not poison from the authoritative server, but through the intermediate network, that is, the switch, the Internet Protocol lifetime value of the poisoner's domain name response message will be very different from the standard Internet lifetime value.
[0103] In one embodiment, the first suspicious value may be obtained in the following manner:
[0104] If the first comparison result is that the Internet protocol lifetime value is not within the first specified range, adding a first preset initial value to a first preset threshold value to obtain the first suspicious value;
[0105] If the first comparison result is that the Internet protocol lifetime value is within the first specified range, the first preset initial value is determined as the first suspicious value.
[0106] Method 2: If the domain name response message includes a domain name lifetime value, the domain name lifetime value is compared with a second specified range to obtain a second comparison result, and based on the second comparison result, a second suspicious value is obtained, and the second suspicious value is determined as the target suspicious value; wherein the second suspicious value is used to identify whether the domain name lifetime value of the domain name response message is within the second specified range.
[0107] In order to ensure the poisoning effect, the poisoner will set the domain name lifetime value to be very long. However, the domain name lifetime value corresponding to a normal domain name is relatively short, because it is necessary to ensure better scheduling and faster fault recovery time. Therefore, it is necessary to compare the domain name lifetime value in the domain name response message with the second specified range.
[0108] It should be noted that the second designated range in this embodiment is pre-set and can be set according to actual conditions, and this embodiment does not limit it here.
[0109] In one embodiment, the second suspicious value may be obtained in the following manner:
[0110] If the second comparison result is that the domain name lifetime value is not within the second specified range, then adding the second preset initial value to the second preset threshold to obtain the second suspicious value;
[0111] If the second comparison result is that the domain name lifetime value is within the second specified range, the second preset initial value is determined as the second suspicious value.
[0112] Method three: If the domain name response message includes the domain name, the domain name is compared with the target domain name to obtain a third comparison result, and based on the third comparison result, a third suspicious value is obtained, and the third suspicious value is determined as the target suspicious value; wherein, the target domain name is obtained by converting the domain name in the domain name access message using a preset domain name conversion rule, and the third suspicious value is used to identify whether the domain name of the domain name response message is the same as the target domain name.
[0113] In this embodiment, when the recursive server sends a domain name access request to the authoritative server, the preset domain name conversion rule is also sent to the authoritative server. Therefore, only the domain name sent by the authoritative server will be the same as the target domain name. The domain name sent by the poisoner will not be the same as the target domain name.
[0114] The preset domain name conversion rule in this embodiment is a domain name letter case conversion rule. The preset domain name conversion rule in this embodiment uses 0x20 to perform conversion. That is, the case of the fifth letter in the domain name is changed. However, the domain name conversion rule is only used for example, and the specific domain name conversion rule can be set according to the actual situation, and this embodiment does not limit it here.
[0115] In one embodiment, the third suspicious value may be determined in the following manner:
[0116] If the third comparison result is that the domain name is the same as the target domain name, determining the third preset initial value as the third suspicious value;
[0117] If the third comparison result is that the domain name is different from the target domain name, the third preset initial value is added to the third preset threshold to obtain the third suspicious value.
[0118] Method 4: If the domain name response message includes an Internet protocol lifetime value and the domain name lifetime value, the target suspicious value is obtained by using the first suspicious value and the second suspicious value.
[0119] In one embodiment, the first suspicious value and the second suspicious value are added to obtain the target suspicious value.
[0120] Method 5: If the domain name response message includes the domain name lifetime value and the domain name, the target suspicious value is obtained by using the second suspicious value and the third suspicious value.
[0121] In one embodiment, the second suspicious value and the third suspicious value are added to obtain the target suspicious value.
[0122] Method six: if the domain name response message includes the Internet protocol lifetime value and the domain name, the target suspicious value is obtained by using the first suspicious value and the third suspicious value.
[0123] In one embodiment, the first suspicious value and the third suspicious value are added to obtain the target suspicious value.
[0124] Method seven: If the domain name response message includes an Internet protocol lifetime value, the domain name lifetime value and the domain name, then the Internet protocol lifetime value is compared with a target Internet protocol lifetime value to obtain a fourth comparison result, and the domain name lifetime value is compared with a target domain name lifetime value to obtain a fifth comparison result; using the fourth comparison result and the fifth comparison result, a fourth suspicious value is obtained, and according to the first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value, the target suspicious value is obtained; wherein the target Internet protocol lifetime value and the target domain name lifetime value are both obtained through the domain name.
[0125] The first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value are added together to obtain the target suspicious value.
[0126] In one embodiment, the fourth suspicious value is obtained by:
[0127] If the fourth comparison result is that the difference between the Internet protocol lifetime value and the target Internet protocol lifetime value is within the first specified difference range, and the fifth comparison result is that the difference between the domain name lifetime value and the target domain name lifetime value is within the second specified difference range, then the fourth preset initial value is determined as the fourth suspicious value; otherwise, the fourth preset initial value is added to the fourth preset threshold to obtain the fourth suspicious value.
[0128] It should be noted that: in this embodiment, the first preset initial value, the second preset initial value, the third preset initial value and the fourth preset initial value may be the same, partially the same, or completely different, and may be set according to actual conditions.
[0129] In one embodiment, the target Internet protocol lifetime value and the target domain name lifetime value are determined by:
[0130] If the domain name and the resolved Internet protocol are in a preset database, the Internet protocol lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target Internet protocol lifetime value, and the domain name lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target domain name lifetime value;
[0131] like Figure 3 As shown in the figure, it is the data corresponding to any domain name in the preset database, such as Figure 3 It can be seen that the data corresponding to the domain name in the domain name response message is first found in the preset database. If it exists, it is determined whether there is a resolved Internet protocol corresponding to the domain name response message in the data corresponding to the domain name. If it exists, the Internet protocol lifetime value corresponding to the domain name is determined as the target Internet protocol lifetime value, and the domain name lifetime value corresponding to the domain name in the preset database is determined as the target domain name lifetime value.
[0132] The data corresponding to the domain name also includes index, priority and other data, and the parsed Internet protocol includes the corresponding earliest registration time, latest registration time and registration times and the like.
[0133] It should be noted that the preset database includes data corresponding to each domain name, namely, the index, priority, Internet protocol lifetime value, domain name lifetime value and Internet protocol resolution corresponding to each domain name, as well as the earliest registration time, latest registration time and registration times corresponding to the Internet protocol resolution.
[0134] If the domain name or the resolved Internet protocol is not in the preset database, the Internet protocol lifetime value in the designated domain name response message is determined as the target Internet protocol lifetime value, and the domain name lifetime value in the designated domain name response message is determined as the target domain name lifetime value; wherein, the designated domain name response message is a response message obtained by sending the domain name access message to a designated domain name system, and the domain name of the designated domain name response message is the same as the domain name of the domain name response message, and the resolved Internet protocol of the target response message is the same as the resolved Internet protocol of the domain name response message.
[0135] In order to further understand the technical solution of the present invention, the technical solution of the present invention is introduced in detail by taking the domain name response message including the domain name, the Internet protocol lifetime value and the domain name lifetime value as an example. Figure 4 A detailed description may include the following steps:
[0136] Step 401: In response to a domain name access message sent by a user, obtaining at least one domain name response message corresponding to the domain name access message in a domain name system;
[0137] Step 402: Determine whether the number of domain name response messages that meet a first specified condition is greater than a first specified threshold, wherein the first specified condition is that the parameters of the domain name response message are equal to the parameters of the domain name access message, and the parameters include a port and an access identifier; if so, execute step 403; if not, execute step 404;
[0138] Step 403: for any domain name response message that meets the first specified condition, compare the Internet protocol lifetime value with the first specified range to obtain a first comparison result; and obtain a first suspicious value based on the first comparison result;
[0139] Step 404: Compare the domain name lifetime value with a second specified range to obtain a second comparison result, and obtain a second suspicious value based on the second comparison result;
[0140] Step 405: Compare the domain name with the target domain name to obtain a third comparison result, and obtain a third suspicious value based on the third comparison result;
[0141] Step 406: Compare the Internet protocol lifetime value with the target Internet protocol lifetime value to obtain a fourth comparison result, and compare the domain name lifetime value with the target domain name lifetime value to obtain a fifth comparison result, and use the fourth comparison result and the fifth comparison result to obtain a fourth suspicious value;
[0142] It should be noted that the execution order of steps 403 to 406 in this embodiment is not limited in this embodiment, and they can be executed simultaneously or sequentially.
[0143] Step 407: Obtain the target suspicious value according to the first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value;
[0144] Step 408: Determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message;
[0145] Step 409: determining the domain name response message that meets the first specified condition as the target domain name response message corresponding to the domain name access message;
[0146] Step 410: Utilize the target domain name response message to obtain a domain name corresponding to the domain name access message, and send the domain name to a terminal device corresponding to the user, so that the user can access the domain name through the terminal device.
[0147] Based on the same disclosure concept, the method for accessing a domain name as described above in the present disclosure can also be implemented by a device for accessing a domain name. The effect of the device for accessing a domain name is similar to that of the aforementioned method, and will not be described in detail here.
[0148] Figure 5 The figure is a schematic diagram of the structure of a device for accessing a domain name according to an embodiment of the present disclosure.
[0149] like Figure 5 As shown, the device 500 for accessing a domain name disclosed herein may include a domain name response message determination module 510 , a target suspicious value determination module 520 , a target domain name response message determination module 530 and a domain name determination module 540 .
[0150] A domain name response message determination module 510, configured to obtain at least one domain name response message corresponding to the domain name access message in the domain name system in response to the domain name access message sent by the user;
[0151] The target suspicious value determination module 520 is used to obtain a target suspicious value of the domain name response message based on the domain name response message for any domain name response message that meets the first specified condition if it is determined that the number of domain name response messages that meet the first specified condition is greater than the first specified threshold; wherein the first specified condition is that the parameters of the domain name response message are equal to the parameters of the domain name access message, and the parameters include a port and an access identifier;
[0152] A target domain name response message determination module 530, configured to determine a domain name response message with a minimum target suspicious value as a target domain name response message corresponding to the domain name access message;
[0153] The domain name determination module 540 is used to use the target domain name response message to obtain the domain name corresponding to the domain name access message, and send the domain name to the terminal device corresponding to the user, so that the user can access the domain name through the terminal device.
[0154] In one embodiment, the domain name response message includes at least one of a domain name, an Internet protocol lifetime value, and a domain name lifetime value;
[0155] The target suspicious value determination module 530 is specifically used to:
[0156] If the domain name response message includes an Internet protocol lifetime value, the Internet protocol lifetime value is compared with a first specified range to obtain a first comparison result; and based on the first comparison result, a first suspicious value is obtained, and the first suspicious value is determined as the target suspicious value; wherein the first suspicious value is used to identify whether the Internet protocol lifetime value of the domain name response message is within the first specified range; or,
[0157] If the domain name response message includes a domain name lifetime value, the domain name lifetime value is compared with a second specified range to obtain a second comparison result, and based on the second comparison result, a second suspicious value is obtained, and the second suspicious value is determined as the target suspicious value; wherein the second suspicious value is used to identify whether the domain name lifetime value of the domain name response message is within the second specified range; or,
[0158] If the domain name response message includes the domain name, the domain name is compared with the target domain name to obtain a third comparison result, and based on the third comparison result, a third suspicious value is obtained, and the third suspicious value is determined as the target suspicious value; wherein the target domain name is obtained by performing domain name conversion on the domain name in the domain name access message using a preset domain name conversion rule, and the third suspicious value is used to identify whether the domain name of the domain name response message is the same as the target domain name; or,
[0159] If the domain name response message includes an Internet protocol lifetime value and the domain name lifetime value, then using the first suspicious value and the second suspicious value to obtain the target suspicious value; or,
[0160] If the domain name response message includes the Internet protocol lifetime value and the domain name, the target suspicious value is obtained by using the first suspicious value and the third suspicious value; or,
[0161] If the domain name response message includes the domain name lifetime value and the domain name, the target suspicious value is obtained by using the second suspicious value and the third suspicious value; or,
[0162] If the domain name response message includes an Internet protocol lifetime value, the domain name lifetime value and the domain name, the Internet protocol lifetime value is compared with a target Internet protocol lifetime value to obtain a fourth comparison result, and the domain name lifetime value is compared with a target domain name lifetime value to obtain a fifth comparison result; a fourth suspicious value is obtained using the fourth comparison result and the fifth comparison result, and the target suspicious value is obtained based on the first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value; wherein the target Internet protocol lifetime value and the target domain name lifetime value are both obtained through the domain name.
[0163] In one embodiment, the target suspicious value determination module 530 performs the step of obtaining the first suspicious value based on the first comparison result, specifically for:
[0164] If the first comparison result is that the Internet protocol lifetime value is not within the first specified range, adding a first preset initial value to a first preset threshold value to obtain the first suspicious value;
[0165] If the first comparison result is that the Internet protocol lifetime value is within the first specified range, the first preset initial value is determined as the first suspicious value.
[0166] In one embodiment, the target suspicious value determination module 530 performs the step of obtaining the second suspicious value based on the second comparison result, specifically for:
[0167] If the second comparison result is that the domain name lifetime value is not within the second specified range, then adding the second preset initial value to the second preset threshold to obtain the second suspicious value;
[0168] If the second comparison result is that the domain name lifetime value is within the second specified range, the second preset initial value is determined as the second suspicious value.
[0169] In one embodiment, the target suspicious value determination module 530 performs the step of obtaining the third suspicious value based on the third comparison result, specifically for:
[0170] If the third comparison result is that the domain name is the same as the target domain name, determining the third preset initial value as the third suspicious value;
[0171] If the third comparison result is that the domain name is different from the target domain name, the third preset initial value is added to the third preset threshold to obtain the third suspicious value.
[0172] In one embodiment, the target suspicious value determination module 530 performs the use of the fourth comparison result and the fifth comparison result to obtain the fourth suspicious value, specifically for:
[0173] If the fourth comparison result is that the difference between the Internet protocol lifetime value and the target Internet protocol lifetime value is within the first specified difference range, and the fifth comparison result is that the difference between the domain name lifetime value and the target domain name lifetime value is within the second specified difference range, the fourth preset initial value is determined as the fourth suspicious value;
[0174] Otherwise, the fourth preset initial value is added to the fourth preset threshold to obtain the fourth suspicious value.
[0175] In one embodiment, the domain name response message further includes parsing the Internet protocol; the device further includes:
[0176] The target determination module 550 is used to determine the target Internet protocol lifetime value and the target domain name lifetime value by:
[0177] If the domain name and the resolved Internet protocol are in a preset database, the Internet protocol lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target Internet protocol lifetime value, and the domain name lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target domain name lifetime value; or,
[0178] If the domain name or the resolved Internet protocol is not in the preset database, the Internet protocol lifetime value in the designated domain name response message is determined as the target Internet protocol lifetime value, and the domain name lifetime value in the designated domain name response message is determined as the target domain name lifetime value; wherein, the designated domain name response message is a response message obtained by sending the domain name access message to a designated domain name system, and the domain name of the designated domain name response message is the same as the domain name of the domain name response message, and the resolved Internet protocol of the target response message is the same as the resolved Internet protocol of the domain name response message.
[0179] In one embodiment, the apparatus further comprises:
[0180] The poisoning alarm message sending module 560 is used to send a poisoning alarm message to a designated terminal device after determining the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message. The poisoning alarm message includes other domain name response messages except the target domain name response message.
[0181] After introducing a method and an apparatus for accessing a domain name according to an exemplary embodiment of the present disclosure, next, an electronic device according to another exemplary embodiment of the present disclosure is introduced.
[0182] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0183] In some possible implementations, the electronic device according to the present disclosure may include at least one processor and at least one computer storage medium. The computer storage medium stores program code, and when the program code is executed by the processor, the processor executes the steps in the method for accessing a domain name according to various exemplary implementations of the present disclosure described above in this specification. For example, the processor may execute the following steps: Figure 2 Steps 201-204 shown in .
[0184] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0185] like Figure 6 As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include but are not limited to: the at least one processor 601, the at least one computer storage medium 602, and a bus 603 connecting different system components (including the computer storage medium 602 and the processor 601).
[0186] Bus 603 represents one or more of several types of bus structures, including a computer storage media bus or computer storage media controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
[0187] The computer storage media 602 may include readable media in the form of volatile computer storage media, such as random access computer storage media (RAM) 621 and / or cache storage media 622 , and may further include read-only computer storage media (ROM) 623 .
[0188] The computer storage medium 602 may also include a program / utility 625 having a set (at least one) of program modules 624, such program modules 624 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0189] The electronic device 600 may also communicate with one or more external devices 604 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or may communicate with any device that enables the electronic device 600 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). This communication may be performed via an input / output (I / O) interface 605. In addition, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 606. As shown, the network adapter 606 communicates with other modules for the electronic device 600 via a bus 603. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0190] In some possible implementations, various aspects of a method for accessing a domain name provided by the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method for accessing a domain name according to various exemplary embodiments of the present disclosure described above in this specification.
[0191] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access computer storage medium (RAM), a read-only computer storage medium (ROM), an erasable programmable read-only computer storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only computer storage medium (CD-ROM), an optical computer storage medium, a magnetic computer storage medium, or any suitable combination of the above.
[0192] The program product for accessing a domain name of an embodiment of the present disclosure may adopt a portable compact disk read-only computer storage medium (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0193] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0194] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0195] Program code for performing the disclosed operations may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user electronic device, partially on the user device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In the case of a remote electronic device, the remote electronic device may be connected to the user electronic device via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0196] It should be noted that although several modules of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be embodied.
[0197] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0198] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk computer storage media, CD-ROM, optical computer storage media, etc.) containing computer-usable program codes.
[0199] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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.
[0200] These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable computer storage medium produce a manufactured product including 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.
[0201] 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.
[0202] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A method for accessing a domain name, characterized in that: The method comprises: In response to a domain name access message sent by a user, obtaining at least one domain name response message corresponding to the domain name access message in the domain name system; If it is determined that the number of domain name response messages that meet the first specified condition is greater than the first specified threshold, then for any domain name response message that meets the first specified condition, a target suspicious value of the domain name response message is obtained based on the domain name response message; wherein the first specified condition is that a parameter of the domain name response message is equal to a parameter of the domain name access message, and the parameter includes a port and an access identifier; Determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message; If it is determined that the number of domain name response messages that meet the first specified condition is not greater than the first specified threshold, determining whether the domain name in the domain name response message is a key protected domain name, and if so, determining whether the resolution Internet protocol in the domain name response message is stored in a preset database, and if so, determining the domain name response message as the target domain name response message; The target domain name response message is used to obtain a domain name corresponding to the domain name access message, and the domain name is sent to a terminal device corresponding to the user, so that the user can access the domain name through the terminal device.
2. The method according to claim 1, characterized in that The domain name response message includes at least one of a domain name, an Internet protocol lifetime value, and a domain name lifetime value; The obtaining, based on the domain name response message, a target suspicious value of the domain name response message includes: If the domain name response message includes an Internet protocol lifetime value, the Internet protocol lifetime value is compared with a first specified range to obtain a first comparison result; and based on the first comparison result, a first suspicious value is obtained, and the first suspicious value is determined as the target suspicious value; wherein the first suspicious value is used to identify whether the Internet protocol lifetime value of the domain name response message is within the first specified range; or, If the domain name response message includes a domain name lifetime value, the domain name lifetime value is compared with a second specified range to obtain a second comparison result, and based on the second comparison result, a second suspicious value is obtained, and the second suspicious value is determined as the target suspicious value; wherein the second suspicious value is used to identify whether the domain name lifetime value of the domain name response message is within the second specified range; or, If the domain name response message includes the domain name, the domain name is compared with the target domain name to obtain a third comparison result, and based on the third comparison result, a third suspicious value is obtained, and the third suspicious value is determined as the target suspicious value; wherein the target domain name is obtained by performing domain name conversion on the domain name in the domain name access message using a preset domain name conversion rule, and the third suspicious value is used to identify whether the domain name of the domain name response message is the same as the target domain name; or, If the domain name response message includes an Internet protocol lifetime value and the domain name lifetime value, then using the first suspicious value and the second suspicious value to obtain the target suspicious value; or, If the domain name response message includes the Internet protocol lifetime value and the domain name, the target suspicious value is obtained by using the first suspicious value and the third suspicious value; or, If the domain name response message includes the domain name lifetime value and the domain name, the target suspicious value is obtained by using the second suspicious value and the third suspicious value; or, If the domain name response message includes an Internet protocol lifetime value, the domain name lifetime value and the domain name, the Internet protocol lifetime value is compared with a target Internet protocol lifetime value to obtain a fourth comparison result, and the domain name lifetime value is compared with a target domain name lifetime value to obtain a fifth comparison result; a fourth suspicious value is obtained using the fourth comparison result and the fifth comparison result, and the target suspicious value is obtained based on the first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value; wherein the target Internet protocol lifetime value and the target domain name lifetime value are both obtained through the domain name.
3. The method according to claim 2, characterized in that The obtaining a first suspicious value based on the first comparison result includes: If the first comparison result is that the Internet protocol lifetime value is not within the first specified range, adding a first preset initial value to a first preset threshold value to obtain the first suspicious value; If the first comparison result is that the Internet protocol lifetime value is within the first specified range, the first preset initial value is determined as the first suspicious value.
4. The method according to claim 2, characterized in that: The obtaining a second suspicious value based on the second comparison result includes: If the second comparison result is that the domain name lifetime value is not within the second specified range, then adding the second preset initial value to the second preset threshold to obtain the second suspicious value; If the second comparison result is that the domain name lifetime value is within the second specified range, the second preset initial value is determined as the second suspicious value.
5. The method according to claim 2, characterized in that: The obtaining a third suspicious value based on the third comparison result includes: If the third comparison result is that the domain name is the same as the target domain name, determining the third preset initial value as the third suspicious value; If the third comparison result is that the domain name is different from the target domain name, the third preset initial value is added to the third preset threshold to obtain the third suspicious value.
6. The method according to claim 2, characterized in that The using the fourth comparison result and the fifth comparison result to obtain a fourth suspicious value includes: If the fourth comparison result is that the difference between the Internet protocol lifetime value and the target Internet protocol lifetime value is within the first specified difference range, and the fifth comparison result is that the difference between the domain name lifetime value and the target domain name lifetime value is within the second specified difference range, the fourth preset initial value is determined as the fourth suspicious value; Otherwise, the fourth preset initial value is added to the fourth preset threshold to obtain the fourth suspicious value.
7. The method according to claim 2 or 6, characterized in that: The domain name response message also includes an Internet protocol for parsing; The target Internet protocol lifetime value and the target domain name lifetime value are determined by: If the domain name and the resolved Internet protocol are in a preset database, the Internet protocol lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target Internet protocol lifetime value, and the domain name lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target domain name lifetime value; or, If the domain name or the resolved Internet protocol is not in the preset database, the Internet protocol lifetime value in the designated domain name response message is determined as the target Internet protocol lifetime value, and the domain name lifetime value in the designated domain name response message is determined as the target domain name lifetime value; wherein, the designated domain name response message is a response message obtained by sending the domain name access message to a designated domain name system, and the domain name of the designated domain name response message is the same as the domain name of the domain name response message, and the resolved Internet protocol of the designated domain name response message is the same as the resolved Internet protocol of the domain name response message.
8. The method according to claim 1, characterized in that After determining the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message, the method further includes: A poisoning alarm message is sent to a designated terminal device, wherein the poisoning alarm message includes other domain name response messages except the target domain name response message.
9. A device for accessing a domain name, characterized in that: The device comprises: A domain name response message determination module, configured to obtain at least one domain name response message corresponding to the domain name access message in the domain name system in response to the domain name access message sent by the user; A target suspicious value determination module, configured to obtain a target suspicious value of a domain name response message based on the domain name response message for any domain name response message that meets the first specified condition, if it is determined that the number of domain name response messages that meet the first specified condition is greater than a first specified threshold; wherein the first specified condition is that a parameter of the domain name response message is equal to a parameter of the domain name access message, and the parameter includes a port and an access identifier; a target domain name response message determination module, used to determine the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message; or to determine whether the domain name in the domain name response message is a key protected domain name when the number of domain name response messages that meet the first specified condition is not greater than the first specified threshold, and if so, determine whether the resolution Internet protocol in the domain name response message is stored in a preset database, and if so, determine the domain name response message as the target domain name response message; The domain name determination module is used to use the target domain name response message to obtain the domain name corresponding to the domain name access message, and send the domain name to the terminal device corresponding to the user, so that the user can access the domain name through the terminal device.
10. The device according to claim 9, characterized in that The domain name response message includes at least one of a domain name, an Internet protocol lifetime value, and a domain name lifetime value; The target suspicious value determination module is specifically used to: If the domain name response message includes an Internet protocol lifetime value, the Internet protocol lifetime value is compared with a first specified range to obtain a first comparison result; and based on the first comparison result, a first suspicious value is obtained, and the first suspicious value is determined as the target suspicious value; wherein the first suspicious value is used to identify whether the Internet protocol lifetime value of the domain name response message is within the first specified range; or, If the domain name response message includes a domain name lifetime value, the domain name lifetime value is compared with a second specified range to obtain a second comparison result, and based on the second comparison result, a second suspicious value is obtained, and the second suspicious value is determined as the target suspicious value; wherein the second suspicious value is used to identify whether the domain name lifetime value of the domain name response message is within the second specified range; or, If the domain name response message includes the domain name, the domain name is compared with the target domain name to obtain a third comparison result, and based on the third comparison result, a third suspicious value is obtained, and the third suspicious value is determined as the target suspicious value; wherein the target domain name is obtained by performing domain name conversion on the domain name in the domain name access message using a preset domain name conversion rule, and the third suspicious value is used to identify whether the domain name of the domain name response message is the same as the target domain name; or, If the domain name response message includes an Internet protocol lifetime value and the domain name lifetime value, then using the first suspicious value and the second suspicious value to obtain the target suspicious value; or, If the domain name response message includes the Internet protocol lifetime value and the domain name, the target suspicious value is obtained by using the first suspicious value and the third suspicious value; or, If the domain name response message includes the domain name lifetime value and the domain name, the target suspicious value is obtained by using the second suspicious value and the third suspicious value; or, If the domain name response message includes an Internet protocol lifetime value, the domain name lifetime value and the domain name, the Internet protocol lifetime value is compared with a target Internet protocol lifetime value to obtain a fourth comparison result, and the domain name lifetime value is compared with a target domain name lifetime value to obtain a fifth comparison result; a fourth suspicious value is obtained using the fourth comparison result and the fifth comparison result, and the target suspicious value is obtained based on the first suspicious value, the second suspicious value, the third suspicious value and the fourth suspicious value; wherein the target Internet protocol lifetime value and the target domain name lifetime value are both obtained through the domain name.
11. The device according to claim 10, characterized in that The target suspicious value determination module executes the step of obtaining a first suspicious value based on the first comparison result, specifically for: If the first comparison result is that the Internet protocol lifetime value is not within the first specified range, adding a first preset initial value to a first preset threshold value to obtain the first suspicious value; If the first comparison result is that the Internet protocol lifetime value is within the first specified range, the first preset initial value is determined as the first suspicious value.
12. The device according to claim 10, characterized in that The target suspicious value determination module executes the step of obtaining a second suspicious value based on the second comparison result, specifically for: If the second comparison result is that the domain name lifetime value is not within the second specified range, then adding the second preset initial value to the second preset threshold to obtain the second suspicious value; If the second comparison result is that the domain name lifetime value is within the second specified range, the second preset initial value is determined as the second suspicious value.
13. The device according to claim 10, characterized in that The target suspicious value determination module executes the step of obtaining a third suspicious value based on the third comparison result, specifically for: If the third comparison result is that the domain name is the same as the target domain name, determining the third preset initial value as the third suspicious value; If the third comparison result is that the domain name is different from the target domain name, the third preset initial value is added to the third preset threshold to obtain the third suspicious value.
14. The device according to claim 10, characterized in that The target suspicious value determination module executes the use of the fourth comparison result and the fifth comparison result to obtain a fourth suspicious value, specifically for: If the fourth comparison result is that the difference between the Internet protocol lifetime value and the target Internet protocol lifetime value is within the first specified difference range, and the fifth comparison result is that the difference between the domain name lifetime value and the target domain name lifetime value is within the second specified difference range, the fourth preset initial value is determined as the fourth suspicious value; Otherwise, the fourth preset initial value is added to the fourth preset threshold to obtain the fourth suspicious value.
15. The device according to claim 10 or 14, characterized in that The domain name response message also includes an Internet protocol for parsing; the device also includes: The target determination module is used to determine the target Internet protocol lifetime value and the target domain name lifetime value by: If the domain name and the resolved Internet protocol are in a preset database, the Internet protocol lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target Internet protocol lifetime value, and the domain name lifetime value corresponding to the domain name and the resolved Internet protocol in the preset database is determined as the target domain name lifetime value; or, If the domain name or the resolved Internet protocol is not in the preset database, the Internet protocol lifetime value in the designated domain name response message is determined as the target Internet protocol lifetime value, and the domain name lifetime value in the designated domain name response message is determined as the target domain name lifetime value; wherein, the designated domain name response message is a response message obtained by sending the domain name access message to a designated domain name system, and the domain name of the designated domain name response message is the same as the domain name of the domain name response message, and the resolved Internet protocol of the designated domain name response message is the same as the resolved Internet protocol of the domain name response message.
16. The device according to claim 9, characterized in that The device also includes: The poisoning alarm message sending module is used to send a poisoning alarm message to a designated terminal device after determining the domain name response message with the smallest target suspicious value as the target domain name response message corresponding to the domain name access message, wherein the poisoning alarm message includes other domain name response messages except the target domain name response message.
17. An electronic device, characterized in that: It comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executed by the at least one processor; and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-8.
18. A computer storage medium, characterized in that: The computer storage medium stores a computer program for executing the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
DNS reflection amplification attack detection method, device and system
CN107135238A
Detection method and device for malicious domain names and computer readable storage medium
CN109120579A
DNS request processing method and server
CN110581842A
Method and system for identifying access domain name
CN111200666A
Botnet detection method and device, equipment and medium
CN113179260A
