Method and system for discovering illegal DNS (Domain Name Server) resolution service

Through the hierarchical detection methods of port scanning and DNS query, the problem of telecom operators' difficulty in time to detect illegal DNS resolution services is solved, and the rapid and efficient identification and management in large-scale IP network space is achieved, and the monitoring efficiency of DNS resolution services is improved. .

CN118945137APending Publication Date: 2024-11-12SHANGHAI CHUANGQI TIANXIA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411347246.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

At this stage, it is difficult for telecom operators to dynamically grasp the domain name resolution service, which leads to the inability to detect illegal recursive resolution services in time, and it is impossible to accurately identify illegal recursive domain name resolution services based on enterprise reporting and cyberspace surveying and mapping.

Method used

A method of discovering violations of DNS resolution service was designed, and through port scanning, DNS query and compliance comparison, it realizes hierarchical detection and step-by-step identification of DNS recursive resolution services, including IP address survival scan, 53 port scanning, and non-recursive DNS query. Compare with compliance and generate a list of suspected violations of IPs.

Benefits of technology

It realizes the rapid and efficient discovery of non-public DNS recursive resolution services in large-scale IP network space, reducing invalid detection, improving detection efficiency, and automatically monitoring new non-public recursive resolution services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945137A_ABST
    Figure CN118945137A_ABST
Patent Text Reader

Abstract

The invention designs a method and a system for discovering violation DNS (Domain Name System) analysis service, and the method comprises the steps: S1, carrying out the survival scanning of an IP (Internet Protocol) address space of the Internet operated by an operator through employing a port scanning tool, and screening out an active IP address set aIPs; s2, performing 53 port scanning on the IP address set aIPs, and screening out an IP address set bIPs with open ports; s3, performing non-recursive DNS query on the IP address set bIPs, and if the analyzed IP address is correctly returned in a query response and rd is displayed in a response flag, putting the IP address into an address set cIPs; s4, performing compliance comparison on the address set cIPs, and putting the IP addresses which are not in the RdIPs into the address set dIPs; and S5, performing violation checking and rectification on the address set dIPs. Through the above design, hierarchical detection can be realized, and DNS recursion resolution services can be accurately identified step by step, so that an operator can quickly and efficiently discover non-public DNS recursion resolution services in a large-scale IP network space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of network security, and in particular relates to a method and system for discovering illegal DNS resolution services. Background Art

[0002] The Domain Name System (DNS) is one of the important infrastructures of the Internet, responsible for resolving domain names into IP addresses. All network behaviors of Internet users rely on the DNS system. The DNS system is a distributed data query system with hierarchical authorization, including authoritative domain name servers and recursive resolution servers. Among them, the authoritative domain name server provides the correspondence between domain names and IP addresses, and provides search and positioning services for email, instant messaging and web browsing. The recursive resolution server is responsible for querying the domain name information from the authoritative domain name server on behalf of the user, and returning the query results to the user.

[0003] Due to the above domain name resolution mechanism, recursive resolution has become a convenient entry point for hackers to attack the resolution system. Hackers often attack through DNS hijacking or pollution, among which resolution cache poisoning is one of the most commonly used methods. According to Article 7 of the "Telecommunications Regulations of the People's Republic of China" and the "Administrative Measures for the Operation License of Telecommunications Business of the Ministry of Industry and Information Technology (Ministry of Industry and Information Technology Order No. 42)", if an enterprise needs to carry out domain name recursive resolution services, it must apply for a business license from the local administration, otherwise it will be considered illegal operation. Local communications administration bureaus will conduct irregular inspections of servers, and will notify operators to make rectifications if they find any illegal recursive resolution service behaviors.

[0004] At present, the IP network space managed by telecom operators is huge, and it is difficult to dynamically grasp the status of domain name resolution services, resulting in the inability to promptly discover illegal recursive resolution services.

[0005] At present, the management mainly relies on enterprises to report domain name recursive resolution services. In this way, there are still many non-public recursive resolution services that have not been reported. However, the cyberspace is huge and it is beyond the telecom operators' ability to do so. Telecom operators cannot figure out how many are illegal. Another technical solution is to rely on cyberspace mapping, but it only obtains a relatively rough domain name service assets, without obtaining a detailed classification of resolution services, and it is impossible to figure out which are illegal recursive domain name resolution services. Summary of the invention

[0006] In order to solve the above problems, the present application designs a method for discovering illegal DNS resolution services and a resolution service system, so as to achieve hierarchical detection and accurate identification of DNS recursive resolution services at each level through the above design, thereby enabling operators to quickly and efficiently discover non-public DNS recursive resolution services in large-scale IP network space.

