Botnet control terminal detection method and device, storage medium, and electronic device

By analyzing DNS log records and natural language processing technology, we extract domain name vectors and target probabilities, which solves the problem of low detection efficiency of botnet control terminals in the existing technology, achieves more efficient and accurate detection results, and enhances network security.

CN115134095BActive Publication Date: 2024-10-18CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110261716.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-10
Publication Date
2024-10-18
Estimated Expiration
2041-03-10

AI Technical Summary

Technical Problem

Existing technologies have low efficiency and insufficient accuracy in identifying and detecting botnet control terminals, making it difficult to effectively respond to network threats such as DDoS attacks.

Method used

By obtaining DNS log records, extracting domain name information sequences, calculating domain name vectors, and using similarity and evaluation factors to determine the target probability of domain names, the botnet control end is then detected. This method uses natural language processing technology to improve detection efficiency and accuracy based on the behavioral characteristics and co-occurrence characteristics of domain names.

Benefits of technology

It improves the detection efficiency and accuracy of the botnet control end, can more effectively identify potential botnet activities, and enhances network security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115134095B_ABST
    Figure CN115134095B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of network security technology, and provides a method and device for detecting a botnet control terminal, a storage medium, and an electronic device, wherein the method comprises: obtaining a DNS log record, wherein the DNS log record comprises a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name; sorting the domain name corresponding to the requesting IP according to the time information to form a domain name information sequence, and determining a domain name vector of the domain name according to the domain name information sequence; calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, and determining the target probability of the domain name according to the similarity. The present disclosure makes full use of the behavioral characteristics that botnets will initiate domain name requests to DNS in batches, provides a vectorized representation of domain names, and improves detection efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the increasing application of Internet technology, network systems are becoming more and more vulnerable to various malicious attacks, and network security issues are becoming increasingly prominent. Currently, botnets have become one of the biggest security threats to the Internet. Botnets use C&C (command and control) control terminals to send attack instructions to controlled terminals, thereby implementing malicious attacks such as DDoS (Distributed Denial of Service) attacks, spam, and phishing websites. Therefore, effectively identifying the control terminal of a botnet is the key to accurately perceive DDoS attacks in real time and effectively handle network attacks.

[0003] In the existing technology, the identification of botnet control ends relies on sample capture or reverse engineering. For example, honeypot technology deliberately lays out the target to be attacked to lure attacks. Once the attacker invades, it can track how the attack is carried out, analyze the connections between the attackers, and obtain the social network between the attackers. However, honeypot technology requires large-scale deployment and has low detection efficiency.

[0004] In view of this, there is an urgent need in the art to develop a new botnet control terminal detection method and device.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a botnet control terminal detection method, a botnet control terminal detection device, a computer-readable storage medium and an electronic device, thereby improving the efficiency and accuracy of network control terminal detection at least to a certain extent.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to one aspect of the present disclosure, a method for detecting a botnet control terminal is provided, the method comprising: obtaining a DNS log record, wherein the DNS log record comprises a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name; sorting the domain name corresponding to the requesting IP according to the time information to form a domain name information sequence, and determining a domain name vector of the domain name according to the domain name information sequence; calculating a similarity between a domain name vector of a botnet domain name and a domain name vector of the domain name, and determining a target probability of the domain name according to the similarity.

[0009] In an exemplary embodiment of the present disclosure, the domain name includes multiple domain names; calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name includes: obtaining a botnet domain name in a botnet domain name library, determining a domain name to be detected from the multiple domain names according to the botnet domain name; and calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected.

[0010] In an exemplary embodiment of the present disclosure, calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected includes: calculating the cosine similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected, and configuring the cosine similarity as the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected.

[0011] In an exemplary embodiment of the present disclosure, determining the target probability of the domain name according to the similarity includes: configuring an evaluation factor corresponding to the botnet domain name, and calculating the target probability of the domain name according to the evaluation factor and the similarity.

[0012] In an exemplary embodiment of the present disclosure, the domain name includes multiple domain names; configuring an evaluation factor corresponding to the botnet domain name includes: respectively calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of each of the domain names, and configuring the minimum value of the similarity as the evaluation factor corresponding to the botnet domain name.

[0013] In an exemplary embodiment of the present disclosure, the domain name includes multiple domain names; configuring an evaluation factor corresponding to the botnet domain name includes: respectively calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of each of the domain names, and configuring the average value of the similarities as the evaluation factor corresponding to the botnet domain name.

[0014] In an exemplary embodiment of the present disclosure, the target probability of the domain name is calculated according to the evaluation factor and the similarity, including: the calculation formula of the target probability is as follows:

[0015]

[0016] Among them, P e represents the target probability of the domain name, score represents the similarity between the domain name vector of the domain name and the domain name vector of the botnet domain name, score th represents the evaluation factor corresponding to the botnet domain name, α represents the adjustment factor, α∈[0,1].

[0017] In an exemplary embodiment of the present disclosure, determining the domain name vector of the domain name according to the domain name information sequence includes: extracting semantic features of the domain name in a time dimension according to the domain name information sequence, and obtaining the domain name vector of the domain name according to the semantic features of the domain name in the time dimension.

[0018] In an exemplary embodiment of the present disclosure, the method further includes: determining whether the target probability of the domain name is greater than a target probability threshold; when the target probability of the domain name is greater than the target probability threshold, determining the botnet family corresponding to the domain name; obtaining the botnet communication protocol of the botnet family, and detecting whether the domain name is the botnet domain name according to the botnet communication protocol.

[0019] In an exemplary embodiment of the present disclosure, detecting whether the domain name is the botnet domain name according to the botnet communication protocol includes: sending a connection request to the domain name according to the botnet communication protocol; if a response message returned by the domain name is received, determining that the domain name is the botnet domain name, and adding the domain name to the botnet domain name library. In an exemplary embodiment of the present disclosure,

