24
MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment of the requirements for the award of the degree of Bachelor of Computer Science (Computer Systems & Networking) FACULTY OF COMPUTER SYSTEMS & SOFTWARE ENGINEERING UNIVERSITY MALAYSIA PAHANG NOVEMBER, 2010

MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

MUJAHID BIN JAMALUDDIN

A theses submitted in fulfillment of the requirements for the award of the degree of

Bachelor of Computer Science (Computer Systems & Networking)

FACULTY OF COMPUTER SYSTEMS & SOFTWARE ENGINEERING

UNIVERSITY MALAYSIA PAHANG

NOVEMBER, 2010

Page 2: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

ABTRACT

Network Monitor with Packet Sniffer is software for operating network

monitor application. It has been designed for use in any computer in a simple

approach. This software interacts easily with user as only buttons are the way of

interaction. Network Monitor with Packet Sniffer is a real-time way to manage the

network-communication via monitoring, capturing and sniffing in order to fulfill the

project purpose. The result will be packet monitoring traffic, and packet information

that can be analyzed in the future. So, it is very convenient to user especially for

networking students. This thesis consists of 6 chapters.

Chapter 1 will discUss about the Introduction to the System. These first

chapters briefly explain about the objective of the system, problem statement and

project scopes. Chapter 2 and 3 are about the Literature Review and Methodology of

the project. Chapter 2 and 3 will discuss about the methods that will be used,

elaborating the sources from the research, and deciding the best tools that will be

used to build the system. Chapter 4, Implementation; are about the documentation of

the processes during the development of the system, including any modification that

been plan and made. While the last, Chapter 5 Result and Discussion and Chapter 6

Conclusion. Chapter 5 will explain about the result that has collected from the

analysis and tests of the system along with the constraints and suggestion to enhance

the system performance. Conclusion and overall summary of the system, data,

methodology, implementation, and the suggestions are in the matter of the discussion

on of the chapter 6.

V

Page 3: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

ABTSRAK

Network Monitor with Packet Sniffer ialah sebuah perisian untuk memonitor

network. la direka khas untuk semua computer dengan pendekatan yang mudah.

Perisian mi berinteraksi dengan mudah dengan pengguna kaerana pengguna hanya

perlu menggunakan butang sebagai alat untuk berinteraksi dengan sistem mi.

Network Monitor with Packet Sniffer ialah sebuah system "Real-Time" untuk

memonitor komunikasi network. Hasilnya adalah trafik paket network, dan

makiumat untuk setiap network paket yang boleh dikaji secara berasingan. Perisian

mi sangat mudah untuk pengguna terutamanya bagi pelajar teknoiogi rangkaian.

Tesis mi mengandungi 6 bahagian.

Bahagian 1 akan membincangkan berkenaan pengenalan kepada system mi.

Di sini ia akan menjelaskan serba sedikit berkenaan objektif, penyataan masaalah

dan skop kepada pembinaan sistem mi. Bahagian 2 dan Bahagian 3 menerangkan

berkenaan Kajian Literasi dan Methadologi pembinaan sistem mi. Di bahagian mi

kaedah-kaedah, kaj ian yang berkaitan dengan system, dan juga alatan dan perisian

yang difikirkan rasional untuk pembinaan sistem mi akan dijelaskan. Bahagian 4,

Implernentasi; adalah berkenaan dokumentasi proses-proses yang dijalankan ketika

pembinaan sistem, termasuk perubahan yang di rancang dan juga yang telah di

lakukan.Bahagian yang seterusnya adalah Bahagian 5, Keputusan dan Perbincangan;

dan Bahagian 6, Kesimpulan;. Bahagian 5 membincangkan hasil keputusan yang

telah di pero!eh berdasarkan analisa dan ujian-ujian yang teiah di jalankan.

Disamping itu bahagian mi juga turut mendiskusikan halangan dan cadangan-

cadangan tambahan untuk menambah baik lagi status prestasi sistem mi. Konklusi

