Illegal DNS service identification method and device, equipment, storage medium and product

Through the statistics and analysis of DNS logs, combined with the collection of DNS traffic from the metropolitan area network egress router, we can quickly identify and control illegal DNS services, solving the problem of low identification efficiency in existing technologies and achieving effective management of illegal DNS.

CN118784615APending Publication Date: 2024-10-15CHINA MOBILE GROUP JIANGSU +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410864993.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing technology cannot quickly identify illegal DNS services, making it difficult to manage and control illegal DNS. It is especially inefficient in massive scanning of IPv6 address segments, and closing UDP 53 port may accidentally damage compliant authoritative DNS services.

Method used

By statistics of DNS logs, a list of suspected violations is constructed, a DNS query request is sent to the suspected violation IP, and the service provider IP that provides the violation DNS service is determined based on the returned results, combined with the DNS traffic collection of the metropolitan area network egress router and the data mining system Use it to achieve rapid identification and control.

Benefits of technology

It can quickly identify illegal DNS services without large-scale detection, ensuring reasonable management and control of illegal DNS and avoiding accidental damage to compliance services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784615A_ABST
    Figure CN118784615A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of network security, and discloses an illegal DNS service identification method, device and equipment, a storage medium and a product. According to the method, DNS logs are counted to obtain a suspected violation list, and the DNS logs are obtained by collecting DNS traffic of an exit router of a metropolitan area network; sending at least one DNS query request to each suspected violation IP in the suspected violation list; and taking the suspected violation IP feeding back the correct return result corresponding to the at least one DNS query request as a service providing IP for providing the violation DNS service. The DNS log constructed by collecting the DNS flow of the exit router of the metropolitan area network is subjected to statistical analysis, the suspected violation list is determined, and further request verification is combined, so that the service providing IP which really provides the violation DNS service is determined, the violation DNS service can be rapidly determined without large-scale detection, and the violation DNS can be reasonably managed and controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to a method, device, equipment, storage medium and product for identifying illegal DNS services. Background Art

[0002] DNS (Domain Name System) is the "navigator" of the Internet world, which realizes the mapping between domain names and IP addresses, so that Internet users can easily access the Internet without having to remember boring and cumbersome IP number strings. DNS can be roughly divided into authoritative DNS (or authorized DNS) and recursive DNS according to its functions. Authoritative DNS is a server that publishes information about domain names with the authorization of the upper level, and it can also transfer the resolution authorization to others. Recursive DNS accepts users' queries for any domain name and returns the final resolution results to the user. Recursive DNS is generally set up by telecom operators and ISPs to serve their own users, and is sometimes also called LOCAL DNS. Since DNS code is open source and easy to deploy, criminals will set up illegal recursive DNS in advance, and then invade the user's router to tamper with DNS, so as to hijack user traffic. At the least, malicious information will be injected, and at the worst, it will be redirected to a fake website to trick users into filling in sensitive information, such as personal account details, which will cause great security risks. The identification and disposal of illegal recursive DNS services are urgent.

[0003] The existing DNS recursive identification scheme can only detect a small number of IPs, and it is not feasible to scan the 53 port and detect the massive IPv4 and IPv6 addresses belonging to the jurisdiction through the "DNS recursive query" function. The most fatal problem is the low efficiency and the long statistical cycle. For example, a certain province has 3.57 million self-owned IPv4 addresses, not including the user IPv4 addresses through proxy broadcast. For a larger IPv6 address segment, there are 2 to the 99th power IPv6 addresses in the / 29 subnet (that is, 633825300114114700748351602688 IPv6 addresses). Assuming that 100,000 IPs are scanned per second, the number of days required to scan a / 29 subnet is also an astronomical number. If the province has multiple / 29 IPv6 addresses, it will basically never be able to end the scanning of the IPv6 address segment.

[0004] The current solution for controlling DNS recursive services is to close the UDP 53 port of the illegal recursive DNS through ACL. However, since the problem of identifying illegal DNS recursive services has not been solved, and the DNS recursive service and the DNS authoritative service use the same UDP 53 port, the large-scale closure of UDP 53 port at this stage may cause compliant authoritative DNS services to be accidentally damaged. Therefore, how to quickly identify illegal DNS is a difficult problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of the present invention is to provide a method, device, equipment, storage medium and product for identifying illegal DNS services, aiming to solve the technical problem that the existing technology cannot quickly identify illegal DNS services, resulting in the difficulty in controlling illegal DNS.

