documentation

118
CHAPTER ONE INTRODUCTION 1.1 Introduction Mobile ad hoc network (MANET) is a group of two or more devices or nodes or terminals with a capability of wireless communications and networking which makes them able to communicate with each other without the aid of any centralized system. This is an autonomous system in which nodes are connected by wireless links and send data to each other. As we know that there is no any centralized system so routing is done by node itself. Due to its mobility and self routing capability nature, there are many weaknesses in its security. To solve the security issues we need an Intrusion detection system, which can be categorized into two models: Signature-based intrusion detection and anomaly-based intrusion detection. In Signature-based intrusion detection there are some previously detected patron or signature are stored into the data base of the IDS if any disturbance is found in the network by IDS it matches it with the previously saved signature and if it is matched than IDS found attack. But if there is an attack and its signature is not in IDS database then IDS cannot be able to detect attack. For this periodically updating of database is compulsory. To solve this problem anomaly based IDS is invented, in which firstly the IDS makes the normal profile 1

Upload: avi-nash

Post on 27-Dec-2015

81 views

Category:

Documents


0 download

DESCRIPTION

text doc

TRANSCRIPT

Page 1: Documentation

CHAPTER ONE

INTRODUCTION

1.1 Introduction

Mobile ad hoc network (MANET) is a group of two or more devices or nodes or

terminals with a capability of wireless communications and networking which makes

them able to communicate with each other without the aid of any centralized system. This

is an autonomous system in which nodes are connected by wireless links and send data to

each other. As we know that there is no any centralized system so routing is done by node

itself. Due to its mobility and self routing capability nature, there are many weaknesses in

its security. To solve the security issues we need an Intrusion detection system, which can

be categorized into two models: Signature-based intrusion detection and anomaly-based

intrusion detection. In Signature-based intrusion detection there are some previously

detected patron or signature are stored into the data base of the IDS if any disturbance is

found in the network by IDS it matches it with the previously saved signature and if it is

matched than IDS found attack. But if there is an attack and its signature is not in IDS

database then IDS cannot be able to detect attack. For this periodically updating of

database is compulsory. To solve this problem anomaly based IDS is invented, in which

firstly the IDS makes the normal profile of the network and put this normal profile as a

base profile compare it with the monitored network profile. The benefit of this IDS

technique is that it can be able to detect attack without prior knowledge of attack.

Intrusion attack is very easy in wireless network as compare to wired network. One of the

serious attacks to be considered in ad hoc network is DDoS attack. A DDoS attack is a

large scale, coordinated attack on the availability of services at a victim system or

network resource. The DDoS attack is launched by sending huge amount of packets to

the target node through the co-ordination of large amount of hosts which are distributed

all over in the network. At the victim side this large traffic consumes the bandwidth and

not allows any other important packet reached to the victim.

1

Page 2: Documentation

1.2 Motivation

Mobile ad-hoc networks devices or nodes or terminals with a capability of

wireless communications and networking which makes them able to communicate

with each other without the aid of any centralized system. This is an autonomous

system in which nodes are connected by wireless links and send data to each other As

we know that there is no any centralized system so routing is done by node itself.

Due to its mobility and self routing capability nature, there are many weaknesses in its

security. The benefits of this IDS technique are that it can be able to detect attack

without prior knowledge of attack. Intrusion attack is very easy in wireless network as

compare to wired network. One of the serious attacks to be considered in ad hoc

network is DDoS attack.

1.3 Aim of the Project

Intrusion attack is very easy in wireless network as compare to wired network. One

of the serious attacks to be considered in ad hoc network is DDoS attack. A DDoS attack

is a large scale, coordinated attack on the availability of services at a victim system or

network resource.

1.4 Technical Approach

There are many security attacks in MANET and DDoS (distributed denial of

service) is one of them. Our main aim is seeing the effect of DDoS attack, Black mail

attack, Location disclosure attack, Routing table poisoning attack, i.e. maximizing due to

attack on network.

1.5 Significance of the Project

The DDoS attack is launched by sending huge amount of packets to the target node

through the co-ordination of large amount of hosts which are distributed all over in the

network. At the victim side this large traffic consumes the bandwidth and not allows any

other important packet reached to the victim.

2

Page 3: Documentation

1.6 Organization of the Project

Chapter one introduces the background information about our project, aim of

project and approach to the problem in the existing system.

Chapter two deals with presentation of the problem, methodology used, and general

outline on which the solution to the problem is arrived. It mentions about the previous

works related to the project, describes a problem and suggests the solution to the

problem.

Chapter three describes the background work we carried to analyze the feasibility of

the system and design so as to provide solution to the problem. It explains our approach,

i.e., the reasoning behind how our system works. This describes the system architecture

Chapter four describes about the technologies we have used to implement this

project efficiently.

Chapter five describes our implementation i.e., what are all the key modules

involved in the project.

Chapter six describes the results obtained to the problems proposed in the system.

Chapter seven deals with testing. Various forms of testing is performed on the

project is discussed.

The final chapter is our conclusion section which describes how the system has

extended the state of art and about the future enhancements on the project.

3

Page 4: Documentation

CHAPTER TWO

LITERATURE SURVEY

2.1 Introduction

Literature survey is the most important step in software development process.

Before developing the tool it is necessary to determine the time factor, economy n

company strength. Once these things r satisfied, ten next steps are to determine which

operating system and language can be used for developing the tool. Once the

programmers start building the tool the programmers need lot of external support. This

support can be obtained from senior programmers, from book or from websites. Before

building the system the above consideration are taken into account for developing the

proposed system.

2.2 Methodology

The new DOS attack, called Ad Hoc Flooding Attack(AHFA), can result in denial of

service when used against on-demand routing protocols for mobile ad hoc networks, such

as AODV & DSR. Wei-Shen Lai et al [3] have proposed a scheme to monitor the traffic

pattern in order to alleviate distributed denial of service attacks. Shabana Mehfuz1 et al

[4] have proposed a new secure power-aware ant routing algorithm (SPA-ARA) for

mobile ad hoc networks that is inspired from ant colony optimization (ACO) algorithms

such as swarm intelligent technique. Giriraj Chauhan and Sukumar Nandi [5] proposed a

QoS aware on demand routing protocol that uses signal stability as the routing criteria

along with other QoS metrics. Xiapu Luo et al [6] have presented the important problem

of detecting pulsing denial of service (PDoS) attacks which send a sequence of attack

pulses to reduce TCP throughput. Xiaoxin Wu et al [7] proposed a DoS mitigation

technique that uses digital signatures to verify legitimate packets, and drop packets that

do not pass the verification Ping. S.A.Arunmozhi and Y.Venkataramani [8] proposed a

defense scheme for DDoS attack in which they use MAC layer information like

frequency of RTD/CTS packet, sensing a busy channel and number of RTS/DATA

retransmission. Jae-Hyun Jun, Hyunju Oh, and Sung-Ho Kim [9] proposed DDoS

flooding attack detection through a step-by-step investigation scheme in which they use 4

Page 5: Documentation

entropy-based detection mechanism against DDoS attacks in order to guarantee the

transmission of normal traffic and prevent the flood of abnormal traffic. Qi Chen,

Wenmin Lin, Wanchun Dou, Shui Yu [10] proposed a Confidence-Based Filtering

method (CBF) to detect DDoS attack in cloud computing environment. In which anomaly

detection is used and normal profile of network is formed at non attack period and CBF is

used to detect the attacker at attack period.

2.3 Solution to problem

One of the serious attacks to be considered in ad hoc network is DDoS attack. A

DDoS attack is a large scale, coordinated attack on the availability of services at a victim

system or network resource. The DDoS attack is launched by sending huge amount of

packets to the target node through the co-ordination of large amount of hosts which are

distributed all over in the network. At the victim side this large traffic consumes the

bandwidth and not allows any other important packet reached to the victim.

Distributed Denial Of Service(DDOS) Attack

Blackmail Attack

Location Disclosure Attack

Routing Table Poisoning Attack

From the above attacks, we will be solved the solution to problem.

5

Page 6: Documentation

CHAPTER THREE

DESIGN AND ANALYSIS

3.1 Introduction

PRELIMINARY INVESTIGATION:

The first and foremost strategy for development of a project starts from the

thought of designing a mail enabled platform for a small firm in which it is easy and

convenient of sending and receiving messages, there is a search engine ,address book and

also including some entertaining games. When it is approved by the organization and our

project guide the first activity, ie. Preliminary investigation begins. The activity has three

parts:

Request Clarification

Feasibility Study

Request Approval

REQUEST CLARIFICATION:

After the approval of the request to the organization and project guide, with an

investigation being considered, the project request must be examined to determine

precisely what the system requires.

Here our project is basically meant for users within the company whose systems

can be interconnected by the Local Area Network(LAN). In today’s busy schedule man

need everything should be provided in a readymade manner. So taking into consideration

of the vastly use of the net in day to day life, the corresponding development of the portal

came into existence.

FEASIBILITY ANALYSIS:

An important outcome of preliminary investigation is the determination that the

system request is feasible. This is possible only if it is feasible within limited resource

and time. The different feasibilities that have to be analyzed are

Operational Feasibility

Economic Feasibility6

Page 7: Documentation