dan rumusan keseluruhan . projek, data-data, methodologi, ujian aplikasi, dan juga

cadangan-cadangan adalah isu yang dibincangkan di dalam Bahagian 6.

vi

Page 4: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

TABLE OF CONTENTS

CHAPTER TITLE PAGE

DECLARATION ii

DEDICATION iii

ACKNOWLEDGEMENT iv

ABSTRACT v

ABTSRAK vi

TABLE OF CONTENTS vii

LIST OF FIGURES x

LIST OF TABLES xii

LIST OF ABBREVIATIONS xiii

LIST OF APPENDICES xiv

1 INTRODUCTION

1.1 Project Background 1

1.2 Problem Statement 2

1.3 Objective 3

1.4 Scope 3

1.5 Thesis Organization 3

2 LITERATURE RI VIEW

2.1 Introduction 4

2.2 Brief of System Background 5

vii

Page 5: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

2.2.1 IPAddress 6

2.2.2 Protocol 6

2.2.3 Internet Protocol version 4 (IPv4) 7

2.2.4 IPv4 Header Format 7

2.3 Previous Research 8

2.3.1 Wireshark 8

2.3.2 Microsoft Network Monitor 3 10

2.3.3 Network Probe 3.0 11

2.3.4 Previous Research Comparison 13

2.4 Project Modules 14

3 METHODOLOGY

3.1 Project Methodology 15

3.2 Method 16

3.2.1 Requirements Planning 18

3.2.2 User Design 18

3.2.3 Construction 22

3.3 Project Requirement 23

3.3.1 Software Requirement 23

3.3.1.1 Microsoft Visual Studio 2008 24

3.3.1.2 Microsoft Windows 7 Professional 24

3.3.1.3 Adobe Photoshop C52 9.0 24

3.3.1.4 Microsoft Office 2007 25

3.3.2 Hardware Requirement 25

4 IMPLEMENTATION

4.1 introduction 26

4.2 Implementation 26

4.2.1 Packet Capture and Monitoring Module 29

4.2.2 Packet Sniffing/Analyzing Module 32

viii

Page 6: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

4.3 Implementation Requirement 34

5 RESULTS AND DISCUSSION

5.1 Introduction 35

5.2 Project Result 36

5.3 Discussion 44

5.3.1 Advantages of Network Monitor with Packet 45

Sniffer 45

5.3.2 Disadvantages of Network Monitor with 46

Packet Sniffer

5.4 Future Enhancement

6 CONCLUSION

6.1 Summary 47

6.2 Achieved Objective 48

6.3 Lesson Learned 48

6.4 Project Planning 48

6.5 Time-Management 49

6.6 Conclusion 49

REFERENCES 50

APPENDICES 52

lx

Page 7: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

LIST OF FIGURES

FIGURE NO. TITLE PAGE

2.1 IPv4 Header Format 7

2.2 Wireshark 8

2.3 Microsoft Network Monitor 3.2 10

2.4 Network Probe 3.0 11

3.1 Martin's Four Phases RAD Life Cycle 17

3.2 Flow diagram of Network Monitor with Packet 19

Sniffer

3.3 Design for monitoring interface 19

3.4 Design for packet information interface 20

3.5 Logical design for SMS Gateway interface 20

3.6 Illustration of the system modules 21

4.1 Developments in Visual Studio 2008 27

4.2 Components in Network Monitor with Packet 38

Sniffer

4.3 Main Form 29

4.4 Packet Capturing and Monitoring Module Flow 31

4.5 Packet Details Form 32

4.6 Help Form 33

5.1 Main form load 36

5.2 No network connection 37

5.3 Network connection warning 38

5.4 Monitoring commences 39

5.5 Monitoring stops 40

5.6 Monitor output file 40

5.7 Output file contents 41

x

Page 8: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

5.8 Two output files 41

5.9 Bandwidth exceeded 42

5.10 Packet details 42