[0006] To achieve the above object, the present invention provides a method for identifying an illegal DNS service, the method comprising the following steps:

[0007] Perform statistics on DNS logs to obtain a list of suspected violations, wherein the DNS logs are obtained by collecting DNS traffic of metropolitan area network egress routers;

[0008] Send at least one DNS query request to each suspected violating IP in the suspected violation list;

[0009] A suspected illegal IP address that has a correct return result corresponding to at least one of the DNS query requests will be fed back as a service provider IP address that provides illegal DNS services.

[0010] Optionally, the step of collecting statistics on the DNS logs to obtain a suspected violation list includes:

[0011] Extract iterative request logs from DNS logs;

[0012] Read the request source IP corresponding to each iteration request log;

[0013] A suspected violation list is constructed based on the request source IP.

[0014] Optionally, the step of collecting statistics on the DNS logs to obtain a suspected violation list includes:

[0015] Extract recursive request logs from DNS logs;

[0016] Read the request source IP and request destination IP in each recursive request log;

[0017] Counting the number of the request source IP addresses to obtain a first suspected violation set;

[0018] Counting the number of the destination IP addresses of the requests to obtain a second suspected violation set;

[0019] A suspected violation list is constructed according to the first suspected violation set and the second suspected violation set.

[0020] Optionally, the DNS log also includes a local DNS log, and the local DNS log is obtained by accessing a data mining system;

[0021] The steps of collecting statistics on DNS logs and obtaining a list of suspected violations include:

[0022] Extracting a local DNS log from the DNS log;

[0023] Collect statistics on the request source IP or the request destination IP in the local DNS log to obtain an authoritative DNS set;

[0024] A suspected violation list is constructed based on the authoritative DNS set.

[0025] Optionally, after the step of feeding back at least one suspected illegal IP address of the correct return result corresponding to the DNS query request as a service provider IP address for providing illegal DNS services, the step further includes:

[0026] Add the IP address of the service provider to the list of illegal services;

[0027] When a DNS request sent by a metropolitan area network egress is detected, a source IP corresponding to the DNS request is obtained;

[0028] If the source IP corresponding to the DNS request is in the illegal service list, the DNS request mirror is synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

[0029] Optionally, if the source IP corresponding to the DNS request is in the illegal service list, the step of synchronizing the DNS request mirror to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request includes:

[0030] If the source IP corresponding to the DNS request is in the illegal service list, then detecting whether the source IP corresponding to the DNS request is in the IP whitelist;

[0031] If it is not in the IP whitelist, the DNS request mirror is synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

[0032] In addition, to achieve the above-mentioned purpose, the present invention also proposes a device for identifying a violation DNS service, the device comprising:

[0033] A statistics module is used to collect statistics on DNS logs to obtain a suspected violation list, wherein the DNS logs are obtained by collecting DNS traffic of a metropolitan area network egress router;

[0034] A sending module, used for sending at least one DNS query request to each suspected violating IP in the suspected violating list;

[0035] The determination module is used to use the suspected illegal IP that feeds back a correct return result corresponding to at least one of the DNS query requests as a service providing IP that provides illegal DNS services.

