Date post: | 07-Apr-2018 |
Category: |
Documents |
Upload: | manju31991 |
View: | 224 times |
Download: | 0 times |
of 49
8/4/2019 Effect of Denial of Sleep Attack
1/49
TABLE OF CONTENTS
CHAPTER NO. TITLE PAGE NO.
ABSTRACT
LIST OF TABLES
LIST OF FIGURES
1 INTRODUCTION
2 SYSTEM STUDY
2.1 EXISTING SYSTEM
2.2 PROPOSED SYSTEM
2.3 FEASABILITY STUDY
2.4 OBJECTIVE
3 SYSTEM SPECIFICATION
3.1 HARDWARE SPECIFICATION
3.2 SOFTWARE SPECIFICATION
4 LANGUAGE DESCRIPTION
5 SYSTEM DESIGN AND DEVELOPMENT
5.1 DESCRIPTION
5.2 DATA FLOW DIAGRAM
5.3 PROCESS DIAGRAM
5.4 SCREEN DESIGN
8/4/2019 Effect of Denial of Sleep Attack
2/49
5.5 SAMPLE CODING
5.6 SAMPLE INPUT AND OUTPUT
6 TESTING AND IMPLEMENTATION
6.1 SYSTEM TESTING
6.2 IMPLEMENTATION TESTING
6.3 SYSTEM IMPLEMENTATION
7 FUTURE ENHANCEMENT
8 CONCLUSION
8/4/2019 Effect of Denial of Sleep Attack
3/49
PROJECT
Effects of Denial-of-Sleep Attacks onWireless
Sensor Network MAC Protocols
Abstract
Wireless platforms are becoming less expensive and more
powerful, enabling the promise of widespread use for
everything from health monitoring to military sensing. Like
other networks, sensor networks are vulnerable to malicious
attack. However, the hardware simplicity of these devices
makes defense mechanisms designed for traditional
networks infeasible. This paper explores the denial-of-sleep
attack, in which a sensor nodes power supply is targeted.
Attacks of this type can reduce the sensor
lifetime from years to days and have a devastating impact
on a sensor network. This paper classifies sensor network
denial-of-sleep attacks in terms of an attackers knowledge
of the medium access control (MAC) layer protocol and
ability to bypass authentication and encryption protocols.
Attacks from each classification are then modeled to show
the impacts on four sensor network MAC protocols, i.e.,
8/4/2019 Effect of Denial of Sleep Attack
4/49
Sensor MAC (S-MAC), Timeout MAC (T-MAC), Berkeley MAC
(B-MAC), and Gateway MAC (G-MAC). Implementations of
selected attacks on S-MAC, T-MAC, and B-MAC are
described and analyzed in detail to validate their
effectiveness and analyze their efficiency. Our analysis
shows that the most efficient attack on S-MAC can keep a
cluster of nodes awake 100% of the time by an attacker that
sleeps 99% of the time. Attacks on T-MAC can keep victims
awake 100% of the time while the attacker sleeps 92% of
the time. A framework for preventing denial-of-sleep attacksin sensor networks is also introduced. With full protocol
knowledge and an ability to penetrate link-layer encryption,
all wireless sensor network MAC protocols are susceptible to
a full domination attack, which reduces the network lifetime
to the minimum possible by maximizing the power
consumption of the nodes radio subsystem. Even without
the ability to penetrate encryption, subtle attacks can be
launched, which reduce the network lifetime by orders of
magnitude. If sensor networks are to meet current
expectations, they must be robust in the face of network
attacks to include denial-of-sleep.
Index TermsMedium access control (MAC), wireless
security,wireless sensornetworks (WSNs).
8/4/2019 Effect of Denial of Sleep Attack
5/49
I. INTRODUCTION
WIRELESS sensor networks (WSNs) are becoming
increasingly attractive for a variety of application areas,
including industrial automation, security, weather analysis,
and a broad range of military scenarios. The challenge of
designing these systems to be robust in the face of myriad
security threats
is a priority issue. One such threat is the denial-of-sleep
attack, which is a specific type of denial-of-service (DoS)
attack that targets a battery-powered devices power supply
in an effort to exhaust this constrained resource. If a large
percentage of network nodes, or a few critical nodes, are
attacked this way, the network lifetime can be reduced from
months or years to days.
The impacts of denial-of-sleep attacks on WSN MAC
protocols have not been thoroughly addressed. The only
previous study that focused on denial-of-sleep in WSN is [1],
which models the network lifetime under routine traffic
patterns for a sleep broadcast attackon these protocols on
the Tmote Sky [2] WSN platform. This paper describes a
more potent unauthenticated broadcast attack in which a
back-to-back stream of unauthenticated packets is
transmitted, as opposed to the attack used in [1], which uses
a much lower rate of four attack packets per second. This
8/4/2019 Effect of Denial of Sleep Attack
6/49
paper also explores the impacts of constant physical-layer
jamming, intelligent replay, and a full domination attack for
each of the protocols considered.We also expand on [1] by
modeling the impact of these attacks on the
Crossbow Mica2 [3] WSN platform in addition to Tmote Sky.
Furthermore, the impacts of various denial-of-sleep attacks
on current wireless sensor devices are validated through
implementation on the Mica2. A framework for defending
against these potentially devastating attacks is then
presented.To make the nodes small and inexpensive for economical
deployment in large numbers, they generally have very
limited processing capability and memory capacity. Because
the design of these devices usually favors decreased cost
over increased capabilities, we cannot expect Moores law to
lead to enhanced performance. Another challenge unique to
sensor node platforms is their extremely limited and often
nonreplenishable power supply. Mica2 and Tmote Sky are
two examples of widely available sensor node platforms.
Both devices are configured to run for a year or more on a
pair of AA batteries, relying on long periods of sleep to save
power. The dominant source of power loss in these sensor
platforms is the radio
subsystem. Table I shows the instantaneous power
consumption during receive, transmit, and sleep periods for
these devices [2],[3]. The data link layer, specifically the
8/4/2019 Effect of Denial of Sleep Attack
7/49
medium access control (MAC) protocol, is responsible for
managing the radio. Therefore, the MAC protocol must keep
the radio in a low-power sleep mode as much as possible. As
a result, most research in the area of sensor node power
conservation is focused on MAC protocols.
The MAC protocols considered in this paper include the
slotted carrier sense multiple access with collision avoidance
(CSMA/CA) protocols Sensor MAC (S-MAC) [4], Timeout MAC
(T-MAC) [5], and Berkeley MAC (B-MAC) [6]. In addition,
Gateway MAC (G-MAC) [7] is also consideredhere, which is a clustered protocol that combines a
contention-based slot reservation period with a time-division
multiple-access (TDMA) period for data dissemination.
Similar centralized cluster-based WSN protocols include low-
energy adaptive clustering hierarchy (LEACH) [8] and power-
aware
clustered TDMA (PACT) [9].
.
1.1 SCOPE OF THE PROJECT:
The MAC-layer denial-of-sleep attacks on WSNs can be
categorized based on the level of protocol knowledge
required to initiate them and the level of network
penetration achieved by an attacker. Penetration refers to an
8/4/2019 Effect of Denial of Sleep Attack
8/49
attackers ability to read and send trusted traffic. A network
is easily penetrated if the networking protocols are known
and if cryptographic mechanisms are not used for
communication or are compromised. While
there are mechanisms available for secure communication in
WSN, they are not as robust as those found in traditional
networks due to resource constraints. Any shared medium
can be attacked with physical-layer jamming. Jamming,
however, is a blunt instrument for executing a denial-of-
sleep attack on WSN. Depending on the MAC protocol, thelifetime of a
WSN can be significant, even in the face of jamming,
requiring that an attacker jam the network for an extended
period to render it ineffective. Furthermore, conducting a
jamming attack requires considerable resources. A more
efficient attack strategy is to use knowledge of MAC
protocols to initiate an assault aimed at draining power from
sensor platforms, thereby rendering the network unusable
and nullifying any other security mechanisms. In the ensuing
discussion, the following three classifications of MAC layer
denial-of-sleep attacks are used.
8/4/2019 Effect of Denial of Sleep Attack
9/49
1) Class 1No Protocol Knowledge, No Ability to Penetrate
Network
2) Class 2Full Protocol Knowledge, No Ability to
Penetrate
Network
3) Class 3Full Protocol Knowledge, Network Penetrated
SYSTEM STUDY
2.SYSTEM STUDY
Existing System:
Existing systems available for defense against Denial-of-Sleep attack were
includes the following problems,
1.Fails in Service availability:
Authentication at higher protocol layers can be effective for
providing data integrity and confidentiality but still fails to
ensure service availability.
2. Disadvantage in Replay Attack:
Existing techniques for protecting against replay attacks at
the link layer have the disadvantage of requiring resource
constrained sensor nodes to maintain a neighbor table of
8/4/2019 Effect of Denial of Sleep Attack
10/49
packet sequence numbers, a requirement that can become
unwieldy even in moderately sized networks.
3.Problem in jamming attack:
sensor nodes are usually equipped with simple radios that
are not designed to use spread-spectrum techniques to
defend against jamming.
4.Broadcasting Attack:
This type of attack is particularly hard to detect because itdoes not effect legitimate throughput, which might indicate
an ongoing network attack.
Proposed System:
To prevent attacks across WSN we must incorporatefour components in our Proposed System, they are,
1. Strong Link-Layer Authentication2. Anti-Replay Protection3. Jamming Identification and Mitigation4. Broadcast Attack Protection
Strong Link-Layer Authentication:
Strong Link-layer Authentication should be incorporated to ensure Integrity,
Confidentiality and Service availability.
Anti-Replay Protection:
8/4/2019 Effect of Denial of Sleep Attack
11/49
Using Clustered Anti-replay Protection (CARP), that bounds
the size of the neighbor table according to the maximum
node degree and the number
of clusters, which are user configurable in many clustering
protocols. Anti-replay counters are exchanged during the
periodic reclustering process. This anti-replay counter
exchange is, in turn, protected from replays using a
sequential numbering scheme for clustering events.
Jamming Identification and Mitigation:
Adding jam detection to networks that are vulnerable to
jamming-based denial-of-sleep attacks is quite possible
using this technique.
Broadcast Attack Protection:
A lightweight intrusion-detection mechanism employed at
the MAC layer that classifies each incoming packet as eitherlegitimate (meaning that it passes authentication and anti-
replay checks)or malicious.
2.1FEASIBILITY STUDY
All projects are feasible given unlimited resources and infinite time.
It is both necessary and prudent to evaluate the feasibility of the project at
the earliest possible time. Feasibility and risk analysis is related in many
ways. If project risk is great , the feasibility listed below is equally
important.
The following feasibility techniques has been used in this project
8/4/2019 Effect of Denial of Sleep Attack
12/49
Operational Feasibility
Technical Feasibility
Economic Feasibility
Operational Feasibility:
Proposed system is beneficial since it turned into information system
analyzing the traffic that will meet the organizations operating
requirements.
IN security, the file is transferred to the destination and the
acknowledgement is given to the server. Bulk of data transfer is sent
without traffic.
Technical Feasibility:
Technical feasibility centers on the existing computer system
(hardware , software, etc..) and to what extent it can support the proposed
addition. For example, if the current computer is operating at 80% capacity.
This involves, additional hardware (RAM and PROCESSOR) will increase
the speed of the process. In software, Open Source language that is JAVA
and is used. We can also use in Linux operating system.
The technical requirement for this project are Java tool kit and
Swing component as software and normal hardware configuration is
enough , so the system is more feasible on this criteria.
8/4/2019 Effect of Denial of Sleep Attack
13/49
Economic Feasibility:
Economic feasibility is the most frequently used method for
evaluating the effectiveness of a candidate system. More commonly known
as cost / benefit analysis, the procedure is to determine the benefits and
saving that are expected from a candidate and compare them with the costs.
If the benefits outweigh cost. Then the decision is made to design and
implement the system. Otherwise drop the system.
This system has been implemented such that it can be used to
analysis the traffic. So it does not requires any extra equipment or hardware
to implement. So it is economically feasible to use.
2.2OBJECTIVES :
Attacks from each of the three classifications and their
impacts on S-MAC, T-MAC, B-MAC, and G-MAC are analyzed.
This section explores the impacts of constant physical-layer
jamming, unauthorized broadcast, intelligent replay, and a
full domination attack for each of the three protocols
considered. A full domination attack assumes that the
attacker has penetrated the network and has full knowledge
of the MAC protocol. In each case, a full domination attack
can reduce the network lifetime to ten days for the Mica2
platform and six days for the Tmote Sky platform, which is
equivalent to a network lifetime under IEEE 802.11 with no
power saving features.
8/4/2019 Effect of Denial of Sleep Attack
14/49
SYSTEM SPECIFICATION:
3.1 HARDWARE SPECIFICATION:
Processor : Pentium-IV
Speed : 1.1GHz
RAM : 512MB
Hard Disk : 40GB
General : KeyBoard, Monitor , Mouse
3.2 SOFTWARE SPECIFICATION:
Operating System : Windows XP
Software : JAVA ( JDK 1.6(swing))
IDE : Net Beans 1.6
Back End : SQL Server
LANGUAGE DESCRIPTION
4. LANGUAGE DESCRIPTION
The inventors are java wanted to design a language, which could
offer solution to some of the problems encountered in modern programming.
They wanted the language to be reliable, portable and distributed but also
simple, compact and interactive. Sun Microsystems officially describes java
with following attributes:
Compile and interpreter
8/4/2019 Effect of Denial of Sleep Attack
15/49
Platform independent and portable
Object-oriented
Distributed
Familiar ,simple and small
Multithreaded and interactive
High performance
Dynamic and extensible
Although the above appears to be a list of buzzwords, they apply describe
the full potential of language. These features have made java the first
application language of the world wide web. Java will also become the
primer language for general-purpose stand-alone applications.
Compile and Interpreted:
Usually a computer language either compiled or interpreted. Java
combines both the approaches for making java a two-stage system. First,
Java compiler translates source code into what is known as byte code
instructions. Byte codes are not machine instructions is therefore , in the
second stage, java interpreter generates machine code that
can be directly executed by a machine is running the Java program. We
can thus say that a Java is both compiled and an interpreted language.
Platform-Independent and Portable:
8/4/2019 Effect of Denial of Sleep Attack
16/49
The most significant contribution of Java over other languages
is its portability. Java programs can be easily moved from one computer
system to another, anywhere anytime. Changes and upgrades in operating
systems, processors and system resources will not force any changes in Java
programs. This is the reason why Java has become a popular language for
programming on Internet, which interconnects different kinds of systems
worldwide.We can download a Java applet from a remote computer on to
our local system via Internet an extension of the users basic system
providing practically unlimited number of accessible applets and
applications.
Java ensures the portability in two ways. First Java compiler
generate byte code instructions that can be implemented on any machine.
Secondly, the size of the primitive data types are machine-independent.
Object-Oriented:
Java is a true object oriented language. Almost everything in Java
is an Object. All program code and data reside within objects and classes.
Java comes with an extensive set of classes, arranged in packages, that
we can use in our programs by inheritance. The object model in Java is
simple and easy to extend.
Robust and Secure:
8/4/2019 Effect of Denial of Sleep Attack
17/49
Java is a robust language. It provides many safeguards to ensure
reliable code. It has strict compiler time and runtime checking for data
types. It is designed as a garbage-collected language relieving the
programmers virtually all memory management problems. Java also
incorporates the concept of exception handling , which captured the
series errors and eliminates any risk of crashing the system.
Security becomes an important issue for a language that is used for
programming in internet. Threat of virus and abuse of resource is
everything. Java systems not only verify all memory access but also
ensure no virus are communicated with an applet. The absence of pointer
in java ensures that programs cannot gain access to memory location
without proper authorization.
Distributed:
Java is designed as a distributed language for creating applications
on networks.It has the ability to share both data programs. Java applications
can open and access remote objects on Internet as easily as they can in a
local system.This enables multiple programmers at multiple remote
locations to collaborate and work together on a single project.
Simple Small and Familiar:
8/4/2019 Effect of Denial of Sleep Attack
18/49
Java is a small and simple language. Many features of C and C++ that
are either redundant or sources of unreliable code are not part of Java. For
example,
Java does not use pointers,preprocessor header files, go to statement
and many others.It also eliminates operator overloading and multiple
inheritance.
Familiarity is another striking feature of Java .To make the
language look familiar to the existing programmers, it was modeled on C
and C++ and therefore, Java looks like C and C++ code.In fact, Java is a
simplified version of C++.
Mutithreading and Interactive:
Multi threaded means handling multiple tasks simultaneously. Java
supports multi threading programs. This means that we need not wait for the
application to finish one task before beginning another. For example. we can
listen to an audio clip time download an applet from distance computer. The
feature greatly improves the interactive performance of graphical
applications. The Java runtime comes with tools that support multi process
synchronization and construct smoothly running interactive system.
High Performance:
Java performance is impressive for an interpreted language. Mainly
due to the use of intermediate byte code. According to Sun, java speed is
comparable to the native C/C++. Java architecture is also designed to reduce
overhead during runtime. Further, the incorporation of multi threading
enhances the overall execution speed of overall programs.
8/4/2019 Effect of Denial of Sleep Attack
19/49
Dynamic and Extensible:
Java is a dynamic language . Java is capable of dynamically linking in
new class libraries methods and objects. Java can also determine the type of
class through a query, making it possible to either dynamically link or abort
the program , depending on the response.
Java programs support functions written in other languages such as C
and C++.These functions are known as native methods.This facility enables
The programmers to use the efficient functions available in these
languages.Native methods are linked dynamically at runtime.
SWING:
Swing is a set of classes that provides more powerful and flexible
components than are possible with the AWT. In addition to that the familiar
components such as buttons, check box and labels swings supplies several
exciting additions including tabbed panes, scroll panes, trees and tables.
Even familiar components such as buttons have more capabilities in swing.
For example a button may have both an image and text string associated
with it. Also the image can be changed as the state of button changes. Unlike
AWT components swing components are not implemented by platform
specific code instead they are return entirely in JAVA and, therefore , are
platform- independent. The term lightweight is used to describe such
elements. The number of classes and interfaces in the swing packages is
substantial.
The swing component classes are
SWING COMPONENT CLASSES
8/4/2019 Effect of Denial of Sleep Attack
20/49
Class Description
Abstract Button Abstract super class for Swing
Buttons
Button Group Encapsulates a mutually exclusive
Set of Buttons
Image Icon Encapsulates an Icon
JApplet The swing version of Applet
JButton The Swing Push Button class
JCheckBox The swing CheckBox class
JComboBox Encapsulates a combobox
JLabel The swing version of a Label
JRadioButton The swing version of a RadioButton
JScrollPane Encapsulates a scrollable window
8/4/2019 Effect of Denial of Sleep Attack
21/49
JTabbedPane Encapsulates a Tabbed window
JTable Encapsulates a Table-based control
JTextField The swing version of a text-field
5. SYSTEM DESIGN AND DEVELOPMENT:
5.1 DESCRIPTION OF A SYSTEM:
A framework for defending against denial-of-sleep attacks is
presented. To prevent attacks across the spectrum of link-
layer vulnerabilities, a defensive framework must
incorporate four key components, i.e., strong link-layer
authentication, anti-replay protection, jamming identification
and mitigation, and broadcast attack defense.
1) Strong Link-Layer Authentication: This is the first andmost important component of denial-of-sleep defense and
must be incorporated into any WSN that might be vulnerable
to attack. Authentication at higher protocol layers can be
effective for providing data integrity and confidentiality but
8/4/2019 Effect of Denial of Sleep Attack
22/49
still fails to ensure service availability. An attackers ability to
send trusted MAC-layer traffic on the network leaves it open
to the types of full-domination attacks that can reduce the
network lifetime from a year or more to less than a week.
Existing options for implementing link-layer authentication in
WSN include TinySec, which is incorporated into current
releases of TinyOS [20], and the authentication algorithms
built into IEEE 802.15.4-compliant devices.
2) Anti-Replay Protection: An attackers ability to replay
messages, even without being able to read them, can forcenodes to forward old traffic through the network and can
significantly increase power consumption for all nodes on the
path from sender to receiver. Traffic analysis makes it
possible to distinguish control traffic from data traffic.
Replayed control
packets, like S-MAC SYNC packets, can be used to mount an
effective denial-of-sleep attack. Existing techniques for
protecting against replay attacks at the link layer have the
disadvantage of requiring resourceconstrained sensor nodes
to maintain a neighbor table of packet sequence numbers, a
requirement that can become unwieldy even in moderately
sized networks. The neighbor table can also be exploited by
an attacker if packets from other portions of the network are
replayed, thereby increasing the size of a nodes neighbor
table and consuming more resources. Oneway to limit the
size of the neighbor table is to use networklayer neighbor
8/4/2019 Effect of Denial of Sleep Attack
23/49
information to limit the number of neighbors that must be
tracked to those from which legitimate traffic is expected.
Clustering protocols such as HEED [22] and ACE [23] reduce
the number of potential communication partners to a subset
of a nodes one-hop neighbors. By adding a small amount of
anti-replay information to clustering messages and using
existing authentication techniques, anti-replay protection
can be provided for clustered WSNs at low overheads. One
such technique is Clustered Anti-replay Protection (CARP), as
described in [24]. CARP bounds the size of the neighbortable according to the maximum node degree and the
number of clusters, which are user configurable in many
clustering
protocols. Anti-replay counters are exchanged during the
periodic reclustering process. This anti-replay counter
exchange is, in turn, protected from replays using a
sequential numbering scheme for clustering events. Since
reclustering is, by definition, a network-wide operation, all
nodes know the sequence number of the current clustering
event, and replayed clustering messages from previous
clustering events can be identified and
ignored [24].
3) Jamming Identification and Mitigation: A strong jamming
attack can prevent all sensor nodes access to the wireless
medium and can shut down the network. To reduce costs,
sensor nodes are usually equipped with simple radios that
8/4/2019 Effect of Denial of Sleep Attack
24/49
are not designed to use spread-spectrum techniques to
defend
against jamming. While IEEE 802.15.4-compliant
transceivers use direct sequence spread spectrum (DSSS) to
protect against background noise, spreading codes are fixed
according to the ZigBee standard and, therefore, cannot be
used to defend against jamming by a ZigBee-compliant
attacker. A logical reaction to jamming is for nodes to go into
low-power mode,
waking only periodically to sense the medium, thusconserving maximum energy when there is no hope of
successfully using the wireless medium. With techniques
available to reliably identify jamming attacks, such a
mechanism is now feasible. As part of this research, Xu et
al.s proposed jam detection mechanism based on the
relationship between PDR and RSSI values [16] was
implemented and tested on the Mica2 WSN platform. This
implementation effectively detects jamming with a low
probability of false positives. Adding jam detection to
networks that are vulnerable to jamming-based denial-of-
sleep attacks is quite possible using this technique.
4) Broadcast Attack Protection: Most MAC protocols are
susceptible to a simple unauthenticated broadcast attack.
Long messages can be broadcasted and must be received in
full by all network nodes before the nodes discard them due
to authentication failure. A subtle broadcast attack is one in
8/4/2019 Effect of Denial of Sleep Attack
25/49
which the attacker obeys MAC-layer rules of collision
avoidance, thereby transmitting attack traffic only when
there is no legitimate traffic in the network. This type of
attack is particularly hard to detect because it does not
effect legitimate throughput, which might indicate an
ongoing network attack. The limited resources available on
most sensor platforms prevent the use of traditional network
intrusion detection techniques, which normally require
capturing and analyzing large amounts of previous network
traffic. Another alternative, however, is a lightweightintrusion-detection mechanism employed at the MAC layer
that classifies each incoming packet as either legitimate
(meaning that it passes authentication and anti-replay
checks)or malicious. Tracking the ratio of legitimate to
malicious traffic, along with the percentage of time that the
device is able to sleep, is enough to identify a denial-of-sleep
broadcast attack [25]. Fig. 7 shows the correlation between
received traffic and power consumption in a simulated Mica2
network. The offered load averages 1 packet-per-second
(pps) with a burst of 4 pps of legitimate traffic from 120 to
240 s. Since this burst is legitimate data, it should be
allowed despite increased power consumption during the
burst. As long as legitimate traffic can be differentiated from
malicious traffic, the spike in energy consumption associated
with the increase in traffic, along with a high ratio of
malicious versus legitimate traffic, identifies the requirement
8/4/2019 Effect of Denial of Sleep Attack
26/49
to take action to mitigate the energy-draining effects of
malicious traffic.
Experimental setup for denial-of-sleep attacks (d_1.5m).
6. MODULE DESCRIPTION:
6.1 MODULE 1:SENSOR STATUS
Initiate the communication between two nodes named Node1 and
Node2.
8/4/2019 Effect of Denial of Sleep Attack
27/49
Sense the Communication between those nodes.
Click the sense result Button and view the sense result.
Restart sense or otherwise stop the sense
6.2 MODULE 2: ATTACK EXPLOITATION
Initiate the Communication between two nodes.
Sense the communication between those nodes.
Click the Attack Button.
Now activate the sensor by click Sense Button and view the result After five attacks the sensor will be Expired.
6.3 MODULE 3:ATTACK DEFENSE
Initiate the Communication between two nodes.
Sense the communication between those nodes.
Click the Attack Button.
Now activate the sensor by click Sense Button and view the result
Now Click the Defense Button to interrupt the attack and save the
Sensor from further attacks.
Module diagram
START
8/4/2019 Effect of Denial of Sleep Attack
28/49
UML Diagrams
SENSE
SENSOR STATUS
NODECOMMUNICATION
SENSOR
WORKING
ATTACK DEFENSE
STOP
8/4/2019 Effect of Denial of Sleep Attack
29/49
NODE1 NODE2
Class diagram
NODE1
Select file, Displays in
TextArea, Sends to Node2
SenseAttack
Defense
NodeCommunicatio
n
Sense
Attack
Defense
8/4/2019 Effect of Denial of Sleep Attack
30/49
NODE2
Recieve file from
Node1,Displays file
content in TextArea
SenseAttack
Defense
8/4/2019 Effect of Denial of Sleep Attack
31/49
Object diagram
Node1
Sense
Attack
Node2
Exit
Defense
Start
Sense Result
8/4/2019 Effect of Denial of Sleep Attack
32/49
State diagram
Nodes
Sends
Receives
Sensor
Sense the
communicationof nodes
Display thesense result
Attacker
Attack the Sensor
and degrate theperformance of
sensor
Stops the Attacker
and enhance the
performance of
sensor
Defensor
8/4/2019 Effect of Denial of Sleep Attack
33/49
Activity diagram
Sensor
Sense the
Communication
If there is noattack then
print the result
otherwisedefense and
print the result
Login
Send to
other
node
Node
Start
Browse the
File
Display the File
Content
8/4/2019 Effect of Denial of Sleep Attack
34/49
Sequence diagram
Node 1 Browse Node 2 Sense Result
Login and getfile
Send to Node 2
Sense
Node 1
Print the
senseresult
SenseNode 2
8/4/2019 Effect of Denial of Sleep Attack
35/49
Collaboration Diagram
Node 1
Node 2
Result
Sensor
1: Read file and send 2: Receiveand display
3:Sense
8/4/2019 Effect of Denial of Sleep Attack
36/49
Component Diagram
NODE1
NODE2
DEFENSE
SENSEOUTPUT
ATTACK
8/4/2019 Effect of Denial of Sleep Attack
37/49
Dataflow diagram
Yes
No
START
Node 1 Node 2
SENSE
Attac
k
Defense
Sense result
END
8/4/2019 Effect of Denial of Sleep Attack
38/49
Project Flow Diagram
Output
Attack
NODE21
Sense
NODE1
8/4/2019 Effect of Denial of Sleep Attack
39/49
System Architecture
ATTACK
NODE1
SENSOR
NODE2
DEFENSE
RESULT
8/4/2019 Effect of Denial of Sleep Attack
40/49
TESTING AND IMPLEMENTATION
6 .TESTING AND IMPLEMENTATION
6.1 TESTING:
Testing is a process of executing a program with a intent of finding
an error.
Testing presents an interesting anomaly for the software engineering.
The goal of the software testing is to convince system developer and
customers that the software is good enough for operational use. Testing is aprocess intended to build confidence in the software.
Testing is a set of activities that can be planned in advance and
conducted
systematically.
Testing is a set of activities that can be planned in advance and
conducted
systematically.
Software testing is often referred to as verification & validation.
TYPE OF TESTING:
The various types of testing are
White Box Testing
Black Box Testing
Alpha Testing
Beta Testing
Win Runner And Load Runner
8/4/2019 Effect of Denial of Sleep Attack
41/49
Load Runner
WHITE BOX TESTING:
It is also called as glass-box testing. It is a test case design
method that uses the control structure of the procedural design to
derive test cases.Using white box testing methods, the software engineer can
derive test cases that
1. Guarantee that all independent parts within a module have
been exercised at least once,
2. Exercise all logical decisions on their true and false sides.
BLACK BOX TESTING:
Its also called as behavioral testing . It focuses on the
functional requirements of the software.
It is complementary approach that is likely to uncover a .
different class of errors than white box errors.
A black box testing enables a software engineering to derive a
sets of input conditions that will fully exercise all functional
requirements for a program.
8/4/2019 Effect of Denial of Sleep Attack
42/49
ALPHA TESTING:
Alpha testing is the software prototype stage when the software is first
able to run. It will not have all the intended functionality, but it will
have core functions and will be able to accept inputs and
generate outputs. An alpha test usually takes place in the developer's
offices on a separate system.
BETA TESTING:
The beta test is a live application of the software in an
environment that cannot be controlled by the developer. The beta test is
conducted at one or more customer sites by the end user of the software.
WIN RUNNER & LOAD RUNNER:
We use Win Runner as a load testing tool operating at the GUI layer as it
allows us to record and playback user actions from a vast variety of user
applications as if a real user had manually executed those actions.
LOAD RUNNER TESTING:
With Load Runner , you can Obtain an accurate picture of end-to-end
system performance. Verify that new or upgraded applications meet
specified performance requirements.
8/4/2019 Effect of Denial of Sleep Attack
43/49
6.1.1 TESTING USED IN THIS PROJECT:
6.1.2 SYSTEM TESTING :
Testing of the debugging programs is one of the most
critical aspects of the computer programming triggers, without programs that
works, the system would never produce the output for which it was
designed. Testing is best performed when user development are asked to
assist in identifying all errors and bugs. The sample data are used for
testing . It is not quantity but quality of the data used the matters of testing.
Testing is aimed at ensuring that the system was accurately an efficiently
before live operation commands.
6.1.3 UNIT TESTING:
In this testing we test each module individually and
integrate with the overall system. Unit testing focuses verification efforts on
the smallest unit of software design in the module. This is also known as
module testing. The module of the system is tested separately . This testing
is carried out during programming stage itself . In this testing step each
module is found to working satisfactorily as regard to the expected output
from the module. There are some validation checks for fields also. It is very
easy to find error debut in the system
8/4/2019 Effect of Denial of Sleep Attack
44/49
Conclusion and Future Enhancements:
Most current research in WSN security focuses on data
confidentiality and integrity, largely ignoring availability.
Without the ability to secure the physical medium over which
communication takes place, sensor networks are susceptible
to an array of potential attacks focused on rapidly draining
sensor node batteries, thereby rendering the network
unusable. This paper makes three contributions to the area
of sensor network security. First, it classifies denial-of-sleep
attacks on WSN MAC protocols based on an attackers
knowledge of the MAC protocol and ability to penetrate the
network. Second, it explores potential attacks from each
attack classification, both modeling their impacts on sensor
networks running four
leading WSN MAC protocols and analyzing the efficiency of
implementations of these attacks on three of the protocols.
Finally, it proposes a framework for defending against denial-
of-sleep attacks and provides specific techniques that can be
8/4/2019 Effect of Denial of Sleep Attack
45/49
used against each denial-of-sleep vulnerability. Future work
will involve exploring the defensive framework provided here
and finding ways to apply it to currently available sensor
devices to further develop specific mechanisms to protect
them against these attacks.
Book References:
[1] M. Brownfield, Y. Gupta, and N. Davis, Wireless sensor
network denial
of sleep attack, in Proc. 6th Annu. IEEE SMC Inf. Assurance
Workshop,
Jun. 2005, pp. 356364.
[2] Tmote Sky Datasheet: Low Power Wireless Sensor
Module, Moteiv Corporation,Redwood City, CA. Accessed Feb., 2006. [Online]. Available:
http://www.moteiv.com/
[3] Mica2 Datasheet, CrossBow Corporation, San Jose, CA.
Accessed
May 2006. [Online]. Available: http://www.xbow.com/
[4] W. Ye, J. Heidemann, and D. Estrin, Medium access
control with coordinated
adaptive sleeping for wireless sensor networks, IEEE/ACM
Trans.
Netw., vol. 12, no. 3, pp. 493506, Jun. 2004.
8/4/2019 Effect of Denial of Sleep Attack
46/49
[5] T. VanDam and K. Langendoen, An adaptive energy-
efficient MAC protocol
for wireless sensor networks, in Proc. 1st ACM Int. Conf.
Embedded
Netw. Sensor Syst., Nov. 2003, pp. 171180.
[6] J. Polastre, J. Hill, and D. Culler, Versatile low power
media access for
wireless sensor networks, in Proc. 2nd ACM Int. Conf.
Embedded Netw.
Sensor Syst., Nov. 2004, pp. 95107.[7] M. Brownfield, K.Mehrjoo, A. Fayez, and N. Davis,
Wireless sensor network
energy-adaptive MAC protocol, in Proc. IEEE Consum.
Commun.
Netw. Conf., Jan. 2006, pp. 778782.
[8] W. Heinzelman, A. Chandrakasan, and H. Balakrishnan,
Energy-efficient
communication protocol for wireless microsensor networks,
in Proc.
Hawaii Int. Conf. Syst. Sci., Jan. 2000, pp. 80208029.
[9] G. Pei and C. Chien, Low power TDMA in large wireless
sensor
networks, in Proc. AFCEA/IEEE Military Commun. Conf., Oct.
2001,
pp. 347351.
8/4/2019 Effect of Denial of Sleep Attack
47/49
[10] S. Singh and C. S. Raghavendra, PAMAS: Power aware
multi-access
protocol with signaling for ad hoc networks, Comput.
Commun. Rev.,
vol. 28, no. 3, pp. 526, Jul. 1999.
[11] M. Brownfield, N. Davis, and A. Fayez, Wireless sensor
network radio
power management, in Proc. OPNETWORK, Aug. 2005.
[12] A. Perrig, R. Canetti, D. Song, and J. Tygar, Efficient and
secure sourceauthentication for multicast, in Proc. 8th Annu. Symp. Netw.
Distrib. Syst.
Security, Feb. 2001, pp. 3546.
[13] C. Karlof, N. Sastry, and D.Wagner, Tinysec: A link layer
security architecture
for wireless sensor networks, in Proc. 2nd Int. Conf.
Embedded
Netw. Sensor Syst., Nov. 2004, pp. 162175.
[14] LAN MAN Standards Committee of the IEEE Computer
Society,
Wireless LAN Medium Access Control (MAC) and Physical
Layer (PHY)
Specification for Low-rateWireless Personal Area Networks
(LR-WPANs),
IEEE Std. 802.15.4, 2003.
8/4/2019 Effect of Denial of Sleep Attack
48/49
[15] A. D. Wood and J. A. Stankovic, Denial of service in
sensor networks,
Computer, vol. 35, no. 10, pp. 5462, Oct. 2002.
[16] W. Xu, W. Trappe, Y. Zhang, and T. Wood, The
feasibility of launching
and detecting jamming attacks in wireless networks, in
Proc. 11th Annu.
Int. Conf. Mobile Comput. Netw., May 2005, pp. 4657.
[17] R. Negi and A. Perrig, Jamming analysis of MAC
protocols, CarnegieMellon Univ., Pittsburgh, PA, 2003. Tech. Rep.
[18] Y. W. Law, L. vanHoesel, J. Doumen, and P. Havinga,
Energy-efficient
link-layer jamming attacks against wireless sensor network
MAC protocols,
in Proc. 3rd ACM Workshop Security Ad Hoc Sensor Netw.,
Nov. 2005, pp. 7688.
[19] SourceForge.net. Accessed Jun. 2006. [Online].
Available: http://
sourceforge.net/
[20] TinyOS Community Forum, Accessed Aug., 2007.
[Online]. Available:
http://www.tinyos.net/
[21] AvroraThe AVR simulation and analysis framework.
Accessed
8/4/2019 Effect of Denial of Sleep Attack
49/49
Aug., 2006. [Online]. Available:
http://compilers.cs.ucla.edu/avrora/
[22] O. Younis and S. Fahmy, HEED: A hybrid, energy-
efficient, distributed
clustering approach for ad hoc sensor networks, IEEE Trans.
Mobile
Comput., vol. 3, no. 4, pp. 366379, Dec. 2004.
[23] H. Chan and A. Perrig, ACE: An emergent algorithm for
highly uniform
cluster formation, in Proc. 1st Eur. Workshop Sensor Netw.,Jan. 2004,
pp. 154171.
[24] D. Raymond, R. Marchany, and S. Midkiff, Scalable,
cluster-based antireplay
protection for wireless sensor networks, in Proc. 8th Annu.
IEEE
SMC Inf. Assurance Workshop, Jun. 2007, pp. 127134.
[25] D. Raymond and S. Midkiff, Clustered adaptive rate
limiting: Defeating
denial-of-sleep attacks in wireless sensor networks, in Proc.
AFCEA/IEEE Military Commun. Conf., Oct. 2007, pp. 17.
[26] OPNET Modeler, Bethesda, MD: OPNET Technol. Inc.
Accessed
Aug. 2006. [Online]. Available: http://www.opnet.com/