You are on page 1of 19

INDEX

No. Sub No.


TOPIC NAME Page No.

1.
INTRODUCTION

1.1 INTRODUCTION TO PROJECT

1.2 PROJECT OVERVIEW

2 SYSTEM ANALYSIS

2.1 Existing System

2.2 Proposed System

2.3 OVERVIEW OF MODULES

3 ALGORITHM/TECHNIQUES USED

3.1 RED Algorithm Description

3,2 Methodology And Specifications

4 SYSTEM MODEL
No. Sub No.
TOPIC NAME Page No.

4.1
Network Model

4.2 Threat Model

4.3 Protocol Model

5 SYSTEM DESIGN

5.1 DIAGRAMS

6 FUTURE ENHANCEMENT

1.INTRODUCTION

1.1 INTRODUCTION TO PROJECT

The Internet is not a safe place. Unsecured hosts can expect to be compromised within minutes
of connectingto the Internet and even well-protected hosts may be crippled with denial-of-service
(DoS) attacks. However,while such threats to host systems are widely understood, it is less well
appreciated that the network infrastructure itself is subject to constant attack as well. Indeed,
through combinations of social engineering and weak passwords, attackers have seized control
over thousands of Internet routers . Even more troubling is Mike Lynns controversial
presentation at the 2005 Black Hat Briefings, which demonstrated how Cisco routers can be
compromised via simple software vulnerabilities. Once a router has been compromised in such a
fashion, an attacker may interpose on the traffic stream and manipulate it maliciously to attack
othersselectively dropping, modifying, or rerouting packets.
Several researchers have developed distributed protocols to detect such traffic manipulations,
typically by validating that traffic transmitted by one router is received unmodified by another .
However, all of these schemesincluding our ownstruggle in interpreting the absence of
traffic. While a packet that has been modified in transit represents clear evidence of tampering, a
missing packet is inherently ambiguous: it may have been explicitly blocked by a compromised
router or it may have been dropped benignly due to network congestion. In fact, modern routers
routinely drop packets due to bursts in traffic that exceed their buffering capacities, and the
widely used Transmission Control Protocol (TCP) is designed to cause such losses as part of its
normal congestion control behavior. Thus, existing traffic validation systems must inevitably
produce false positives for benign events and/or produce false negatives by failing to report real
malicious packet dropping.
In this project, we develop a compromised router detection protocol that dynamically infers the
precisenumber of congestive packet losses that will occur. Once the congestion ambiguity is
removed, subsequent packet losses can be safely attributed to malicious actions. We believe our
protocol is the first to automatically predict congestion in a systematic manner and that it is
necessary for making any such network fault detection practical. In the remainder of this paper,
we briefly survey the related background material, evaluate options for inferring congestion, and
then present the assumptions, specification, and a formal description of a protocol that achieves
these goals. We have evaluated our protocol in a small experimental network and demonstrate
that it is capable of accurately resolving extremely small and fine-grained attacks.

1.2 PROJECT OVERVIEW


we consider the problem of detecting whether a compromised router is maliciously manipulating
its stream ofpackets. In particular, we are concerned with a simple yet effective attack in which a
router selectively drops packets destined for somevictim. Unfortunately, it is quite challenging to
attribute a missing packet to a malicious action because normal network congestion canproduce
the same effect. Modern networks routinely drop packets when the load temporarily exceeds
their buffering capacities.Previous detection protocols have tried to address this problem with a
user-defined threshold: too many dropped packets implymalicious intent. However, this heuristic
is fundamentally unsound; setting this threshold is, at best, an art and will certainly create
unnecessary false positives or mask highly focused attacks. We have designed, developed, and
implemented a compromised routerdetection protocol that dynamically infers, based on
measured traffic rates and buffer sizes, the number of congestive packet lossesthat will occur.
Once the ambiguity from congestion is removed, subsequent packet losses can be attributed to
malicious actions. Wehave tested our protocol in Emulab and have studied its effectiveness in
differentiating attacks from legitimate network behavior.

2. SYSTEM ANALYSIS

2.1 Existing System