[0020] In an exemplary embodiment of the present disclosure, obtaining a DNS log record includes: determining whether there is response information in the DNS log record; and if there is response information in the DNS log record, obtaining the DNS log record.

[0021] In an exemplary embodiment of the present disclosure, the method further includes: acquiring a whitelist domain name, and deleting a DNS log record corresponding to the whitelist domain name in the DNS log record.

[0022] According to one aspect of the present disclosure, a botnet control terminal detection device is provided, the botnet control terminal detection device comprising: an information acquisition module, used to acquire DNS log records, wherein the DNS log records include a request IP, a domain name corresponding to the request IP, and time information corresponding to the domain name; a vector acquisition module, used to sort the domain names corresponding to the request IP according to the time information to form a domain name information sequence, and determine the domain name vector of the domain name according to the domain name information sequence; a probability calculation module, used to calculate the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, and determine the target probability of the domain name according to the similarity.

[0023] According to one aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the botnet control terminal detection method described in the above embodiment is implemented.

[0024] According to one aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the botnet control terminal detection method as described in the above embodiments.

[0025] It can be seen from the above technical solutions that the botnet control terminal detection method and device, computer-readable storage medium, and electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:

[0026] The disclosed botnet control terminal detection method first obtains DNS log records, which include a request IP, a domain name corresponding to the request IP, and time information corresponding to the domain name; then, the domain name corresponding to the request IP is sorted according to the time information to form a domain name information sequence, and the domain name vector of the domain name is determined according to the domain name information sequence; finally, the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name is calculated, and the target probability of the domain name is determined according to the similarity. The disclosed botnet control terminal detection method, on the one hand, makes full use of the behavioral characteristics that the botnet will initiate domain name requests to the DNS in batches, sorts the domain names according to the time information to obtain the domain name information sequence, extracts the domain name vector of the domain name in the domain name information sequence, embeds the characteristics of domain name co-occurrence, provides a vectorized representation of the domain name, and improves the detection efficiency; on the other hand, by calculating the similarity between the domain name vector of the known botnet domain name and the domain name vector of the domain name, the target probability is further determined, and the detection accuracy is improved.

[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0029] Figure 1 The flowchart of the botnet control terminal detection method according to an embodiment of the present disclosure is schematically shown;

[0030] Figure 2 The following schematically shows a flow chart of a method for obtaining DNS log records according to an embodiment of the present disclosure;

[0031] Figure 3A flowchart of a method for calculating similarity according to an embodiment of the present disclosure is schematically shown;

[0032] Figure 4 A schematic diagram of a method flow for calculating target probability according to an embodiment of the present disclosure is shown;

[0033] Figure 5 The flowchart of detecting a domain name according to a target probability according to an embodiment of the present disclosure is schematically shown;

[0034] Figure 6 The flowchart of the botnet control terminal detection method in a specific embodiment according to an embodiment of the present disclosure is schematically shown;

[0035] Figure 7 A block diagram schematically shows a botnet control terminal detection device according to an embodiment of the present disclosure;

[0036] Figure 8 The module diagram of the electronic device according to an embodiment of the present disclosure is schematically shown;

[0037] Fig. 9 A schematic diagram of a program product according to an embodiment of the present disclosure is shown schematically. DETAILED DESCRIPTION

[0038] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.

[0039] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0040] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0041] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0042] In the prior art, one method is to extract the C&C domain name used in the attack activity by analyzing the Domain Name System (DNS) log records, and then analyze the type of parasitic Trojans to lock the zombie host controlled by the C&C server. And by analyzing the Poisson parameters of each type of C&C domain name, the trend of botnet activities is analyzed to achieve timely formulation of effective suppression measures. However, this method captures the attack behavior after the botnet has launched an attack, and locks the zombie host by analyzing the type of parasitic Trojans. The number of botnet control terminals detected is extremely limited, and the detection efficiency is low.

[0043] Based on the problems existing in the related art, a method for detecting a botnet control terminal is provided in one embodiment of the present disclosure. The method is based on DNS (Domain Name System). DNS is a service of the Internet. As a distributed database that maps domain names and IP addresses to each other, DNS enables people to access the Internet more conveniently. Nodes on the Internet can be uniquely identified by IP addresses and can be accessed through IP addresses, but even if a 32-bit binary IP address is written as 4 ten-digit numbers from 0 to 255, it is still too long and difficult to remember. Therefore, people invented domain names, which can associate an IP address with a group of meaningful characters. When a user visits a website, he can enter either the IP address of the website or its domain name. For access, the two are equivalent.

[0044] When creating a website, a domain name will be registered in advance. To register a domain name, the domain name and IP address corresponding to the website need to be registered with the domain name registrant, and the domain name registrant will store the domain name and IP address in the domain name system. After creating a website, the process of users accessing the website is as follows: First, a client with a DNS application is running on the user's terminal. When the user wants to access the website on the terminal, he only needs to enter the URL corresponding to the website in the browser of the terminal; then, the browser extracts the domain name field from the received URL and transmits the domain name to the client with a DNS application. The client with a DNS application sends a query message to the DNS server, and the query message includes the domain name field to be accessed; then, the domain name field is resolved by the DNS server to obtain the IP address corresponding to the domain name, and the DNS server returns a reply message with the IP address to the client with a DNS application; finally, the client with a DNS application sends the IP address to the browser. After receiving the IP address, the browser can initiate a TCP connection to the HTTP server located by the IP address, and the user can access the website in the browser.

[0045] The botnet control end detection method is also based on natural language processing (NLP), which is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language used by people in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.