[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a violation DNS service identification device, which includes: a processor, a memory, and a violation DNS service identification program stored in the memory and executable on the processor, and the violation DNS service identification program implements the steps of the violation DNS service identification method described above when executed.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, on which a violation DNS service identification program is stored, and when the violation DNS service identification program is executed, the steps of the violation DNS service identification method described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer program product, which includes a violation DNS service identification program, and when the violation DNS service identification program is executed, the steps of the violation DNS service identification method described above are implemented.

[0039] The present invention obtains a suspected violation list by performing statistics on DNS logs, wherein the DNS logs are obtained by collecting DNS traffic of a metropolitan area network egress router; at least one DNS query request is sent to each suspected violation IP in the suspected violation list; and the suspected violation IP that feeds back a correct return result corresponding to at least one DNS query request is used as a service provider IP that provides a violation DNS service. Since the suspected violation list is determined by performing statistical analysis on the DNS logs constructed by collecting DNS traffic of a metropolitan area network egress router, and then combined with further request verification, the service provider IP that actually provides the violation DNS service is determined, ensuring that the violation DNS service can be quickly determined without large-scale detection, and ensuring that the violation DNS can be reasonably controlled. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present invention;

[0041] Figure 2 This is a flow chart of a first embodiment of a method for identifying illegal DNS services according to the present invention;

[0042] Figure 3 A schematic diagram of iterative query behavior according to an embodiment of the present invention;

[0043] Figure 4A schematic diagram of the forwarding mode operation of an embodiment of the present invention;

[0044] Figure 5 A flowchart of a second embodiment of the method for identifying illegal DNS services of the present invention;

[0045] Figure 6 A schematic diagram of the interference message control principle according to an embodiment of the present invention;

[0046] Figure 7 It is a structural block diagram of the first embodiment of the illegal DNS service identification device of the present invention.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0049] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of the structure of a device for identifying illegal DNS services in a hardware operating environment according to an embodiment of the present invention.

[0050] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0052] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and an illegal DNS service identification program.

[0053] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the illegal DNS service identification device, and the electronic device calls the illegal DNS service identification program stored in the memory 1005 through the processor 1001, and executes the illegal DNS service identification method provided by the embodiment of the present invention.

[0054] The embodiment of the present invention provides a method for identifying an illegal DNS service. Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of a method for identifying illegal DNS services according to the present invention.

[0055] In this embodiment, the method for identifying illegal DNS services includes the following steps:

[0056] Step S10: Count the DNS logs to obtain a list of suspected violations.

[0057] It should be noted that the executor of this embodiment may be the illegal DNS service identification device (referred to as the illegal identification device for short), and the illegal identification device may be a device that can manage the program king exit router (such as data reading, data interception, etc.), such as a personal computer, server and other electronic devices, and may also be other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the illegal DNS service identification method of the invention is described by taking the illegal identification device as an example.

[0058] It should be noted that the DNS log can be obtained by collecting the DNS traffic of the metropolitan area network egress router. A metropolitan area network (MAN) can be a computer communication network established within a city, and the metropolitan area network egress router can be a routing device (such as a router, network switch, etc.) set in the metropolitan area network for connecting the metropolitan area network with other external networks or servers. When users in the metropolitan area network access the Internet, the DNS server in the metropolitan area network (i.e., the server providing DNS services, including compliant DNS services and illegal DNS services) will generate a corresponding DNS request, which will flow through the metropolitan area network egress router and initiate a step-by-step query to the root, top-level domain, second-level domain and other authoritative DNS. Therefore, by collecting the DNS traffic of the metropolitan area network egress router, the record of the DNS request sent out by the metropolitan area network can be obtained. Therefore, after obtaining the DNS log, the DNS log is analyzed and statistically processed to obtain the IP address of the server that may provide DNS services in violation of the regulations in the metropolitan area network, thereby obtaining a suspected violation list.

[0059] In actual use, the fields that can be included in the DNS log and their meanings are shown in the following table:

[0060]

[0061]

[0062] In a specific implementation, in order to quickly determine the IP address of a server that may illegally provide DNS services in the metropolitan area network and ensure that a suspected violation list can be quickly obtained, step S10 in this embodiment may include:

[0063] Extract iterative request logs from DNS logs;

[0064] Read the request source IP corresponding to each iteration request log;

[0065] A suspected violation list is constructed based on the request source IP.

[0066] It should be noted that the iterative request log may be a DNS log containing an RD flag bit of 0. Reading the request source IP corresponding to the iterative request log may be reading the field value corresponding to the source IP field in the iterative request log, and using the read field value as the request source IP. Constructing a suspected violation list based on the request source IP may be adding all request source IPs to the same data table, deduplicating the data table, and using the deduplicated data table as the suspected violation list, wherein the data table is only for ease of understanding, and may also be processed in a collection or other similar manner according to actual needs, and this embodiment does not limit this.