Technical Feasibility

OPERATIONAL FEASIBILITY:

Operational Feasibility deals with the study of prospects of the system to be

developed. This system operationally eliminates all the tensions of the Admin and helps

him in effectively tracking the project progress. This kind of automation will surely

reduce the time and energy, which previously consumed in manual work. Based on the

study, the system is proved to be operationally feasible.

ECONOMIC FEASIBILITY:

Economic Feasibility or Cost-benefit is an assessment of the economic

justification for a computer based project. As hardware was installed from the beginning

& for lots of purposes thus the cost on project of hardware is low. Since the system is a

network based, any number of employees connected to the LAN within that organization

can use this tool from at anytime. The Virtual Private Network is to be developed using

the existing resources of the organization. So the project is economically feasible.

TECHNICAL FEASIBILITY:

According to Roger S. Pressman, Technical Feasibility is the assessment of the

technical resources of the organization. The organization needs IBM compatible

machines with a graphical web browser connected to the Internet and Intranet. The

system is developed for platform Independent environment. Java Server Pages,

JavaScript, HTML, SQL server and WebLogic Server are used to develop the system.

The technical feasibility has been carried out. The system is technically feasible for

development and can be developed with the existing facility.

REQUEST APPROVAL:

Not all request projects are desirable or feasible. Some organization receives so

many project requests from client users that only few of them are pursued. However,

those projects that are both feasible and desirable should be put into schedule. After a

project request is approved, it cost, priority, completion time and personnel requirement

is estimated and used to determine where to add it to any project list. Truly speaking, the

approval of those above factors, development works can be launched.

7

Page 8: Documentation

3.2 Feasibility Study

The feasibility of the project is analyzed in this phase and business proposal is put

forth with a very general plan for the project and some cost estimates. During system

analysis the feasibility study of the proposed system is to be carried out. This is to ensure

that the proposed system is not a burden to the company. For feasibility analysis, some

understanding of the major requirements for the system is essential.

Three key considerations involved in the feasibility analysis are:

ECONOMIC FEASIBILITY

TECHNICAL FEASIBILITY

SOCIAL FEASIBILITY

3.2.1 Economic Feasibility

This study is carried out to check the economic impact that the system will have on

the organization. The amount of fund that the company can pour into the research and

development of the system is limited. The expenditures must be justified. Thus the

developed system as well within the budget and this was achieved because most of the

technologies used are freely available. Only the customized products had to be purchased.

3.2.2 Technical Feasibility

This study is carried out to check the technical feasibility, that is, the technical

requirements of the system. Any system developed must not have a high demand on the

available technical resources. This will lead to high demands on the available technical

resources. This will lead to high demands being placed on the client. The developed

system must have a modest requirement, as only minimal or null changes are required for

implementing this system.

3.2.3 Social Feasibility

The aspect of study is to check the level of acceptance of the system by the user.

This includes the process of training the user to use the system efficiently. The user must

not feel threatened by the system, instead must accept it as a necessity. The level of

acceptance by the users solely depends on the methods that are employed to educate the

8

Page 9: Documentation

user about the system and to make him familiar with it. His level of confidence must be

raised so that he is also able to make some constructive criticism, which is welcomed, as

he is the final user of the system.

3.3 System Analysis

3.3.1 Existing System

To solve the security issues we need an Intrusion detection system, which can be

categorized into two models: Signature-based intrusion detection and anomaly-based

intrusion detection. In Signature-based intrusion detection there are some previously

detected patron or signature are stored into the data base of the IDS if any disturbance is

found in the network by IDS it matches it with the previously saved signature and if it is

matched than IDS found attack. But if there is an attack and its signature is not in IDS

database then IDS cannot be able to detect attack. For this periodically updating of

database is compulsory. To solve this problem anomaly based IDS is invented, in which

firstly the IDS makes the normal profile of the network and put this normal profile as a

base profile compare it with the monitored network profile. The benefit of this IDS

technique is that it can be able to detect attack without prior knowledge of attack.

Intrusion attack is very easy in wireless network as compare to wired network.

3.3.2 Limitation of Existing System

There may be a chance of channel DDos attacks due to Compromise of data

transfer in Multiple Nodes simultaneously.

The cluster head may misguide the destination due to the adversary is aware of

the hopping schedules of all nodes within the cluster.

There is no multicasting techniques are used to forward the data simultaneously to

the destinations.

The Routing paths are based on metrics. Sometime if the metrics are used as

energy there may be a chance of flooding of the data packets.

The Routing techniques used based on the metrics

9

Page 10: Documentation

3.3.3 Proposed System

One of the serious attacks to be considered in ad hoc network is DDoS attack. A

DDoS attack is a large scale, coordinated attack on the availability of services at a victim

system or network resource. The DDoS attack is launched by sending huge amount of

packets to the target node through the co-ordination of large amount of hosts which are

distributed all over in the network. At the victim side this large traffic consumes the

bandwidth and not allows any other important packet reached to the victim.

3.3.4 Advantages of the Proposed System

The benefits of this IDS technique are that it can be able to detect attack

without prior knowledge of attack.

Intrusion attack is very easy in wireless network as compare to wired network.

One of the serious attacks to be considered in ad hoc network is DDoS

attack.

3.4 Software Requirement Specification

Java Technology A Software Requirement Specification (SRS) is basically an

organization's understanding of a customer or potential client's system requirements and

dependencies at a particular point prior to any actual design or development work. The

information gathered during the analysis is translated into a document that defines a set of

requirements. It gives the brief description of the services that the system should provide

and also the constraints under which, the system should operate. Generally, the SRS is a

document that completely describes what the proposed software should do without

describing how the software will do it. It's a two-way insurance policy that assures that

both the client and the organization understand the other's requirements from that

perspective at a given point in time.

The SRS document itself states in precise and explicit language those functions

and capabilities a software system (i.e., a software application, an eCommerce Web site,

and so on) must provide, as well as states any required constraints by which the system

must abide. The SRS also functions as a blueprint for completing a project with as little

cost growth as possible. The SRS is often referred to as the "parent" document because

all subsequent project management documents, such as design specifications, statements

10

Page 11: Documentation

of work, software architecture specifications, testing and validation plans, and

documentation plans, are related to it.

Requirement is a condition or capability to which the system must conform.

Requirement Management is a systematic approach towards eliciting, organizing and

documenting the requirements of the system clearly along with the applicable attributes.

The elusive difficulties of Requirements are not always obvious and can come from any

number of sources.

Table: 3.1 Software Requirements

Functional Requirements

Functional Requirement defines a function of a software system and how the

system must behave when presented with specific inputs or conditions. These may

include calculations, data manipulation and processing and other specific functionality. In

this system following are the functional requirements:-

The Service providers have to apply the appropriate technique to divide the data

into ‘N’ Number of Packets.

The Data Has to Flow with either Router or Queue with the packets

11

Functional Hiding the packets from the attackers by applying the above

mentioned types, Splitting the data into ‘N’ number of packets

and assigning cryptographic keys to each and every packet.

Non- Functional No service is providing by the destination to the other users

External

interface

LAN , Routers

Performance Finding File sending Information such as

encoding,decoding,interleaving etc , File Sharing efficiency

fairness and avoiding jamming,

Attributes Data splitting and

sending,Router,Queue,Destination,owner,Remote Users,

SHCS,Puzzle Scheme, AONT

Page 12: Documentation

The service provider has to encode the data, interleave and send

The destination has to check the method apply same technique to receive the data.

The Receiver has to decoded interleave and receive the data. The results of the

data will also be generated by the destination.

The Attributes are Channel encode, Channel decode, interleave, De interleave,

queue, Router, SHCS, puzzles, AONT.

Non-functional Requirements

Non functional requirements are the requirements which are not directly

concerned with the specific function delivered by the system. They specify the criteria

that can be used to judge the operation of a system rather than specific behaviors. They

may relate to emergent system properties such as reliability, response time and store

occupancy. Non functional requirements arise through the user needs, because of budget

constraints, organizational policies, the need for interoperability with other software and

hardware systems or because of external factors such as:-

Product Requirements

Organizational Requirements

User Requirements

Product Requirements

Portabil i ty : Since the software is developed in java it can be executed on any platform

for which the JVM is available with minor or no modifications.

Correctness: It followed a well-defined set of procedures and rules to compute and

also rigorous testing is performed to confirm the correctness of the data. The defined rule

has to follow the corresponding technique to encode and decode the data. Once the

service provider uses some technique the same technique has to follow in destination also.

Ease of Use: The front end is designed in such a way that it provides an interface

which allows the user to interact in an easy manner. The Packeting hiding techniques are

easy to use. Because the interfaces designed in such a manner.

12

Page 13: Documentation

Modularity: The complete product is broken up into many modules and well-defined

interfaces are developed to explore the benefit of flexibility of the product.

Robustness: This software is being developed in such a way that the overall

performance is optimized and the user can expect the results within a limited time with

utmost relevancy and correctness. Java itself possesses the feature of robustness, which

implies the failure of the system is negligible.

Non functional requirements are also called the qualities of a system. These

qualities can be divided into execution quality & evolution quality. Execution qualities

are security & usability of the system which are observed during run time, whereas

evolution quality involves testability, maintainability, extensibility or scalability.