[0046] Natural language processing is divided into supervised learning algorithms, semi-supervised learning algorithms and unsupervised learning algorithms. For example, the word2vec (word to vector) model is an unsupervised learning algorithm. Among them, unsupervised learning does not require manual labeling of data, and directly learns the intrinsic properties and laws of data from unlabeled data samples. Clustering is often used to extract data laws. Representative models include: K-means algorithm (K-means). Due to the high cost of labeling data, a lot of data in reality is unlabeled, which makes unsupervised learning have a wide range of application scenarios, such as organizing computer clusters, social network analysis, market segmentation, astronomical data analysis, recommendation systems, search engines, etc.

[0047] The present disclosure first provides a method for detecting a botnet control terminal. Figure 1 The flowchart of the botnet control terminal detection method is shown in FIG. Figure 1 As shown, the botnet control terminal detection method at least includes the following steps:

[0048] Step S110: Obtaining a DNS log record, wherein the DNS log record includes a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name;

[0049] Step S120: sorting the domain names corresponding to the request IP according to the time information to form a domain name information sequence, and determining the domain name vector of the domain name according to the domain name information sequence;

[0050] Step S130: Calculate the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, and determine the target probability of the domain name according to the similarity.

[0051] The botnet control terminal detection method in the disclosed embodiment, on the one hand, makes full use of the behavioral characteristics of botnets that they will initiate domain name requests to the DNS in batches, sorts the domain names according to time information to obtain a domain name information sequence, extracts the domain name vectors of the domain names in the domain name information sequence, embeds the characteristics of domain name co-occurrence, provides a vectorized representation of the domain name, and improves the detection efficiency; on the other hand, by calculating the similarity between the domain name vector of the known botnet domain name and the domain name vector of the domain name, the target probability is further determined, thereby improving the detection accuracy.

[0052] It should be noted that the botnet control terminal detection method of the exemplary embodiment of the present disclosure can be executed by a server, and the botnet control terminal detection device corresponding to the botnet control terminal detection method can also be configured in the server. In addition, it should be understood that the terminal device (e.g., mobile phone, tablet, etc.) can also implement the various steps of the botnet control terminal detection method, and the corresponding device can also be configured in the terminal device.

[0053] In order to make the technical solution of the present disclosure clearer, the steps of the botnet control terminal detection method are described below.

[0054] In step S110, a DNS log record is obtained, wherein the DNS log record includes a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name.

[0055] In the exemplary embodiment of the present disclosure, the process of the DNS server performing domain name resolution according to the domain name field is the process of querying the domain name database in the domain name system according to the domain name, and querying the IP address corresponding to the domain name in the domain name database according to the domain name. During the process of domain name resolution, the DNS server will form a DNS log record according to the query process.

[0056] Among them, the DNS log record may include a request IP, which indicates the terminal IP address corresponding to the user's terminal. The DNS log record may also include the website information entered by the user on the terminal, and the website information includes the domain name. The DNS log record may also include time information, which may include the access request time corresponding to the website information entered by the user on the terminal, and may also include the response time of the DNS server sending the IP address corresponding to the domain name to the user terminal. Of course, the DNS log record may also include the IP address corresponding to the domain name, etc., which is not specifically limited in the present disclosure.

[0057] Specifically, the DNS log record may be a passive DNS data set obtained from a database of a DNS server, and the DNS server may include one or more servers such as a local DNS server, a DNS root server, a .com domain server, a .163.com domain server, etc., which is not specifically limited in the present disclosure.

[0058] In addition, the DNS log records within a preset time period can be obtained from the database of the DNS server, or the DNS log records in the database of the DNS server can be obtained in real time. The preset time period can be set according to actual conditions, for example, the DNS log records can be obtained every two hours, or every hour, and the present disclosure does not make specific limitations on this.

[0059] In an exemplary embodiment of the present disclosure, after a user issues a domain name access request, there may be a situation where the DNS server does not respond, but this domain name access request will still exist in the DNS log record, but the corresponding DNS log record does not have a response time and IP address. Among them, the situation of no response may be that the domain name entered by the user is incorrect and the domain name does not exist in the domain name system. Normally, there are most cases of no response in the DNS log record, but since the controlled end of the botnet will not have a no response when accessing the botnet control end. Therefore, in order to improve the pertinence and improve the detection efficiency, this embodiment can only obtain the DNS log records with responses when obtaining the DNS log records.

[0060] Specifically, all DNS log records are obtained in the DNS database, and DNS log records without response information are filtered out, including: determining whether the DNS log record has response information, and if the DNS log record has response information, obtaining the DNS log record. The response information includes the IP address returned by the DNS server or the response time of the DNS server.

[0061] In addition, a response tag and a no-response tag may also be configured in the DNS log record. If the domain name in the domain name access request does not exist in the domain name database, a no-response tag is added to the DNS log record corresponding to the domain name access request; if the domain name in the domain name access request exists in the domain name database, a response tag is added to the DNS log record corresponding to the domain name access request. Before obtaining the DNS log record, determine whether there is a response tag in the DNS log record; if there is a response tag in the DNS log record, obtain the DNS log record.

[0062] In an exemplary embodiment of the present disclosure, after obtaining the DNS log record, a whitelist domain name is obtained, and the DNS log record corresponding to the whitelist domain name is deleted from the DNS log record.

[0063] The whitelist domain name may be a domain name from a domain name whitelist published by China Internet Network Information Center (CNNIC). It may also be a domain name ranked in a preset top position in the Alxea ranking, wherein the preset top position may be set according to actual conditions, for example, it may be TOP10000 or TOP56982, and the present disclosure does not specifically limit this.