[0067] For ease of understanding, now combined Figure 3 3 is a schematic diagram of iterative query behavior in this embodiment. Figure 3 As shown, users in each metropolitan area network sub-district will initiate recursive queries to illegal recursive servers (i.e., servers that provide DNS services in violation of regulations). The illegal recursive servers will then initiate iterative queries to the authoritative DNS servers of the root or other domains through the egress routers. Therefore, the IP address of the illegal recursive server can be determined through the source IP in the iterative request log.

[0068] In a specific implementation, in order to ensure that the DNS service provided using the forwarding mode can also be normally identified, step S10 in this embodiment may include:

[0069] Extract recursive request logs from DNS logs;

[0070] Read the request source IP and request destination IP in each recursive request log;

[0071] Counting the number of the request source IP addresses to obtain a first suspected violation set;

[0072] Counting the number of the destination IP addresses of the requests to obtain a second suspected violation set;

[0073] A suspected violation list is constructed according to the first suspected violation set and the second suspected violation set.

[0074] It should be noted that the recursive request log may be a DNS log including an RD flag bit of 1. Reading the request source IP and the request destination IP in the recursive request log may be reading the field value corresponding to the source IP field in the recursive request log as the request source IP, and reading the field value of the destination IP as the request destination IP.

[0075] In actual use, in addition to the mode of initiating multiple iterative requests to obtain resolution results, the recursive service also has a special resolution mode: forward mode (forward), which forwards the user's resolution request to other public DNS to directly obtain the resolution result. In order to identify the DNS service provided in this way, the recursive request log with RD=1 in the DNS log can be extracted, and then the data volume can be counted based on the request source IP as the dimension to obtain the first suspected violation set, and the number can be counted based on the request destination IP as the dimension to obtain the second suspected violation set. Finally, the IP addresses in the first suspected violation set and the second suspected violation set can be merged and deduplicated to obtain a suspected violation list.

[0076] In specific applications, since the number of request source IPs and request destination IPs may be extremely large, and the server IP that provides DNS services in forwarding mode will appear more frequently as request source IPs or request destination IPs, when the number is counted based on the request source IP as the dimension, it can be sorted based on the number obtained by statistics, and the first suspected violation set can be constructed based on the request source IPs ranked in the top N (N is a positive integer, which can be set by the administrator of the violation identification device) in the sorting. Of course, the first suspected violation set can also be constructed based on the request source IPs whose corresponding number is greater than M (M is a positive integer, which can be set by the administrator of the violation identification device). Among them, when the number is counted based on the request destination IP as the dimension, the processing method can be similar to that when the number is counted based on the request source IP as the dimension, but the set N or M is different. Since the processing method is similar, it will not be repeated here.

[0077] For ease of understanding, now combined Figure 4 This is for illustration only, but not for limitation. Figure 4 This is a schematic diagram of the forwarding mode operation of this embodiment. As shown in the figure, the DNS recursive request traffic is captured at the metropolitan area network exit of the A metropolitan area network sub-district. The source IPs of these requests contain DNS recursive services configured with forwarding mode, and the purpose is to obtain query results from other public recursive DNS. Recording and analyzing the request top information of the source IP (i.e., the top N source IPs in the statistical order) can show us the recursive service that initiates the most recursive requests in the A metropolitan area network sub-district;

[0078] Use the same method to capture DNS recursive request traffic at the MAN egress of MAN sub-district B. When users in MAN sub-district B access the recursive service in MAN sub-district A, the IP of the recursive service is converted into the destination IP of the request message. As long as the Top statistics of the destination IP in the traffic are counted, the recursive service IP with the most requests in MAN sub-district A can be obtained.

[0079] In a specific implementation, in order to ensure the comprehensiveness of the identification, step S10 in this embodiment may include:

[0080] Extracting a local DNS log from the DNS log;

[0081] Collect statistics on the request source IP or the request destination IP in the local DNS log to obtain an authoritative DNS set;

[0082] A suspected violation list is constructed based on the authoritative DNS set.

[0083] It should be noted that the DNS log can also include local DNS logs, which are obtained by accessing the data mining system. For example, the data mining system will regularly collect access records in the authoritative DNS server and generate local DNS logs for storage. Then, by accessing the data mining system, the local DNS logs can be obtained. The authoritative DNS set can include the IP corresponding to each authoritative DNS service, where the IP corresponding to the authoritative DNS service can be the IP address of a server that is authorized and compliant to provide DNS services.