Organizational Requirements

Design Methods: Design is one of the important stages in the software engineering

process. This stage is the first step in moving from problem to the solution domain. In

other words, starting with what is needed design takes us to work how to satisfy the

needs.

Eclipse: It is a multi-language software development environment comprising an

integrated development environment (IDE) and an extensible plug-in system. It is written

mostly in Java and can be used to develop applications in Java and, by means of various

plug-ins, other programming languages including Ada, C, C++, COBOL, Perl, PHP,

Python, Ruby (including Ruby on Rails framework), Scala, Clojure, and Scheme. The

IDE is often called Eclipse ADT (Ada Development Toolkit) for Ada, Eclipse CDT for

C/C++, Eclipse JDT for Java, and Eclipse PDT for PHP.

The initial codebase originated from Visual Age. In its default form it is meant

for Java developers, consisting of the Java Development Tools (JDT). Users can extend

its abilities by installing plug-ins written for the Eclipse software framework, such as

development toolkits for other programming languages, and can write and contribute

their own plug-in modules.

Released under the terms of the Eclipse Public License, Eclipse is free and open

source software. It was one of the first IDEs to run under GNU Class path and it runs

without issues under Iced Tea.

13

Page 14: Documentation

Swing: The Java Foundation Classes (JFC) consists of five major parts:- AWT, Swing,

and Accessibility, Java 2D, and Drag and Drop. Java 2D has become an integral part of

AWT, Swing is built on top of AWT, and Accessibility support is built into Swing. The

five parts of JFC are certainly not mutually exclusive, and Swing is expected to merge

more deeply with AWT in future versions of Java. Swing is a set of classes that provides

more powerful and flexible components than are possible with the AWT. In addition to

the familiar components, Swing supplies tabbed panes, scroll panes, trees, and tables. It

provides a single API capable of supporting multiple look-and feels so that developers

and end-users are not locked into a single platform’s look-and-feel. The Swing library

makes heavy use of the MVC software design pattern, which conceptually decouples the

data being viewed from the user interface controls through which it is viewed. Swing

possesses several traits such as

1. Platform-independence

2. Extensibility

3. Component-oriented

4. Customizable

5. Configurable

6. Look and feel

Platform independence both in terms of its expression and its implementation,

extensibility which allows for the "plugging" of various custom implementations of

specified framework interfaces Users can provide their own custom implementation of

these components to override the default implementations. Component-orientation allows

responding to a well-known set of commands specific to the component. Specifically,

Swing components are Java Beans components, compliant with the Java Beans

Component Architecture specifications. Through customizable feature users will

programmatically customize a standard Swing component by assigning specific borders,

colors, backgrounds, opacities, etc, configurable that allows Swing to respond at runtime

to fundamental changes in its settings. Finally look and feel allows one to specialize the

look and feel of widgets, by modifying the default via runtime parameters deriving from

an existing one, by creating one from scratch, or, beginning with J2SE 5.0, by using the

Look and Feel which is configured with an XML property file.

14

Page 15: Documentation

USER REQUIREMENTS

There must be a user interface in both source side and destination side.

There must be an option for the user to select the file to transfer.

An option to view the content of the file.

The system should be user friendly, so that the client application is available at

the system tray and user has to just click to select any options.

3.4.1 Hardware Requirements

• PROCESSOR : PENTIUM IV

• PROCESSOR SPEED : 1.1GHz

• RAM : 256 MB OR MORE

• HARD DISK : 20 GB OR MORE

3.4.2 Software Requirements

• PLATFORM : JAVA,JDK1.6

• OPERATING SYSTEM : WINDOWS XP/2000/7

• DATABASE : MICROSOFT ACCESS

• DATABASE CONNECTIVITY : ODBC

15

Page 16: Documentation

3.5 DESIGN

3.5.1 Introduction

INPUT DESIGN

The input design is the link between the information system and the user. It comprises the

developing specification and procedures for data preparation and those steps are

necessary to put transaction data in to a usable form for processing can be achieved by

inspecting the computer to read data from a written or printed document or it can occur

by having people keying the data directly into the system. The design of input focuses on

controlling the amount of input required, controlling the errors, avoiding delay, avoiding

extra steps and keeping the process simple. The input is designed in such a way so that it

provides security and ease of use with retaining the privacy. Input Design considered the

following things:

What data should be given as input?

How the data should be arranged or coded?

The dialog to guide the operating personnel in providing input.

Methods for preparing input validations and steps to follow when error occur.

OBJECTIVES

1. Input Design is the process of converting a user-oriented description of the input into a

computer-based system. This design is important to avoid errors in the data input process

and show the correct direction to the management for getting correct information from

the computerized system.

2. It is achieved by creating user-friendly screens for the data entry to handle large

volume of data. The goal of designing input is to make data entry easier and to be free

from errors. The data entry screen is designed in such a way that all the data manipulates

can be performed. It also provides record viewing facilities.

3. When the data is entered it will check for its validity. Data can be entered with the help

of screens. Appropriate messages are provided as when needed so that the user will not

be in maize of instant. Thus the objective of input design is to create an input layout that

is easy to follow.

16

Page 17: Documentation

OUTPUT DESIGN

A quality output is one, which meets the requirements of the end user and presents the

information clearly. In any system results of processing are communicated to the users

and to other system through outputs. In output design it is determined how the

information is to be displaced for immediate need and also the hard copy output. It is the

most important and direct source information to the user. Efficient and intelligent output

design improves the system’s relationship to help user decision-making.

1.Designing computer output should proceed in an organized, well thought out manner;

the right output must be developed while ensuring that each output element is designed so

that people will find the system can use easily and effectively. When analysis design

computer output, they should Identify the specific output that is needed to meet the

requirements.

2. Select methods for presenting information.

3. Create document, report, or other formats that contain information produced by the

system.

The output form of an information system should accomplish one or more of the

following objectives.

Convey information about past activities, current status or projections of the

Future.

Signal important events, opportunities, problems, or warnings.

Trigger an action.

Confirm an action.

3.5.2 Unified Modeling Language

The design phase of project is implemented using Unified Modeling Language

(UML). UML was introduced in 1997, has rapidly been accepted throughout the software

industry as the standard graphical language for specifying, constructing, visualizing, and

documenting software-intensive systems. The UML provides anyone involved in the

production, deployment, and maintenance of software with a standard notation for

expressing a system's blueprint. The UML covers conceptual things, such as business

17

Page 18: Documentation

processes and system functions, as well as concrete things, such as programming-

language classes, database schemas, and reusable software components.

The UML is a graphical language for specifying visualizing constructing and

documenting the artifacts of software systems.

3.5.3 UML Diagrams of the Project

Figure 3.1 CLASS DIAGRAM

18

Page 19: Documentation

Figure 3.2 SEQUENCE DIAGRAM

19

Page 20: Documentation

Figure 3.3 DATA FLOW DIAGRAM

20

Page 21: Documentation

Figure 3.4 FLOW CHART DIAGRAM

21

Page 22: Documentation

3.6 TABLES

Table 3.2 : Default Routing Table

SNode IRouter Dest Attacker

S R1 A No

S R2 B R2

S R2 C No

S R2 D No

S R3 E No

S R3 F No The table 3.2 shows the database schema of Default Routing Table

Table 3.4 : Reciever

NodeName IPAddress Port Status fsize ipstatus

A 192.168.1.3 105 Unblock 5000default

B 192.168.1.3 105 Unblock 12000default

C 192.168.1.3 105 Block 5000default

D 192.168.1.3 105 Unblock 12000default

E 192.168.1.6 105 Unblock 12000Changed

F 192.168.1.3 105 Unblock 10000default The table 3.3 shows the database schema of Reciever

Table 3.4 Routing Table

SNode IRouter Dest Attacker

S R1 A No

S R1 B No

S R2 C No

S R2 D No

S R3 E No

S R3 F No The table 3.4 shows the database schema of Routing Table

22

Page 23: Documentation

CHAPTER FOUR

TECHNOLOGIES USED

4.1 Introduction

This project is developed by software such as JDK 1.6 running in Windows XP

operating system. The system uses Java technology such as RMI (Remote Method

Invocation). Java’s SWING API is used to build user interface. The RMI technology lets

nodes to communicate remotely. The simulation has three kinds of nodes namely

centralized server, server and client. The purpose of source is to send the data to the

destination. There sender will be consisting of the Channel Encoder, Inter leaver and the

Modulator. For simulation of communication in WSN, the server node is able to send

messages to client nodes based on the port number and the communication is routed

through one of the centralized servers. Here user is able to select a file by clicking browse

button. The Send button is to be initiated by user in order to send messages to client

based on port number. The message or file selected is broken into packets with length 48

bytes. It selects the required data and sends it to a particular client. The data is sent in the

form of packets with length 48 bytes. The server has to use specific IP address and port

number based on the centralized server through which it is to send the messages to client.

Software Environment has following

4.2 Java Technology

Java technology is both a programming language and a platform.

4.2.1 The Java Programming Language

The Java programming language is a high-level language that can be characterized

by all of the following buzzwords:

Simple

Architecture neutral

Object oriented

Portable

Distributed23

Page 24: Documentation

High performance

Interpreted

Multithreaded

