Patent Description:
Botnet refers to a network which may cause a large number of hosts to be infected by a bot through one or more transmission routes, thereby forming a point-to-multipoint command and control (C&C) between a controller and the infected hosts. Attackers spread bots to infect a number of hosts all over the Internet through various channels, and the infected hosts receive instructions from the attackers through one control channel, resulting in a botnet. Upon such attack trick, the attackers are provided with a hidden, flexible and efficient point-to-multipoint command and control mechanism, as a result of which the attackers can commit offenses such as surreptitiously acquisition of information, distributed denial of service, and spam sending, resulting in a serious threaten in the present network security field.

At present, the most popular method for detecting botnets may be implemented through network traffic analysis, i.e., clustering or correlation detection of network data traffic. This kind of methods commonly perform clustering analysis onto characteristic information, such as source IP address, destination IP address, data packet size, port number, protocol, etc. contained in data stream information of multiple network devices, such as switches, gateway devices that are widely distributed in a monitored network so as to discover abnormal behaviors of network traffic belonging to the botnet, or alternatively, perform correlation analysis based on known botnet behaviors to identify abnormal traffic from the network traffic so as to achieve detection of botnet. However, those methods require a wide variety of data information, a huge data stream, and have to parse data packets to extract multiple characteristics. Thus, the processing load is too large, resulting in a relatively low efficiency of botnet detection.

Document by <NPL>, proposes a lightweight anomaly detection approach based on unproductive DNS traffic, namely, the failed DNS queries, with a novel tool-DNS failure graphs. A DNS failure graph captures the interactions between hosts and failed domain names. A graph decomposition algorithm based on the tri-nonnegative matrix factorization technique is applied to iteratively extract coherent co-clusters (dense subgraphs) from DNS failure graphs. By analyzing the co-cluster in the daily DNS failure graphs from a <NUM>-month DNS trace captured at a large campus network, these co-clusters are found to represent a variety of anomalous activities, e.g., spamming, Trojans, bots, etc.. In addition, these activities often exhibit distinguishable subgraph structures. By exploring the temporal properties of the co-clusters, the method can identify new anomalies that likely correspond to unreported domain-flux bots.

Document by <NPL>, validates the Domain Name System (DNS) failure graph approach presented earlier in Identifying suspicious activities through DNS failure graph analysis (<NPL>). This approach is applied to in an operational <NUM> mobile network serving a significantly large user population. Based on the introduction of stable host identifiers a novel approach is implemented to the tracking of botnets over a period of several weeks. The results reveal the presence of several groups of hosts that are members of botnets. The host groups exhibiting the most suspicious behavior are analyzed and how these participate in botnets and other malicious activities are elaborated. In addition, how the accuracy of the detection approach could be improved in the future by correlating the knowledge obtained from applying the method in different network is discussed.

The present invention relates to a botnet detection method, a botnet detection system, and a storage medium, as defined in the annexed claims, so that an improvement in the detection efficiency of botnets is realized.

To achieve the objective, according to an embodiment of the present disclosure, it is provided a botnet detection method applied to a botnet detection system, the method including steps of: acquiring original network traffic data in a monitored network, and preprocessing the original network traffic data to obtain preprocessed network traffic data; constructing a terminal access relationship graph based on the preprocessed network traffic data; and mining a list of identifiers of terminals accessing a plurality of identical domain names from the terminal access relationship graph to obtain a combination of candidate nodes, and screening the combination of candidate nodes based on a preset screening rule to obtain a detection result of botnet nodes.

According to a further embodiment of the present disclosure, it is also provided a botnet detection system, including: a data preprocessing module configured to acquire original network traffic data in a monitored network, and preprocess the original network traffic data to obtain preprocessed network traffic data; a relationship graph construction module configured to construct a terminal access relationship graph based on the preprocessed network traffic data; and a node judgment module configured to mine a list of identifiers of terminals accessing a plurality of identical domain names from the terminal access relationship graph to obtain a combination of candidate nodes, and screen the combination of candidate nodes based on a preset screening rule to obtain a detection result of botnet nodes.

According to a still further embodiment of the present disclosure, it is also provided a network access system, including a botnet detection system, and a malicious domain name detection system, a monitoring system and a DNS server, each of which is communicatively connected to the botnet detection system. The botnet detection system is further connected to a number of access terminals. The botnet detection system is configured to serve as the botnet detection system described above. The DNS server is configured to provide domain name access services to the access terminals. The malicious domain name detection system is configured to receive suspicious domain names in a detection result sent by the botnet detection system, and evaluate the suspicious domain names to optimize the detection result. The monitoring system is configured to receive the detection result reported by the botnet detection system to display the detection result, and/or perform, according to the detection result, corresponding management and control operations onto terminals suspected of being infected with a bot virus.

According to a yet further embodiment of the present disclosure, it is also provided a botnet detection system, including: a memory, a processor, and a botnet detection program stored on the memory and executable on the processor. The botnet detection program may, when executed by the processor, implement steps of any one of the botnet detection methods as described.

According to a yet still further embodiment of the present disclosure, it is also provided a computer-readable storage medium storing thereon a botnet detection program. The botnet detection program may, when executed by a processor, may implement steps of any one of the botnet detection methods as described.

With reference to accompanying drawings, further implementation, functional features and advantages of the present disclosure will be described in detail below in conjunction with the embodiments.

The solutions of the disclosure will become apparent and more comprehensible from the following detailed description with reference to the drawings.