The earliest work on fault-tolerant forwarding is due to Perlman who developed a robust routing
system basedon source routing, digitally signed route-setup packets, and reserved buffers. While
groundbreaking, Perlmans work required significant commitments of router resources and high
levels of network participation to detect anomalies. Since then, a variety of researchers have
proposed lighter weight protocols for actively probing the network to test whether packets are
forwarded in a manner consistent with the advertised global topology Conversely, the1997
WATCHERS system detects disruptive routers passively via a distributed monitoring algorithm
that detects deviations from a conservation of flow invariant . However, work on WATCHERS
was abandoned, in part due to limitations in its distributed detection protocol, its overhead, and
the problem of ambiguity stemming from congestionTo perform all these processes manually is a
very tedious process for a trained expert and, thus, an automated differential counting system that
helps in saving time and money is highly desirable.

2.2 Proposed System


We have designed, developed, and implemented a compromised router detection protocol that
dynamically infers, based on measured traffic rates and buffer sizes, the number of congestive
packet losses that will occur.
Once the ambiguity from congestion is removed, subsequent packet losses can be attributed to
malicious actions. We have tested our protocol in Emulab and have studied its effectiveness in
differentiating attacks from legitimate network behavior

2.3 OVERVIEW OF MODULES


Total project has divided into 5 Modules. They are
1. GUI Design
2. Protocol Utilization
3. Packet Transmission Details
4. CLP Calculation using Bayesian Theorem
5. Identifying Normal Packet using Threshold value.

Module 1:GUI Design


Using swing concepts in Java, we allocate area for the statistical characterization for the
transmitted packets.So that the design is consistent and efficient for the user to interact with the
software.

Module 2:Protocol Utilization


Packets are transmitted through the use of networking protocols. So that ports are distinguished
by different colors. I consider two types of protocols called TCP and UDP protocols. Here I use
the acknowleged TCP protocol to transmit the packets.
Module 3 :PTD (Packet Transmission Details)
Packet scores are generated based on the protocol values, the size of the packet and the
destination.

Module 4:CLP Calculationusing Bayesian Theorem


The Scores of each packet is generated and the probability calculation is performed. The
attribute value of each packet is compared with the base line profile value and sorting of packets
occurred.

Module 5: Identifying NP using Threshold Value


In this module, the threshold value is calculated and is compared with the attribute value of each
packet. Discarding of packets takes place in comparison with the threshold value.
3. ALGORITHM/TECHNIQUES USED

3.1REDAlgorithm Description
RED monitors the average queue size, based on an exponential weighted moving average: where
the actual queue size and weight for a low-pass filter. RED uses three more parameters in
minimum threshold, Maximum, Maximum threshold. Using, RED dynamically computes a
dropping probability in two steps for each packet it receives. First, it computes an interim
probability, Further; the RED algorithm tracks the number of packets, since the last dropped
packet. The final dropping probability, p, is specified to increase slowly as increases.

3.2Methodology And Specifications


There are inherently two threats posed by a compromised router. The attacker may subvert the
network control plane (e.g., by manipulating the routing protocol into false route updates) or may
subvert the network data plane and forward individual packets incorrectly. The first set of attacks
have seen the widest interest and the mostactivitylargely due to their catastrophic potential. By
violating the routing protocol itself, an attacker may causelarge portions of the network to
become inoperable. Thus, there have been a variety of efforts to impart authenticity and
consistency guarantees on route update messages with varying levels of cost and protection We
do not consider this class of attacks in this paper. Instead, we have focused on the less well-
appreciatedthreat of an attacker subverting the packet forwarding process on a compromised
router. Such an attack presentsa wide set of opportunities including DoS, surveillance, man-in-
the-middle attacks, replay and insertion attacks,and so on. Moreover, most of these attacks can
be trivially implemented via the existing command shell languages in commodity routers. The
earliest work on fault-tolerant forwarding is due to Perlman who developed a robust routing
system based on source routing, digitally signed route-setup packets, and reserved buffers.
While groundbreaking, Perlmans work required significant commitments of router resources
and high levels of network participation to detect anomalies. Since then, a variety of researchers
have proposed lighter weight protocols for actively probing the network to test whether packets
are forwarded in a manner consistent with the advertised global topology Conversely, the 1997
WATCHERS system detects disruptive routers passively via a distributed monitoring algorithm
that detects deviations from a conservation of flow invariant However, work on WATCHERS
was abandoned, in part due to limitations in its distributed detection protocol, its overhead,and
the problem of ambiguity stemming from congestion . Finally, our own work broke the problem
into three
pieces: a traffic validation mechanism, a distributed detection protocol, and a rerouting
countermeasure. In wefocused on the detection protocol, provided a formal framework for
evaluating the accuracy and precision of any such protocol, and described several practical
protocols that allow scalable implementations.
However, we also assumed that the problem of congestion ambiguity could be solved, without
providing a solution. This paper presents a protocol that removes this assumption. INFERRING
CONGESTIVE LOSSIn building a traffic validation protocol, it is necessary to explicitly resolve
the ambiguity around packet losses.Should the absence of a given packet be seen as malicious or
benign? In practice,