[0007] A method for discovering an illegal DNS resolution service includes the following steps:

[0008] Step S1: Use a port scanning tool to perform an IP address survival scan on the Internet IP address space operated by the operator to screen out active IP address sets aIPs;

[0009] Step S2: Scan TCP and UDP port 53 for each IP address in the active IP address set aIPs, and select the IP address set bIPs with open port 53;

[0010] Step S3, using a domain name query tool to send a non-recursive DNS query request to each IP address in the IP address set bIPs with port 53 open in step S2;

[0011] If the resolved IP address is correctly returned in the query response, and the response flag flags displays RecursionDesired, then the IP address provides DNS recursive resolution service, and the IP address is added to the address set cIPs;

[0012] Step S4, perform compliance comparison: compare each IP address in the address set cIPs with the operator's existing legal DNS recursive resolution service address set RdIPs, and put the IP addresses in the address set cIPs but not in the address set RdIPs into the address set dIPs;

[0013] Step S5: All IPs in the address set dIPs are IP addresses that are suspected of violating the regulations in providing DNS recursive resolution services. The operator can conduct subsequent verification and management based on this list of suspected violating IPs, set a detection cycle, and then repeat step S1 to start a new detection.

[0014] Preferably, in step S3, if the resolved IP address is correctly returned in the query response, and the response flag flags displays Recursion Desired, then the IP address provides a DNS recursive resolution service, and the IP address is put into the address set cIPs;

[0015] If the resolved IP address is returned correctly and the response flag displays AuthoritativeAnswer, then the IP address provides the DNS authoritative resolution service;

[0016] If no resolution result is returned or a connection error occurs, it is considered that the IP address does not provide DNS resolution service.

[0017] Preferably, in step S5, the verification management method includes: sending a notification and rectification email to the enterprises or units to which these IPs belong, and the notified enterprises or units reply to the notification email after confirming the rectification, and after the operator confirms, the IP addresses that have applied for the DNS recursive resolution service operating license can be put into the RdIPs address set, and then repeat step 1 to start a new detection.

[0018] Preferably, in step S3, the domain name query tool includes but is not limited to dig.

[0019] Preferably, in step S1, the port scanning tool includes but is not limited to Nmap.

[0020] A DNS resolution service system for discovering illegal DNS, including an IP detection module, a 53-port scanning module, a DNS query detection module, a DNS database, a compliance comparison module, and a DNS service report management module;

[0021] The IP live detection module is used to perform IP address liveness scanning on the Internet IP address space operated by the operator, and screen out active IP address sets aIPs;

[0022] The port 53 scanning module is used to scan the TCP and UDP port 53 of each IP address in the active IP address set aIPs, and filter out the IP address set bIPs with open port 53;

[0023] The DNS query detection module is used to send a non-recursive DNS query request to each IP address in the IP address set bIPs opened on port 53; if the resolved IP address is correctly returned in the query response, and the response flag flags displays Recursion Desired, the IP address provides DNS recursive resolution service, and the DNS query detection module puts the IP address into the address set cIPs;

[0024] The compliance comparison module is used to compare each IP address in the address set cIPs with the operator's existing legal DNS database, and put the IP addresses in the address set cIPs but not in the operator's existing legal DNS database into the address set dIPs;

[0025] The DNS service report management module is used to display all IP addresses in the address set dIPs.

[0026] The advantages and effects of this application are as follows:

[0027] The present application designs a method for discovering illegal DNS resolution services, comprising the following steps: step S1, using a port scanning tool to perform an IP address survival scan on the Internet IP address space operated by an operator, and screening out an active IP address set aIPs; step S2, performing a TCP and UDP port 53 scan on each IP address in the active IP address set aIPs, and screening out an IP address set bIPs with port 53 open; step S3, using a domain name query tool to send a non-recursive DNS query request to each IP address in the IP address set bIPs with port 53 open in step S2; if the resolved IP address is correctly returned in the query response, and Recursion is displayed in the response flags, Desired, then the IP address provides DNS recursive resolution service, and the IP address is placed in the address set cIPs; step S4, conduct compliance comparison: compare each IP address in the address set cIPs with the operator's existing legal DNS recursive resolution service address set RdIPs, and put the IP addresses in the address set cIPs but not in the address set RdIPs into the address set dIPs; step S5, all IPs in the address set dIPs are IP addresses suspected of violating regulations to provide DNS recursive resolution services; the operator can conduct subsequent verification and management based on this list of suspected illegal IPs, set the detection cycle at the same time, and then repeat step S1 to start a new detection. Through the above design, the present application can realize hierarchical detection and accurate identification of DNS recursive resolution services at each level, thereby enabling operators to quickly and efficiently discover non-public DNS recursive resolution services in large-scale IP network space.