It shall be appreciated that embodiments described herein are intended only to explain, rather than limit, the present disclosure. Obviously, the embodiments described below are merely part of the embodiments of the present disclosure. Based on the disclosed embodiments, other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of the present disclosure. As long as there is no conflict, the embodiments in the present disclosure as well as the features in the embodiments may be combined with one another in any manner. Although a logic sequence is illustrated in the flow diagram, in some cases, the steps illustrated or described can be performed in a sequence different from the sequence herein.

The concept introduced by the embodiments of the present disclosure lies in acquiring original network traffic data in a monitored network, and preprocessing the original network traffic data to obtain preprocessed network traffic data; constructing a terminal access relationship graph based on the preprocessed network traffic data; and mining a list of identifiers of terminals accessing a plurality of identical domain names from the terminal access relationship graph to obtain a combination of candidate nodes, and screening the combination of candidate nodes based on a preset screening rule to obtain a detection result of botnet nodes. Thereby, behavior patterns of the terminals may be analysed and compared depending on information about domain name queries or accesses in terminal network behaviors, and existence of any botnet may be detected and found based on a characteristic that botnet-controlled terminals generally have identical or similar behavior patterns, which can effectively improve detection efficiency. Besides, this solution does not require detection based on known botnet behavior characteristics, and therefore can be advantageously applied for detection of unknown botnet threats.

In certain cases, dominantly existing methods for detecting a botnet may perform clustering analysis onto characteristic information, such as source IP address, destination IP address, data packet size, port number, protocol, etc. contained in data stream information of multiple network devices, such as switches, gateway devices that are widely distributed in a monitored network so as to discover abnormal behaviors of network traffic belonging to the botnet, or alternatively, perform correlation analysis based on known botnet behaviors to identify abnormal traffic from the network traffic so as to achieve detection of botnet. However, those methods require a wide variety of data information, a huge data stream, and have to parse data packets to extract multiple characteristics. Thus, the processing load thereof is too large, resulting in a relatively low efficiency of botnet detection.

The present disclosure provides a technical solution that may need relatively few types of data and little characteristics extracted from data traffic, thereby reducing computational overhead, and effectively improving detection efficiency.

In one embodiment, referring to <FIG>, shown is an architecture diagram of a network access system according to an embodiment of the present disclosure. In particular, <FIG> shows a schematic diagram of an application deployment of a botnet detection system according to the embodiment of the present disclosure.

As shown in <FIG>, an embodiment of the present disclosure provides a network access system that includes a botnet detection system, and a malicious domain name detection system, a monitoring system and a DNS (Domain Name System) server which are communicatively connected to the botnet detection system, respectively. The botnet detection system is further connected with a number of access terminals. The botnet detection system herein right serves as the botnet detection system to be provided by embodiments of the present disclosure.

In the application deployment shown in <FIG>, the botnet detection system is deployed in the network architecture via a bypass connection to acquired network traffic in a mirrored manner for detection and analysis.

In the embodiment of the present disclosure, the botnet detection system performs detection by acquiring, from network traffic data, terminal identifier information and domain name information that the terminals query or access. The system needs to extract terminal identifiers (for example, terminal IP address, terminal MAC address, or user identity information a host associated with a terminal, etc.) in the terminal identifier information and domain names accessed or inquired by the terminals. The mentioned network traffic data acquired by the system may include various forms, including but not limited to, for example, a domain name query request from a terminal, a HTTP connection request from a terminal to access a domain name, or the like.

In an implementation of the embodiment of the present disclosure, the deployment of the botnet detection system may be implemented in various ways. References may be made from the bypass deployment scheme in <FIG>, or made by changing physical connection mode or modifying traffic routing rules as long as each access stream passes through the botnet detection system right before it reaches a terminal, a server, or the like.

In an implementation of the embodiment of the present disclosure, the botnet detection system may detect traffic logs within a time range, analyse behavior patterns of the terminals, and finally sort out all terminals having identical behavior patterns. The mentioned sorting out identical behavior patterns means that multiple terminals have completely consistent access or query behaviors toward multiple domain names within a set time interval or threshold.

In one embodiment, as that in an implementation of the embodiment of the present disclosure, the botnet detection system may send a suspicious domain name in detection result to the malicious domain name detection system so that the suspicious domain name can be further evaluated. Optionally, the malicious domain name detection system here may be implemented by various means, such as a malicious domain name blacklist filtering system, a threat intelligence matching detection system, an arbitrary domain name detection system, or the like. By means of the malicious domain name detection system, the botnet detection system may further rank the detection result in terms of threat levels so as to optimize the detection result. As an example, if the malicious domain name detection system judges a domain name accessed by a group of terminals to be a botnet domain name, it may determine that the group of terminals with identical behavior patterns is suspected to be controlled by a same kind of bot virus so that a topological relationship of the botnet can be obtained directly. In practical deployment, the botnet detection system may determine, according to actual conditions, whether this step is to be performed to further detect the domain name information.

Further, in an implementation of the embodiment of the present disclosure, the botnet detection system may further report the detection result to the monitoring system, on which the detection result may be displayed. In an expanded manner, the monitoring system may further perform corresponding management and control operations onto terminals suspected of being infected with the bot virus based on the detection result, for example, performing operations such as network speed limit onto terminals suspected of being infected with the bot virus.

It should be noted that the mentioned deployment scheme of the botnet detection system is merely a preferred example. In applications, the botnet detection system can be deployed depending on actual networking conditions.

In one embodiment, in addition to being deployed in the network to perform real-time traffic detection, the botnet detection system of the present disclosure may also be applicable to parse traffic log files and output a network behavior analysis and detection result.

In the mentioned system architecture as shown in <FIG>, the DNS server is configured to provide domain name access service to an access terminal.