There are three approaches forAddressing this issue:


3.2.1 Static Threshold.:
Low rates of packet loss are assumedto be congestive, while rates above some
predefinedthreshold are deemed malicious.

3.2.2Traffic modeling.:
Packet loss rates are predicted as afunction of traffic parameters and losses beyond theprediction
are deemed malicious.

3.2.3 Traffic measurement:


. Individual packet losses arepredicted as a function of measured traffic loadand router buffer
capacity. Deviations from thesepredictions are deemed malicious.

Most traffic validation protocols, including WATCHERS,Secure Traceroute, and our own work
described in analyze aggregate traffic over some period of time in orderto amortize monitoring
overhead over many packets. Forexample, one validation protocol described in maintainspacket
counters in each router to detect if traffic flow is notconserved from source to destination. When
a packet arrivesat router r and is forwarded to a destination that willtraverse a path segment
ending at router x, r increments anoutbound counter associated with router x. Conversely,when a
packet arrives at router r, via a path segmentbeginning with router x, it increments its inbound
counterassociated with router x. Periodically, router x sends a copyof its outbound counters to
the associated routers forvalidation.Then, a given router r can compare the numberof packets that
x claims to have sent to r with the number ofpackets it counts as being received from x, and it
can detectthe number of packet losses.Thus, over some time window, a router simply knowsthat
out of m packets sent, n were successfully received. Toaddress congestion ambiguity, all of these
systems employ apredefined thresholdhow does one choose the threshold?
In order to avoid false positives, the threshold must belarge enough to include the maximum
number of possiblecongestive legitimate packet losses over a measurementinterval. Thus, any
compromised router can drop that manypackets without being detected. Unfortunately, given
thenature of the dominant TCP, even small numbers of lossescan have significant impacts.
Subtle attackers can selectivelytarget the traffic flows of a single victim and within theseflows
only drop those packets that cause the most harm. Forexample, losing a TCP SYN packet used in
connectionestablishment has a disproportionate impact on a hostbecause the retransmission time-
out must necessarily bevery long (typically 3 seconds or more). Other seeminglyminor attacks
that cause TCP time-outs can have similareffects
4. SYSTEM MODEL

Our work proceeds from an informed, yet abstracted,model of how the network is constructed,
the capabilities ofthe attacker, and the complexities of the traffic validation
problem. In this section, we briefly describe the assumptionsunderlying our model. We use the
same system modelas in our earlier work .

4.1 Network Model


We consider a network to consist of individual homogeneousrouters interconnected via
directional point-topointlinks. This model is an intentional simplification ofreal networks (e.g., it
does not include broadcast channelsor independently failing network interfaces) but is
sufficientlygeneral to encompass such details if necessary.Unlike our earlier work, we assume
that the bandwidth, thedelay of each link, and the queue limit for each interface areall known
publicly.Within a network, we presume that packets are forwardedin a hop-by-hop fashion,
based on a localforwarding table. These forwarding tables are updatedvia a distributed link-state
routing protocol such as OSPFor IS-IS. This is critical, as we depend on the routingprotocol to
provide each node with a global view of thecurrent network topology.
Finally, we assume the administrativeability to assign and distribute cryptographic keysto sets of
nearby routers. This overall model is consistentwith the typical construction of large enterprise
IP networksor the internal structure of single ISP backbonenetworks but is not well suited for
networks that arecomposed of multiple administrative domains using BGP.At this level of
abstraction, we can assume a synchronousnetwork model.We define a path to be a finite
sequence hr1; r2; . . . rni ofadjacent routers. Operationally, a path defines a sequence ofrouters a
packet can follow. We call the first router of thepath the source and the last router its sink;
together, these arecalled terminal routers. A path might consist of only onerouter, in which case
the source and sink are the same.Terminal routers are leaf routers: they are never in themiddle of
any path.An x-path segment is a consecutive sequence of x routersthat is a subsequence of a
path. A path segment is anx-path segment for some value of x > 0. For example, if anetwork
consists of the single pth ha; b; c; di, then hc; di andhb; ci are both two-path segments, but ha; ci
is not because aand c are not adjacent.
4.2 Threat Model
This project focuses solely on dataplane attacks Moreover, for simplicity, weexamine only
attacks that involve packet dropping.However, our approach is easily extended to address
otherattackssuch as packet modification or reorderingsimilarto our previous work. Finally,
as in TCP, the protocol wedevelop validates traffic whose source and sink routers
areuncompromised.A router can be traffic faulty by maliciously droppingpackets and protocol
faulty by not following the rules of thedetection protocol. drops or misroutes packets that flow
through _. A routercan drop packets without being faulty, as long as thepackets are dropped
because the corresponding outputinterface is congested. A compromised router r can alsobehave
in an arbitrarily malicious way in terms of executing

