You are on page 1of 6

Signature-based Botnet Detection and Prevention

Sunny Behal1, Amanpreet Singh Brar2, Krishan Kumar3


1
Deptt of CSE, SBECET, Ferozepur, India
2
Deptt of CSE & IT, GNDEC, Ludhiana, India
3
Deptt of CSE, SBSCET, Ferozepur, India

Abstract primary source of most of the threats used for scanning,


(distributed) denial-of-service (DOS) activities
The Internet is used extensively for important services and direct attacks, taking place across the Internet. At the
such as banking, business, medicine, education, research, center of these threats is a large pool of compromised
stock trades, weather forecasting etc. Most of these hosts sitting in homes, schools, businesses, and
services must be processed in a timely manner. However governments around the world. Bot malware typically
these services are delayed, degraded and sometimes takes advantage of system vulnerabilities and software
completely disrupted because of unavailability of internet. bugs or hacker-installed backdoors that allow malicious
The inherent vulnerabilities of the internet architecture code to be installed on computers without the owners’
provide opportunities for a lot of attacks on its consent or knowledge. However, all bots distinguish
infrastructure and services. Behind these attacks is a themselves from the other malware forms by their ability
large pool of compromised hosts sitting in homes, school, to establish a command and control (C&C) channel
business and governments around the world. These through which they can be updated and directed. Once
infected systems are called bots that communicates with a collectively under the control of a C&C server, bots form
bot controller and other bots to form what is commonly what is referred to as a botnet. The elements involved and
referred to as a Zombie army or Botnet. For any the sequence of commands exchanged between different
organization, internal bot infections cause serious botnet elements is shown in figure 1.
repercussions including loss of man hours and downtime.
The average cost of such disasters runs into tens of
thousands of dollars. So there is need to defend against
such attacks. In this paper, we have analysed the
feasibility of outbound traffic i.e. extrusions, to detect and
prevent attacks caused because of botnets. As a part of
the research work, a Network-based Detection and
Prevention systems of botnets called N-EDPS has been
proposed.

Keywords: - Attacker, Bot, Botmaster, Extrusion,


Intrusion, Pear to Pear, Zombie.