[0084] Among them, the authoritative DNS set can be determined by statistical analysis of the source IP or destination IP in the local DNS log.

[0085] In actual use, due to the authorization of some authoritative DNS services, they are generally only authorized to resolve subdomains under specific domain names. However, some authoritative DNS services may not turn off the recursive function when they are actually put into use. In this case, they can provide unauthorized domain name resolution. At this time, the DNS server is actually a violating DNS. Therefore, in order to ensure the comprehensiveness of the identification, the authoritative DNS server that enables recursive services for this type of violation can also be identified. A suspected violation list can be constructed based on the IPs included in the authoritative DNS set to facilitate further verification.

[0086] For example, if DNS server A is authorized to provide a domain name "a.com", the domain names it can resolve are generally subdomains of "a.com", such as "www.a.com" or "test.a.com". However, if the recursive function is enabled on the DNS server, it can illegally provide resolution for other domain names, such as resolution for subdomains under the domain name "b.com".

[0087] It should be noted that at least two of the above-mentioned methods of determining the suspected violation list using iterative request logs, recursive request logs and local DNS logs can be used in combination. For example, if the iterative request log and the recursive request log are used in combination, the suspected violation list can be determined using the iterative request log and the recursive request log respectively, and then the suspected violation lists determined by the two methods are merged and deduplicated to obtain an overall suspected violation list. The implementation process of combining the three methods is similar to that of combining the two methods. They are all used separately and then merged and deduplicated, which will not be repeated here.

[0088] Among them, after determining the suspected violation list, some IPs that legally provide recursive servers can be removed from the suspected violation list. For example, although authoritative DNS server A has enabled the recursive service, it has been authorized or reported before enabling the recursive service. In this case, A's IP can be removed from the suspected violation list.

[0089] Step S20: Send at least one DNS query request to each suspected violating IP in the suspected violating list.

[0090] Step S30: Feedback the suspected illegal IP that has the correct return result corresponding to at least one of the DNS query requests as a service provider IP that provides illegal DNS services.

[0091] In actual use, in order to avoid misjudgment, after determining the suspected violation list, further investigation and verification can be carried out to determine whether it actually provides DNS services. Therefore, at least one DNS query request can be sent to each suspected violation IP in the suspected violation list, and an attempt can be made to make the server corresponding to the suspected violation IP feedback the corresponding DNS query result.

[0092] In actual use, since the suspected violation list may include the IP address of the authoritative DNS, in order to ensure that the recursive function of the server is enabled, when sending a DNS query request, the queried domain name can be a domain name that is not within the normal resolution range of the authoritative DNS. Therefore, a public domain name can be used, that is, a domain name that can only be resolved by an authoritative DNS server with a higher resolution authorization level (root server, or a higher-level server, such as a DNS server authorized for ".com").

[0093] When sending a DNS request, nmap scanning and dig tools may be used. For example, nmap scanning and dig tools may be used to initiate DNS requests for multiple common public domain names for each suspected violating IP in the suspected violation list.

[0094] It is understandable that if the suspected illegal IP feeds back the correct return result corresponding to at least one DNS query request, then the IP can be regarded as opening the "DNS recursive query function" to the public, and it can be determined that the device corresponding to the suspected illegal IP provides illegal DNS services. Therefore, the suspected illegal IP that feeds back the correct return result corresponding to at least one of the DNS query requests can be used as the service provider IP that provides illegal DNS services. Among them, the service provider IP can be the IP address of the server that provides DNS services.

[0095] This embodiment obtains a suspected violation list by collecting statistics on DNS logs, and the DNS logs are obtained by collecting DNS traffic from the metropolitan area network egress router; at least one DNS query request is sent to each suspected violation IP in the suspected violation list; and the suspected violation IP that feeds back the correct return result corresponding to at least one DNS query request is used as the service provider IP that provides the illegal DNS service. Since the suspected violation list is determined by statistically analyzing the DNS logs constructed by collecting the DNS traffic from the metropolitan area network egress router, and then combined with further request verification, the service provider IP that actually provides the illegal DNS service is determined, ensuring that the illegal DNS service can be quickly determined without large-scale detection, ensuring that the illegal DNS can be reasonably controlled.