The malicious domain name detection system is configured to receive a suspicious domain name in the detection result sent by the botnet detection system, and to evaluate the suspicious domain name to optimize the detection result.

The monitoring system is configured to receive the detection result reported by the botnet detection system to display the detection result, and/or perform corresponding management and control operations onto terminals suspected of being infected with a bot virus according to the detection result.

The botnet detection system provided by the embodiment of the present disclosure will be described in detail with reference to the following embodiments.

The botnet detection system provided by the embodiment of the present disclosure may perform analysis and comparison on behavior patterns of the terminals depending on information about domain name queries or accesses in terminal network behaviors, and detect and find the existence of any botnet based on such a characteristic that botnet-controlled terminals generally have identical or similar behavior patterns. Compared with existing technologies, the disclosed solution needs relatively fewer types of data and less characteristics extracted from data traffic, thereby reducing computational overhead, and effectively improving detection efficiency. Besides, this solution does not require detection based on known botnet behavior characteristics, and therefore can be advantageously applied for detection of unknown botnet threats.

In one embodiment, as shown in <FIG>, a first embodiment of the present disclosure provides a botnet detection method applied to a botnet detection system, which includes the following steps S101 to S <NUM>.

At step S101, original network traffic data in a monitored network is acquired, and the original network traffic data is preprocessed to obtain preprocessed network traffic data.

In particular, the botnet detection system may acquire network traffic data by various manners, including but not limited to, for example, a domain name query request from a terminal, a HTTP connection request from a terminal to access a domain name, or the like.

In one embodiment, as an implementation, the step of acquiring the original network traffic data in the monitored network may include: acquiring, by the botnet detection system, real-time traffic data or traffic log files within a preset time range in the monitored network as the original network traffic data, the real-time traffic data or the traffic log files including at least domain name query requests from the terminals and/or HTTP connection requests from the terminals for accessing the domain names.

When the original network traffic data in the monitored network has been acquired, preprocessing is applied on the original network traffic data.

In particular, the preprocessing applied on the original network traffic data includes: extracting valid fields in the network traffic data, and performing data cleaning to remove redundant and duplicate information. A data preprocessing module may be provided to perform this step.

In one embodiment, the following schemes may be adopted to preprocess the original network traffic data.

Firstly, the original network traffic data is grouped by time intervals.

In particular, grouping by time intervals refers to pre-setting a time window T, and grouping traffic logs containing domain name information in a periodic manner with T as one period, so that all log data having a timestamp within T may serve as a set of data content to be processed in subsequent terminal identifier aggregation.

The reason for grouping by time intervals is that: under normal circumstances, controlled terminals infected with the same bot virus will exhibit a certain degree of consistency in their behavior patterns and thereby their traffic data follows certain periodic features, as a result of which locating of botnet behaviors will be more accurate as long as a setting of time interval is reasonable.

Then, valid fields are extracted from the network traffic data grouped by time intervals. The valid fields include at least three key fields of timestamp, terminal identifier, and access domain name.

In particular, the valid field extraction in this embodiment may be implemented by selecting and extracting three key fields in the log data, such as timestamp, terminal identifier, and access domain name.

The mentioned valid fields constitute a minimum set of fields required for detection, and none of them is dispensable. In practical applications, the extracted fields content include but are not limited to the above fields.

Finally, the network traffic data containing the valid fields are cleaned and redundant data and a whitelist are filtered to obtain log sequences each having a data structure of <timestamp, terminal identifier, access domain name>.

In one embodiment, as that in this embodiment, the process of data cleaning may include two steps, redundant data filtering and whitelist filtering.

In particular, redundant data filtering means that in one and the same time interval, if <terminal ID, access domain name> information for multiple logs is detected to be consistent during the log processing process, then duplicate records is removed but only one log will be kept within that same time interval.

Whitelist filtering means that an access domain name in the information of a log may be analysed, and if the domain name is a trusted domain name, then the log is removed without performing the subsequent detection process.

After the mentioned data cleaning processing, the data preprocessing module outputs log sequences each with a structure of <timestamp, terminal identifier, access domain name>.

At step S102, a terminal access relationship graph is constructed based on the preprocessed network traffic data.

In particular, the step of constructing the terminal access relationship graph may be performed by a relationship graph construction module. The construction of the terminal access relationship graph may include three operations: terminal identifier information aggregation, relationship graph construction, and relationship graph update.

In one embodiment, the step of constructing the terminal access relationship graph based on the preprocessed network traffic data may include the following steps.

Information about terminal identifiers identifying terminal information and domain names accessed or inquired by the terminals in terminal network behaviors within a corresponding time interval are extracted from the preprocessed network traffic data.

Based on the extracted information about terminal identifiers and domain names accessed or queried by the terminals, terminal identifier information within the same time interval is aggregated with respect to each domain name of interest to form an aggregation structure of <time identifier, domain name, terminal identifier set for accessing domain name>, respectively.

Based on the aggregation structure, an adjacency relationship graph between a node with the domain name of interest and a list of terminal identifiers that access the domain name is constructed and updated so as to obtain the terminal access relationship graph.

In particular, the aggregation of terminal identifier information refers to an aggregation operation that is exerted on data within a time interval. This operation uses an access domain name in the log information as a key value, and aggregates the identifier information of the terminals that initiate queries or accesses to this domain name. An aggregation result obtained is in a form of <time identifier, domain name, terminal identifier set>, where the time identifier is used to identify the time interval in which those access operations occur.

Hereafter the operation will be described in details by, for example, using IP addresses as the terminal identifiers.