Robust

Dynamic

Secure

With most programming languages, you either compile or interpret a program so

that you can run it on your computer. The Java programming language is unusual in that

a program is both compiled and interpreted. With the compiler, first you translate a

program into an intermediate language called Java byte codes —the platform-

independent codes interpreted by the interpreter on the Java platform. The interpreter

parses and runs each Java byte code instruction on the computer. Compilation happens

just once; interpretation occurs each time the program is executed. The following figure

illustrates how this works.

You can think of Java byte codes as the machine code instructions for the Java

Virtual Machine (Java VM). Every Java interpreter, whether it’s a development tool or a

Web browser that can run applets, is an implementation of the Java VM. Java byte codes

help make “write once, run anywhere” possible. You can compile your program into byte

codes on any platform that has a Java compiler. The byte codes can then be run on any

implementation of the Java VM. That means that as long as a computer has a Java VM,

the same program written in the Java programming language can run on Windows 2000,

a Solaris workstation, or on an iMac.

24

Page 25: Documentation

4.2.2 The Java Platform

A platform is the hardware or software environment in which a program runs.

We’ve already mentioned some of the most popular platforms like Windows 2000,

Linux, Solaris, and Mac-OS. Most platforms can be described as a combination of the

operating system and hardware. The Java platform differs from most other platforms in

that it’s a software-only platform that runs on top of other hardware-based platforms.

The Java platform has two components:

The Java Virtual Machine (Java VM)

The Java Application Programming Interface (Java API)

You’ve already been introduced to the Java VM. It’s the base for the Java platform

and is ported onto various hardware-based platforms.

The Java API is a large collection of ready-made software components that provide

many useful capabilities, such as graphical user interface (GUI) widgets. The Java API is

grouped into libraries of related classes and interfaces; these libraries are known as

packages. The next section, What Can Java Technology Do? Highlights what

functionality some of the packages in the Java API provide.

The following figure depicts a program that’s running on the Java platform. As the

figure shows, the Java API and the virtual machine insulate the program from the

hardware.

25

Page 26: Documentation

Native code is code that after you compile it, the compiled code runs on a

specific hardware platform. As a platform-independent environment, the Java

platform can be a bit slower than native code. However, smart compilers, well-

tuned interpreters, and just-in-time byte code compilers can bring performance

close to that of native code without threatening portability.

What Can Java Technology Do?

The most common types of programs written in the Java programming language are

applets and applications. If you’ve surfed the Web, you’re probably already familiar with

applets. An applet is a program that adheres to certain conventions that allow it to run

within a Java-enabled browser.

However, the Java programming language is not just for writing cute, entertaining applets

for the Web. The general-purpose, high-level Java programming language is also a

powerful software platform. Using the generous API, you can write many types of

programs.

An application is a standalone program that runs directly on the Java platform. A special

kind of application known as a server serves and supports clients on a network. Examples

of servers are Web servers, proxy servers, mail servers, and print servers. Another

specialized program is a servlet. A servlet can almost be thought of as an applet that runs

on the server side. Java Servlets are a popular choice for building interactive web

applications, replacing the use of CGI scripts. Servlets are similar to applets in that they

are runtime extensions of applications. Instead of working in browsers, though, servlets

run within Java Web servers, configuring or tailoring the server.

How does the API support all these kinds of programs? It does so with packages of

software components that provides a wide range of functionality. Every full

implementation of the Java platform gives you the following features:

• The essentials: Objects, strings, threads, numbers, input and output, data

structures, system properties, date and time, and so on. 26

Page 27: Documentation

• Applets: The set of conventions used by applets.

• Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data gram

Protocol) sockets, and IP (Internet Protocol) addresses.

• Internationalization: Help for writing programs that can be localized for users

worldwide. Programs can automatically adapt to specific locales and be displayed

in the appropriate language.

• Security: Both low level and high level, including electronic signatures, public

and private key management, access control, and certificates.

• Software components: Known as JavaBeansTM, can plug into existing component

architectures.

• Object serialization: Allows lightweight persistence and communication via

Remote Method Invocation (RMI).

• Java Database Connectivity (JDBCTM): Provides uniform access to a wide

range of relational databases.

The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,

collaboration, telephony, speech, animation, and more. The following figure

depicts what is included in the Java 2 SDK.

27

Page 28: Documentation

How Will Java Technology Change My Life?

We can’t promise you fame, fortune, or even a job if you learn the Java programming

language. Still, it is likely to make your programs better and requires less effort than

other languages. We believe that Java technology will help you do the following:

• Get started quickly: Although the Java programming language is a powerful

object-oriented language, it’s easy to learn, especially for programmers already

familiar with C or C++.

• Write less code: Comparisons of program metrics (class counts, method counts,

and so on) suggest that a program written in the Java programming language can

be four times smaller than the same program in C++.

• Write better code: The Java programming language encourages good coding

practices, and its garbage collection helps you avoid memory leaks. Its object

orientation, its JavaBeans component architecture, and its wide-ranging, easily

extendible API let you reuse other people’s tested code and introduce fewer bugs.

• Develop programs more quickly: Your development time may be as much as

twice as fast versus writing the same program in C++. Why? You write fewer

lines of code and it is a simpler programming language than C++.

• Avoid platform dependencies with 100% Pure Java: You can keep your

program portable by avoiding the use of libraries written in other languages. The

100% Pure JavaTM Product Certification Program has a repository of historical

process manuals, white papers, brochures, and similar materials online.

• Write once, run anywhere: Because 100% Pure Java programs are compiled into

machine-independent byte codes, they run consistently on any Java platform.

• Distribute software more easily: You can upgrade applets easily from a central

server. Applets take advantage of the feature of allowing new classes to be loaded

“on the fly,” without recompiling the entire program.

28

Page 29: Documentation

4.3 ODBC

Microsoft Open Database Connectivity (ODBC) is a standard programming

interface for application developers and database systems providers. Before ODBC

became a de facto standard for Windows programs to interface with database systems,

programmers had to use proprietary languages for each database they wanted to connect

to. Now, ODBC has made the choice of the database system almost irrelevant from a

coding perspective, which is as it should be. Application developers have much more

important things to worry about than the syntax that is needed to port their program from

one database to another when business needs suddenly change.

Through the ODBC Administrator in Control Panel, you can specify the particular

database that is associated with a data source that an ODBC application program is

written to use. Think of an ODBC data source as a door with a name on it. Each door will

lead you to a particular database. For example, the data source named Sales Figures

might be a SQL Server database, whereas the Accounts Payable data source could refer

to an Access database. The physical database referred to by a data source can reside

anywhere on the LAN.

The ODBC system files are not installed on your system by Windows 95. Rather,

they are installed when you setup a separate database application, such as SQL Server

Client or Visual Basic 4.0. When the ODBC icon is installed in Control Panel, it uses a

file called ODBCINST.DLL. It is also possible to administer your ODBC data sources

through a stand-alone program called ODBCADM.EXE. There is a 16-bit and a 32-bit

version of this program and each maintains a separate list of ODBC data sources.

From a programming perspective, the beauty of ODBC is that the application can

be written to use the same set of function calls to interface with any data source,

regardless of the database vendor. The source code of the application doesn’t change

whether it talks to Oracle or SQL Server. We only mention these two as an example.

There are ODBC drivers available for several dozen popular database systems. Even

Excel spreadsheets and plain text files can be turned into data sources. The operating

system uses the Registry information written by ODBC Administrator to determine

which low-level ODBC drivers are needed to talk to the data source (such as the interface

to Oracle or SQL Server). The loading of the ODBC drivers is transparent to the ODBC

29

Page 30: Documentation

application program. In a client/server environment, the ODBC API even handles many

of the network issues for the application programmer.

The advantages of this scheme are so numerous that you are probably thinking

there must be some catch. The only disadvantage of ODBC is that it isn’t as efficient as

talking directly to the native database interface. ODBC has had many detractors make the

charge that it is too slow. Microsoft has always claimed that the critical factor in

performance is the quality of the driver software that is used. In our humble opinion, this

is true. The availability of good ODBC drivers has improved a great deal recently. And

anyway, the criticism about performance is somewhat analogous to those who said that

compilers would never match the speed of pure assembly language. Maybe not, but the

compiler (or ODBC) gives you the opportunity to write cleaner programs, which means

you finish sooner. Meanwhile, computers get faster every year.

4.4 JDBC

In an effort to set an independent database standard API for Java; Sun Microsystems

developed Java Database Connectivity, or JDBC. JDBC offers a generic SQL database

access mechanism that provides a consistent interface to a variety of RDBMSs. This

consistent interface is achieved through the use of “plug-in” database connectivity

modules, or drivers. If a database vendor wishes to have JDBC support, he or she must

provide the driver for each platform that the database and Java run on.

To gain a wider acceptance of JDBC, Sun based JDBC’s framework on ODBC.

As you discovered earlier in this chapter, ODBC has widespread support on a variety of

platforms. Basing JDBC on ODBC will allow vendors to bring JDBC drivers to market

much faster than developing a completely new connectivity solution.

JDBC was announced in March of 1996. It was released for a 90 day public

review that ended June 8, 1996. Because of user input, the final JDBC v1.0 specification

was released soon after.