[0028] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application so that it can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings as follows.

[0029] Based on the detailed description of the specific embodiments of the present application in combination with the accompanying drawings below, those skilled in the art will become more aware of the above and other objects, advantages and features of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings without creative work. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale.

[0031] Figure 1 A flowchart of a method for discovering illegal DNS resolution services designed for this application;

[0032] Figure 2 A structural block diagram of a DNS resolution service system for detecting violations designed for this application. DETAILED DESCRIPTION

[0033] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the present application. Obviously, the described embodiment is a part of the embodiment of the present application, rather than all of the embodiments. In the following description, specific details such as specific configuration and components are provided only to help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, for clarity and brevity, the description of known functions and structures is omitted in the embodiment.

[0034] It should be understood that the references to "one embodiment" or "this embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "one embodiment" or "this embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0035] In addition, the present application may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplicity and clarity, and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0036] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" in this article describes another type of association object relationship, indicating that there can be two relationships. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship.

[0037] The term "at least one" in this article is merely a description of the association relationship of associated objects, indicating that there may be three relationships. For example, at least one of A and B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0038] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusions.

[0039] Example 1

[0040] This example mainly introduces a method for discovering illegal DNS resolution services. Please refer to Figure 1 , including the following steps:

[0041] Step S1: Use a port scanning tool to perform an IP address survival scan on the Internet IP address space operated by the operator to screen out active IP address sets aIPs;

[0042] Furthermore, if you use Nmap to scan: nmap -sP 201.107.16.0 / 24.

[0043] Step S2: Scan TCP and UDP port 53 for each IP address in the active IP address set aIPs, and select the IP address set bIPs with open port 53;

[0044] Furthermore, we can use Nmap to scan the port: nmap-p 53-sT-sU201.107.16.1-201.107.16.10.

[0045] Step S3, use a domain name query tool to send a non-recursive DNS query request to each IP address in the IP address set bIPs opened at port 53 in step S2; for example, use the dig command: dig@201.107.16.1baidu.com+norecurse;

[0046] If the resolved IP address is correctly returned in the query response, and the response flag flags displays RecursionDesired, then the IP address provides DNS recursive resolution service, and the IP address is added to the address set cIPs;

[0047] If the resolved IP address is returned correctly and the response flag displays AuthoritativeAnswer, then the IP address provides the DNS authoritative resolution service;

[0048] If no resolution result is returned or a connection error occurs, it is considered that the IP address does not provide DNS resolution service.

[0049] Step S4, perform compliance comparison: compare each IP address in the address set cIPs with the operator's existing legal DNS recursive resolution service address set RdIPs, and put the IP addresses in the address set cIPs but not in the address set RdIPs into the address set dIPs;

[0050] Step S5: All IPs in the address set dIPs are IP addresses suspected of violating the regulations to provide DNS recursive resolution services; the operator can conduct subsequent verification management based on this list of suspected illegal IPs, set a detection cycle, and then repeat step S1 to start a new detection;

[0051] Furthermore, the verification and management method includes: sending notification and rectification emails to the enterprises or units to which these IPs belong, and the notified enterprises or units reply to the notification emails after confirming the rectification, and after the operator confirms, the IP addresses that have applied for the DNS recursive resolution service operating license can be put into the RdIPs address set, and then repeat step 1 to start a new detection.

[0052] Furthermore, in step S3, the domain name query tool includes but is not limited to dig.

[0053] Furthermore, in step S1, the port scanning tool includes but is not limited to Nmap.

[0054] This application not only sends a small number of regular domain name resolution requests, but also the detection results are completely included in the DNS query response. The detection results can be obtained by analyzing the DNS query response, so it can effectively avoid being intercepted by firewalls or IDS / IPS devices. At the same time, the present invention not only identifies recursive resolution services, but also identifies authoritative resolution services, which helps to further grasp non-public DNS resolution services, and can automatically monitor new non-public recursive resolution services every day, providing operators with effective technical means to efficiently manage DNS resolution services in large-scale IP network space.

[0055] Based on the above design, this application has designed a system for discovering illegal DNS resolution services. Please refer to Figure 2 , specifically including IP detection module, 53 port scanning module, DNS query detection module, DNS database, compliance comparison module, and DNS service report management module;

[0056] The IP live detection module is used to perform IP address liveness scanning on the Internet IP address space operated by the operator, and screen out active IP address sets aIPs;