The original network traffic data undergoes data preprocessing (such as time slice extraction, valid field extraction, data filtering) to obtain tuples of <timestamp, terminal IP address identifier, access domain name>.

Information of the preprocessed tuple is divided by time intervals, and the data aggregation operation is performed on log records within a time interval T1 to obtain tuples of <time identifier, access domain name, terminal IP address identifier set> as shown in Table <NUM> below.

Accordingly, based on the aggregated data within the time interval as listed, a relationship graph is constructed. The relationship graph uses <time identifier#domain name information> and <terminal identifier information> as nodes, respectively, and includes adjacency relationship between a terminal identifier and an accessed domain name.

Taking a bipartite graph method as an example for constructing the relationship graph, operations of constructing the relationship graph will be described in detail below. The bipartite graph includes two types of nodes, where a node set U represents a set of terminal identifiers, and a node set V represents a set of access domain names recorded within said time interval. In addition, the bipartite graph defines E={ <ui,vi> }, representing an adjacency relationship between a terminal identifier ui and its corresponding access domain name vi. Taking the above aggregated data within the time interval T1 as an example, the access relationship graph within the time interval T1 may be constructed, as shown in <FIG>.

Then, the relationship graph is updated and an existing historical relationship graph is loaded.

The obtained information of the time interval relationship graph is updated to the historical relationship graph.

Detailed description of exemplary update operations on the mentioned relationship graphs and exemplary update rules for the mentioned relationship graphs will be provided below.

It is assumed that a historical relationship graph already exists, and that any content of the relationship graph is related to the aggregated data within the above-mentioned time interval T1. Further, it is assumed that current data to be updated corresponds to a time interval T2, and aggregated data thereof is shown in Table <NUM> below.

The update rules are as follows:
The aggregated data within the time interval T2 in Table <NUM> is compared with the data structure in the existing relationship graph (see <FIG>).

If domain names of the existing nodes in the historical relationship graph are all different from those of the aggregated data within the time interval T2, the aggregated data of newly added domain names within the time interval T2 is directly incorporated into the relationship graph. For example, in the case of that <T2, Domain3, <IP-<NUM>, IP-<NUM>, IP-<NUM> > > in Table <NUM> is compared to the historical relationship graph, Domain3 is a new domain name, and the data of this domain name is directly incorporated into the relationship graph.

If any domain name of an existing node in the historical relationship graph is consistent with the domain name (Domain) of the aggregated data within the time interval T2, then a set of adjacency nodes (set A1) corresponding to the domain name Domain in the historical relationship graph is checked and compared with a set of adjacency nodes (set A2) related to the domain name Domain within the time interval T2.

If the set A1 is a subset of the set A2, then the domain node Domain and its corresponding adjacency relationships are removed from the original relationship graph, and adjacency relationship data corresponding to A2 is incorporated to update the graph. For example, if an IP address list in the historical relationship graph <T1, Domain1, <IP-<NUM>, IP-<NUM>, IP-<NUM>>> is a subset of an IP address list in a relationship graph for the time interval T2 <T2, Domain1, <IP-<NUM>, IP-<NUM>, IP-<NUM>, IP-<NUM>>>, then the node and its corresponding relationships in the historical relationship graph is deleted and updated by a node T2#Domain1 and its corresponding adjacency relationships with the IP address list.

On the contrary, if the set A2 is a subset of the set A1, the node and its adjacency relationship data in the historical relationship graph are retained, and the domain name node and the set A2 do not need to be updated to the relationship graph.

If there is no subset inclusion relationship between the sets A1 and A2, the domain name node and the set A2 are incorporated to the relationship graph. For example, <T1, Domain2, <IP-<NUM>, IP-<NUM>, IP-<NUM>, IP-<NUM>>> exists in the historical relationship graph, and <T2, Domain2, <IP-<NUM>, IP-<NUM>> > is newly added in a relationship graph for the time interval T2. Although the access domain names are identical in these two relationship graphs, the sets A1 and A2 have no inclusion relationship between each other. Therefore, a new node <T2#Domain2> is newly incorporated into the relationship graph together with its corresponding adjacency relationships.

Upon the mentioned update, <FIG> shows an update result of the original relationship graph in <FIG>.

At Step S103, a list of identifiers of terminals accessing a plurality of identical domain names is mined from the terminal access relationship graph to obtain a combination of candidate nodes, and the combination of candidate nodes is screened based on a preset screening rule to obtain a detection result of botnet nodes.

When implemented, this step may be performed by a node judgment module.

Referring to <FIG>, firstly, from the access relationship graph obtained by the above-mentioned final update, a combination of source IPs that access a plurality of identical domain names is mined to serve as the combination of candidate nodes.

As an implementation, the step of mining the list of identifiers for the terminals accessing the plurality of identical domain names from the terminal access relationship graph to obtain the combination of candidate nodes may further include the following steps:.

In one embodiment, based on the sorted linked lists and by using the terminal identifier nodes in the linked lists as tree nodes, access domain name information are added to attribute information of the tree nodes so as to construct the access pattern tree.

Then, a set of nodes on each path of the access pattern tree is extracted as a terminal identifier set, and a <time identifier#domain name> list of end nodes on the path is extracted as an access domain name set accessed by corresponding terminal identifiers collectively, so as to obtain the list of identifiers of terminals accessing a plurality of identical domain names as the combination of candidate nodes.

Finally, based on a preset screening rule, the combination of candidate nodes is screened to obtain a detection result of botnet nodes.