[0064] For example, Figure 2 A schematic diagram of the method for obtaining DNS log records is shown in FIG. Figure 2 As shown, in step S210, determine whether there is response information in the DNS log record; in step S220, if there is response information in the DNS log record, obtain the DNS log record; in step S230, obtain the whitelist domain name, and delete the DNS log record corresponding to the whitelist domain name in the DNS log record.

[0065] In this embodiment, by filtering out the DNS response records containing whitelisted domain names in the DNS response records, the amount of irrelevant data is reduced, thereby improving the detection efficiency of botnet domain names.

[0066] In step S120, the domain names corresponding to the request IP are sorted according to the time information to form a domain name information sequence, and the domain name vector of the domain name is determined according to the domain name information sequence.

[0067] In an exemplary embodiment of the present disclosure, multiple DNS log records are obtained, each log record corresponds to a request IP, a domain name, and a time information. In multiple DNS log records corresponding to a request IP, there are multiple identical or different domain names, and each identical or different domain name corresponds to a time information. Therefore, the domain names corresponding to all request IPs in the DNS log record are sorted according to the time information to obtain a domain name information sequence. Specifically, multiple DNS log records corresponding to each request IP are obtained, and the domain names in the multiple DNS log records are sorted according to the time information in each DNS log record to form a domain name information sequence. In the domain name information sequence, one or more domain names sorted according to the time information corresponding to one or more request IPs are included.

[0068] For example, the domain name information sequence is schematically identified in a table form. Table 1 schematically shows the domain name information sequence. As shown in Table 1, this table is a domain name information sequence generated according to a part of DNS log records obtained within one hour.

[0069] Table 1 Domain name information sequence

[0070] Request IP domain name domain name domain name domain name domain name domain name Request IP1 Domain 12 Domain 29 Domain 315 Domain 16 Domain 41 Request IP2 Domain 15 Domain 20 Domain 60 Domain 58 Request IP3 Domain 541 Domain 25 Domain 20 Domain 25 Domain 30 Domain 68 Request IP4 Domain 256 Domain 78 Domain 12 Request IP5 Domain 12 Domain 26 Domain 45 Domain 05 Domain 12 Domain 02

[0071] It can be seen from the domain name information sequence that the same request IP may access the same domain name at different time points. For example, request IP3 accessed domain name 541, domain name 25, domain name 20, domain name 25, domain name 30, and domain name 68 in sequence within one hour. In the domain name information sequence, if there are multiple request IPs, the multiple request IPs can be sorted according to the registration time of the request IPs, or they can be sorted randomly, and the present disclosure does not make specific limitations on this.

[0072] In an exemplary embodiment of the present disclosure, semantic features of a domain name in a time dimension are extracted according to a domain name information sequence, and a domain name vector of the domain name is obtained according to the semantic features of the domain name in the time dimension.

[0073] Specifically, the domain name information sequence is input into the domain name vector model, the semantic features of each domain name in the domain name information sequence in the time dimension are extracted through the domain name vector model, and the domain name vector corresponding to each domain name is determined according to the semantic features of each domain name in the time dimension.

[0074] The domain name vector model may be a word2vec model, which is a natural language processing model that vectorizes text content. The word2vec model can simplify the processing of text content into vector operations in a K-dimensional vector space, and the similarity of vectors in the vector space can be used to represent the semantic similarity of text content.

[0075] In addition, semantic features of one or more dimensions such as domain name frequency, domain name length, domain name type, etc. can be extracted according to the domain name information sequence, and the domain name vector of the domain name can be obtained according to the semantic features of the domain name in different dimensions.

[0076] This embodiment reconstructs the co-occurrence matrix of the domain name through dimensionality reduction of the domain name vector model, and represents a single domain name as a low-dimensional vector containing domain name co-occurrence information. The domain name vector model includes an input layer, a hidden layer, and an output layer. The method for obtaining the domain name vector according to the domain name vector model may include the following steps: first, the domain name in the domain name information sequence is represented by one-hot (one-hot code, one-hot encoding), which means that a domain name is represented by a vector that only sets one bit to "1" and the rest of the bits are "0", and the encoded domain name is used as the input vector of the input layer; then, in the hidden layer, the input vector is linearly transformed by the weight matrix of the domain name vector model to obtain a low-dimensional vector corresponding to the domain name, that is, the domain name vector; finally, the domain name vector is output in the output layer.

[0077] In an exemplary embodiment of the present disclosure, the domain name information sequence can be input into the word2vec model by calling the word2vec model in the gensim library, and the semantic features of each domain name in the domain name information sequence in the time dimension can be extracted through the word2vec model, and the domain name vector of each domain name can be determined according to the semantic features of each domain name in the time dimension. Among them, the parameters of the word2vec model can be set according to the actual scenario. For example, the training algorithm of the word2vec model can be set to the CBOW (Continuous Bag-of-Word Model) algorithm, the dimension of the feature vector can be set to 300, and the number of truncation of low-frequency domain names can be set to 6, that is, domain names that appear 6 times in the domain name information sequence are removed. Of course, parameters such as the number of iterations can also be set, and the present disclosure does not specifically limit this.

[0078] The domain names corresponding to the request IP are sorted according to the time information to form a domain name information sequence, and the domain name vector of the domain name is determined according to the domain name information sequence.

[0079] In an exemplary embodiment of the present disclosure, a domain name vector library is constructed based on the domain name vector of the domain name. As DNS log records are continuously acquired, a domain name information sequence is formed based on the DNS log records, and the domain name vector of each domain name in the domain name information sequence is determined based on the domain name information sequence, the domain name vector library can be continuously updated. The domain name vector library includes both the domain name vectors of known botnet domain names and the domain name vectors of the domain names to be detected.

[0080] In step S130, the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name is calculated, and the target probability of the domain name is determined according to the similarity.