4.3 Protocol Model


Protocol _ detects traffic faulty routers by validating thequeue of each output interface for each
router. Given thebuffer size and the rate at which traffic enters and exits aqueue, the behavior of
the queue is deterministic. If theactual behavior deviates from the predicted behavior, then
afailure has occurred.We present the failure detection protocol in terms of thesolutions of the
distinct subproblems: traffic validation,distributed detection, and response.
Start

Capture
packets
using jpcap

Assigning packet
score

Fixing a
threshold value

Yes
Is packet Discard packets
score
threshold
value

No

Update packet score

Stop
6.SYSTEM DESIGN

6.1 DIAGRAMS

The Unified Modeling Language is a language for specifying, constructing, visualizing


and documenting the software system and its components. The UML is a graphical language
with a set of rules and semantics.Main advantages of this modeling are
Models make it easier to express complex ideas
The cost of modeling analysis is much lower than the cost of similar
experimentation conducting with the system
Manipulation of the models is much easier
Models reduces the complexity by separating those aspects is
unimportant from those that are important
Model: A model is an abstract representation of the system, constructed to understand the
system prior to building or modifying it.

Static Model: A static model can be viewed as a snapshot of a Systems parameter at rest or at a
specific point in time. Static models are needed to represent the structural or static aspect of the
system.

Dynamic Model: A dynamic model can be viewed as a collection of procedures or


behaviors that taken together reflect the behavior of the system over time. Dynamic
relationships show how the business objects interact to perform the task.

6.1.1 USE CASE DIAGRAM


Use case diagrams are central to modeling the behavior of a system, a subsystem, or class. Each
one shows a set of use cased and actors and their relationships.Use case diagrams are important
for visualizing, specifying, and documenting the behavior of an element. They make systems,
subsystems, and classes approachable and understandable by presenting on outside view of how
those elements may be used in context. Use case diagrams are also important for testing
executable systems through forward engineering and for comprehending executable systems
through reverse engineering.
winpcap

Packet Server
Client

GUI

protocol Utilization
CLP Calculation

Packet Transmission Details

Identifying packet

Use Case diagram of Packet Losses


6.1.2 CLASS DIAGRAM

A class diagram show a set of classes, interfaces, and collaborations and their
relationships. Class diagrams are used to model the static design view of a system. It involves
modeling the vocabulary of the system, modeling collaborations, or modeling schemas. Class
diagrams are also the foundation for a couple of related diagrams: component diagrams and
deployment diagrams.
Class diagrams are important not only for visualizing, specifying and documenting structural
models, but also for constructing executable systems through forward and reverse engineering.
Class diagram of Packet Losses
6.1.3 SEQUENCE DIAGRAM

A sequence diagram is an interaction diagram that emphasizes the time ordering of


messages. A sequence diagram shows a set of objects and the messages sent and received by
those objects. The objects are typically named or anonymous instances of classes, but may also
represent instances of other things, such as collaborations, components and nodes.

WinPcap GUI Packet Transmission Protocol CLP Identification


Details Utilization Calculation

1: Sent Packets

2: Sent Packets

3: Sent Sniffed Packets

4: Sent to Sniffed Protocols used

5: Sent Sniffed Packets

6: Sent Packets for CLP Calulation

7: Sent Packet Score

8: Identify as Normal or Attack

Sequence diagram of Packet Losses

You might also like