5.11 Check domain result 43

5.12 Packet output file 44

5.13 Help form output 44

Xi

Page 9: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

LIST OF TABLES

TABLE NO. TITLE PAGE

2.1 Advantages & Disadvantages of Wire shark 9

2.2 Advantages & Disadvantages of Microsoft 11

Network Monitor 3

2.3 Advantages & Disadvantages of Network Probe 12

3.0

2.4 Previous Research Comparison 13

3.1 Software Requirements to Develop the System 23

3.2 Hardware Requirements to Develop the System 25

4.1 Main Form Interface Input-Output 30

4.2 Packet Details Form Interface Input-Output 33

xii

Page 10: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

LIST OF ABBREVIATIONS

LAN Local Area Network

IP Internet Protocol

IPV4 Internet Prorocol Version 4

IPV6 Internet Prorocol Version 6

IETF Internet Engineering Task Force

RFC Request for Comments

POP Post Office Protocol

IMAP Internet Message Access Protocol

FTP File Transfer Protoco

TCP Transmission Control Protocol

DLL Dynamic-link Library

NIC Network Interface Controller

RAD Rapid Application Development

JAD Joint Application Design

SSADM Structured System Analysis and Design Method

CASE Computer Aided Software Engineering

SDLC System Development Life Cycle

xlii

Page 11: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

LIST OF APPENDICES

APPENDIX TITLE PAGE

A GANTTCHAI.T 52

B USER MANUAL 55

C WORK FLOW DIAGRAM 61

D PROJECT CODING 63

xlv

Page 12: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

CHAPTER 1

INTRODUCTION

1.1 Project Background

The growth of the organization of a company needs a very efficient management

in various parts of every department as they are always depend on each other to fulfill

company's policy and also maximize company's potential to compete in the market and

maybe also in the global. Because of this, a stable and secure connection from every

computer in the company must be ensured as users communicate with each- other in

every department. One of the methods to realize this is by using a network monitor to

capture and analyze packets that runs through each computer.

That is why this project proposes the usage of Network Monitor with Packet

Sniffer as a form of a solution. Normally, a network monitor can be used to capture a

packet, decodes it, and analyze the content or the network data and also deciphering

network protocols. As a packet analyzer, it can intercept and log traffic passing over a

digital network or part of a network. As data streams flow across the network, a packet

sniffer captures each packet and eventually decodes and analyzes its content according

to the appropriate specifications.

The concept of monitoring network and packet sniffing will be implemented in

this application or software for this project. By combining the two concepts, the user of

the program can determine what's really travelling through the network and also

1

Page 13: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

troubleshoot network problems by observing the result of packet capturing operation,

thus find the sources of any network slow-downs.

1.2 Problem Statement

The most common issues that have always been troubling the users in

networking are network performance and the stability of connection. Usually, the

increase of number of user will increase the latency of data delivery and also cause

network slow-downs in the Local Area Network (LAN). This is because the amount of

packet transferred between the computers will consume the bandwidth of the connection

as more and more people communicate through the network. There are also some more

possibilities that may lead to network slow-downs such as inappropriate packet delivery

through the network connection.

With the Network Monitor, every network packet can be observed, captured and

analyzed to determine whether the packets that pass through the computer are valid and

available for forwarding to the destinations. So, network slow-downs and bandwidth

consuming problems can be at least minimized if the problems cannot be fully

prevented.

2

Page 14: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

1.3 Objective

The primary objectives of Network Monitor with Packet Sniffer that needs to be

achieved are:

i. To monitor network packets passing through a computer.

ii. To analyze the packets those come through the computer.

iii. To detect connections that consumes the bandwidth of user's computer.

1.4 Scope

The scopes of this project are as follows:

i. The main user of the system is the computer users.

- ii. Wireless and cabled network infrastructure in a specific Local Area Network.

iii. The system is going to be developed using the Visual Basic.NET programming

language.

iv. The system will provide a simple user-friendly interface for the users in terms of