[0081] In an exemplary embodiment of the present disclosure, since there may be log records corresponding to botnet domain names in DNS log records, the domain name information sequence formed by the DNS log records may include the botnet domain name, and then the domain name vector of the obtained domain name may include the domain name vector corresponding to the botnet domain name.

[0082] If the domain names include a botnet domain name, the domain names other than the botnet domain name are configured as domain names to be detected, and the similarity between the domain name vector of the domain name to be detected and the domain name vector of the botnet domain name is calculated.

[0083] If the domain name does not include the botnet domain name, the domain name vector corresponding to the botnet domain name is first obtained, and then the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name is calculated. The botnet domain name can be input into the domain name vector model to obtain the domain name vector corresponding to the botnet domain name.

[0084] In an exemplary embodiment of the present disclosure, Figure 3 A flow chart of a method for calculating similarity is shown, such as Figure 3 As shown, the process at least includes steps S310 to S320, which are described in detail as follows:

[0085] In step S310, a botnet domain name in a botnet domain name database is obtained, and a domain name to be detected is determined from a plurality of domain names according to the botnet domain name.

[0086] In an exemplary embodiment of the present disclosure, the botnet domain name library includes one or more botnet domain names, and the one or more botnet domain names are matched with multiple domain names respectively; if the domain name matches the botnet domain name, it indicates that the domain name is a botnet domain name; if the domain name does not match the botnet domain name, it indicates that the domain name is a domain name to be detected, and it is necessary to further detect whether the domain name to be detected is a botnet domain name.

[0087] In step S320, the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected is calculated.

[0088] In an exemplary embodiment of the present disclosure, the similarity between two domain name vectors may be calculated by determining the cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. between the vectors, and the present disclosure does not specifically limit this.

[0089] For example, the cosine similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected is calculated, and the cosine similarity is configured as the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected.

[0090] Specifically, the cosine similarity calculation formula between two vectors is shown in formula (1):

[0091]

[0092] Among them, score is the cosine similarity, A i and B i are the components of vector A and vector B respectively. Substitute the domain name vector of the botnet domain name as vector A and the domain name vector of the domain name to be detected as vector B into formula (1) for calculation to obtain the cosine similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected.

[0093] The embodiments of the present disclosure can calculate the similarity between the domain name vector of the domain name to be detected and the domain name vector of the botnet domain name, and characterize the similarity between the domain name vectors. The probability that the domain name to be detected is a botnet domain name can be characterized according to the similarity between the domain name to be detected and the botnet domain name. The greater the similarity between the domain name to be detected and the botnet domain name, the greater the probability that the domain name to be detected is a botnet domain name.

[0094] In an exemplary embodiment of the present disclosure, Figure 4 A schematic diagram of the method for calculating target probability is shown in FIG. Figure 4 As shown, the process at least includes steps S410 to S420, which are described in detail as follows:

[0095] In step S410, an evaluation factor corresponding to the botnet domain name is configured.

[0096] In an exemplary embodiment of the present disclosure, the domain name includes multiple domain names, and the similarities between the domain name vector of the botnet domain name and the domain name vectors of each domain name are calculated respectively, and the minimum value of the similarity is configured as the evaluation factor corresponding to the botnet domain name.

[0097] In addition, if there are multiple botnet domain names, the similarities between the domain name vectors of each botnet domain name and the domain name vectors of each domain name are calculated respectively, each botnet domain name corresponds to multiple similarities, and the minimum value of the multiple similarities corresponding to each botnet domain name is configured as the evaluation factor corresponding to each botnet domain name. In other words, the botnet domain name is associated with the evaluation factor.

[0098] In an exemplary embodiment of the present disclosure, the domain name includes multiple domain names, and the similarities between the domain name vector of the botnet domain name and the domain name vector of each domain name are calculated respectively, and the average value of the similarities is configured as the evaluation factor corresponding to the botnet domain name.

[0099] In addition, if there are multiple botnet domain names, the similarities between the domain name vectors of each botnet domain name and the domain name vectors of each domain name are calculated respectively, each botnet domain name corresponds to multiple similarities, and the minimum value of the multiple similarities corresponding to each botnet domain name is configured as the evaluation factor corresponding to each botnet domain name. In other words, the botnet domain name is associated with the evaluation factor.

[0100] It should be noted that when there is a new domain name, it is necessary to reconfigure the evaluation factor corresponding to each botnet domain name according to the method in this embodiment or the above embodiments.

[0101] In step S420, the target probability of the domain name is calculated according to the evaluation factor and the similarity.

[0102] In the exemplary embodiment of the present disclosure, since there are multiple botnet domain names, the similarity calculation is the similarity between the domain name and a botnet domain name. Finally, one domain name corresponds to multiple similarities, and the multiple similarities respectively represent the similarity between the domain name and multiple botnet domain names. If the similarity between the domain name and a botnet domain name is used to represent the probability that the domain name is a botnet domain name, the accuracy is low.

[0103] Therefore, this embodiment calculates the target probability of the domain name based on the evaluation factor and the similarity, that is, by calculating the target probability, the similarity between the domain name and multiple botnet domain names is mapped to the same standard. Specifically, the calculation formula (2) of the target probability is as follows:

[0104]

[0105] Among them, P e represents the target probability of the domain name, score represents the similarity between the domain name vector of the domain name and the domain name vector of the botnet domain name, score th represents the evaluation factor corresponding to the botnet domain name, α represents the adjustment factor, α∈[0,1]. The value of the adjustment factor can be set according to actual conditions, and the present disclosure does not make any specific limitation on this.