The remainder of this section will cover enough information about JDBC for you to know

what it is about and how to use it effectively. This is by no means a complete overview of

JDBC. That would fill an entire book.

30

Page 31: Documentation

JDBC Goals

Few software packages are designed without goals in mind. JDBC is one that,

because of its many goals, drove the development of the API. These goals, in conjunction

with early reviewer feedback, have finalized the JDBC class library into a solid

framework for building database applications in Java.

The goals that were set for JDBC are important. They will give you some insight as to

why certain classes and functionalities behave the way they do. The eight design goals

for JDBC are as follows:

1. SQL Level API

The designers felt that their main goal was to define a SQL interface for Java.

Although not the lowest database interface level possible, it is at a low enough level

for higher-level tools and APIs to be created. Conversely, it is at a high enough level

for application programmers to use it confidently. Attaining this goal allows for

future tool vendors to “generate” JDBC code and to hide many of JDBC’s

complexities from the end user.

2. SQL Conformance

SQL syntax varies as you move from database vendor to database vendor. In an

effort to support a wide variety of vendors, JDBC will allow any query statement to

be passed through it to the underlying database driver. This allows the connectivity

module to handle non-standard functionality in a manner that is suitable for its users.

3. JDBC must be implemental on top of common database interfaces

The JDBC SQL API must “sit” on top of other common SQL level APIs. This

goal allows JDBC to use existing ODBC level drivers by the use of a software

interface. This interface would translate JDBC calls to ODBC and vice versa.

4. Provide a Java interface that is consistent with the rest of the Java system

Because of Java’s acceptance in the user community thus far, the designers feel

that they should not stray from the current design of the core Java system.

5. Keep it simple

This goal probably appears in all software design goal listings. JDBC is no

exception. Sun felt that the design of JDBC should be very simple, allowing for only

31

Page 32: Documentation

one method of completing a task per mechanism. Allowing duplicate functionality

only serves to confuse the users of the API.

6. Use strong, static typing wherever possible

Strong typing allows for more error checking to be done at compile time; also,

less error appear at runtime.

7. Keep the common cases simple

Because more often than not, the usual SQL calls used by the programmer are

simple SELECT’s, INSERT’s, DELETE’s and UPDATE’s, these queries should be

simple to perform with JDBC. However, more complex SQL statements should also

be possible.

Finally we decided to proceed the implementation using Java Networking.

And for dynamically updating the cache table we go for MS Access database.

Java has two things: a programming language and a platform.

Java is a high-level programming language that is all of the following

Simple Architecture-neutral

Object-oriented Portable

Distributed High-performance

Interpreted multithreaded

Robust Dynamic

Secure

Java is also unusual in that each Java program is both compiled and

interpreted. With a compile you translate a Java program into an intermediate

language called Java byte codes the platform-independent code instruction is

passed and run on the computer.

Compilation happens just once; interpretation occurs each time the

program is executed. The figure illustrates how this works.

32

Page 33: Documentation

Java Program

Compilers

Interpreter

My Program

You can think of Java byte codes as the machine code instructions for the

Java Virtual Machine (Java VM). Every Java interpreter, whether it’s a Java

development tool or a Web browser that can run Java applets, is an

implementation of the Java VM. The Java VM can also be implemented in

hardware.

Java byte codes help make “write once, run anywhere” possible. You can

compile your Java program into byte codes on my platform that has a Java

compiler. The byte codes can then be run any implementation of the Java VM.

For example, the same Java program can run Windows NT, Solaris, and

Macintosh.

33

Page 34: Documentation

4.5 Networking

TCP/IP stack

The TCP/IP stack is shorter than the OSI one:

TCP is a connection-oriented protocol; UDP (User Datagram Protocol) is a

connectionless protocol.

IP datagram’s

The IP layer provides a connectionless and unreliable delivery system. It considers

each datagram independently of the others. Any association between datagram must be

supplied by the higher layers. The IP layer supplies a checksum that includes its own

header. The header includes the source and destination addresses. The IP layer handles

routing through an Internet. It is also responsible for breaking up large datagram into

smaller ones for transmission and reassembling them at the other end.

UDP

UDP is also connectionless and unreliable. What it adds to IP is a checksum for the

contents of the datagram and port numbers. These are used to give a client/server model -

see later.

34

Page 35: Documentation

TCP

TCP supplies logic to give a reliable connection - oriented protocol above IP. It

provides a virtual circuit that two processes can use to communicate.

Internet addresses

In order to use a service, you must be able to find it. The Internet uses an address

scheme for machines so that they can be located. The address is a 32 bit integer which

gives the IP address. This encodes a network ID and more addressing. The network ID

falls into various classes according to the size of the network address.

Network address

Class A uses 8 bits for the network address with 24 bits left over for other addressing.

Class B uses 16 bit network addressing. Class C uses 24 bit network addressing and class

D uses all 32.

Subnet address

Internally, the UNIX network is divided into sub networks. Building 11 is currently on

one sub network and uses 10-bit addressing, allowing 1024 different hosts.

Host address

8 bits are finally used for host addresses within our subnet. This places a limit of 256

machines that can be on the subnet.

Total address

The 32 bit address is usually written as 4 integers separated by dots.

Port addresses

A service exists on a host, and is identified by its port. This is a 16 bit number. To

send a message to a server, you send it to the port for that service of the host that it is

running on. This is not location transparency! Certain of these ports are "well known".

35

Page 36: Documentation

Sockets

A socket is a data structure maintained by the system to handle network connections.

A socket is created using the call socket. It returns an integer that is like a file descriptor.

In fact, under Windows, this handle can be used with Read File and Write File functions.

#include <sys/types.h>

#include <sys/socket.h>

int socket(int family, int type, int protocol);

Here "family" will be AF_INET for IP communications, protocol will be zero, and type

will depend on whether TCP or UDP is used. Two processes wishing to communicate

over a network create a socket each. These are similar to two ends of a pipe - but the

actual pipe does not yet exist.

JFree Chart

JFreeChart is a free 100% Java chart library that makes it easy for developers to

display professional quality charts in their applications. JFreeChart's extensive feature set

includes:

A consistent and well-documented API, supporting a wide range of chart types;

A flexible design that is easy to extend, and targets both server-side and client-side

applications;

Support for many output types, including Swing components, image files (including PNG

and JPEG), and vector graphics file formats (including PDF, EPS and SVG);

JFreeChart is "open source" or, more specifically, free software. It is distributed

under the terms of the GNU Lesser General Public Licence (LGPL), which permits use in

proprietary applications.

1. Map Visualizations

Charts showing values that relate to geographical areas. Some examples include: (a)

population density in each state of the United States, (b) income per capita for each

country in Europe, (c) life expectancy in each country of the world. The tasks in this

project include:

Sourcing freely redistributable vector outlines for the countries of the world,

states/provinces in particular countries (USA in particular, but also other areas);

36

Page 37: Documentation

Creating an appropriate dataset interface (plus default implementation), a

rendered, and integrating this with the existing XYPlot class in JFreeChart;

Testing, documenting, testing some more, documenting some more.

2. Time Series Chart Interactivity

Implement a new (to JFreeChart) feature for interactive time series charts --- to

display a separate control that shows a small version of ALL the time series data, with a

sliding "view" rectangle that allows you to select the subset of the time series data to

display in the main chart.

3. Dashboards

There is currently a lot of interest in dashboard displays. Create a flexible dashboard

mechanism that supports a subset of JFreeChart chart types ( dials, pies, thermometers,

bars, and lines/time series) that can be delivered easily via both Java Web Start and an

applet

4. Property Editors

The property editor mechanism in JFreeChart only handles a small subset of the

properties that can be set for charts. Extend (or reimplement) this mechanism to provide

greater end-user control over the appearance of the charts.

37

Page 38: Documentation

CHAPTER FIVE

ATTACKS IN MANET

5.1 Introduction

In this chapter the attacks in wireless mobile ad-hoc network is being explained in

brief and the modules description.

5.2 Implementation

Implementation is the stage of the project when the theoretical design is turned out

into a working system. Thus it can be considered to be the most critical stage in achieving

a successful new system and in giving the user, confidence that the new system will work

and be effective.

The implementation stage involves careful planning, investigation of the existing

system and it’s constraints on implementation, designing of methods to achieve

changeover and evaluation of changeover methods.

5.3 Modules

Distributed Denial Of Service(DDOS) Attack

Blackmail Attack

Location Disclosure Attack

Routing Table Poisoning Attack

5.3.1 Distributed Denial OF Service (DDOS) Attack

A DDoS attack is a form of DoS attack but difference is that DoS attack is performed

by only one node and DDoS is performed by the combination of many nodes. All nodes

simultaneously attack on the victim node or network by sending them huge packets, this

will totally consume the victim bandwidth and this will not allow victim to receive the

important data from the network.

5.3.2 Blackmail Attack

This attack is relevant against routing protocols that use mechanisms for the

identification of malicious nodes and propagate messages that try to blacklist the offender

38

Page 39: Documentation

An attacker may fabricate such reporting messages and try to isolate legitimate nodes

from the network. The security property of non - repudiation can prove to be useful in

such cases since it binds a node to the messages it generated .

5.3.3 Location Disclosure Attack