[0096] refer to Figure 5 , Figure 5 This is a flow chart of a second embodiment of a method for identifying illegal DNS services according to the present invention.

[0097] Based on the first embodiment, the method for identifying illegal DNS services in this embodiment further includes, after step S30:

[0098] Step S40: Add the service providing IP to the illegal service list.

[0099] It is understandable that after determining the service provider IP, in order to facilitate management and control, the service provider IP can be added to the list of illegal services. Before adding, it can also be checked whether the service provider IP is already included in the list of illegal services. If it is not included, it will be added. If it is already included, no processing will be done to avoid unnecessary updates.

[0100] Step S50: when a DNS request sent from a metropolitan area network egress is detected, a source IP corresponding to the DNS request is obtained.

[0101] Step S60: If the source IP corresponding to the DNS request is in the illegal service list, the DNS request mirror is synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

[0102] It should be noted that the illegal service list may be a data table or set for storing IP addresses of servers corresponding to illegal DNS services. Of course, it may also be in other data formats, which is not limited in this embodiment.

[0103] In actual use, after determining the latest list of illegal services, you can also try to control illegal DNS services. At this time, when a DNS request from a metropolitan area network egress is detected, the DNS request from the metropolitan area network egress can be intercepted, the source IP corresponding to the DNS request can be obtained, and the source IP corresponding to the DNS request can be detected. Whether the source IP is in the illegal service list, if not, the intercepted DNS request is released;

[0104] If the source IP corresponding to the DNS request is in the list of illegal services, it means that the DNS request is issued by the server that provides DNS services in violation of the regulations. At this time, control is required. Therefore, the DNS request mirror can be synchronized to the recursive control system, so that the recursive control system sends interference messages to the source IP corresponding to the DNS request, thereby making it impossible for the illegally provided DNS service to be performed correctly.

[0105] Further, in some cases, some DNS services provided in violation of regulations may have been reported to the operator (for example, if the authorization is extended due to procedure review, but the service can be provided correctly, then the operator may be reported), or authorized by the operator. In this case, release is also required. At this time, step S60 in this embodiment may include:

[0106] If the source IP corresponding to the DNS request is in the illegal service list, then detecting whether the source IP corresponding to the DNS request is in the IP whitelist;

[0107] If it is not in the IP whitelist, the DNS request mirror is synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

[0108] It should be noted that the IP whitelist may store the IP addresses of servers that have been reported to the operator and the IP addresses of servers authorized by the operator.

[0109] In actual use, if the source IP corresponding to the DNS request is in the illegal service list, it means that the server corresponding to the source IP has been identified as a server that illegally provides DNS services. At this time, it is necessary to further check whether it has been reported or authorized by the operator. Therefore, it is possible to check whether the source IP corresponding to the DNS request is in the IP whitelist. If it is in the IP whitelist, the intercepted DNS request can still be released.

[0110] If it is not in the IP whitelist, it means that the source IP corresponding to the DNS request has not been authorized and has not been reported, and needs to be controlled. Therefore, the DNS request mirror can be synchronized to the recursive control system so that the recursive control system sends interference messages to the source IP corresponding to the DNS request.

[0111] For ease of understanding, now combined Figure 6 This is for illustration only, but not for limitation. Figure 6 This is a schematic diagram of the interference message control principle.

[0112] like Figure 6 As shown in the figure, the control process includes the following steps:

[0113] 201. The terminal user initiates a query request to the illegal recursive DNS.

[0114] 202. The illegal recursive DNS receives the request message and starts iteratively accessing the root / authoritative DNS service;

[0115] 203. At the metropolitan area network egress, the request traffic is synchronously mirrored to the recursive control system (i.e. Figure 6 recursive interference systems in );

[0116] 204. The recursive interference system constructs a false DNS response interference message. The target IP of the message is the illegal recursive DNS, the source IP is the authoritative DNS of the illegal recursive DNS iteration request, and the DNS response status bit RCODE is set to 5 (5: rejected) or other abnormal responses;

[0117] 205. The recursive interference system delivers interference messages to the offending recursive DNS;

[0118] 206. The illegal recursive DNS receives the interference message, determines that the iterative query fails according to the RCODE, and returns the result that the user query fails;