result display which are the packets information.

1.5 Thesis Organization

This thesis contains six chapters. Chapter one gives an overview of the research

conducted. It consists of five subtopics which are introduction, problem statements,

objectives, scopes and thesis organization. Chapter two reviews the previous research

works that was conducted and method usually used by researcher. All of the relevant

Page 15: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

books, report and internets taken from those researches will be discussed in detail.

Meanwhile, chapter three reveals the techniques and requirements that will be used in

performing this study. Discussion about the process flow of this research in detail is in

this chapter. Chapter four discusses the details of the implementation. Results of the

testing are to be described in Chapter five. Finally, chapter six concludes the entire

thesis.

El

Page 16: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

Chapter 2 is the important part for any project that will be developed. The -

purpose of this chapter is to present a selected literature review, which is very important

for the research. This chapter also describes and explains on the literature review carried

out on the system.

- - Besides that, previous research also will be discussed in this section at least three

existing system and methodologies that being used in other research which is related to

this system will be explained and compared to highlight the differences.

For the project requirement section, where all the requirements such as software

and hardware as well as the operating system requirement will be listed so that

developer can understand all the features that are available in the requirement before

proceeding to the proposed project.

4

Page 17: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

2.2 Brief of System Background

The term network monitoring describes the use of a system that constantly

monitors a computer network for slow or failing components and that notifies the

network administrator in case of outages via email, pager or other alarms. It is a subset

of the functions involved in network management.

The communication between users in the network involves a lot of data, passing

through the cables, through the internet and also the machine connecting them. Data sent

over a network is divided into frames. Each frame contains the following information:

Source address - the address of the network adapter from which the frame

originated.

ii. Destination address - the address of the network adapter that is meant to receive

the frame. This address can also specify a group of network adapters.

iii. Header information - Information specific to each protocol used to send the

frame.

iv. Data - the information or a portion of it being sent.

Every computer on a network segment receives frames transmitted on-that segment.

The network adapter in each computer retains and processes only those frames that are

addressed to that adapter. The rest of the frames are dropped and no longer processed.

The network adapter also retains broadcast and potentially multicast frames.

A Network Monitor allows users to capture to a file all the frames sent to, or retained

by, the network adapter of the computer on which it is installed. Users can design a

capture filter so that only certain frames are captured. This filter can be configured to

capture frames based on criteria such as source address, destination address, or protocol.

Network Monitor also makes it possible for a user to design a capture trigger to initiate a

specified action when Network Monitor detects a particular set of conditions on the

network. This action can include starting a capture, ending a capture, or starting a

program.

Page 18: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

2.2.1 IP Address

An Internet Protocol (IP) address is a numerical label that is assigned to devices

participating in a computer network that uses the internet protocol for communication

between its nodes.. [l] An IP address serves two principal functions: host or network

interface identification and location addressing. Its role has been characterized as

follows: "A name indicates what we seek. An address indicates where it is. A route

indicates how to get there. "[2]

The designers of TCP/IP defined an IP address as a 32-bit number[2] and this

system, known as Internet Protocol Version 4 or IPv4, is still in use today. However, due

to the enormous growth of the Internet and the resulting depletion of available addresses,

a new addressing system (IM), using 128 bits for the address, was developed in 1995[3]

and last standardized by RFC 2460 in 1998. [4] Although IP addresses are stored as binary

numbers, they are usually displayed in human-readable notations, such as

208.77.188.166 (for IPv4), and 2001:db8:0:1234:0:567:1:1 (for IM).

2.2.2 Protocol

A protocol is a set of rules which is used by computers to communicate with

each other across a network. A protocol is a convention or standard that controls or

enables the connection, communication, and data transfer between computing endpoints.

In its simplest form, a protocol can be defined as the rules governing the syntax,

semantics, and synchronization of communication.

Protocols may be implemented by hardware, software, or a combination of the

two. At the lowest level, a protocol defines the behavior of a hardware connection. A