[0057] The port 53 scanning module is used to scan the TCP and UDP port 53 of each IP address in the active IP address set aIPs, and filter out the IP address set bIPs with open port 53;

[0058] The DNS query detection module is used to send a non-recursive DNS query request to each IP address in the IP address set bIPs opened on port 53; if the resolved IP address is correctly returned in the query response, and the response flag flags displays Recursion Desired, the IP address provides DNS recursive resolution service, and the DNS query detection module puts the IP address into the address set cIPs;

[0059] The compliance comparison module is used to compare each IP address in the address set cIPs with the operator's existing legal DNS database, and put the IP addresses in the address set cIPs but not in the operator's existing legal DNS database into the address set dIPs;

[0060] The DNS service report management module is used to display all IP addresses in the address set dIPs.

[0061] The present invention adopts a hierarchical detection method, which saves invalid port detection and DNS query for a large number of offline IPs compared to full scanning, greatly reduces detection traffic and improves detection efficiency.

[0062] The above description is only the preferred embodiment of the present invention, which does not limit the protection scope of the present invention. For those skilled in the art, the present invention can be modified and varied in various ways. Within the spirit and principle of the present invention, any change, modification, replacement, integration and parameter change of these embodiments by conventional substitution or capable of achieving the same function without departing from the principle and spirit of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for discovering illegal DNS resolution services, characterized in that: The following steps are involved: Step S1: Use a port scanning tool to perform an IP address survival scan on the Internet IP address space operated by the operator to screen out active IP address sets aIPs; Step S2: Scan TCP and UDP port 53 for each IP address in the active IP address set aIPs, and select the IP address set bIPs with open port 53; Step S3, using a domain name query tool to send a non-recursive DNS query request to each IP address in the IP address set bIPs with port 53 open in step S2; If the resolved IP address is correctly returned in the query response, and the response flag flags displays RecursionDesired, then the IP address provides DNS recursive resolution service, and the IP address is added to the address set cIPs; Step S4, perform compliance comparison: compare each IP address in the address set cIPs with the operator's existing legal DNS recursive resolution service address set RdIPs, and put the IP addresses in the address set cIPs but not in the address set RdIPs into the address set dIPs; Step S5: All IPs in the address set dIPs are IP addresses that are suspected of violating the regulations in providing DNS recursive resolution services. The operator can conduct subsequent verification and management based on this list of suspected violating IPs, set a detection cycle, and then repeat step S1 to start a new detection.

2. A method for discovering illegal DNS resolution services according to claim 1, characterized in that: In step S3, if the resolved IP address is correctly returned in the query response and the response flag flags displays Recursion Desired, the IP address provides DNS recursive resolution service, and the IP address is added to the address set cIPs; If the resolved IP address is returned correctly and the response flag displays AuthoritativeAnswer, then the IP address provides the DNS authoritative resolution service; If no resolution result is returned or a connection error occurs, it is considered that the IP address does not provide DNS resolution service.

3. A method for discovering illegal DNS resolution services according to claim 1, characterized in that: In step S5, the verification management method includes: sending a notification and rectification email to the enterprises or units to which these IPs belong, and the notified enterprises or units reply to the notification email after confirming the rectification. After the operator confirms, the IP addresses that have applied for the DNS recursive resolution service operation license can be put into the RdIPs address set, and then repeat step 1 to start a new detection.

4. A method for discovering illegal DNS resolution services according to any one of claims 1 or 2, characterized in that: In step S3, the domain name query tool includes but is not limited to dig.

5. A method for discovering illegal DNS resolution services according to claim 1, characterized in that: In step S1, the port scanning tool includes but is not limited to Nmap.

6. A DNS resolution service system for discovering violations according to claim 1, characterized in that: Including IP detection module, 53 port scanning module, DNS query detection module, DNS database, compliance comparison module, DNS service report management module; The IP live detection module is used to perform IP address liveness scanning on the Internet IP address space operated by the operator, and screen out active IP address sets aIPs; The port 53 scanning module is used to scan the TCP and UDP port 53 of each IP address in the active IP address set aIPs, and filter out the IP address set bIPs with open port 53; The DNS query detection module is used to send a non-recursive DNS query request to each IP address in the IP address set bIPs opened on port 53; if the resolved IP address is correctly returned in the query response, and the response flag flags displays Recursion Desired, the IP address provides DNS recursive resolution service, and the DNS query detection module puts the IP address into the address set cIPs; The compliance comparison module is used to compare each IP address in the address set cIPs with the operator's existing legal DNS database, and put the IP addresses in the address set cIPs but not in the operator's existing legal DNS database into the address set dIPs; The DNS service report management module is used to display all IP addresses in the address set dIPs.