Location disclosure is an attack that targets the privacy requirements of an ad - hoc

network. Through the use of traffic analysis techniques or with simpler probing and

monitoring approaches, an attacker is able to discover the location of a node, or even the

structure of the entire network.

5.3.4 Routing Table Poisoning

Routing protocols maintain tables that hold information regarding routes of the

network. In poisoning attacks the malicious nodes generate and send fabricated signaling

traffic, or modify legitimate messages from other nodes, in order to create false entries in

the tables of the participating nodes . For example, an attacker can send routing updates

that do not correspond to actual changes in the topology of the ad hoc network. Routing

table poisoning attacks can result in the selection of non optimal routes, the creation of

routing loops, bottlenecks, and even portioning certain parts of the network

5.4 Algorithm

Create node =ids;

Set routing = AODV;

If ((node in radio range) && (next hop! =Null)

{

Capture load (all_node)

Create normal_profile (rreq, rrep, tsend, trecv, tdrop)

{pkt_type; // AODV, TCP, CBR, UDP

Time;

Tsend, trecv, tdrop, rrep, rreq

}

Threshold_parameter ()

If ((load<=max_limit) && (new_profile<=max_threshold) &&

(new_profile>=min_threshold))

39

Page 40: Documentation

{

No any attack;

}

Else {

Attack in network;

Find_attack_info ();

}

Else {

“Node out of range or destination unreachable”

}

Find_attack_info ()

{

Compare normal_profile into each trace value

If (normal_profile! = new trace_value)

{

Check pkt_type;

Count unknown pkt_type;

Arrival time;

Sender_node;

Receiver_node;

Block_Sender_node(); //sender node as attacker

}

In our algorithm firstly we create an IDS node in which we set AODV as a routing

protocol. Then after the creation, our IDS node check the network configuration and

capture lode by finding that if any node is in its radio range and also the next hop is not

null, then capture all the information of nodes. Else nodes are out of range or destination

unreachable. With the help of this information IDS node creates a normal profile which

contains information like type of packet, in our case (protocol is AODV, pkt type TCP,

UDP, CBR), time of packet send and receive and threshold. After creating normal profile

and threshold checking is done in the network i.e. if network load is smaller than or equal

40

Page 41: Documentation

to maximum limit and new profile is smaller than or equal to maximum threshold and

new profile is greater than or equal to minimum threshold then there is no any kind of

attack present. Else there is an attack in the network and find the attack. For doing it

compare normal profile with each new trace value i.e. check packet type, count unknown

packet type, arrival time of packet, sender of packet, receiver of packet. And after

detection of any anomaly in that parameters then block that packet sender node (attacker

node).

41

Page 42: Documentation

CHAPTER SIX

EXPERIMENTAL RESULTS

6.1 Introduction:

This Chapter describes the find attacks and resolve that attacks. Four types of attacks

shown as following.

1.Distributed Denial of Service(DDOS) attack,

2.Black mail attack,

3.Location Disclosure attack,

4.Routing Table Poisoning attack.

6.2 Results

Activation of Router, IDS Master in Ad-hoc Network, DestinationA, DestinationB,

DestinationC, DestinationD, DestinationE, DestinationF, Source.

i)Router

Fig 6.1 Router

42

Page 43: Documentation

ii)IDS Master in Ad-hoc Network

Fig 6.2 IDS Master in Ad-hoc Network

43

Page 44: Documentation

iii)Destination A

Fig 6.3 Connection of Destination A

iv)Destination A is connected to Router

Fig 6.4 Destination A is connected to Router

44

Page 45: Documentation

v)Destination B

Fig 6.5 Connection of Destination B

vi)Destination B is connected to Router

Fig 6.6 Destination B is connected to Router

45

Page 46: Documentation

vii)Destination C

Fig 6.7 Connection of Destination C

viii) Destination C is connected to Router

Fig 6.8 Destination C is connected to Router46

Page 47: Documentation

ix) Destination D

Fig 6.9 Connection of Destination D

x) Destination D is connected to Router

Fig 6.10 Destination D is connected to Router

47

Page 48: Documentation

xi) Destination E

Fig 6.11 Connection of Destination E

xii) Destination E is connected to Router

Fig 6.12 Destination E is connected to Router

48

Page 49: Documentation

xiii) Destination F

Fig 6.13 Connection of Destination F

xiv)Destination F is connected to Router

Fig 6.14 Destination F is connected to Router

49

Page 50: Documentation

xv)Source

Fig 6.15 Source

The figures from 6.1 to 6.15 shows all the Activation of Router, IDS Master in Ad-hoc

Network, DestinationA, DestinationB, DestinationC, DestinationD, DestinationE,

DestinationF, Source.

50

Page 51: Documentation

DDOS Attack

i)Browse File

Fig 6.16 Browse File

ii)Select Router

Fig 6.17 Select Router1

51

Page 52: Documentation

iii)Select Destination

Fig 6.18 Select Destination A

iv)Find DDOS Attack

Fig 6.19 Find DDOS Attack

52

Page 53: Documentation

v)Find DDOS Attack at Destination A

Fig 6.20 Find DDOS Attack at Destination A

vi)Status of nodes

Fig 6.21 Status of node A and node B53

Page 54: Documentation

vii)Select Destination B

Fig 6.22 Select Destination B

viii)Data is transfer from Source to Destination

Fig 6.23 Data is transfer from Source to Destination B 54

Page 55: Documentation

ix) Destination B received Data but not Destination A because of DDOS Attack

found at destination A

Fig 6.24 Destination Received Data

The figures from 6.16 to 6.24 shows all the DDOS Attack.

55

Page 56: Documentation

Blackmail Attack

i)Browse File

Fig 6.25 Browse File

ii)Select Router

Fig 6.26 Select Router2

56

Page 57: Documentation

iii)Select Destination

Fig 6.27 Select Destination C

iv)Find Blackmail Attack

Fig 6.28 Find Blackmail Attack57

Page 58: Documentation

v)Find Blackmail Attack at Destination C

Fig 6.29 Find Blackmail Attack at Destination C

vi)Status of nodes

Fig 6.30 Status of node C and node D

58

Page 59: Documentation

vii)Select Destination D

Fig 6.31 Select Destination D

viii)Data is transfer from Source to Destination

Fig 6.32 Data is transfer from Source to Destination D

59

Page 60: Documentation

ix)Destination D received Data but not Destination C because of Blackmail Attack

found at destination C

Fig 6.33 Destination Received Data

The figures from 6.25 to 6.33 shows all the Blackmail Attack.

60

Page 61: Documentation

Location Disclosure Attack

i)Browse File

Fig 6.34 Browse File

ii)Select Router

Fig 6.35 Select Router3

61

Page 62: Documentation

iii)Select Destination

Fig 6.36 Select Destination E

iv)Find Location Disclosure Attack

Fig 6.37 Find Location Disclosure Attack62

Page 63: Documentation

v)Find Location Disclosure Attack at Destination E

Fig 6.38 Find Blackmail Attack at Destination E

vi)Status of nodes

Fig 6.39 Status of node E and node F

63

Page 64: Documentation

vii)Select Destination F

Fig 6.40 Select Destination F

viii)Data is transfer from Source to Destination

Fig 6.41 Data is transfer from Source to Destination 64

Page 65: Documentation

ix) Destination F received Data but not Destination E because of Location Disclosure

Attack found at destination E

Fig 6.42 Destination Received Data

The figures from 6.34 to 6.42 shows all the Location Disclosure Attack.

65

Page 66: Documentation

Routing Table Poisoning Attack

i)Default Routing Path

Fig 6.43 Default Routing Path

ii)Change Routing Path

Fig 6.44 Change Routing Path Source S to Destination B

66

Page 67: Documentation

iii)Browse File

Fig 6.45 Browse File

iv)Select Router

Fig 6.46 Select Router167

Page 68: Documentation

v)Select Destination B

Fig 6.47 Select Destination B

vi)Routing Table Poisoning Attack

Fig 6.48 Routing Table Poisoning Attack at Router 2

The figures from 6.43 to 6.48 shows all the Routing Table Poisoning Attack.

68

Page 69: Documentation

CHAPTER SEVEN

TESTING

7.1 Introduction

The purpose of testing is to discover errors. Testing is the process of trying to

discover every conceivable fault or weakness in a work product. It provides a way to

check the functionality of components, sub-assemblies, assemblies and/or a finished

product It is the process of exercising software with the intent of ensuring that the

Software system meets its requirements and user expectations and does not fail in an

unacceptable manner. There are various types of test. Each test type addresses a specific

testing requirement.

7.2Types of Tests

7.2.1Unit testing

Unit testing involves the design of test cases that validate that the internal program

logic is functioning properly, and that program input produces valid outputs. All decision

branches and internal code flow should be validated. It is the testing of individual

software units of the application .it is done after the completion of an individual unit

before integration. This is a structural testing, that relies on knowledge of its construction

and is invasive. Unit tests perform basic tests at component level and test a specific

business process, application, and/or system configuration. Unit tests ensure that each

unique path of a business process performs accurately to the documented specifications

and contains clearly defined inputs and expected results.

Unit testing is usually conducted as part of a combined code and unit test phase of

the software lifecycle, although it is not uncommon for coding and unit testing to be