protocol is a formal description of message formats and the rules for exchanging those

messages.

Page 19: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

2.2.3 Internet Protocol version 4 (IPv4)

Internet Protocol version 4 (IPv4) is the fourth revision in the development of the

Internet Protocol (IP) and it is the first version of the protocol to be widely deployed.

Together with IM, it is at the core of standards-based internetworking methods of the

Internet. IPv4 is still by far the most widely deployed Internet Layer protocol. As of

2010, IPv6 deployment is still in its infancy.

IPv4 is described in IETF publication RFC 791 (September 1981), replacing an

earlier definition (RFC 760, January 1980). IPv4 is a connectioniess protocol for use on

packet-switched Link Layer networks (e.g., Ethernet). It operates on a best effort.

delivery model, in that it does not guarantee delivery, nor does it assure proper

sequencing, or avoid duplicate delivery. These aspects, including data integrity, are

addressed by an upper layer transport protocol (e.g., Transmission Control Protocol).

2.2.4 IPv4 Header Format

Bits 0 3 4 7 9 15 16 31

Heade Version I Typ of service Total length

Identification Flags Fragment offset

Time to live Protocol Header checksum

32 -bit source address

32-bit destination address

Options Padding

Figure .1: IPv4 Header Format

7

Page 20: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

2.3 Previous Research

All the systems below are the research subject and will be a guideline to this

project. As a result, 3 network monitoring softwares are selected because of their

features and technologies suit with the development of this project. This section will

explain all the features provide on each application and comparison between them. All

this information will be use to propose a prototype application and to improve the

features of the developed application itself.

2.3.1 Wireshark

F:Ie Ed . :00 iSi Si 0: Co rieip

A. 4J

IltSir + expression.,. . _loar Apply

Tm Source DSistmation Protocol Info 1 .2CCCO 192. 16,.D.2 Broadcast 482 Who has 132.168.0.2? Gratuito:

- - 881 Name S S <00><00 01

0 OtsOri N - 0 - iar-d mry

1.22782 182.163.1.1 . 68. TOP tvttp 3196 [S, _k] Sq-0 Ack=' - 6 >

• Er e 1 :62 yts-re , 62 b1 op. .d •50 ornet 1. - . (00:Ob: :20: 3:02,, : Ne-1oor :7 :9a (00:09:5 :2d:5:a) • I 7_rroe Pat : 1,Sr:: 92.. 2.2 1 2.l .0.2), 5 192,16a.0.1 (19 2 .168.0.1) -. T or miss: crtrol P ala_a , Sr(: Port: 3168 31 j, 1)5t Port: itp C80), 0. L ri: 0

Source port: 3196 (3196) Destination port: http (NO) Sequence number: 0 (relative sequence number) Header length: 28 bytes

as: 00'°2 (7(5 Winds size: 64340