[0106] In an exemplary embodiment of the present disclosure, a botnet family in a botnet domain name library is obtained, and the botnet family includes one or more botnet domain names. The similarities between the domain name vectors of each botnet domain name in the botnet family and the domain name vector of the domain name to be detected are calculated respectively, and the average similarity of the similarities corresponding to each botnet domain name in the botnet family is calculated, and the average similarity is configured as the similarity between the domain name to be detected and the botnet family.

[0107] If there are multiple botnet families, the similarity between the domain name to be detected and each botnet family is obtained. The corresponding minimum similarity in each botnet family is used as an evaluation factor, and the target probability that the domain name to be detected is a botnet family is calculated according to formula (2).

[0108] Among them, the botnet domain name library can come from data sources such as threat intelligence. The botnet domain name library stores all botnet domain name information detected as of the current moment. The botnet domain name information includes the botnet domain name, the botnet family to which the botnet domain name belongs, and the botnet communication protocol corresponding to the botnet family.

[0109] In an exemplary embodiment of the present disclosure, Figure 5 A schematic diagram of a process of detecting a domain name according to a target probability is shown, and the process at least includes steps S510 to S530, which are described in detail as follows:

[0110] In step S510, it is determined whether the target probability of the domain name is greater than a target probability threshold.

[0111] In an exemplary embodiment of the present disclosure, there are multiple botnet domain names, and each domain name has a target probability corresponding to each botnet domain name, and it is determined whether each target probability in each domain name is greater than a target probability threshold. The target probability threshold can be set according to actual conditions, for example, the target probability threshold can be set to 0.6 or 0.8, and the present disclosure does not specifically limit this.

[0112] In step S520, when the target probability of the domain name is greater than the target probability threshold, the botnet family corresponding to the domain name is determined.

[0113] In an exemplary embodiment of the present disclosure, if among all target probabilities corresponding to a domain name, there are one or more target probabilities that are greater than a target probability threshold, then one or more botnet domain names corresponding to the one or more target probabilities are obtained respectively. According to the one or more botnet domain names, a botnet family corresponding to each botnet domain name is determined in a botnet domain name library.

[0114] Among them, multiple botnet domain names may correspond to the same botnet family or different botnet families. A botnet family includes one or more botnet domain names. Therefore, the botnet family corresponding to the domain name may include one botnet family or multiple botnet families.

[0115] In step S530, the botnet communication protocol of the botnet family is obtained, and whether the domain name is a botnet domain name is detected according to the botnet communication protocol.

[0116] In an exemplary embodiment of the present disclosure, one or more botnet communication protocols corresponding to one or more botnet families are respectively obtained, and it is detected whether the domain name is a botnet domain name and which botnet family the domain name belongs to according to each botnet communication protocol.

[0117] Specifically, a connection request is sent to a domain name according to a botnet communication protocol; if a response message returned by the domain name is received, the domain name is determined to be a botnet domain name, and the domain name is added to a botnet domain name library. The connection request may be to access the domain name according to the botnet communication protocol, and the response message may be any information returned by the domain name, such as connection success information or web page information corresponding to the domain name, etc., which is not specifically limited in the present disclosure.

[0118] Send a connection request to the domain name according to one or more botnet communication protocols respectively, and if any response information returned according to the botnet communication protocol is received, the domain name is determined to be a botnet domain name. In addition, the botnet family to which the domain name belongs can also be determined according to the botnet communication protocol corresponding to the response information.

[0119] For example, if a connection request is sent to a domain name according to the botnet communication protocol AAA corresponding to botnet family A, and a connection success message is received from the domain name, it indicates that the domain name is a botnet domain name and belongs to botnet family A. The domain name is added to the botnet domain names corresponding to botnet family A in the botnet library.

[0120] The following is a detailed description of the botnet control terminal detection method in this example implementation method in conjunction with specific scenarios. Figure 6 FIG. 1 is a flow chart showing a method for detecting a botnet control terminal in a specific embodiment of the present disclosure. Figure 6 As shown, the process at least includes steps S601 to S611, which are described in detail as follows:

[0121] In step S601, a passive DNS data set is obtained, the passive DNS data set includes multiple DNS log records, and a DNS log record containing response information is obtained from the multiple DNS log records.

[0122] Each DNS log record includes a requesting IP, a domain name, and time information. Multiple DNS log records include multiple requesting IPs, one or more domain names corresponding to each requesting IP, and time information corresponding to the one or more domain names.

[0123] In step S602, the domain names ranked in the TOP10000 in the Alxea ranking are configured as whitelist domain names, and the DNS log records corresponding to the whitelist domain names are filtered out in the DNS log records.

[0124] In step S603, the multiple request IPs corresponding to one or more domain names are sorted according to time information to form a domain name information sequence.

[0125] Each row of the domain name information sequence includes one or more domain names of a certain request IP, and the order of the one or more domain names in the domain name information sequence is sorted according to the time information of the request IP accessing the domain name.

[0126] In step S604, the domain name information sequence is input into the Word2vec model to obtain the domain name vector corresponding to each domain name.

[0127] In step S605, a plurality of known botnet domain names are obtained from a botnet domain name database, and a plurality of domain names to be detected are determined from the plurality of domain names according to the plurality of known botnet domain names.

[0128] In step S606, the similarities between the domain name vectors of each botnet domain name and the domain name vectors of each to-be-detected domain name are calculated respectively.

[0129] In step S607, the minimum similarity between the domain name vector of each botnet domain name and the domain name vectors of the multiple to-be-detected domain names is configured as an evaluation factor corresponding to each botnet domain name.

[0130] In step S608, multiple target probabilities of each to-be-detected domain name are calculated based on the evaluation factor corresponding to each botnet domain name and the similarity between each botnet domain name and the domain name vectors of the multiple to-be-detected domain names.

[0131] Among them, the multiple target probabilities represent the probability that the domain name to be detected is the domain name of each botnet.

