https://www.computerweekly.com/tip/Botnet-detection-through-DNS-behavior-and-clustering-analysis
A botnet is a network of computers on the Internet, each of which has been compromised and is under the influence of a coordinated group of malware instances. Bots on this network run without the owners’ knowledge, and send out transmissions (viruses or spam) to other computers on the Internet. Botnets are controlled by a ‘bot-master’ through command-and-control (C&C) channels.
Botnets serve as platforms for distributed denial-of-service (DDoS) attacks, phishing, spamming and other fraudulent activities, thus making botnet detection essential. This tip will look at a botnet detection strategy via the fast flux characteristics of botnets. Through fast flux, a bot-master DNS uses different IP addresses to avoid detection of the botnet servers’ physical location. This is a unique characteristic of botnets—rapidly changing the bindings of IP addresses to domain names prevents detection of hosts.
The detection approach that we are about to discuss applies K-Means clustering to DNS data for heuristic detection of fast flux and other typically anomalous botnet characteristics. There are several challenges to be faced in detection of botnets:
Botnets can change their C&C content in terms of encryption, protocols (such as HTTP, IRC and FTP), and structure (either centralized or peer-to-peer), as detailed in Figure 1.

Figure
1: Possible structures of a botnet (a) centralized (b) peer-to-peer.
Courtesy:
Guofei Gu et al; BotMiner - Clustering Analysis of Network Traffic for Protocol- and
Structure-Independent Botnet Detection.
The
framework used for botnet detection employs several steps. A network monitoring tool collects data
on the network traffic. The clustering algorithm then classifies traffic, after which heuristics
are applied. The data is then separated into different groups and scrutinized for botnet
activity.
Subsystem
decomposition
Detection
of BotNets starts with monitoring the Internet traffic, followed by analysis and clustering of the
data to compare it with the neighboring nodes to determine a bot-infection (Fig. 2). The steps
followed are:

Figure
2: System for Fast Flux based botnet detection
The methodology used is as follows:

Figure 3: Results of clustering; complete vertical lines show infected traffic, indicating the presence of a botnet infection.
Botnets
are a serious threat to network security. The fast flux method can be utilized effectively for
botnet detection at an early stage. Thus, the network can be secured and spread of fraudulent
activities such as spamming, phishing and DDoS attacks can be prevented.
This article is based on a paper presented by Nilesh Sharma & Pulkit Mehndiratta at null con 2011. Compiled by Varun Haran.
About
the experts: Nilesh
Sharma and
Pulkit Mehndiratta are
M.Tech students at IIIT Delhi, specializing in Information Security. Their interest areas include
detecting botnets, cyber security, cryptography and cyber forensics. Sharma has lectured at
Bhagwant University and B.M.A.S. Engineering College.
06 Apr 2011