A distributed sub-domain name and associated asset mining method, system and device
By using a distributed computing cluster and an improved Raft consensus algorithm to filter duplicate domain name mining, the problem of resource waste caused by parallel mining of multiple methods is solved, and efficient subdomain and associated asset mining is achieved.
Patent Information
- Application Number
- CN202311531594.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-11-16
AI Technical Summary
In existing technologies, when multiple methods mine subdomains in parallel, the same subdomain is repeatedly resolved and verified, resulting in a waste of network and host resources and low mining efficiency.
It employs a distributed computing cluster and an improved Raft consensus algorithm. It mines subdomains on different computing nodes through a distributed subdomain and associated asset mining algorithm, and uses an improved consistency consensus algorithm to filter duplicate domains, ensuring data consistency and avoiding duplicate mining.
This effectively avoids wasting computing resources, reduces subdomain mining time, and improves mining efficiency.
Smart Images

Figure CN117579337B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network security, and in particular to a method, system, and device for mining distributed subdomains and associated assets. Background Technology
[0002] A subdomain is an independent domain name created under a main domain name, distinguished by adding a prefix before the main domain name. Subdomains can be used to organize and manage different parts of a website, or to differentiate different services, functions, or geographical locations. The structure of a subdomain typically involves placing the subdomain name immediately before the main domain name, separated by a dot. For example, for the main domain example.com, subdomains can be created as follows: blog.example.com, shop.example.com, and mail.example.com. In these examples, "blog," "shop," and "mail" are the names of the subdomains, preceded by a dot before the main domain name "example.com." Subdomains can have different IP addresses, hosting configurations, and content. This allows website owners to better organize and manage their websites and offer different services and functions as needed. Subdomains can also be used to create multilingual websites, multiple branded websites, or websites for different departments. In short, subdomains are independent domain names created under a main domain name, distinguished and organized by adding a prefix before the main domain name to differentiate different parts of a website or services.
[0003] Subdomain-related assets refer to the collection of network entities and services associated with all subdomain strings under a domain name. They are a common information gathering target for cybersecurity engineers and hackers. By collecting and analyzing a company's subdomains and related assets, information such as the company's network architecture, information system and application architecture, and web application vulnerabilities can be obtained, thereby identifying potential attack surfaces.
[0004] The purpose of subdomain mining technology is to discover and acquire all subdomains and related assets under a specific domain. Through subdomain mining, the asset pool can be expanded, more data information about a domain can be obtained, and this information can then be used for purposes such as security vulnerability scanning and intelligence gathering.
[0005] Since there is no single, efficient method for mining all subdomains of a given domain, multiple methods are needed when expanding a domain's subdomains. Because methods like brute-force mining are time-consuming, a previous solution was to run the subdomain mining task in parallel across multiple processes to improve speed. However, when using multiple mining methods in parallel, duplicate subdomain results are inevitable. Furthermore, obtaining these results involves unnecessary computation and verification by each method.
[0006] In the existing methods, because the mining is done in parallel, when multiple methods discover the same subdomain, each method must resolve and verify the subdomain.
[0007] To resolve and verify a subdomain, the subdomain mining process must communicate with that subdomain. When multiple methods yield duplicate subdomain results, each method's process must communicate with that subdomain. This results in multiple communications with the same subdomain, wasting network and host resources. Furthermore, due to varying network conditions and limited bandwidth for different subdomains, the "subdomain resolution and verification process" involving communication with the subdomain is the most time-consuming part of the entire subdomain mining process. Multiple resolutions and verifications of the same subdomain not only waste resources but also lead to lengthy mining times and low efficiency. Summary of the Invention
[0008] The purpose of this invention is to provide a distributed subdomain and associated asset mining method, system and device to solve the problems of wasted computing resources and lengthy subdomain mining time caused by repeatedly resolving and verifying the same subdomain.
[0009] To achieve the above objectives, the present invention provides the following solution:
[0010] A method for mining distributed subdomains and associated assets includes:
[0011] Obtain a list of main domain names of the target group enterprise, create separate subdomain mining tasks for the main domain names in the list, and distribute the subdomain mining tasks to different computing nodes of the distributed computing cluster through scheduling;
[0012] Within each computing node, subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method; one computing node corresponds to one subdomain list.
[0013] Verify the subdomains in the subdomain list and determine the subdomains that pass the verification;
[0014] Determine whether the verified subdomain exists within the set of probed subdomains maintained by the improved consensus algorithm; the improved consensus algorithm is responsible for communication between processes of each computing node in the distributed computing cluster and for maintaining the set of probed subdomains; the improved consensus algorithm is based on the Raft consensus algorithm and is improved to remove the restriction on data order, only ensuring data consistency within the observable window, and multiple processes maintain data consistency through the hash of the latest window data;
[0015] If so, discard the verified subdomain and return to step "Within each computing node, mine the subdomains corresponding to the main domain using a distributed subdomain and associated asset mining algorithm, and generate a subdomain list according to the subdomain generation method; one computing node corresponds to one subdomain list";
[0016] If not, classify and label the services mapped to the verified subdomains, and generate labeled subdomains.
[0017] The associated asset information of the labeled subdomains is scanned, and the mined subdomains are added to the set of detected subdomains until all subdomain mining tasks are completed.
[0018] Optionally, within each computing node, subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method. This process also includes:
[0019] The distributed subdomain and associated asset mining tools corresponding to the publicly available distributed subdomain and associated asset mining algorithms are integrated on the computing node by redirecting the input / output interface; the distributed subdomain and associated asset mining algorithms include intelligent enumeration based on strings, collection based on parsing records, search engine analysis, and association analysis based on whois.
[0020] Optionally, verify the subdomains in the subdomain list to determine the subdomains that pass verification, specifically including:
[0021] The subdomains in the subdomain list are verified and filtered using different verification methods to exclude invalid subdomains and false alarms, and to determine the subdomains that pass the verification. The different verification methods include DNS resolution, Whois query, and website access.
[0022] Optionally, determining whether the verified subdomain exists within the set of probed subdomains maintained by the improved consensus algorithm specifically includes:
[0023] Match the string of the verified subdomain with the strings of the subdomains in the set of detected subdomains;
[0024] If the match is successful, it is determined that the verified subdomain exists within the set of probed subdomains maintained by the improved consensus algorithm;
[0025] If the match fails, it is determined that the verified subdomain does not exist in the set of probed subdomains maintained by the improved consensus algorithm.
[0026] Optionally, the services mapped to the verified subdomains are categorized and labeled to generate labeled subdomains, specifically including:
[0027] The verified subdomain mapping services are categorized according to their different functions, uses, and types, and the corresponding service type, IP address list, WHOIS information, and ICP filing information are identified for each verified subdomain mapping service.
[0028] Optionally, the associated asset information of the labeled subdomains is scanned, and the mined subdomains are shared until all subdomain mining tasks are completed. This process then includes:
[0029] All subdomains and associated asset information saved during the subdomain mining process are recovered, and the subdomains and associated asset information are matched one by one with the mined subdomains in the detected subdomain set.
[0030] A distributed subdomain and associated asset mining system, comprising:
[0031] The subdomain mining scheduling and distribution module is used to obtain a list of main domain names of the target group enterprise, establish separate subdomain mining tasks for the main domain names in the list of main domain names, and distribute the subdomain mining tasks to different computing nodes of the distributed computing cluster through scheduling.
[0032] The subdomain mining module is used to mine the subdomains corresponding to the main domain name in each computing node through a distributed subdomain and associated asset mining algorithm, and generate a subdomain list according to the subdomain generation method; one computing node corresponds to one subdomain list.
[0033] The verification module is used to verify the subdomains in the subdomain list and determine the subdomains that pass the verification.
[0034] The consensus algorithm module is used to determine whether the verified subdomain exists in the set of probed subdomains maintained by the improved consensus algorithm. The improved consensus algorithm is responsible for communication between processes of each computing node in the distributed computing cluster and for maintaining the set of probed subdomains. The improved consensus algorithm is based on the Raft consensus algorithm and is improved to remove the restriction on data order. It only guarantees data consistency within the observable window, and multiple processes maintain data consistency through the hash of the latest window data.
[0035] The discard module is used to discard the verified subdomains if the condition is met, and return to the step "Within each computing node, the subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method; one computing node corresponds to one subdomain list";
[0036] The classification and labeling module is used to classify and label the services mapped by the verified subdomains if no, and generate labeled subdomains.
[0037] The results aggregation and analysis module is used to scan the associated asset information of the labeled subdomains and add the mined subdomains to the set of detected subdomains until all subdomain mining tasks are completed.
[0038] Optional, also includes:
[0039] The recycling and pairing module is used to recycle all subdomains and associated asset information saved during the subdomain mining process, and to pair the subdomains and associated asset information with the mined subdomains in the detected subdomain set one by one.
[0040] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor running the computer program to enable the electronic device to perform the aforementioned distributed subdomain and associated asset mining method.
[0041] Optionally, the memory is a non-transitory computer-readable storage medium that stores a computer program, which, when executed by a processor, implements the aforementioned distributed subdomain and associated asset mining method.
[0042] According to specific embodiments provided by the present invention, the following technical effects are disclosed: The embodiments of the present invention establish separate subdomain mining tasks for the main domains in the main domain name set list of the target group enterprise, and distribute the subdomain mining tasks to different computing nodes in the distributed computing cluster through scheduling. The distributed subdomain and associated asset mining algorithm is used to mine the subdomains corresponding to the main domains, and the verified subdomains are compared with the set of probed subdomains maintained by the improved consensus algorithm. This improved consensus algorithm is based on the Raft consensus algorithm, which removes the restriction on data order and only guarantees data consistency within the observable window. Multiple processes maintain data consistency through the hash of the latest window data, thereby avoiding one process repeatedly mining subdomains already collected by other processes. The present invention applies the subdomain mining task to different computing nodes in the distributed computing cluster for multi-task, multi-dimensional mining, and uses the improved consensus algorithm to ensure the consistency of results to filter duplicate domain mining requests, thereby avoiding waste of computing resources, reducing the overall mining time, and improving the subdomain mining efficiency. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart of the distributed subdomain and associated asset mining method provided by the present invention;
[0045] Figure 2 A flowchart illustrating the interaction process between the distributed subdomain and associated asset mining algorithm and the improved consensus algorithm;
[0046] Figure 3 A comparison diagram showing instances of the improved consensus algorithm and the original Raft consensus algorithm;
[0047] Figure 4 This is a schematic diagram of the structure of the distributed subdomain and associated asset mining system provided in Embodiment 3 of the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] The purpose of this invention is to provide a distributed subdomain and associated asset mining method, system and device that can avoid the waste of computing resources, reduce the overall mining time and improve the mining efficiency of subdomains.
[0050] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0051] like Figure 1 As shown, this invention provides a distributed subdomain and associated asset mining method, including:
[0052] Step 101: Obtain the main domain name set list of the target group enterprise, create separate subdomain mining tasks for the main domain names in the main domain name set list, and distribute the subdomain mining tasks to different computing nodes in the distributed computing cluster through scheduling.
[0053] In practical applications, subdomain collection is a crucial testing point in areas such as cyberspace asset mapping, information penetration testing, and internet exposure surface detection. Since vulnerabilities are rarely found on the target's main website, penetration testing often requires interfaces outside the main site. However, subdomains are usually related to the main domain in some way, such as in services, functions, or regions. This is especially true for large corporations with numerous target sites, where the sheer number of subdomains involved and the time required for subdomain mining are substantial. For example, consider the domain list ["abc1.com", "abc2.com", ..., "abc33.com"], which involves subdomain mining of 33 main domains. This task is distributed across four different node processes in the cluster. One process, F, is responsible for mining the subdomains of "abc1.com" and "abc2.com".
[0054] In practical applications, scheduling and distribution are based on tasks and policies, and can be grouped according to different top-level domains (such as .cn, .com) or different companies and industries.
[0055] This invention is applied to distributed scenarios, where the mining program (i.e., the distributed subdomain and associated asset mining algorithm) is deployed on different computing nodes. These computing nodes logically belong to the same computing cluster, which completes one or a set of business functions.
[0056] In this context, computing nodes physically refer to general-purpose server equipment, or Docker containers or virtual machines installed on servers; logically, they refer to resource points with independent computing capabilities.
[0057] Step 102: Within each computing node, subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method; one computing node corresponds to one subdomain list.
[0058] In practical applications, before step 102, the method further includes: integrating the distributed subdomain mining tool corresponding to the publicly available distributed subdomain and associated asset mining algorithm onto the computing node by redirecting the input / output interface; the distributed subdomain and associated asset mining algorithm includes intelligent enumeration based on strings, collection based on parsing records, analysis based on search engines, and association analysis based on whois.
[0059] In practical applications, distributed subdomain and associated asset mining algorithms include string-based intelligent enumeration, DNS record-based collection, search engine-based analysis, and WHOIS-based association analysis. The goal is to expand the main domain into many valid subdomains.
[0060] Each seed domain generation method can generate a list of subdomains. These subdomain lists may contain duplicates or be completely different. A single compute node can use a single production method or multiple different methods; regardless of the method used, the final output will always be a list of subdomains. In other words, the number of different subdomain lists corresponds to the number of compute nodes to which the task is distributed.
[0061] In practical applications, taking process F as an example, it iterates through the domains "abc1.com" and "abc2.com" for task mining. Considering that there are many different tools for subdomain generation, such as fierce, Sublist3r, Amass, OneForAll, and dnsrecon, a new subdomain list can be obtained. Subdomain dictionaries can also be generated based on subdomain brute-force attacks, statistical learning models, and other methods. For publicly available algorithms and tools, they can be integrated into the computation node's algorithm through redirected input / output interfaces.
[0062] Step 103: Verify the subdomains in the subdomain list and determine the subdomains that have passed the verification.
[0063] In practical applications, step 103 specifically includes: verifying and filtering the subdomains in the subdomain list through different verification methods, excluding invalid subdomains and false alarms, and determining the subdomains that have passed verification; different verification methods include DNS resolution, Whois query and website access.
[0064] In practical applications, subdomains can be verified through DNS resolution, Whois queries, website access, etc., to exclude invalid subdomains and false positives. Verified subdomains can then be used for subsequent collection and analysis of associated asset information.
[0065] For example, the subdomain "shop.abc1.com" of the main domain "abc1.com" has an A-type DNS record and an IP address of 1.223.44.*. Optionally, the status of the subdomain can also be verified by querying the subdomain status through WHOIS or by constructing a URL string to access its corresponding website. The verification method can be flexibly selected based on the actual situation.
[0066] Step 104: Determine whether the verified subdomain exists within the set of probed subdomains maintained by the improved consensus algorithm. The improved consensus algorithm is responsible for communication between processes on various computing nodes within the distributed computing cluster and for maintaining the set of probed subdomains. The improved consensus algorithm is based on the Raft consensus algorithm, removing restrictions on data order and only ensuring data consistency within the observable window. Multiple processes maintain data consistency through the hash of the latest window data. If yes, proceed to step 105; otherwise, proceed to step 106. The interaction process between the distributed subdomain and associated asset mining algorithm and the improved consensus algorithm is as follows: Figure 2 As shown.
[0067] In practical applications, step 104 specifically includes: matching the string of the verified subdomain with the string of the subdomain in the set of probed subdomains; if the match is successful, determining that the verified subdomain exists in the set of probed subdomains maintained by the improved consensus algorithm; if the match fails, determining that the verified subdomain does not exist in the set of probed subdomains maintained by the improved consensus algorithm.
[0068] In practical applications, the improved consensus algorithm maintains a consistent set of probed subdomains across all processes participating in the mining task within the cluster. The observable window size is set to N = 10000, and the consistency of subdomains is verified using this window of N subdomain strings. If "shop.abc1.com" is already in the set of probed subdomains, the current process F stops mining information for that subdomain and continues to obtain the next subdomain, "map.abc1.com," from step 2 for verification and consistency monitoring.
[0069] Step 105: Discard the verified subdomain and return to step 102.
[0070] Step 106: Classify and label the services mapped to the verified subdomains to generate labeled subdomains.
[0071] In practical applications, step 106 specifically includes: classifying the services mapped to the verified subdomains according to different functions, uses and types, and identifying the service type, the corresponding IP address list, WHOIS information and ICP filing information of the services mapped to the verified subdomains, so as to facilitate the subsequent collection and analysis of the associated asset information of the subdomains.
[0072] In practical applications, the classification and labeling of subdomains are multi-labeled and multi-dimensional. The classification labels can be pre-learned and set in the parameters using machine learning methods.
[0073] For example, a subdomain m1.uptime66.com can have category tags such as industry (domains in the energy industry), threat intelligence (CC domains of botnets), or user-defined tags (user-labeled tags, etc.). These tags are mainly used in attack surface analysis.
[0074] The corresponding IP address list can be obtained by requesting DNS packets from different DNS recursive servers to find the corresponding host servers; WHOIS information can be used to obtain information such as the registrar and status of the subdomain; ICP filing information can be used to obtain information such as the main entity of the subdomain and the industry attribute of the filing.
[0075] Step 107: Scan the associated asset information of the labeled subdomains and add the mined subdomains to the set of detected subdomains until all subdomain mining tasks are completed.
[0076] In practical applications, step 107 is followed by: recovering all subdomains and associated asset information saved during the subdomain mining process, and pairing the subdomains and associated asset information with the mined subdomains in the detected subdomain set.
[0077] In practical applications, after subdomains are categorized and labeled, their assets are scanned for ports, vulnerabilities, and sensitive information to identify security vulnerabilities and risks. The operational behavior and parameters differ for each scan.
[0078] The associated asset information of subdomains focuses on attack surface risks, such as port scanning (scanning open ports of the target subdomain to discover potential service vulnerabilities), vulnerability scanning (common web application vulnerabilities include SQL injection, XSS, CSRF, etc.), sensitive information scanning (such as database passwords, configuration files, source code, etc.), SSL certificate detection (whether the certificate has expired, whether there is a man-in-the-middle attack, etc.), web content analysis (whether there is malicious code), and system fingerprinting (operating system, application framework, etc.).
[0079] Specifically, taking the subdomain "map.abc1.com" as an example, port scanning revealed that port 3306 was open; vulnerability scanning revealed that it used an HTTP / 2 denial-of-service vulnerability; sensitive information scanning revealed no leakage; SSL certificate detection showed no expiration; web content analysis showed no malicious code; system fingerprinting identified the operating system as CentOS 7.6 and the application framework as jQuery.
[0080] In practical applications, the mined subdomain information is encapsulated into a log append request and sent to the consensus algorithm subroutine (i.e., the executable program of the improved consensus algorithm). The consensus algorithm subroutine completes the appending of the log record by communicating and interacting with other processes in the cluster.
[0081] Specifically, in an example of the present invention, the subdomain "map.abc1.com" information is added and sent to the consensus algorithm to prevent mining algorithms in other processes from repeatedly mining the associated asset information of "map.abc1.com".
[0082] In practical applications, all subdomain and related asset information saved during the subdomain mining process is retrieved from each process and matched one by one with the set of detected subdomains maintained by the corresponding consistency algorithm.
[0083] Specifically, in this embodiment of the invention, process F completes the subdomain mining task for the two main domains "abc1.com" and "abc2.com". After the processes in the other three different nodes complete their mining tasks, they are matched with the subdomains in the already detected subdomain set to form complete and formatted subdomain and associated asset information. This information can be saved and output in formats such as JSON or Excel.
[0084] The improved consensus algorithm involved in this invention is mainly responsible for communication between different processes within the cluster and maintaining the detected subdomain set. This part, based on the improved Raft consensus algorithm, ensures data consistency within the cluster. The improved technical points are as follows:
[0085] The detected set of subdomains serves as the process state that the improved consensus algorithm needs to maintain. At the same time, the Raft consensus algorithm's requirement for the order of request submission is modified, relaxing the restriction to only require that the data within the set of subdomains be consistent, without needing to care about the order of appending.
[0086] like Figure 3 As shown, the original Raft consensus algorithm could only detect differences after A and corrected ADBC to ABCD. The improved consensus algorithm now focuses on the hash value of the latest window when checking consistency, relaxing the requirement for sequential consistency; BCD and DBC (with a window size of 3) have the same hash value. This speeds up and ignores unnecessary and redundant operations in specific scenarios (where order doesn't matter), thereby saving resources and increasing speed.
[0087] The Raft consensus algorithm maintains data consistency by appending logs and using a state machine mechanism. The improved algorithm encapsulates the results into log append requests to obtain a set of known subdomains as the consensus state.
[0088] This invention employs a distributed subdomain and associated asset mining method, which can improve the efficiency and accuracy of subdomain and associated asset mining. By applying mining tasks to different nodes in a distributed cluster for multi-task and multi-dimensional mining, and using a distributed consensus algorithm to ensure result consistency and filter duplicate domain mining requests, the overall mining time is reduced and the efficiency of subdomain mining is improved.
[0089] Example 2
[0090] In order to implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a distributed subdomain and associated asset mining system is provided below.
[0091] A distributed subdomain and associated asset mining system, comprising:
[0092] The subdomain mining scheduling and distribution module is used to obtain a list of main domain names of the target group enterprise, create separate subdomain mining tasks for the main domain names in the list of main domain names, and distribute the subdomain mining tasks to different computing nodes of the distributed computing cluster through scheduling.
[0093] The subdomain mining module is used to mine the subdomains corresponding to the main domain name in each computing node through a distributed subdomain and associated asset mining algorithm, and generate a subdomain list according to the subdomain generation method; one computing node corresponds to one subdomain list.
[0094] The verification module is used to verify the subdomains in the subdomain list and determine the subdomains that pass the verification.
[0095] The consensus algorithm module is used to determine whether the verified subdomain exists within the set of probed subdomains maintained by the improved consensus algorithm. The improved consensus algorithm is responsible for communication between processes of various computing nodes in the distributed computing cluster and for maintaining the set of probed subdomains. The improved consensus algorithm is based on the Raft consensus algorithm and is improved to remove the restriction on data order, ensuring data consistency only within the observable window. Multiple processes maintain data consistency through the hash of the latest window data.
[0096] The discard module is used to discard the verified subdomains if the condition is met, and return to the step "Within each computing node, the subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method; one computing node corresponds to one subdomain list".
[0097] The classification and labeling module is used to classify and label the services mapped by the verified subdomains if no, and generate labeled subdomains.
[0098] The results aggregation and analysis module is used to scan the associated asset information of the labeled subdomains and add the mined subdomains to the set of detected subdomains until all subdomain mining tasks are completed.
[0099] In practical applications, it also includes:
[0100] The recycling and pairing module is used to recycle all subdomains and associated asset information saved during the subdomain mining process, and to pair the subdomains and associated asset information with the mined subdomains in the detected subdomain set one by one.
[0101] Example 3
[0102] Embodiment 3 of the present invention provides a distributed subdomain and associated asset mining system, such as... Figure 4 As shown, it includes:
[0103] Task scheduling module 1 is responsible for distributing the domain name list of the target group enterprise to different node processes and creating separate subdomain mining tasks for each domain. This module monitors and manages the scheduling, status, and execution results of the tasks. For example, an enterprise may have thousands of domain names, requiring subdomain mining and related asset information collection for each domain, but the computing resources of a single node are insufficient to complete this task. Therefore, the task scheduling module can be used to distribute the domain name list to different node processes, which can then perform subdomain mining and related asset information collection in parallel, thereby improving efficiency and reducing time costs.
[0104] The subdomain and associated asset mining module is responsible for generating a subdomain list based on different subdomain generation methods, and verifying and filtering the subdomains to exclude invalid subdomains and false positives. Simultaneously, it collects, categorizes, and labels the associated asset information of verified subdomains, identifying the service type, corresponding IP address list, WHOIS information, ICP filing information, etc. It is also responsible for performing port scanning, vulnerability scanning, and sensitive information scanning on subdomain assets to discover existing security vulnerabilities and risks. This module interacts with the consensus algorithm module to jointly maintain a set list of detected subdomains. This invention includes multiple subdomain and associated asset mining modules, such as... Figure 4 The subdomain and associated asset mining module 2-N is shown, where N = 1, 2, ...
[0105] Consensus Algorithm Module 3 is responsible for inter-process communication among nodes in the cluster and maintaining a set of probed subdomains. It achieves data consistency based on the improved Raft consensus algorithm and prevents repeated mining of probed subdomains.
[0106] The Results Aggregation and Analysis Module 4 is responsible for collecting subdomain and associated asset information saved in each process, and matching it one by one with the set of probed subdomains maintained by the corresponding consistency algorithm to form complete and formatted subdomain associated asset information. It is also responsible for summarizing and analyzing the collected associated asset information, generating reports, and providing services such as display and download.
[0107] The distributed subdomain and associated asset mining system of the present invention allows each process in the distributed cluster to use different subdomain mining methods. By reconstructing the input and output interfaces of these methods and integrating them with the consensus algorithm program, the system achieves the joint use of multiple mining methods to complete the task of subdomain and associated asset mining.
[0108] Example 4
[0109] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor running the computer program to enable the electronic device to perform the distributed subdomain and associated asset mining method described above.
[0110] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the distributed subdomain and associated asset mining method described above.
[0111] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0112] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for mining distributed subdomains and associated assets, characterized in that, include: Obtain a list of main domain names of the target group enterprise, create separate subdomain mining tasks for the main domain names in the list, and distribute the subdomain mining tasks to different computing nodes of the distributed computing cluster through scheduling; Within each computing node, subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method; one computing node corresponds to one subdomain list. Within each computing node, subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method. This process also includes: The distributed subdomain and associated asset mining tools corresponding to the publicly available distributed subdomain and associated asset mining algorithms are integrated on the computing node by redirecting the input / output interface; the distributed subdomain and associated asset mining algorithms include string-based intelligent enumeration, record-based collection, search engine-based analysis, and WHOIS-based association analysis; Verify the subdomains in the subdomain list and determine the subdomains that pass the verification; Determining whether the verified subdomain exists within the set of probed subdomains maintained by the improved consensus algorithm specifically includes: Match the string of the verified subdomain with the strings of the subdomains in the set of detected subdomains; If the match is successful, it is determined that the verified subdomain exists within the set of probed subdomains maintained by the improved consensus algorithm; If the match fails, it is determined that the verified subdomain does not exist in the set of detected subdomains maintained by the improved consensus algorithm. The improved consensus algorithm is responsible for communication between processes of each computing node in the distributed computing cluster and for maintaining the set of detected subdomains. The improved consensus algorithm is based on the Raft consensus algorithm and is improved to remove the restriction on data order. It only guarantees data consistency within the observable window, and multiple processes maintain data consistency through the hash of the latest window data. If so, discard the verified subdomain and return to step "Within each computing node, mine the subdomains corresponding to the main domain using a distributed subdomain and associated asset mining algorithm, and generate a subdomain list according to the subdomain generation method; one computing node corresponds to one subdomain list"; If not, the services mapped to the verified subdomains are categorized and labeled to generate labeled subdomains, specifically including: The verified subdomain mapping services are categorized according to their different functions, uses, and types, and the service type, corresponding IP address list, WHOIS information, and ICP filing information of the verified subdomain mapping services are identified. The associated asset information of the labeled subdomains is scanned, and the mined subdomains are added to the set of detected subdomains until all subdomain mining tasks are completed.
2. The distributed subdomain and associated asset mining method according to claim 1, characterized in that, Verifying the subdomains in the subdomain list and determining the subdomains that pass verification specifically includes: The subdomains in the subdomain list are verified and filtered using different verification methods to exclude invalid subdomains and false alarms, and to determine the subdomains that pass the verification. The different verification methods include DNS resolution, Whois query, and website access.
3. The distributed subdomain and associated asset mining method according to claim 1, characterized in that, The associated asset information of the labeled subdomains is scanned, and the mined subdomains are shared until all subdomain mining tasks are completed. This process then includes: All subdomains and associated asset information saved during the subdomain mining process are recovered, and the subdomains and associated asset information are matched one by one with the mined subdomains in the detected subdomain set.
4. A distributed subdomain and associated asset mining system, characterized in that, The distributed subdomain and associated asset mining method according to any one of claims 1-3 includes: The subdomain mining scheduling and distribution module is used to obtain a list of main domain names of the target group enterprise, establish separate subdomain mining tasks for the main domain names in the list of main domain names, and distribute the subdomain mining tasks to different computing nodes of the distributed computing cluster through scheduling. The subdomain mining module is used to mine the subdomains corresponding to the main domain name in each computing node through a distributed subdomain and associated asset mining algorithm, and generate a subdomain list according to the subdomain generation method; one computing node corresponds to one subdomain list. The verification module is used to verify the subdomains in the subdomain list and determine the subdomains that pass the verification. The consensus algorithm module is used to determine whether the verified subdomain exists in the set of probed subdomains maintained by the improved consensus algorithm. The improved consensus algorithm is responsible for communication between processes of each computing node in the distributed computing cluster and for maintaining the set of probed subdomains. The improved consensus algorithm is based on the Raft consensus algorithm and is improved to remove the restriction on data order. It only guarantees data consistency within the observable window, and multiple processes maintain data consistency through the hash of the latest window data. The discard module is used to discard the verified subdomains if the condition is met, and return to the step "Within each computing node, the subdomains corresponding to the main domain are mined using a distributed subdomain and associated asset mining algorithm, and a subdomain list is generated according to the subdomain generation method; one computing node corresponds to one subdomain list"; The classification and labeling module is used to classify and label the services mapped by the verified subdomains if no, and generate labeled subdomains. The results aggregation and analysis module is used to scan the associated asset information of the labeled subdomains and add the mined subdomains to the set of detected subdomains until all subdomain mining tasks are completed.
5. The distributed subdomain and associated asset mining system according to claim 4, characterized in that, Also includes: The recycling and pairing module is used to recycle all subdomains and associated asset information saved during the subdomain mining process, and to pair the subdomains and associated asset information with the mined subdomains in the detected subdomain set one by one.
6. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the distributed subdomain and associated asset mining method as described in any one of claims 1-3.
7. The electronic device according to claim 6, characterized in that, The memory is a non-transitory computer-readable storage medium, which stores a computer program.
Citation Information
Patent Citations
Task verification method of block chain and related equipment
CN110769011A
Domain name asset vulnerability scanning method and device, equipment and storage medium
CN115277129A