[0132] In step S609, when the target probability of the domain name to be detected is greater than the target probability threshold, the botnet family of the domain name to be detected is determined.

[0133] In step S610, the botnet communication protocol of the botnet family corresponding to the domain name to be detected is obtained, and a connection request is sent to the domain name to be detected according to the botnet communication protocol.

[0134] In step S611, if response information returned by the domain name to be detected is received, the domain name is determined to be a botnet domain name, and the domain name is added to the botnet domain name library.

[0135] If the domain name to be detected is a botnet domain name, the IP address corresponding to the domain name to be detected can be queried in the DNS database according to the domain name to be detected, and the terminal or server corresponding to the IP address is the control end of the botnet. In addition, the request IP corresponding to the botnet can be queried in the DNS response record, and the terminal or server corresponding to the request IP is the controlled end of the botnet.

[0136] The botnet control terminal detection method of this embodiment firstly makes full use of the behavioral feature that botnets initiate domain name requests to DNS in batches, sorts domain names according to time information to obtain a domain name information sequence, extracts domain name vectors of domain names in the domain name information sequence, embeds the features of domain name co-occurrence, provides a vectorized representation of domain names, and improves detection efficiency; secondly, uses the unsupervised learning Word2vec model to extract the features of domain names in the time series dimension when they are accessed by different request IPs, without the need to annotate sample labels in advance; finally, by calculating the similarity between the domain name vector of a known botnet domain name and the domain name vector of the domain name, the target probability is further determined, thereby improving the detection accuracy.

[0137] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided by the present invention are performed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk.

[0138] In addition, it should be noted that the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0139] The following describes an apparatus embodiment of the present disclosure, which can be used to execute the above-mentioned botnet controller detection method of the present disclosure. For details not disclosed in the apparatus embodiment of the present disclosure, please refer to the above-mentioned botnet controller detection method embodiment of the present disclosure.

[0140] Figure 7 A block diagram of a botnet control terminal detection device according to an embodiment of the present disclosure is schematically shown.

[0141] Reference Figure 7 As shown, according to an embodiment of the present disclosure, a botnet control terminal detection device 700 includes: an information acquisition module 701, a vector acquisition module 702 and a probability calculation module 703. Specifically:

[0142] The information acquisition module 701 is used to acquire a DNS log record, wherein the DNS log record includes a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name;

[0143] The vector acquisition module 702 is used to sort the domain names corresponding to the request IP according to the time information to form a domain name information sequence, and determine the domain name vector of the domain name according to the domain name information sequence;

[0144] The probability calculation module 703 is used to calculate the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, and determine the target probability of the domain name according to the similarity.

[0145] In an exemplary embodiment of the present disclosure, the information acquisition module 601 may also be used to determine whether there is response information in the DNS log record; if there is response information in the DNS log record, the DNS log record is acquired.

[0146] In an exemplary embodiment of the present disclosure, the information acquisition module 601 may also be used to acquire a whitelist domain name, and delete the DNS log record corresponding to the whitelist domain name in the DNS log record.

[0147] In an exemplary embodiment of the present disclosure, the vector acquisition module 602 may also be used to extract semantic features of the domain name in the time dimension according to the domain name information sequence, and obtain a domain name vector of the domain name according to the semantic features of the domain name in the time dimension.

[0148] In an exemplary embodiment of the present disclosure, the probability calculation module 603 can also be used to obtain a botnet domain name in a botnet domain name library, determine a domain name to be detected from multiple domain names according to the botnet domain name, and calculate the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected. The domain name includes multiple domain names.

[0149] In an exemplary embodiment of the present disclosure, the probability calculation module 603 can also be used to calculate the cosine similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected, and configure the cosine similarity as the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected.

[0150] In an exemplary embodiment of the present disclosure, the probability calculation module 603 may also be used to configure an evaluation factor corresponding to the botnet domain name, and calculate the target probability of the domain name according to the evaluation factor and the similarity.

[0151] In an exemplary embodiment of the present disclosure, the probability calculation module 603 may also be used to respectively calculate the similarity between the domain name vector of the botnet domain name and the domain name vector of each domain name, and configure the minimum value of the similarity as the evaluation factor corresponding to the botnet domain name.

[0152] In an exemplary embodiment of the present disclosure, the probability calculation module 603 may also be used to respectively calculate the similarity between the domain name vector of the botnet domain name and the domain name vector of each domain name, and configure the average value of the similarity as the evaluation factor corresponding to the botnet domain name.

[0153] In an exemplary embodiment of the present disclosure, the probability calculation module 603 may also be used to calculate the target probability using the following formula:

[0154]

[0155] Among them, P e represents the target probability of the domain name, score represents the similarity between the domain name vector of the domain name and the domain name vector of the botnet domain name, score th represents the evaluation factor corresponding to the botnet domain name, α represents the adjustment factor, α∈[0,1].

[0156] In an exemplary embodiment of the present disclosure, the botnet control end detection device 700 also includes a domain name detection module (not shown in the figure), which is used to determine whether the target probability of the domain name is greater than the target probability threshold; when the target probability of the domain name is greater than the target probability threshold, determine the botnet family corresponding to the domain name; obtain the botnet communication protocol of the botnet family, and detect whether the domain name is a botnet domain name according to the botnet communication protocol.

[0157] In an exemplary embodiment of the present disclosure, the domain name detection module can also be used to send a connection request to the domain name according to the botnet communication protocol; if response information returned by the domain name is received, the domain name is determined to be a botnet domain name, and the domain name is added to the botnet domain name library.

[0158] The specific details of the above-mentioned botnet control terminal detection devices have been described in detail in the corresponding botnet control terminal detection methods, so they will not be repeated here.