conducted as two distinct phases.

Test strategy and approach

Field testing will be performed manually and functional tests will be written in

detail.

69

Page 70: Documentation

Test objectives

All field entries must work properly.

Pages must be activated from the identified link.

The entry screen, messages and responses must not be delayed.

Features to be tested

Verify that the entries are of the correct format

No duplicate entries should be allowed

All links should take the user to the correct page.

7.2.2Functional test

Functional tests provide systematic demonstrations that functions tested are

available as specified by the business and technical requirements, system documentation,

and user manuals.

Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be exercised.

Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key

functions, or special test cases. In addition, systematic coverage pertaining to identify

Business process flows; data fields, predefined processes, and successive processes must

be considered for testing. Before functional testing is complete, additional tests are

identified and the effective value of current tests is determined

7.2.3Integration Testing

Integration tests are designed to test integrated software components to determine if

they actually run as one program. Testing is event driven and is more concerned with

the basic outcome of screens or fields. Integration tests demonstrate that although the

components were individually satisfaction, as shown by successfully unit testing, the

combination of components is correct and consistent. Integration testing is specifically

aimed at exposing the problems that arise from the combination of components.

70

Page 71: Documentation

Software integration testing is the incremental integration testing of two or more

integrated software components on a single platform to produce failures caused by

interface defects.

The task of the integration test is to check that components or software applications,

e.g. components in a software system or – one step up – software applications at the

company level – interact without error.

Test Results: All the test cases mentioned above passed successfully. No defects

encountered.

7.2.4 Acceptance Testing

User Acceptance Testing is a critical phase of any project and requires significant

participation by the end user. It is also ensures that the system meets the functional

requirements.

Test Results: All the test cases mentioned above passed successfully. No defects

encountered.

7.3 Test Cases

Test Cases checks are performed on the following fields.

TEXT FIELD:

The text field can contain only the number of characters lesser than or equal to its

size. The text fields are alphanumeric in some tables and alphabetic in other tables.

Incorrect entry always flashes and error message.

NUMERIC FIELD:

The numeric field can contain only numbers from 0 to 9. An entry of any

character flashes an error messages. The individual modules are checked for accuracy

and what it has to perform. Each module is subjected to test run along with sample data.

The individually tested modules are integrated into a single system. Testing involves

executing the real data information is used in the program the existence of any program

defect is inferred from the output. The testing should be planned so that all the

requirements are individually tested.

71

Page 72: Documentation

PREPARATION OF TEST DATA:

Taking various kinds of test data does the above testing. Preparation of test data

plays a vital role in the system testing. After preparing the test data the system under

study is tested using that test data. While testing the system by using test data errors are

again uncovered and corrected by using above testing steps and corrections are also noted

for future use.

USING LIVE TEST DATA:

Live test data are those that are actually extracted from organization files. After a

system is partially constructed, programmers or analysts often ask users to key in a set of

data from their normal activities. Then, the systems person uses this data as a way to

partially test the system. In other instances, programmers or analysts extract a set of live

data from the files and have them entered themselves.

It is difficult to obtain live data in sufficient amounts to conduct extensive testing.

And, although it is realistic data that will show how the system will perform for the

typical processing requirement, assuming that the live data entered are in fact typical,

such data generally will not test all combinations or formats that can enter the system.

This bias toward typical values then does not provide a true systems test and in fact

ignores the cases most likely to cause system failure.

USING ARTIFICIAL TEST DATA:

Artificial test data are created solely for test purposes, since they can be generated

to test all combinations of formats and values. In other words, the artificial data, which

can quickly be prepared by a data generating utility program in the information systems

department, make possible the testing of all login and control paths through the program.

The most effective test programs use artificial test data generated by persons other

than those who wrote the programs. Often, an independent team of testers formulates a

testing plan, using the systems specifications.

The package “Virtual Private Network” has satisfied all the requirements

specified as per software requirement specification and was accepted.

72

Page 73: Documentation

CHAPTER EIGHT

CONCLUSION

8.1 Summary

The proposed mechanism eliminates the need for a centralized trusted authority

which is not practical in ADHOC network due to their self organizing nature. The results

demonstrate that the presence of a DDOS increases the packet loss in the network

considerably. The proposed mechanism protects the network through a self organized,

fully distributed and localized procedure. The additional certificate publishing happens

only for a short duration of time during which almost all nodes in the network get

certified by their neighbors.

After a period of time each node has a directory of certificates and hence the routing

load incurred in this process is reasonable with a good network performance in terms of

security as compare with attack case. We believe that this is an acceptable performance,

given that the attack prevented has a much larger impact on the performance of the

protocol. The proposed mechanism can also be applied for securing the network from

other routing attacks by changing the security parameters in accordance with the nature

of the attacks.

8.2 Future Enhancements

There are many security attacks in MANET and DDoS (Distributed denial of

service) is one of them. Our main aim is seeing the effect of DDoS in routing load, packet

drop rate, end to end delay, i.e. maximizing due to attack on network. And with these

parameters and many more also we build secure IDS to detect this kind of attack and

block it.

73

Page 74: Documentation

References

[1] F. Anjum, D. Subhadrabandhu and S. Sarkar. Signature based intrusion detection for

wireless Ad-hoc networks," Proceedings of Vehicular Technology Conference, vol. 3, pp.

2152-2156, USA, Oct. 2003.

[2] D. E. Denning, An Intrusion Detection Model," IEEE Transactions in Software

Engineering, vol. 13, no. 2, pp. 222- 232, USA, 1987.

[3] Wei-Shen Lai, Chu-Hsing Lin , Jung-Chun Liu , Hsun-Chi Huang, Tsung-Che Yang:

Using Adaptive Bandwidth Allocation Approach to Defend DDoS Attacks, International

Journal of Software Engineering and Its Applications, Vol. 2, No. 4, pp. 61-72 (2008)

[4] ShabanaMehfuz, Doja,M.N.: Swarm Intelligent Power-Aware Detection of

Unauthorized and Compromised Nodes in MANETs”, Journal of Artificial Evolution and

Applications (2008)

[5] Giriraj Chauhan,Sukumar Nandi: QoS Aware Stable path Routing (QASR) Protocol

for MANETs, in First International Conference on Emerging Trends in Engineering and

Technology,pp. 202-207 (2008).

[6] Xiapu Luo, Edmond W.W.Chan,Rocky K.C.Chang: Detecting Pulsing Denial-of-

Service Attacks with Nondeterministic Attack Intervals, EURASIP Journal on Advances

in Signal Processing (2009)

[7] Xiaoxin Wu, David,K.Y.Yau, Mitigating Denial-of-Service Attacks in MANET by

Distributed Packet Filtering: A Game theoretic Approach, in Proceedings of the 2nd

ACM symposium on Information, computer and communication security, pp 365-367

(2006)

[8] S.A.Arunmozhi, Y.Venkataramani “DDoS Attack and Defense Scheme in Wireless

Ad hoc Networks” International Journal of Network Security & Its Applications (IJNSA),

Vol.3, No.3, May 2011, DOI: 10.5121/ijnsa.2011.3312.

[9] Jae-Hyun Jun, Hyunju Oh, and Sung-Ho Kim “DDoS flooding attack detection

through a step-by-step investigation” 2011 IEEE 2nd International Conference on

Networked Embedded Systems for Enterprise Applications, ISBN: 978-1-4673-0495-

5,2011

74

Page 75: Documentation

[10] Qi Chen , Wenmin Lin , Wanchun Dou , Shui Yu ” CBF: A Packet Filtering Method

for DDoS Attack Defence in Cloud Environment”, 2011 IEEE Ninth International

Conference on Dependable, Autonomic and Secure Computing. ISBN: 978-0-7695-4612-

4.2011

[11] Yih-Chun Hu, Adrian Perrig, and David B. Johnson., “Packet Leashes A Defense

against Wormhole Attacks in Wireless Ad Hoc Networks” In Proceedings of the Twenty-

Second Annual Joint Conference of the IEEE Computer and Communications Societies

(INFOCOM 2003), April 2003

[12] Patroklos g. Argyroudis and donal o’mahony, “Secure Routingfor Mobile Ad hoc

Networks”, IEEE Communications Surveys & Tutorials Third Quarter 2005.

[13] Karan Singh, R. S. Yadav, Ranvijay International Journal of Computer Science and

Security, Volume (1): Issue (1) 56

[14] I. Aad, J.-P. Hubaux, and E-W. Knightly, “Denial of ServiceResilience in Ad Hoc

Networks,” Proc. MobiCom, 2004.

[15] K. Balakrishnan, J. Deng, and P.K. Varshney, “TWOACK: Preventing Selfishness in

Mobile Ad Hoc Networks” Proc. IEEE Wireless Comm. and Networking Conf. (WCNC

’05), Mar. 2005.

[16] Mohammad Al-Shurman and Seong-Moo Yoo, Seungjin Park, “Black Hole Attack

in Mobile Ad Hoc Networks” ACMSE’04, April 2-3, 2004, Huntsville, AL, USA.

[17] Yih-Chun Hu, Adrian Perrig, David B. Johnson, “Rushing Attacks and Defense in

Wireless Ad Hoc Network Routing Protocols” WiSe 2003, September 19, 2003, San