[0119] 207. The recursive violation receives the correct result message from the root / authoritative DNS response, but because the interference message has been received before, this message will be directly discarded;

[0120] Among them, the recursive interference system can be set up within the provincial network (i.e., within the metropolitan area network), and the interference message will always be returned to the illegal DNS recursive service earlier than the response message of the root / DNS authoritative server on the Internet. Therefore, it can stably achieve the effect of interfering with the illegal DNS recursive service and make the illegal DNS recursive service completely invalid. And because it only interferes with the transmission of its DNS protocol, it will not affect other services carried by its IP, so there will be no additional blocking effect.

[0121] This embodiment adds the service providing IP to the illegal service list; when a DNS request sent from the metropolitan area network exit is detected, the source IP corresponding to the DNS request is obtained; if the source IP corresponding to the DNS request is in the illegal service list, the DNS request mirror is synchronized to the recursive control system, so that the recursive control system sends an interference message to the source IP corresponding to the DNS request. Since it is determined that the source IP corresponding to the DNS request is the server IP corresponding to the illegal DNS service, the DNS request mirror can be synchronized to the recursive control system, so that it sends an interference message to the source IP corresponding to the DNS request, thereby making the illegal DNS service invalid, cutting off the DNS service provided to the user, and ensuring that the user is not disturbed by the illegal DNS service.

[0122] In addition, an embodiment of the present invention further provides a storage medium, on which a violation DNS service identification program is stored. When the violation DNS service identification program is executed by a processor, the steps of the violation DNS service identification method described above are implemented.

[0123] In addition, an embodiment of the present invention further provides a computer program product, which includes a violation DNS service identification program. When the violation DNS service identification program is executed by a processor, the steps of the violation DNS service identification method described above are implemented.

[0124] Reference Figure 7 , Figure 7 It is a structural block diagram of the first embodiment of the illegal DNS service identification device of the present invention.

[0125] like Figure 7 As shown, the illegal DNS service identification device proposed in the embodiment of the present invention includes:

[0126] A statistics module 10 is used to collect statistics on DNS logs to obtain a suspected violation list, wherein the DNS logs are obtained by collecting DNS traffic of a metropolitan area network egress router;

[0127] A sending module 20, configured to send at least one DNS query request to each suspected violating IP in the suspected violating list;

[0128] The determination module 30 is used to use the suspected illegal IP that feeds back a correct return result corresponding to at least one of the DNS query requests as a service providing IP that provides illegal DNS services.

[0129] This embodiment obtains a suspected violation list by collecting statistics on DNS logs, and the DNS logs are obtained by collecting DNS traffic from the metropolitan area network egress router; at least one DNS query request is sent to each suspected violation IP in the suspected violation list; and the suspected violation IP that feeds back the correct return result corresponding to at least one DNS query request is used as the service provider IP that provides the illegal DNS service. Since the suspected violation list is determined by statistically analyzing the DNS logs constructed by collecting the DNS traffic from the metropolitan area network egress router, and then combined with further request verification, the service provider IP that actually provides the illegal DNS service is determined, ensuring that the illegal DNS service can be quickly determined without large-scale detection, ensuring that the illegal DNS can be reasonably controlled.

[0130] Furthermore, the statistical module 10 is also used to extract iterative request logs from the DNS logs; read the request source IP corresponding to each iterative request log; and construct a suspected violation list based on the request source IP.

[0131] Furthermore, the statistical module 10 is also used to extract recursive request logs from DNS logs; read the request source IP and the request destination IP in each recursive request log; perform quantitative statistics on the request source IP to obtain a first suspected violation set; perform quantitative statistics on the request destination IP to obtain a second suspected violation set; and construct a suspected violation list based on the first suspected violation set and the second suspected violation set.

[0132] Furthermore, the DNS log also includes a local DNS log, and the local DNS log is obtained by accessing a data mining system;

[0133] The sending module 20 is further used to extract a local DNS log from the DNS log; to count the request source IP or the request destination IP in the local DNS log to obtain an authoritative DNS set; and to construct a suspected violation list based on the authoritative DNS set.

[0134] Furthermore, the determination module 30 is also used to add the service providing IP to the list of illegal services; when a DNS request issued by the metropolitan area network exit is detected, the source IP corresponding to the DNS request is obtained; if the source IP corresponding to the DNS request is in the list of illegal services, the DNS request is mirrored and synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