[0159] It should be noted that, although several modules or units of the device for execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0160] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0161] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0162] Refer to the following Figure 8 An electronic device 800 according to this embodiment of the present invention will be described. Figure 8 The electronic device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0163] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.

[0164] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can perform the following steps: Figure 1 Step S110 shown in: obtaining a DNS log record, wherein the DNS log record includes a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name; step S120: sorting the domain name corresponding to the requesting IP according to the time information to form a domain name information sequence, and determining a domain name vector of the domain name according to the domain name information sequence; step S130: calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, and determining a target probability of the domain name according to the similarity.

[0165] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .

[0166] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0167] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0168] The electronic device 800 may also communicate with one or more external devices 1000 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable viewers to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0169] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0170] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0171] refer to Fig. 9 As shown, a program product 900 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0172] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0173] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0174] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0175] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0176] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0177] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0178] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for detecting a botnet control terminal, characterized in that: include: Obtaining a DNS log record, wherein the DNS log record includes a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name; Sort the domain names corresponding to the request IP according to the time information to form a domain name information sequence, and determine the domain name vector of the domain name according to the domain name information sequence; Calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, and determining the target probability of the domain name according to the similarity; Determining the target probability of the domain name according to the similarity includes: configuring an evaluation factor corresponding to the botnet domain name, and calculating a target probability of the domain name according to the evaluation factor and the similarity; The calculating the target probability of the domain name according to the evaluation factor and the similarity includes: the calculation formula of the target probability is as follows: Among them, P e represents the target probability of the domain name, score represents the similarity between the domain name vector of the domain name and the domain name vector of the botnet domain name, score th represents the evaluation factor corresponding to the botnet domain name, α represents the adjustment factor, α∈[0,1]; The determining the domain name vector of the domain name according to the domain name information sequence includes: The semantic features of the domain name in the time dimension are extracted according to the domain name information sequence, and the domain name vector of the domain name is obtained according to the semantic features of the domain name in the time dimension.

2. The method for detecting a botnet controller according to claim 1, characterized in that: The domain name includes multiple; Calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, including: Acquire a botnet domain name in a botnet domain name library, and determine a domain name to be detected from a plurality of domain names according to the botnet domain name; The similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected is calculated.

3. The method for detecting a botnet controller according to claim 2, characterized in that: Calculating the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected includes: The cosine similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected is calculated, and the cosine similarity is configured as the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name to be detected.

4. The method for detecting a botnet controller according to claim 1, characterized in that: The domain name includes multiple; Configuring an evaluation factor corresponding to the botnet domain name includes: The similarities between the domain name vector of the botnet domain name and the domain name vectors of each of the domain names are calculated respectively, and the minimum value of the similarities is configured as the evaluation factor corresponding to the botnet domain name.

5. The method for detecting a botnet controller according to claim 1, characterized in that: The domain name includes multiple; Configuring an evaluation factor corresponding to the botnet domain name includes: The similarities between the domain name vector of the botnet domain name and the domain name vectors of each of the domain names are calculated respectively, and an average value of the similarities is configured as an evaluation factor corresponding to the botnet domain name.

6. The method for detecting a botnet controller according to claim 1, characterized in that: The method further comprises: Determining whether the target probability of the domain name is greater than a target probability threshold; When the target probability of the domain name is greater than a target probability threshold, determining a botnet family corresponding to the domain name; The botnet communication protocol of the botnet family is obtained, and whether the domain name is the botnet domain name is detected according to the botnet communication protocol.

7. The method for detecting a botnet controller according to claim 6, characterized in that: Detecting whether the domain name is the botnet domain name according to the botnet communication protocol includes: Sending a connection request to the domain name according to the botnet communication protocol; If the response information returned by the domain name is received, the domain name is determined to be the botnet domain name, and the domain name is added to the botnet domain name library.

8. The method for detecting a botnet controller according to claim 1, characterized in that: Get DNS log records, including: Determine whether there is response information in the DNS log record; If there is response information in the DNS log record, the DNS log record is obtained.

9. The method for detecting a botnet controller according to claim 8, characterized in that: The method further comprises: Obtain a whitelist domain name, and delete the DNS log record corresponding to the whitelist domain name in the DNS log record.

10. A botnet control terminal detection device, characterized in that: include: An information acquisition module, used to acquire a DNS log record, wherein the DNS log record includes a requesting IP, a domain name corresponding to the requesting IP, and time information corresponding to the domain name; A vector acquisition module, used to sort the domain names corresponding to the request IP according to the time information to form a domain name information sequence, and determine the domain name vector of the domain name according to the domain name information sequence; A probability calculation module, used to calculate the similarity between the domain name vector of the botnet domain name and the domain name vector of the domain name, and determine the target probability of the domain name according to the similarity; Determining the target probability of the domain name according to the similarity includes: configuring an evaluation factor corresponding to the botnet domain name, and calculating a target probability of the domain name according to the evaluation factor and the similarity; The calculating the target probability of the domain name according to the evaluation factor and the similarity includes: the calculation formula of the target probability is as follows: Among them, P e represents the target probability of the domain name, score represents the similarity between the domain name vector of the domain name and the domain name vector of the botnet domain name, score th represents the evaluation factor corresponding to the botnet domain name, α represents the adjustment factor, α∈[0,1]; The determining the domain name vector of the domain name according to the domain name information sequence includes: The semantic features of the domain name in the time dimension are extracted according to the domain name information sequence, and the domain name vector of the domain name is obtained according to the semantic features of the domain name in the time dimension.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the botnet control terminal detection method according to any one of claims 1 to 9 is implemented.

12. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the botnet control terminal detection method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Detection and processing method and system for botnet domain names

    CN103152442A

  • Botnet detection technology based on DGA domain name and periodic network connection session behaviors

    CN110602020A