1. Introduction
The Internet consists of hundreds of millions of Figure 1: Working of a typical IRC-based Botnet
computers distributed all around the world. Most of the Firstly, a botmaster exploits the vulnerability on the
companies, institutes, banks, businesses, and research victim. Then the victim downloads the actual bot binary
heavily depend on a well-working and secure computer and contacts the IRC server address in the executable,
networks. Any incident could be critical to their routine including resolving the DNS name. After that the bot
work. The increasing usage of interactive internet joins an IRC communication channel to receive
applications in these areas has induced a rise in risks and commands from the botmaster via communication
possibilities of misuse of computer networks. The core channel. The proposed work uses the botnet life cycle
objectives of information security have to be met in order given in [1] and is depicted by the State Transition
to protect the network such as confidentiality, integrity, Diagram shown in figure 2.
availability, authentication, non-repudiation. In order to
meet all of these requirements, it is essential to protect a
network against all possible threats. Over the last decade,
malicious software or malware has risen to become a
5, 9, 11, 12] and Mitigation mechanisms [5, 8, 10].
Network-based intrusion detection systems (IDSs) and
intrusion prevention systems (IPSs) may come to mind as
the most appealing technology for detecting and
mitigating botnet threats. Traditional IDSs, whether
signature based [20, 21] or anomaly based [1, 8], typically
focus on inbound packets flows for signs of malicious
point-to-point intrusion attempts. Network IDSs have the
capacity to detect initial incoming intrusion attempts, and
the prolific frequency with which they produce such
alarms in operational networks, However, distinguishing a
successful local host infection from the daily myriad of
Figure 2: Life cycle of a Botnet scans and intrusion attempts is as critical and challenging
The figure 2 is not intended to provide a strict ordering of a task as any facet of network defense [2].
events, but rather to capture a typical infection dialog. In Our primary contribution in this paper is (1) to introduce a
new network monitoring strategy, which focuses on
the idealized sequence of a direct-exploit bot infection
detecting and preventing malware infections (specifically
model, the bot infection begins with an external-to-
bots/botnets) through monitoring outbound traffic i.e.
internal communication flow that may encompass bot
scanning (E1) or a direct inbound exploit (E2). When an extrusions only using the available signatures. (2) to
internal host has been successfully compromised, the reduce the rule set of a detection and prevention system so
newly compromised host down- loads and instantiates a as to increase its efficiency under attack. (3) to utilizes the
existing open source and freely available software to
full malicious binary instance of the bot (E3). Once the
develop a network based detection and prevention system
full binary instance of the bot is retrieved and executed,
this model accommodates two potential dialog paths, of botnet based attacks.
referred to as the bot Type I versus Type II split. Under The remainder of this paper is outlined as
Type II bots, the infected host proceeds to C&C server follows.
The section-II focuses on the problem formulation and
coordination (E4) before attempting self-propagation.
experimental setup of N-EDPS. The section-III discusses
Under a Type I bot, the infected host immediately moves
the various results obtained and the last section concludes
to outbound scanning and attack propagation (E5),
representing a classic worm infection. Botnets can serve the work by highlighting the scope for future work.
both legitimate and illegitimate purposes as described in
[6]. One legitimate purpose is to support the operations of 2. Related Work
IRC channels using administrative privileges on specific The proposed work utilizes the Botnet detection system
individuals. Nevertheless, such goals do not meet the vast called a BotHunter proposed in paper [1]. BotHunter is a
number of bots that we have seen. The possibilities to use passive network monitoring system driven by Snort. It
botnets for criminally motivated or for destructive goals correlates the inbound intrusion alarms with the outbound
has been categorized as DDoS Attacks [3, 15], Spamming communication patterns that are highly indicative of
and Spreading Malware [16, 17], Information Leakage successful local host infection. The experimental results
[14, 15], Click Fraud [15], Identity Fraud [15], Hosting of using BotHunter are presented in a virtual and live testing
Illegal Software [16], Political Activism [18]. Before environment. BotHunter focuses on botnet detection and
discussing Botnet defense approaches, it is necessary to its traffic. We focus on all outbound traffic generated by a
highlight here that traditional security technologies such malicious source. Paper [22] focuses on the outbound
as router access lists, firewalls, and Intrusion detection traffic with the intention to guarantee that the host will not
systems which are important components of overall be used as an attack launcher or intrusion relayer to
security strategy, do not provide comprehensive botnet compromise other systems. Therefore, the intended goal
protection by themselves because of the reasons given in using the outbound traffic is different for the mentioned
[19]. Since these security components are unable to paper and the present work. Paper [22] focuses on the
restrict botnet attacks, some specific defense approaches prevention of further propagation of malware. In this
are being deployed to combat botnet attacks. The work, on the other hand, the outbound traffic is analysed
stumbling barrier against these attacks is that it is almost to get a clear indication about a successful attack. The
impossible to differentiate between legitimate and attack proposed work also utilizes the malware classifications
packets. Therefore it has become a real challenge to given by C. Lussi in paper [2]. The author in [2] uses the
defend against these attacks. The seriousness of botnet concept of escalation rules with different weights. The
problem and growing sophistication of attackers have led applied rule with the highest weight determines the
to development of numerous defense mechanisms. These treatment of the corresponding alert. Apart from this
defense mechanisms are classified into three broad work, other network-based automated botnet detection
categories in Prevention [5, 6], Detection and Tracing [4, tools are in existent like Rishi [23], Strayer [24], and
BotMiner [13]. While there are few other detection tools The concept of signature-based detection and prevention
available which are host based like Binder [25] and system is used which searches for known malicious
BotSwat [26]. The gaps in the existing work have been patterns in the payload whereas a behavior-based IDS,
identified and efforts are made to address some of these also known as an anomaly detection system, analyses in
gaps as part of current work the first instance the traffic data. Most of the current used
IDS focus on the intrusion from outside of the network
into the monitored network. Such a detection of attacks
3. Methodology creates a lot of false alarms. A new approach called
The conceptual methodology used for the development of extrusion detection is focusing on the traffic, whose
N-EDPS has been shown in figure 3. The end product will source address is inside of the monitored network. The
first monitor the network traffic of the educational extrusion detection technique is a promising approach
institute to capture the details of types of attacks because the behaviour of an infected system and the
occurring in the network and the output will be stored in generated traffic due to this infection is often
some database or log file for future reference. Based on conspicuous. An extrusion is a clear indication of
the available signatures, alerts will be generated occurred intrusion, because an extrusion only happens as
corresponding to the various attacks occurring in the a result of a successful attack. The differentiation between
network. an attempted and a successful attack is the ultimate goal
of this work. Therefore, we will analyse and test the
efficiency of the extrusion detection approach. For the
development of N-EDPS, a no. of Open Source Softwares
and free Softwares has been used. This permits users to
use, change, and improve the software, and to redistribute
it in modified or unmodified forms

Table 1: Classification of signatures for N-EDPS

File Name Description No. of


Rules
E1.rules contains all External to Internal 75
Inbound Scan related rules
E2. rules contains all External to Internal 325
Figure 3: Methodology to develop N-EDPS
Inbound Exploit related rules

New rules/signatures will be developed and updated to the E3.rules contains all Internal to External 250
database of detection system as well as to the database of Binary Acquisition related rules
prevention system. The database of prevention system
E4.rules contains all Internal to External C&C 370
will contains only those rules for which we want to drop
the incoming packets whereas the database of detection Communication related rules
system will contains more no. of rules for which we want E5.rules contains all Internal to External 455
to generate alerts only. After the development of such
rules, we would be able to filter malicious traffic from Outbound Infection Scanning rules
legitimate traffic resulting in Botnet free traffic. For the
development of proposed N-EDPS, a prevention system,
also known as active IDS has been used, which 4. Experimental Setup
investigates the traffic inline. This means that the packets The proposed N-EDPS consists of two components. One
are analysed continuously and the reaction to an attack is is the detection engine and the other one is the prevention
in real-time. The IPS blocks traffic independently without engine. For the development of proposed system, we have
human interaction. It aims not only at detecting, but also used Bot Hunter as the detection engine and snort-inline
at preventing an attack. In contrast, a passive IDS does as the prevention engine. The system topology for the N-
not act by itself but does only raise an alarm in case of a EDPS in the live environment in shown in figure 4. We
supposed attack. The Network-based deployment has placed the proposed N-EDPS between the network and
been used instead of Host-based deployment. A Network- the Internet Server to monitor all the outbound traffic. It is
based IPS monitors the network traffic of a particular worth to be noted that the IDS engine works for two
network whereas a Host-based IPS monitors the operating conditions;
system, applications, and the host specific network traffic.
• Condition 1: Evidence of local host infection 65 C & C servers, 32 Egg download servers and 24 IP
(E2), AND evidence of outward bot coordination addresses of outbound scanning servers which could be
or attack propagation (E3-E5); or used for further infection. Apart from these results, the
• Condition 2: At least two distinct signs of signatures that have been triggered in identifying the
outward bot coordination or attack propagation popular viruses/worms/spyware who were using botnets
(E3-E5). are shown in table 2. The name and type of
viruses/worms/spyware found to use botnets inside the
As for the development of the proposed N-EDPS, we network, have been shown in table 3.
have focussed on only outbound traffic, so we will use
condition 2 for the detection of botnets in a network. And Table 2: Top Triggered Signatures
will use only category E3, E4 and E5 rules\signatures for ET Known Russian Business Network Monitored Domain
the above said purpose. The N-EDPS had been deployed
ET ShadowServer confirmed botnet control server
in the SBSCET network for a period of three weeks and
to run the N-EDPS, the rules\ signatures have been ET TROJAN Down adup/Conficker A or B Worm reporting
classified according the life cycle of the botnet shown in Detected intense malware port scanning of 30 IPs
figure 2 and have been stored accordingly into five files BotHunter MTC confirmed botnet control server
as shown in table 1. ET SCAN Behavioral Unusual Port NETBIOS traffic,
Potential Scan or Infection
ET TROJAN Downadup/Conficker A Worm reporting
ET TROJAN BOT - potential response
BotHunter REPO confirmed botnet control server
Detected moderate malware port scanning of 10 IPs
ET TROJAN Sality Trojan User-Agent (KUKU v3.09 exp)
ET VIRUS Sality Virus User Agent Detected (KUKU)
ET MALWARE 180solutions Spyware Reporting
ET MALWARE Hotbar Agent Partner Checkin
ET TROJAN Likely Bot Nick in IRC (USA +..)
ET MALWARE Hotbar Agent Reporting Information
ET TROJAN Pakes/Cutwall/Kobcka Update URL Detected
BACKDOOR Pushdo client communication attempt
Figure4:Experimental Topology of N-EDPS BotHunter HTTP-based .exe Upload on backdoor port
ET POLICY PE EXE or DLL Windows file download
ET TROJAN Peed Report to Controller
ET POLICY Outbound Multiple Non-SMTP Server Emails
COMMUNITY BOT GTBot info command

A number of unusual ports have also been found (123,


137, 443, 445, 1036, 1170, 1199, 1863, 1900, 2711, 3670,
6667, 6697, 7000, 7920, 8000, 8067, 8448, 9006, 18384,
47221, 49158, 55273, 58670). It had been confirmed that
Figure5: the monitored network did not provide any service
corresponding to these ports.
As we concentrate only on outbound traffic, we use only
E3, E4 and E5 type rules for botnet detection.

5. Results and Discussion

The N-EDPS has been run for a period of three weeks in


the live environment of SBSCET network. As shown in
figure 5, we have been able to find 42 infected computers,
Table 3: Botnets found [3] F. Freiling , T. Holz and G. Wicherski , “Botnet tracking:
exploring a root-cause methodology to prevent distributed
Conflicker A \ Downup \ Downadup \ Kido denial-of-service Attacks,” in Proceedings of the 10th
Conflicker B \ Downup \ Downadup \ Kido European Symposium on Research in Computer Security
Sality trojan user agent (KUKU v3.09 exp) (ESORICS ’05), vol. 3679 of Lecture Notes in Computer
Sality Virus user agent (KUKU) Science, pp. 319–335,Springer, Milan, Italy, 2005.
180 solutions spyware [4] G. Carl, G. Kesidis, “Denial of Service Attack-Detection
Hotbar Techniques,” IEEE Internet Computing, Vol 10, No. 1, pp
Pakes 82-89, 2006.
Cutwall [5] E. Cooke, F. Jahanian , and D. McPherson , “The zombie
Kobcka roundup: Understanding, detecting, and disrupting Botnets”
Pushdo\ Pandex \ Cutwail in Proceedings of Workshop on Steps to Reducing
Peed\ Storm Unwanted Traffic on the Internet (SRUTI’05), 2005.
variant of GT Bot [6] McCarty B. (2003), “Botnets: big and bigger,” IEEE
Security and Privacy, vol. 1, no. 4, pp. 87–90.
[7] R. Villamarin-Salomon and J. , “Identifying botnets using
6. Conclusion and Scope for Future Work anomaly detection techniques applied to DNS Traffic” in
To better understand the botnet and to stop its attacks Proceedings of the 5th IEEE Consumer Communications
eventually, this research work focuses on the detection and Networking Conference, pp. 476–481, Las Vegas, Nev,
and prevention of successful botnet attacks based on the USA, 2008.
[8] J. Liu, Y. Xiao, J. Zhang , ”Botnet: Classification, attacks,
concept of analyzing outbound traffic i.e. Extrusions only. Detection, Tracing and Preventive measures” EURASIP
As a part of the work we have proposed a signature-based journal of Wireless Communications and Networking, Vol.
N-EDPS which examines only outbound traffic to detect 2009, article ID 692654, 2009.
Botnet related malicious traffic using various open source [9] Y. Kugisaki , Y. Kasahara , Y. Hori , and K. Sakurai , “Bot
and freely available software. We run the N-EDPS for a detection based on Traffic Analysis,” in Proceedings of the
period of three weeks in the live environment of SBSCET International Conference on Intelligent Pervasive
network. As a part of the run, we have been able to find a Computing (IPC ’07), pp. 303–306, Jeju Island, South
number of infected computers, C & C servers, Egg Korea, 2007.
download servers and outbound scanning servers which [10] T. Holz , M. Steiner, F. Dahl, E. Biersack, Freiling ,
”Measurements and Mitigation of Peer-to-Peer-based
could be used for further infection. The name and type of Botnets: A Case Study on StormWorm”, 2007
viruses/worms/spyware found to use botnets inside the [11] X. Hu , M. Knyz and K. Shin , “RB-Seeker: auto-detection
network have been found. The proposed N-EDPS is better of redirection Botnets” in Proceedings of 16th Annual
than an N-IDPS because N-EDPS requires a smaller Network & Distributed System Security Symposium (NDSS
database of rules \ signatures as compared to N-IDPS and ’09), 2009.
delivers better results. But there are certain drawbacks of [12] J. Grizzard , V. Sharma, C. Nunnery, B. Kang , and D.
the proposed system. (1) As the case with any Antivirus Dagon , “Peer-to-peer botnets: Overview and case study” in
software, the proposed signature-based N-EDPS also USENIX Workshop on Hot Topics in Understanding
requires access to a current database of attack signatures. Botnets (HotBots’07), 2007.
[13] G. Gu , R. Perdisci , J. Zhang and W. Lee , “Bot-Miner:
(2) The proposed N-EDPS is not capable of detecting Clustering Analysis of Network Traffic for Protocol- and
encrypted C & C channels, if they exist. For this, anomaly Structure-Independent Botnet Detection” in USENIX
based detection logic must be incorporated into N-EDPS. Security Symposium, 2008.
This work opens up a number of avenues for future work. [14] J. Govil, “Examining the criminology of bot zoo,” in
(1) A perfect N-EDPS is one which can respond to attacks Proceedings of the 6th International Conference on
when they occur, i.e., the one which is able to provide Information, Communications and Signal Processing
real-time response to any kind of attack whether it is (ICICS ’07), pp. 1–6, Singapore, December 2007.
known or novice. For this we need to develop an N-EDPS [15] P. Bacher, T. Holz, M. Kotter, and G. Wicherski, “Know
which integrates the feature of both signature-based and your Enemy: Tracking Botnets,”
http://www.honeynet.org/papers/ bots., Accessed:
behaviour-based detection system and dynamically September 2009
develop new rules for novel attacks and drop the traffic in [16] K. Pappas, “Back to basics to fight botnets,”
real time. (2) For detecting encrypted C & C channels, the Communications News, vol. 45, no. 5, p. 12, 2008.
anomaly based logic can be incorporated. [17] P. Sroufe, S. Phithakkitnukoon, R. Dantu, and J. Cangussu,
“Email shape analysis for spam botnet detection,” in
Proceedings of the 6th IEEE Consumer Communications
References and Networking Conference (CCNC ’09), pp. 1–2, Las
[1] Gu, G., Porras, Ph., Yegneswaran, V., Fong, M., Lee, W.
Vegas, Nev, USA, January 2009.
“BotHunter: Detecting malware infection through IDS-
[18] Info World Newsletter.
driven dialog correlation” , In 16th USENIX Security
http://www.infoworld.com/d/security-central/botnets-new-
Symposium (Security’ 07), 2007.
political-activism-392 Accessed November, 2009
[2] Cecile Lussi. Master’s thesis on “Signature-based
[19] P. Ferguson, D. Senie, “Network ingress filtering:
Extrusion detection” ETHZ (TIK), 2008.
Defeating Denial of Service attacks which employ IP
source address spoofing,” RFC 2267, the Internet
Engineering Task Force (IETF), 1998
[20] V. Paxson. BRO: A System for Detecting Network
Intruders in Real Time. In Proceedings of the 7th USENIX
Security Symposium, 1998.
[21] M. Roesch. Snort - lightweight intrusion detection for
networks. In Proceedings of USENIX LISA’99, 1999,
Accessed November, 2009
[22] Mandujano, S., Galván, A. Ountbound Intrusion Detection,
Center for Intelligent System Monterrey, Mexico, 2004
[23] J. Goebel and T. Holz. Rishi: Identify bot contaminated
hosts by irc nickname evaluation. In USENIX Workshop on
Hot Topics in Understanding Botnets (HotBots’07), 2007.
[24] W. T. Strayer, R.Walsh, C. Livadas, and D. Lapsley,
“Detecting botnets with tight command and control,” in
Proceedings of the 31st Annual IEEE Conference on Local
Computer Networks (LCN ’06), pp. 195–202, Tampa, Fla,
USA, November 2006.
[25] W. Cui, R. H. Katz, W. Tan. Design and Implementation of
an Extrusion-based Break-In Detector for Personal
Computers in Annual Computer Security Applications
Conf., Dec. 2005.
[26] E. Stinson, J. C. Mitchell. Characterizing Bots’ Remote
Control Behaviour in Detection of Intrusions & Malware,
and Vulnerability Assessment, July 2007.

You might also like