000 00 09 5B2375 9a 00 OhSd 30 cd 02 08 00 45 00 . . fJ- u... ] .... E. 010 00 30 18 48 40 00 80 06 61 2c CO aN 00 02 CO aN .0.6(9... a....... 020 00 01 Dc 7c 00 50 3c 36 95 fN 00 00 00 00 70 02 . ..I.Pc6 ..... . p. 030 fafO 27 eQ 00 00 02 04 05 b4 01 01 04 02 ..' ...........

fie: D:/test.pcap" 148800:00:02 12: 1200: 120 M: 0

Figure 2.2: Wireshark

8

Page 21: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

Wireshark is a free packet analyzer computer application. It is used for network

troubleshooting, analysis, software and communications protocol development, and

education. Wireshark is very similar to tcpdump, but it has a graphical front-end, and

many more information sorting and filtering options. It allows the user to see all traffic

being passed over the network. [1]

Features:

i. Capture live packet data from a network interface.

ii. Display packets with very detailed protocol information.

iii. Open and Save packet data captured.

iv. Import and Export packet data from and to a lot of other capture programs.

V. Filter packets on many criteria.

vi. Search for packets on many criteria.

vii. Colorize packet display based on filters.

viii. Create various statistics.

Table 2.1: Advantages & Disadvantages Of Wireshark

Advantages Disathantages

L Detailed packet analyzer. L Complex command.

ii. Can save result logs. ii. Too many settings must be made.

iii. Can filter packets based on

protocol.

Page 22: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

2.3.2 Microsoft Network Monitor 3.2

- -

- - .- F1 a

/-- --1

Figure 2.3: Microsoft Network Monitor 3.2

Microsoft Network Monitor is a software that applies the technology of packet

analyzer. It enables capturing, viewing, and analyzing network data and

deciphering network protocols. It can be used to troubleshoot network problems and

applications on the network [2]

Features:

i. Process tracking.

ii. Grouping by network conversation.

iii. Support for over 300 public and Microsoft proprietary protocols.

iv. Simultaneous capture sessions.

V. Wireless Monitor Mode with supported wireless N1Cs.

vi. Real-time capture and display of frames.

vii. Reassembly of -fragmented data.

10

Page 23: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

Table 2.2: Advantages & Disadvantages of Microsoft Network Monitor 3

Advantages

i. Can track capture process.

ii. Support Microsoft proprietary

protocols.

iii. Have command line tool.

Disadvantages - --

i. Complicated command.

ii. Too detail data for standard

computer user.

2.3.3 Network Probe 3.0

Ct 0 C n Cl CC CCO IC D.nCrkCd$l C —d II ntwo JOl

<A I C CC £ CISC C COCt, C LIt S '1CC Cr C CCII I

3i 101 1 I_ - 2 ' LI

468028060S3 C Show source convorsotons 'crrno host 2 41425 3&. 2 255 0 0mw 055s.mstsn onr<s'at son for thu host 11 111427

t 212172242146 Cl172 24 2 1S<iow source __,ors and prows es 'onsvs lost 2 -

10_ 'WIW £WnflnPnPICto 1 Slow destination onmoers010ns and 7101001W forUms 'lost 2 111436 11. CCrde Inn C C55d0Onrr 2

. 100242

10 iD 2 42 257 161 Slow defIned asr'rs forth host C

I 43 2C6 16 13 Show 10480104 51511115 for ! Ills 'not C

41 _l C 1 5 3 b 2 1 C C C

Sxpotd,ts

C 1^69' 22458 'Etp__________________________

Hosts C I C

CCC 3CCC7 22 122 C -4 411 Cl CC --02 W5 I

CCCC C

1 1 05786 I00

2 S

101 753 C

Cf _42 6811 C <CCC 21575

CCC IC C C 7248

CO C 16448 _02 , 4 3 16 , 384

'<1 1 R 130

] 13 1101 IS U20 100 - 0 0 00a - CC in

Figure 2.4: Network Probe 3.0

Network Probe 3.0 is a tool for monitoring network and analyzing network

protocols. The program gives instant pictures of traffic situations on the user network

and enables user to identify and isolate traffic problems. Traffic statistics are graphically

displayed in real-time. Network Probe is a protocol analyzer for traffic-level network

monitoring and will help users to find any network slow-downs.

11

Page 24: MUJAHID BIN JAMALUDDIN A theses submitted in fulfillment

Features:

1. Network summary.

2. Network throughput.

3. Top protocols and host.

4. Top conversations.

5. Traffic Alarms.

6. Alarm email notifications.

7. Powerful searching and filtering.

8. Protocol Statistics.

9. Host Statistics.

10. Conversation Statistics.

ii. Host traffic per NIC.

12. Conversations per NIC.

Table 2.3: Advantages & Disadvantages of Network Probe 3.0

Advantages I Disadvantages

i. Graphically data analyze display. i. Complicated result views.

ii. Can have specific NIC analyze. ii. Consumes more physical memory

iii. Traffic alarm for unwanted of a computer.

connections.

12