[0135] Furthermore, the determination module 30 is also used to detect whether the source IP corresponding to the DNS request is in the IP whitelist if the source IP corresponding to the DNS request is in the illegal service list; if it is not in the IP whitelist, the DNS request mirror is synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

[0136] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0137] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0138] In addition, for technical details not fully described in this embodiment, please refer to the illegal DNS service identification method provided in any embodiment of the present invention, and will not be repeated here.

[0139] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0140] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0142] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for identifying illegal DNS services, characterized in that: The method for identifying illegal DNS services comprises the following steps: Perform statistics on DNS logs to obtain a list of suspected violations, wherein the DNS logs are obtained by collecting DNS traffic of metropolitan area network egress routers; Send at least one DNS query request to each suspected violating IP in the suspected violation list; A suspected illegal IP address that has a correct return result corresponding to at least one of the DNS query requests will be fed back as a service provider IP address that provides illegal DNS services.

2. The method for identifying illegal DNS services according to claim 1, characterized in that: The steps of collecting statistics on DNS logs and obtaining a list of suspected violations include: Extract iterative request logs from DNS logs; Read the request source IP corresponding to each iteration request log; A suspected violation list is constructed based on the request source IP.

3. The method for identifying illegal DNS services according to claim 1, wherein: The steps of collecting statistics on DNS logs and obtaining a list of suspected violations include: Extract recursive request logs from DNS logs; Read the request source IP and request destination IP in each recursive request log; Counting the number of the request source IP addresses to obtain a first suspected violation set; Counting the number of the destination IP addresses of the requests to obtain a second suspected violation set; A suspected violation list is constructed according to the first suspected violation set and the second suspected violation set.

4. The method for identifying illegal DNS services according to claim 1, wherein: The DNS log also includes a local DNS log, and the local DNS log is obtained by accessing a data mining system; The steps of collecting statistics on DNS logs and obtaining a list of suspected violations include: Extracting a local DNS log from the DNS log; Collect statistics on the request source IP or the request destination IP in the local DNS log to obtain an authoritative DNS set; A suspected violation list is constructed based on the authoritative DNS set.

5. The method for identifying an illegal DNS service according to any one of claims 1 to 4, characterized in that: After the step of feeding back at least one suspected illegal IP address of the correct return result corresponding to the DNS query request as a service provider IP address for providing illegal DNS services, the method further includes: Add the IP address of the service provider to the list of illegal services; When a DNS request sent by a metropolitan area network egress is detected, a source IP corresponding to the DNS request is obtained; If the source IP corresponding to the DNS request is in the illegal service list, the DNS request mirror is synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

6. The method for identifying illegal DNS services according to claim 5, characterized in that: If the source IP corresponding to the DNS request is in the illegal service list, the step of synchronizing the DNS request mirror to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request includes: If the source IP corresponding to the DNS request is in the illegal service list, then detecting whether the source IP corresponding to the DNS request is in the IP whitelist; If it is not in the IP whitelist, the DNS request mirror is synchronized to the recursive control system so that the recursive control system sends an interference message to the source IP corresponding to the DNS request.

7. A device for identifying illegal DNS services, characterized in that: The illegal DNS service identification device comprises: A statistics module is used to collect statistics on DNS logs to obtain a suspected violation list, wherein the DNS logs are obtained by collecting DNS traffic of a metropolitan area network egress router; A sending module, used for sending at least one DNS query request to each suspected illegal IP in the suspected illegal IP list; The determination module is used to use the suspected illegal IP that feeds back a correct return result corresponding to at least one of the DNS query requests as a service providing IP that provides illegal DNS services.

8. A device for identifying illegal DNS services, characterized in that: The illegal DNS service identification device includes: a processor, a memory, and an illegal DNS service identification program stored in the memory and executable on the processor. When the illegal DNS service identification program is executed, the steps of the illegal DNS service identification method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a violation DNS service identification program, and when the violation DNS service identification program is executed, the steps of the violation DNS service identification method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product includes a violation DNS service identification program, and when the violation DNS service identification program is executed, the steps of the violation DNS service identification method according to any one of claims 1 to 6 are implemented.