In an implementation, it is judged whether an inclusion relationship exists between candidate nodes in the combination of candidate nodes. If so, any included candidate node is deleted from the combination of candidate nodes to obtain a redundancy-screened combination of candidate nodes. Based on the redundancy-screened combination of candidate nodes, the number of elements in the terminal identifier set and the number of elements in the access domain name set are obtained at each candidate node. A set of candidate nodes where the number of elements in the terminal identifier set is greater than a preset threshold for the number of terminal identifiers and the number of elements in the access domain name set is greater than a preset threshold for the number of access domain names is retained to obtain the botnet nodes.

The mentioned screening for botnet nodes will be described in details with reference to the following examples.

In one embodiment, linked lists are constructed based on the adjacency relationships and then sorted.

In particular, construction of a linked list refers to that each domain name node and its corresponding adjacency nodes are constructed as a linked list based on the terminal access relationship graph. In a linked list, a <time identifier#access domain name> node is used as a head node of the linked list, and those nodes following it are terminal identifier nodes. The terminal identifier nodes are sorted in a descending order according to respective degrees (or dimensions) of the nodes in the entire relationship graph.

In one embodiment, different linked lists are sorted among each other in a sequential order, where a sorting rule thereof is to sort access domain name nodes in a descending order according to their own degrees in the entire relationship graph.

The above instance where an IP addresses is used as the terminal identifier is taken hereby. A corresponding linked list for a node <T2#Domain1> is established according to the obtained terminal access relationship graph. T2#Domain1 is used as a head node, and child nodes corresponding to the head node include <IP-<NUM>, IP-<NUM>, IP-<NUM>, IP-<NUM>>. It can be seen from the terminal access relationship graph that a sorting order with respect to these IP nodes is <IP-<NUM>, IP-<NUM>, IP-<NUM>, IP-<NUM>> according to degrees of the IP nodes.

Upon completion of sorting other linked lists in the similar way, another sorting is further performed with respect to the domain name nodes in a descending order as <T2#Domain1, T1#Domain2, T2#Domain2, T2#Domain3> according to respective degrees of the domain name nodes. Finally, a combination of sorted linked lists is obtained as shown in Table <NUM> below.

Then, an access pattern tree is constructed.

The access pattern tree uses the terminal identifier nodes as tree nodes, and access domain name information is added to attribute information of the tree nodes. The construction of the access pattern tree, as shown in <FIG>, includes the following processes.

It should be noted that each linked list in <FIG> takes a domain name node as a head node, and all terminal identifier nodes are sorted in descending order by degrees. Nodes in the terminal identifier set right serve as said nodes to be processed.

If a linked list is initially read, then the current node is a root node, and the node to be processed is a first node with the highest degree after nodes in the terminal identifier set are sorted in descending order.

If a linked list is not initially read, the current node is a terminal identifier node that has been processed in the last cycle, and the node to be processed is a terminal identifier node with a degree only next to the current node after nodes in the terminal identifier set are sorted in descending order.

Taking the data in <FIG> as an example, the process of constructing a pattern tree is shown in <FIG>.

Then, a combination of candidate nodes is extracted. For the constructed access pattern tree, each path of the tree starting from a root node may be a combination of candidate nodes. A set of nodes on a path represents a terminal identifier set, and a <time ID#domain name> list of end nodes on the path represents an access domain name set accessed by these terminal identifiers collectively, so that a structure of <source IP set, time ID#domain name list> is formed, which is exactly a combination of candidate botnet nodes.

In the case of that the above instance where an IP addresses is used as a terminal identifier is taken hereby with reference to <FIG>, the following candidate nodes may be extracted:.

Finally, botnet nodes are screened out by the followings.

For all structures in a combination of candidate nodes, if there is an inclusion relationship between one another, then a structure that is included by another is removed.