Diego, California, USA.

[18] Ponomarchuk, Yulia and Seo, Dae-Wha, “Intrusion Detection Based On Traffic

Analysis in Wireless Sensor Networks” IEEE 2010.

[19] Network Simulator- ns-2. http://www.isi.edu/ nsnam /ns/.

[20] Yang, H., Luo, H., Ye, F., Lu, S., & Zhang, L. (2004), Security in mobile ad hoc

networks: Challenges and solutions, IEEE Wireless Communications, 11(1), 38-47.

75

Page 76: Documentation

Websites

http://java.sun.com

http://www.sourcefordgde.com

http://www.networkcomputing.com/

http://www.roseindia.com/

http://www.java2s.com/

76

Page 77: Documentation

APPENDIX A

Sample code

import java.awt.BorderLayout;

import java.awt.Color;

import java.awt.Container;

import java.awt.Font;

import java.awt.event.KeyEvent;

import java.awt.event.WindowAdapter;

import java.awt.event.WindowEvent;

import java.io.BufferedInputStream;

import java.io.BufferedOutputStream;

import java.io.BufferedReader;

import java.io.BufferedWriter;

import java.io.DataInputStream;

import java.io.DataOutputStream;

import java.io.IOException;

import java.io.InputStreamReader;

import java.net.InetAddress;

import java.net.ServerSocket;

import java.net.Socket;

import java.sql.Connection;

import javax.swing.BorderFactory;

import javax.swing.JButton;

import javax.swing.JCheckBox;

import javax.swing.JComboBox;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.JPanel;

77

Page 78: Documentation

import javax.swing.JScrollPane;

import javax.swing.JTextArea;

import javax.swing.JTextField;

import javax.swing.border.Border;

import javax.swing.border.TitledBorder;

public class RecieverA {

public JLabel T1a = new JLabel("");

public JLabel T1b = new JLabel(" ");

public Font f = new Font("Times new roman", Font.BOLD, 22);

public Font f1 = new Font("Times new roman", Font.BOLD, 15);

public Font f2 = new Font("Arial", Font.BOLD, 17);

public Font f3 = new Font("Times new roman", Font.BOLD, 18);

public JLabel T0 = new JLabel(" Receiver A");

public JLabel T1 = new JLabel("File Receiving Path:");

public JLabel T2 = new JLabel("Server Status :");

public JLabel T3 = new JLabel("File receive path ");

public JLabel T4 = new JLabel("running and waiting");

public JLabel T5 = new JLabel("Answer :");

public JCheckBox chk1 = new JCheckBox("");

public JComboBox TAreu = new JComboBox();

public JButton btn = new JButton("Send");

public JTextArea tf = new JTextArea();

public JScrollPane pane = new JScrollPane();

public JButton btn2 = new JButton("Send");

public JTextField txt = new JTextField();

public JTextField txt1 = new JTextField();

public JTextField txt2 = new JTextField();

JLabel imageLabel = new JLabel();

JLabel receive = new JLabel();

JLabel image = new JLabel();

JLabel imageLabel1 = new JLabel();

78

Page 79: Documentation

JLabel image1 = new JLabel();

JLabel imageLabel2 = new JLabel();

JLabel image12 = new JLabel();

public JLabel tfld = new JLabel();

JPanel jp = new JPanel();

JPanel jp1 = new JPanel();

public JLabel leftButton;

public JLabel proxyques;

String accesspoint;

public JLabel line;

public JLabel line1;

public JLabel imagelabel = new JLabel();

public JFrame jf;

public Container c;

RecieverA() {

String[] r = { "Router" };

String r1 = (String)

JOptionPane.showInputDialog(null,"Which Router Do You Want To Connect?",

"Router",JOptionPane.QUESTION_MESSAGE, null, r, r[0]);

jf = new JFrame("ReceiverA");

c = jf.getContentPane();

c.setLayout(null);

jf.setSize(650, 800);

jf.setResizable(false);

c.setBackground(new Color(100, 100, 100));

T1a.setBounds(50, 5, 650, 45);

T1a.setFont(f);

T1a.setForeground(Color.white);

T1b.setBounds(155, 40, 450, 45);

T1b.setFont(f);

T1b.setForeground(Color.white);

79

Page 80: Documentation

Border lineBorder = BorderFactory.createLineBorder(new Color(211, 217,184));

line = new JLabel();

line.setBorder(lineBorder);

line.setBounds(70, 140, 500, 280);

TitledBorder leftBorder = BorderFactory.createTitledBorder("File Transmit");

leftBorder.setTitleJustification(TitledBorder.LEFT);

leftButton = new JLabel();

leftButton.setBorder(leftBorder);

leftButton.setBounds(70, 200, 500, 300);

leftBorder.setTitleColor(Color.ORANGE);

TitledBorder leftBorder1 = BorderFactory.createTitledBorder("Received File");

leftBorder.setTitleJustification(TitledBorder.LEFT);

proxyques = new JLabel();

proxyques.setBorder(leftBorder1);

proxyques.setBounds(70, 430, 500, 280);

leftBorder1.setTitleColor(Color.ORANGE);

T0.setBounds(200, 80, 350, 45);

T0.setFont(f);

T0.setForeground(Color.CYAN);

T2.setBounds(105, 660, 250, 45);

T2.setFont(f1);

T2.setForeground(new Color(211, 217, 184));

T1.setForeground(new Color(211, 217, 184));

T1.setBounds(105, 570, 300, 150);

T1.setFont(f1);

txt1.setBounds(105, 280, 300, 25);

txt1.setFont(f1);

T3.setBounds(265, 625, 250, 45);

T3.setFont(f1);

T3.setForeground(Color.cyan);

T4.setBounds(255, 660, 350, 45);

80

Page 81: Documentation

T4.setFont(f1);

T4.setForeground(Color.RED);

T5.setBounds(125, 590, 250, 45);

T5.setFont(f3);

T5.setForeground(new Color(211, 217, 184));

txt2.setBounds(220, 595, 250, 30);

txt2.setForeground(Color.BLUE);

txt2.setFont(f1);

btn.setBounds(420, 420, 120, 30);

btn.setFont(f3);

btn.setForeground(new Color(120, 0, 0));

btn2.setBounds(420, 650, 120, 30);

btn2.setFont(f3);

btn2.setForeground(new Color(120, 0, 0));

jp.setBounds(85, 110, 850, 550);

jp.setBackground(new Color(211, 217, 184));

jp1.setBounds(80, 105, 860, 560);

receive.setBounds(445, 720, 250, 45);

receive.setForeground(Color.RED);

txt.setBounds(260, 150, 180, 25);

txt.setForeground(Color.BLUE);

txt.setFont(f1);

TAreu.setBounds(650, 550, 200, 35);

TAreu.addItem("Mesh Route");

TAreu.addItem(" Node ");

TAreu.setFont(f3);

TAreu.setForeground(Color.BLUE);

TAreu.setFont(f);

pane.setBounds(115, 470, 400, 200);

tf.setColumns(20);

tf.setForeground(Color.MAGENTA);

81

Page 82: Documentation

tf.setFont(f1);

tf.setRows(10);

// tf.setName("tf");

pane.setName("pane");

pane.setViewportView(tf);

tfld.setBounds(410, 160, 200, 30);

tfld.setFont(f2);

tfld.setForeground(new Color(120, 0, 0));

btn.setMnemonic(KeyEvent.VK_S);

jf.show();

c.add(T1a);

c.add(T1b);

c.add(line);

c.add(receive);

c.add(pane, BorderLayout.CENTER);

c.add(T0);

c.add(proxyques);

jf.addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent win) {

System.exit(0);

}

});

c.add(imagelabel);

int[] ports = new int[] { 20001, 105,40000 };

for (int i = 0; i < 3; i++) {

Thread t = new Thread(new PortListener(ports[i]));

t.setName("Listener-" + ports[i]);

t.start();

}

try {

Socket soc1 = new Socket("localhost", 100);

82

Page 83: Documentation

String port = "105";

DataOutputStream dos = new DataOutputStream(soc1.getOutputStream());

InetAddress ia = InetAddress.getLocalHost();

String ip = ia.getHostAddress();

dos.writeUTF("A");

dos.writeUTF(ip);

dos.writeUTF(port);

dos.writeUTF(r1);

} catch (IOException e) {

e.printStackTrace();

}

}

public static void main(String[] args) {

RecieverA rc = new RecieverA();

}

class PortListener implements Runnable {

BufferedOutputStream bos = null;

ServerSocket server;

Socket connection;

BufferedReader br = null;

int port;

public PortListener(int port) {

this.port = port;

}

@Override

public void run() {

if (this.port == 40000) {

try {

Socket con1;

ServerSocket server1 = new ServerSocket(40000);

while (true) {

83

Page 84: Documentation

con1 = server1.accept();

DataInputStream din = new DataInputStream(con1.getInputStream());

String router = din.readUTF();

String rname = din.readUTF();

String rip = din.readUTF();

String d = din.readUTF();

System.out.println(router);

System.out.println(rname);

System.out.println(rip);

System.out.println(d+"Recieved file at A");

tf.setText(d);

}

} catch (Exception e) {

System.out.println(e);

}

}

}

}

}

84