As that of the previous example, an inclusion relationship between the candidate nodes <(IP-<NUM>, IP-<NUM>, IP-<NUM>), (T2#Domain1, T1#Domain2)> and <(IP-<NUM>, IP-<NUM>, IP-<NUM>, IP-<NUM>), (T2#Domain1, T1#Domain2)> exists, and the included candidate node <(IP-<NUM>, IP-<NUM>, IP-<NUM>), (T2#Domain1, T1#Domain2)> is removed.

In order to improve the accuracy, a certain screening is performed on the extracted combination of candidate botnet nodes, and a result that meets the threshold is selected.

For example, for the number of elements in the terminal identifier set and the number of the access domain names, a threshold Th1 for the number of elements in the terminal identifier set and a threshold Th2 for the number of the access domain names are provided, respectively. For a combination of all candidate nodes, a structure where the number of elements in the terminal identifiers set is greater than the first preset threshold Th1 while the number of access domain names is greater than the second preset threshold Th2 is reserved.

After the above steps, a list of identifiers of those terminals that access a plurality of identical domain names may be obtained. A format thereof is <terminal identifier set, time identifier#domain name set>, where the terminal identifier set indicates machines infected by the botnet.

In particular, hosts that show the same access behavior many times and access domain names with suspicious risk (the number of elements in the terminal identifier set is greater than the first preset threshold Th1, while the number of elements in the access domain name set is greater than the second preset threshold Th2) behave abnormally so as to be considered as machines infected by the botnet. For a result, the greater the number of elements in the terminal identifier set and the greater the number of elements in the access domain name set, the higher the probability of these machines are to be infected by the botnet.

This embodiment is implemented, through the mentioned concepts, by acquiring original network traffic data in a monitored network, and preprocessing the original network traffic data to obtain preprocessed network traffic data; constructing a terminal access relationship graph based on the preprocessed network traffic data; and mining a list of identifiers of terminals accessing a plurality of identical domain names from the terminal access relationship graph to obtain a combination of candidate nodes, and screening the combination of candidate nodes based on a preset screening rule to obtain a detection result of botnet nodes. Thereby, behavior patterns of the terminals may be analysed and compared through information about domain name queries or accesses in terminal network behaviors, and existence of any botnet may be detected and found based on a characteristic that botnet-controlled terminals generally have identical or similar behavior patterns. Compared with existing technologies, the disclosed solution needs relatively fewer types of data and less characteristics extracted from data traffic, thereby reducing computational overhead, and effectively improving detection efficiency. Besides, this solution does not require detection based on known botnet behavior characteristics, and therefore can be advantageously applied for detection of unknown botnet threats.

As shown in <FIG>, a second embodiment of the present disclosure provides a botnet detection method. Based on the first embodiment shown in <FIG>, the method further includes step S104, in which suspicious domain names in a detection result are sent to a malicious domain name detection system and evaluated by the malicious domain name detection system so that the detection result can be optimized.

Compared with the aforementioned embodiments, this embodiment may also include a scheme in which the malicious domain name detection system evaluates the suspicious domain names to optimize the detection result.

In one embodiment, after obtaining a detection result, the botnet detection system may send suspicious domain names in the detection result to the malicious domain name detection system so that the suspicious domain names can be further evaluated.

In one embodiment, the malicious domain name detection system here may be implemented by various means, such as a malicious domain name blacklist filtering system, a threat intelligence matching detection system, an arbitrary domain name detection system, or the like.

By means of the malicious domain name detection system which evaluates the suspicious domain names, the botnet detection system may further rank the detection result in terms of threat levels so as to optimize the detection result. As an example, if the malicious domain name detection system judges a domain name accessed by a group of terminals to be a botnet domain name, it may determine that the group of terminals with identical behavior patterns is suspected to be controlled by a same kind of bot virus, so that a topological relationship of the botnet can be obtained directly. In practical deployment, the botnet detection system may determine, according to actual conditions, whether this step is to be performed or not to further detect the domain name information.

This embodiment is implemented, through the mentioned concepts, by acquiring original network traffic data in a monitored network, and preprocessing the original network traffic data to obtain preprocessed network traffic data; constructing a terminal access relationship graph based on the preprocessed network traffic data; and mining a list of identifiers of terminals accessing a plurality of identical domain names from the terminal access relationship graph to obtain a combination of candidate nodes, and screening the combination of candidate nodes based on a preset screening rule to obtain a detection result of botnet nodes. Thereby, behavior patterns of the terminals may be analysed and compared through information about domain name queries or accesses in terminal network behaviors, and existence of any botnet may be detected and found based on a characteristic that botnet-controlled terminals generally have identical or similar behavior patterns. In addition, after obtaining a detection result, the botnet detection system may send suspicious domain names in the detection result to the malicious domain name detection system to enable further evaluation on the suspicious domain names, so that the botnet detection system can further rank the detection result in terms of threat levels to optimize the detection result.

Compared with existing technologies, the disclosed solution needs relatively fewer types of data and less characteristics extracted from data traffic, thereby reducing computational overhead, and effectively improving detection efficiency. Besides, this solution does not require detection based on known botnet behavior characteristics, and therefore can be advantageously applied for detection of unknown botnet threats.

As shown in <FIG>, a third embodiment of the present disclosure provides a botnet detection method. Based on the second embodiment shown in <FIG>, the method further includes the following step.

At step S105, a detection result is reported to a monitoring system, and then the monitoring system displays the detection result and/or performs corresponding management and control operations on terminals suspected of being infected with a bot virus according to the detection result.

Compared with the aforementioned embodiments, this embodiment may also include a scheme in which the monitoring system performs corresponding operations on the detection result.

In one embodiment, as that in an implementation of the embodiment of the present disclosure, the detection result may be reported to the monitoring system by the botnet detection system, and may be displayed by the monitoring system.

In one embodiment, the monitoring system may also perform corresponding management and control operations on terminals suspected of being infected with the bot virus based on the detection result, for example, performing operations such as network speed limit onto terminals suspected of being infected with the bot virus.

It should be noted that the deployment scheme of the mentioned botnet detection system is merely a preferred example. In applications, the botnet detection system can be deployed depending on actual networking conditions.

In one embodiment, in addition to being deployed in the network to perform real-time traffic detection, the botnet detection system of the present disclosure may also be applicable to parsing traffic log files and outputting a network behavior analysis and detection result.

Further, an embodiment of the present disclosure also provides a botnet detection system, including a data preprocessing module, a relationship graph construction module, and a node judgment module.

The data preprocessing module receives the original traffic, and processes the original traffic data by extracting valid fields in the traffic data and performing data cleaning to remove redundant and duplicate information.

The relationship graph construction module receives log data processed by the data preprocessing module, and performs operations of terminal identifier information aggregation, relationship graph construction, and relationship graph update. The main operations of this module include: aggregating terminal identifier information within the same time interval with respect to each domain name of interest to form an aggregation structure similar to <time identifier, domain name, terminal identifier list for accessing domain name>, respectively; and constructing and updating an adjacency relationship graph between a node with the domain name of interest and a list of terminal identifiers that access the domain name.

The node judgment module mines a list of identifiers of terminals accessing a plurality of identical domain names from the relationship graph output by the relationship graph construction module, and obtains infected botnet nodes upon screening. The main operations of this module include: mining a list of identifiers of terminals accessing a plurality of identical domain names from the access relationship graph to form a structure similar to <terminal identifier set, access domain name set>, the output structure being the extracted combination of candidate nodes, and then setting corresponding screening rules to screen the combination of candidate nodes, a resulted screening output being exactly the detected botnet nodes.

In one embodiment, the data preprocessing module is configured to acquire original network traffic data in a monitored network, and to preprocess the original network traffic data to obtain preprocessed network traffic data. The relationship graph construction module is configured to construct a terminal access relationship graph based on the preprocessed network traffic data. The node judgment module is configured to mine a list of identifiers of terminals accessing a plurality of identical domain names from the terminal access relationship graph to obtain a combination of candidate nodes, and screen the combination of candidate nodes based on a preset screening rule to obtain a detection result of botnet nodes.

In one embodiment, the mentioned data preprocessing module is also configured to acquire real-time traffic data or traffic log files within a preset time range in the monitored network as the original network traffic data. The real-time traffic data or the traffic log files include at least domain name query requests from the terminals and/or HTTP connection requests from the terminals for accessing the domain names.

In one embodiment, the mentioned data preprocessing module is further configured to group the original network traffic data by time intervals; to extract valid fields from the network traffic data grouped by time intervals, the valid fields including at least three key fields of timestamp, terminal identifier, and access domain name; and to clean the network traffic data containing the valid fields and filter redundant data and a whitelist so as to obtain log sequences each having a data structure of <timestamp, terminal identifier, access domain name>.

In one embodiment, the mentioned relationship graph construction module is also configured to extract, from the preprocessed network traffic data, information about terminal identifiers identifying terminal information and domain names accessed or inquired by the terminals in terminal network behaviors within a corresponding time interval; to aggregate terminal identifier information within the same time interval with respect to each domain name of interest, based on the extracted information about terminal identifiers and domain names accessed or queried by the terminals, to form an aggregation structure of <time identifier, domain name, terminal identifier set for accessing domain name>, respectively; and to construct and update, based on the aggregation structure, an adjacency relationship graph between a node with the domain name of interest and a list of terminal identifiers that access the domain name to obtain the terminal access relationship graph.

In one embodiment, the mentioned node judgment module is further configured to construct and sort a linked list based on adjacency relationships in the terminal access relationship graph; to construct an access pattern tree based on the sorted linked list; and to extract a set of nodes on each path of the access pattern tree as a terminal identifier set, and a <time identifier#domain name> list of end nodes on the paths as an access domain name set accessed by corresponding terminal identifiers collectively so that the list of identifiers of terminals accessing a plurality of identical domain names can be obtained as the combination of candidate nodes.

It is judged whether an inclusion relationship exists between candidate nodes in the combination of candidate nodes. If the judgment is positive, the included candidate node is deleted from the combination of candidate nodes to obtain a redundancy-screened combination of candidate nodes. Based on the redundancy-screened combination of candidate nodes, the number of elements in the terminal identifier set and the number of elements in the access domain name set are obtained at each candidate node. Then, a set of candidate nodes where the number of elements in the terminal identifier set is greater than a preset threshold for the number of terminal identifiers and the number of elements in the access domain name set is greater than a preset threshold for the number of access domain names is retained so as to obtain the botnet nodes.

In one embodiment, the botnet detection system further includes a processing module, which is configured to send suspicious domain names in a detection result to a malicious domain name detection system so that the suspicious domain names can be evaluated by malicious domain name detection system to optimize the detection result; and to report the detection result to a monitoring system so that the monitoring system displays the detection result and/or performs corresponding management and control operations onto terminals suspected of being infected with a bot virus according to the detection result.

For process and principle of implementing botnet detection in this embodiment, reference can be made to the foregoing embodiments, and the details will not be described any further here.

Additionally, an embodiment of the present disclosure further provides a botnet detection system, including: a memory, a processor, and a botnet detection program stored on the memory and executable on the processor. The botnet detection program may, when being executed by the processor, implement steps of any one of the botnet detection methods as described.

In one embodiment, as shown in <FIG>, the system of this embodiment may include a processor <NUM>, such as a CPU, a network interface <NUM>, a user interface <NUM>, a memory <NUM>, and a communication bus <NUM>. Herein, the communication bus <NUM> is configured to realize connection and communication between these components. The user interface <NUM> may include a display screen (Display) and an input unit, such as a keyboard (Keyboard). Optionally, the user interface <NUM> may also include a standard wired interface and a wireless interface. The network interface <NUM> may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory <NUM> may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a magnetic disk memory. Optionally, the memory <NUM> may also be a storage device independent of the mentioned processor <NUM>.

Those skilled in the art may understand that the system structure shown in <FIG> does not constitute a limitation to a platform, and may include more or less components than those shown in the figure, or alternatively include a combination of certain components, or different component arrangements.

As shown in <FIG>, the memory <NUM> as a computer storage medium may include an operating system, a network communication module, a user interface module, and a botnet detection program.

In the system shown in <FIG>, the network interface <NUM> is mainly configured to connect to a network server and perform data communication with the network server; the user interface <NUM> is mainly configured to connect to a client and perform data communication with the client; and the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and perform the operations of: acquiring original network traffic data in a monitored network, and preprocessing the original network traffic data to obtain preprocessed network traffic data; constructing a terminal access relationship graph based on the preprocessed network traffic data; and mining a list of identifiers of terminals accessing a plurality of identical domain names from the terminal access relationship graph to obtain a combination of candidate nodes, and screening the combination of candidate nodes based on a preset screening rule to obtain a detection result of botnet nodes.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operation of: acquiring real-time traffic data or traffic log files within a preset time range in the monitored network as the original network traffic data. The real-time traffic data or the traffic log files include at least domain name query requests from the terminals and/or HTTP connection requests from the terminals for accessing the domain names.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operations of: grouping the original network traffic data by time intervals; extracting valid fields from the network traffic data grouped by time intervals, where the valid fields include at least three key fields of timestamp, terminal identifier, and access domain name; and cleaning the network traffic data that contains the valid fields and filtering redundant data and a whitelist to obtain log sequences each having a data structure of <timestamp, terminal identifier, access domain name>.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operations of: extracting, from the preprocessed network traffic data, information about terminal identifiers identifying terminal information and domain names accessed or inquired by the terminals in terminal network behaviors within a corresponding time interval; aggregating terminal identifier information within the same time interval with respect to each domain name of interest based on the extracted information about terminal identifiers and domain names accessed or queried by the terminals to form an aggregation structure of <time identifier, domain name, terminal identifier set for accessing domain name>, respectively; and constructing, based on the aggregation structure, and updating an adjacency relationship graph between a node with the domain name of interest and a list of terminal identifiers that access the domain name to obtain the terminal access relationship graph.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operations of: constructing and sorting a linked list based on adjacency relationships in the terminal access relationship graph; constructing an access pattern tree based on the sorted linked list; and extracting a set of nodes on each path of the access pattern tree as a terminal identifier set, and a <time identifier#domain name> list of end nodes on the paths as an access domain name set accessed by corresponding terminal identifiers collectively so that the list of identifiers of terminals accessing a plurality of identical domain names can be obtained as the combination of candidate nodes.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operations of: constructing, based on the terminal access relationship graph, each domain name node and its corresponding adjacency nodes as a linked list, where the <time identifier#access domain name> node in the linked list is used as a head node of the linked list, and those nodes following it serve as terminal identifier nodes, the terminal identifier nodes are sorted in a descending order according to respective degrees of the nodes in the entire relationship graph; and sorting different linked lists among each other in a sequential order, where a sorting rule thereof is to sort access domain name nodes in a descending order according to their own degrees in the entire relationship graph.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operations of: adding, based on the sorted linked lists and by using terminal identifier nodes in the linked lists as tree nodes, access domain name information to attribute information of the tree nodes so as to construct the access pattern tree.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operations of: judging whether an inclusion relationship exists between candidate nodes in the combination of candidate nodes; deleting, if the judgment is positive, the included candidate node from the combination of candidate nodes to obtain a redundancy-screened combination of candidate nodes; obtaining the number of elements in the terminal identifier set and the number of elements in the access domain name set at each candidate node based on the redundancy-screened combination of candidate nodes; and reserving a set of candidate nodes where the number of elements in the terminal identifier set is greater than a preset threshold for the number of terminal identifiers and the number of elements in the access domain name set is greater than a preset threshold for the number of access domain names to obtain the botnet nodes.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operation of: sending suspicious domain names in a detection result to a malicious domain name detection system so that the suspicious domain names are evaluated by malicious domain name detection system to optimize the detection result.

In one embodiment, the processor <NUM> may be configured to call a botnet detection program stored in the memory <NUM>, and further perform the operation of: reporting the detection result to a monitoring system so that the monitoring system displays the detection result and/or performs, according to the detection result, corresponding management and control operations onto terminals suspected of being infected with a bot virus.

For process and principle of implementing botnet detection in this embodiment, reference can be made to the foregoing embodiments, and the details will not be described here any further.

Additionally, an embodiment of the present disclosure also provides a computer-readable storage medium storing thereon a botnet detection program. The botnet detection program, when executed by a processor, may implement steps of any one of the botnet detection methods as described above.

Compared with existing technologies, a botnet detection method and system, and a storage medium provided by the embodiments of the present disclosure may be implemented by obtaining original network traffic data in a monitored network and preprocessing the original network traffic data to obtain preprocessed network traffic data; constructing a terminal access relationship graph on the basis of the preprocessed network traffic data; mining an identifier list of terminals accessing a plurality of the same domain names from the terminal access relationship graph to obtain a candidate node, and screening, based on a preset screening rule, the candidate node combination to obtain a botnet node detection result. Thereby, behavior patterns of the terminals may be analysed and compared through information about domain name queries or accesses in terminal network behaviors, and existence of any botnet may be detected and found based on a characteristic that botnet-controlled terminals generally have identical or similar behavior patterns. Compared with existing technologies, the disclosed solution needs relatively fewer types of data and less characteristics extracted from data traffic, thereby reducing computational overhead, and effectively improving detection efficiency. Besides, this solution does not require detection based on known botnet behavior characteristics, and therefore can be advantageously applied for detection of unknown botnet threats.

Claim 1:
A botnet detection method applied to a botnet detection system, comprising steps of:
acquiring original network traffic data in a monitored network, and preprocessing the original network traffic data to obtain preprocessed network traffic data (S101);
constructing, based on the preprocessed network traffic data, a terminal access relationship graph (S <NUM>); and
mining, from the terminal access relationship graph, a list of identifiers of terminals accessing a plurality of identical domain names to obtain a combination of candidate nodes, and screening, based on a preset screening rule, the combination of candidate nodes to obtain a detection result of botnet nodes (S103),
characterized in that:
the step of mining the list of identifiers of the terminals accessing the plurality of identical domain names from the terminal access relationship graph to obtain the combination of candidate nodes further comprises:
constructing, based on adjacency relationships in the terminal access relationship graph, linked lists, and sorting the linked lists;
constructing, based on the sorted linked lists, an access pattern tree; and
extracting a set of nodes on each path of the access pattern tree as a terminal identifier set, and a <time identifier#domain name> list of end nodes on the path as an access domain name set accessed by corresponding terminal identifiers collectively so as to obtain the list of identifiers of terminals accessing a plurality of identical domain names as the combination of candidate nodes.