You are on page 1of 38

Dept.

of CSE, MSRIT

1. INTRODUCTION
General Introduction

Today’s network is a fairly large system consisting of several servers and


end users. Tracking and monitoring such a huge system from a centralized point of
view becomes a fairly difficult task for the network administrator. Our objective is to
facilitate the purpose of monitoring the activities and communications between the
user’s on a client system in an intra-network domain.

1.1 Statement of Problem

The aim of this project is more than one client programs running on different
terminals (client) can get connected to server and hence remotely log into the server.
The Server or the admin has no complete control over the client system. This may
make the client to misuse the weakness of the server or administrator.

1.2 Objectives of the project

The proposed system gives the administrator or the server complete control
over the client systems that have logged in to the intra network as well as providing
him the flexibility of monitoring certain activities of the client and the status of the
system like that of current applications, files of remote systems, sending warning
messages as well as shutting down the system and remote applications.

Fig 1.1: Client server communication

Secured Intra Network Through Server Dominance 1


Dept. of CSE, MSRIT

1.3 Current Scope

The rlogin starts a terminal session on the remote host specified as host. The
remote host must be running an rlogin service (daemon) for rlogin to connect to.
Remote login is nothing but to have an access on the remote machine. Here we refer
to a system we initially login to as either the local system or client system. The
system that you initially login to is the remote system or server system. In the
application that we have proposed usually works on using these modules:

 Client Authentication module.


 Status of the client system module.
 Chat server facility.
 Complete hardware description of the client.
 Online help facility.

1.4 Future Scope

As an extension to this project we would like to build an application that would


run on one different type of OS like one running in Windows and one running in
LINUX and some way connect them to the network to communicate. Also we can add
some additional features like one mentioned below:

 We can develop the face recognition for the client authentication.


 We can develop a module that displays the present applications going on in the
client system’s monitor.

2. LITERATURE SURVEY

2.1 An Introduction to Network Programming


Computer networks

Secured Intra Network Through Server Dominance 2


Dept. of CSE, MSRIT

Two remote hosts communicate via a network and through various network devices
like router, bridges and gateways. In software application, this can be done using
socket programming.

Client

It is an Application program that requests for establishing connections for the purpose
of data communication.

Server

It is an Application program that accepts connections in order to service requests by


sending back responses.

User Agent

It is a client that initiates a request. These are often browsers, editors, spiders (web-
traversing robots) or other end user tools. Computer networks are the communication
systems for connecting end systems. The computers in a network use well defined
protocols to communicate. Since the networks are complex, they are organized as a
series of layers. Most networks follow ISO OSI 7- layer model. The various layers are
shown in the next page.

The O.S.I. model (O.S.I. - Open System Interconnection) is a way of sub-dividing a


System into smaller parts (called layers) from the point of view of communications. A
layer is a collection of conceptually similar functions that provide services to the layer
above it and receives services from the layer below it. On each layer an instance
provides services to the instances at the layer above and requests service from the layer
below. For example, a layer that provides error-free communications across a network
provides the path needed by applications above it, while it calls the next lower layer to
send and receive packets that make up the contents of the path. Conceptually two
instances at one layer are connected by a horizontal protocol connection on that layer.

2.2 Brief Description of OSI


2.2.1 Physical Layer

Secured Intra Network Through Server Dominance 3


Dept. of CSE, MSRIT

The Physical Layer defines the electrical and physical specifications for
devices. In particular, it defines the relationship between a device and a physical
medium. This includes the layout of pins, voltages, cable specifications, hubs,
repeaters, network adapters, host bus adapters (HBAs used in storage area networks)
and more.

To understand the function of the Physical Layer, contrast it with the functions
of the Data Link Layer. Think of the Physical Layer as concerned primarily with the

Fig 2.1: OSI Reference Model

Interaction of a single device with a medium, whereas the Data Link Layer is
concerned more with the interactions of multiple devices (i.e., at least two) with a
shared medium. Standards such as RS-232 do use physical wires to control access to
the medium.

 The major functions and services performed by the Physical Layer are:

Secured Intra Network Through Server Dominance 4


Dept. of CSE, MSRIT

 Establishment and termination of a connection to a communications medium.


 Participation in the process whereby the communication resources are
effectively shared among multiple users. For example, contention resolution and
flow control.
 Modulation or conversion between the representation of digital data in user
equipment and the corresponding signals transmitted over a communications
channel. These are signals operating over the physical cabling (such as copper
and optical fibre) or over a radio link.

Parallel SCSI buses operate in this layer, although it must be remembered


that the logical SCSI protocol is a Transport Layer protocol that runs over this bus.
Various Physical Layer Ethernet standards are also in this layer; Ethernet incorporates
both this layer and the Data Link Layer. The same applies to other local-area
networks, such as token ring, FDDI, ITU- T G.hn and IEEE 802.11, as well as
personal area networks such as Bluetooth and IEEE 802.15.4.

2.2.2 Data Link Layer


The Physical Layer defines the electrical and physical specifications for
devices. In particular, it defines the relationship between a device and a physical
medium. This includes the layout of pins, voltages, cable specifications, hubs,
repeaters, network adapters, host bus adapters (HBAs used in storage area networks)
and more.

To understand the function of the Physical Layer, contrast it with the functions of
the Data Link Layer. Think of the Physical Layer as concerned primarily with the
interaction of a single device with a medium, whereas the Data Link Layer is
concerned more with the interactions of multiple devices (at least two) with a shared
medium. Standards such as RS-232 use physical wires to control access to the medium.

The major functions and services performed by the Physical layer are:
 Establishment and termination of a connection to a communications medium.
 Participation in the process whereby the communication resources are
effectively shared among multiple users. For example, contention resolution and
flow control.

Secured Intra Network Through Server Dominance 5


Dept. of CSE, MSRIT

 Modulation, or conversion between the representation of digital data in user


equipment and the corresponding signals transmitted over a communications
channel. These are signals operating over the physical cabling (such as copper
and optical fiber) or over a radio link.

Parallel SCSI buses operate in this layer, although it must be remembered


that the logical SCSI protocol is a Transport Layer protocol that runs over this bus.
Various Physical Layer Ethernet standards are also in this layer; Ethernet incorporates
both this layer and the Data Link Layer. The same applies to other local-area networks,
such as token ring, FDDI, ITU- T G.hn and IEEE 802.11, as well as personal area
networks such as Bluetooth and IEEE 802.15.4.

2.2.3 Network Layer

The Network Layer provides the functional and procedural means of transferring
variable length data sequences from a source to a destination via one or more networks,
while maintaining the quality of service requested by the Transport Layer. The
Network Layer performs network routing functions, and might also perform
fragmentation and reassembly, and report delivery errors. Routers operate at this layer -
sending data throughout the extended network and making the Internet possible. This is
a logical addressing scheme - values are chosen by the network engineer. The
addressing scheme is hierarchical.

Careful analysis of the Network Layer indicated that the Network Layer could
have at least 3 sub layers:

 Subnetwork Access - that considers protocols that deal with the interface
to networks, such as X.25;
 Subnetwork Dependent Convergence - when it is necessary to bring the level of
a transit network up to the level of networks on either side;
 Subnetwork Independent Convergence – which handles transfer across multiple
networks.

The best example of this latter case is CLNP, or IPv7 ISO 8473. It manages the
connectionless transfer of data one hop at a time, from end system to ingress router,
router to router, and from egress router to destination end system. It is not responsible

Secured Intra Network Through Server Dominance 6


Dept. of CSE, MSRIT

for reliable delivery to a next hop, but only for the detection of error packets so they
may be discarded. In this scheme, IPv4 and IPv6 would have to be classed with X.25
as Subnet Access protocols because they carry interface addresses rather than node
addresses.

A number of layer management protocols, a function defined in the


Management Annex, ISO 7498/4, belong to the Network Layer. These include routing
protocols, multicast group management, Network Layer information and error, and
Network Layer address assignment. It is the function of the payload that makes these
belong to the Network Layer, not the protocol that carries them.

2.3 Brief Description of TCP/IP Protocol


The TCP/IP model, or Internet Protocol Suite, describes a set of general design
guidelines and implementations of specific networking protocols to enable computers
to communicate over a network. TCP/IP provides end-to-end connectivity specifying
how data should be formatted, addressed, transmitted, routed and received at the
destination. Protocols exist for a variety of different types of communication services
between computers.

TCP/IP is generally described as having four abstraction layers (RFC 1122).


This layer architecture is often compared with the seven-layer OSI Reference Model;
using terms such as Internet Reference Model in analogy is however incorrect as the
Internet Model is descriptive while the OSI Reference Model was intended to be
prescriptive, hence Reference Model.

This model lacks the formalism of the OSI reference model and associated
documents, but the IETF does not use a formal model and does not consider this a
limitation, as in the comment by David D. Clark, “We reject: kings, presidents and
voting. We believe in: rough consensus and running code.” Criticisms of this model,
which have been made with respect to the OSI Reference model, often do not consider
the ISO’s later extension to that model.

Secured Intra Network Through Server Dominance 7


Dept. of CSE, MSRIT

Fig 2.2: OSI v/s. TCP/IP

2.4 Brief Description of UDP Protocol


The User Datagram Protocol (UDP) is one of the core members of the Internet
Protocol Suite, the set of network protocols used for the Internet. With UDP, computer
applications can send messages, in this case referred to as datagram, to other
hosts on an Internet Protocol (IP) network without requiring prior communications to
set up special transmission channels or data paths. UDP is sometimes called the
Universal Datagram Protocol.

The protocol was designed by David P. Reed in 1980 and formally defined in
RFC 768. UDP uses a simple transmission model without implicit hand-shaking
dialogues for guaranteeing reliability, ordering, or data integrity. Thus, UDP provides
an unreliable service and datagram may arrive out of order, appear duplicated, or go
missing without notice. UDP assumes that error checking and correction is either not
necessary or performed in the application, avoiding the overhead of such processing at
the network interface level. Time-sensitive applications often use UDP because
dropping packets is preferable to waiting for delayed packets, which may not be an
Secured Intra Network Through Server Dominance 8
Dept. of CSE, MSRIT

option in a real-time system. If error correction facilities are needed at the network
interface level, an application may use the Transmission Control Protocol (TCP)
or Stream Control Transmission Protocol (SCTP) which are designed for this purpose.
UDP’s stateless nature is also useful for servers that answer small queries from huge
numbers of clients.
Unlike TCP, UDP is compatible with packet broadcast (sending to all on local
network) and multicasting (send to all subscribers). Common network applications that
use UDP include: the Domain Name System (DNS), streaming media applications
such as IPTV, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP) and many
online games.

2.5 Ports and Sockets


2.5.1 Ports
Each process that wants to communicate with another process identifies itself to
the TCP/IP protocol suite by one or more ports. A port is a 16-bit number, used by the
host-to-host protocol to identify to which higher-level protocol or application program
(process) it must deliver incoming messages.

As some higher-level programs are themselves protocols, standardized in the


TCP/IP protocol suite, such as TELNET and FTP, they use the same port number in all
TCP/IP implementations. Those “assigned” port numbers are called well-known ports
and the standard applications well- known services.

The well-known ports are controlled and assigned by the Internet Assigned
Numbers Authority (IANA) and on most systems can only be used by system
processes or by programs executed by privileged users. The assigned well-known ports
occupy port numbers in the range 0 to 1023. The ports with numbers in the range
1024-65535 are not controlled by the IANA and on most systems used by ordinary
user-developed programs.

Confusion due to two different applications trying to use the same port numbers
on one host is avoided by writing those applications to request an available port from
TCP/IP. Because this port number is dynamically assigned, it may differ from one

Secured Intra Network Through Server Dominance 9


Dept. of CSE, MSRIT

invocation of an application to the next.

UDP, TCP and ISO TP-4 all use the same “port principle“. To the extent possible,
the same port numbers are used for the same services on top of UDP, TCP and ISO
TP-4.

2.5.2 Sockets
A socket is a network communications endpoint. The analogy is to a wire (the
network data connection) being plugged into a socket. Sockets come in two primary
flavors. An active socket is connected to a remote active socket via an open data
connection. Closing the connection destroys the active sockets at each endpoint. A
passive socket is not connected, but rather awaits an incoming connection, which will
spawn a new active socket.

A socket is not a port, though there is a close relationship between them. A


socket is associated with a port, though this is a many-to-one relationship. Each port
can have a single passive socket, awaiting incoming connections, and multiple active
sockets, each corresponding to an open connection on the port.

2.6 LINUX Operating System


Linux is an operating system that was initially created as a hobby by a student,
Linus Torvalds, at the University of Helsinki in Finland. Linus had an interest in
Minix, a small UNIX system, and decided to develop a system that exceeded the Minix
standards. He began his work in 1991 when he released version 0.02 and worked
steadily until 1994 when version 1. 0 of the Linux Kernel was released.

The kernel, at the heart of all Linux systems, is developed and released under the
GNU General Public License and its source code is freely available to everyone. It is
this kernel that forms the base around which a Linux operating system is developed.
There are now literally hundreds of companies and organizations and an equal number
of individuals that have released their own versions of operating systems based on the
Linux kernel. More information on the kernel can be found at our sister site, LinuxHQ
and at the official Linux Kernel Archives. The current full-featured version is 2.6
(released December 2003) and development continues.

Secured Intra Network Through Server Dominance 10


Dept. of CSE, MSRIT

Apart from the fact that it’s freely distributed, Linux’s functionality, adaptability
and robustness, has made it the main alternative for proprietary Unix and Microsoft
operating systems. IBM, Hewlett-Packard and other giants of the computing world
have embraced Linux and support its ongoing development. Well into its second
decade of existence, Linux has been adopted worldwide primarily as a server platform.
Its use as a home and office desktop operating system is also on the rise. The operating
system can also be incorporated directly into microchips in a process called
“embedding“ and is increasingly being used this way in appliances and devices.

Throughout most of the 1990’s, tech pundits, largely unaware of Linux’s


potential, dismissed it as a computer hobbyist project, unsuitable for the general
public’s computing needs. Through the efforts of developers of desktop management
systems such as KDE and GNOME, office suite project OpenOffice.org and the
Mozilla web browser project, to name only a few, there are now a wide range of
applications that run on Linux and it can be used by anyone regardless of his/her
knowledge of computers.

Those curious to see the capabilities of Linux can download a live CD version
called Knoppix. It comes with everything you might need to carry out day-to-day tasks
on the computer and it needs no installation. It will run from a CD in a computer
capable of booting from the CD drive. Those choosing to continue using Linux can
find a variety of versions or “distributions” of Linux that are easy to install, configure
and use. Information on these products is available in our distribution section and can
be found by selecting the mainstream/general public category.

2.6.1 Fedora 8/RedHat


Fedora is an RPM-based, general purpose operating system built on top of the
Linux kernel, developed by the community-supported Fedora Project and sponsored by
Red Hat. The Fedora Project’s mission is to lead the advancement of free and open
source software and content as a collaborative community.

One of Fedora’s main objectives is not only to contain software distributed


under a free and open source license, but also to be on the leading edge of such
technologies. Fedora developers prefer to make upstream changes instead of applying
fixes specifically for Fedora—this ensures that their updates are available to all
Secured Intra Network Through Server Dominance 11
Dept. of CSE, MSRIT

GNU/Linux distributions.

Fedora has a comparatively short life cycle: version X is maintained until one
month after version X+2 is released. With 6 months between releases, the maintenance
period is about 13 months for each version.

Linus Torvalds, author of the Linux kernel, says he uses Fedora because it had
fairly good support for PowerPC when he used that processor architecture. He became
accustomed to the operating system and continues to use it (as of 2008).

According to DistroWatch, Fedora is the second most popular Linux-based


operating system as of early 2010, behind Ubuntu.

Red Hat, Inc. (NYSE: RHT) is an S&P 500 company in the free and open source
software sector, and a major Linux distribution vendor. Founded in 1993, Red Hat has
its corporate headquarters in Rayleigh, North Carolina with satellite offices worldwide.

Red Hat has become associated to a large extent with its enterprise operating
system Red Hat Enterprise Linux and with the acquisition of open-source enterprise
middleware vendor JBoss. Red Hat provides operating-system platforms along with
middleware, applications, and management products, as well as support, training, and
consulting services.

2.7 Shell Programming


The Bash shell is your main port of entry to Linux, since the shell interprets
everything you enter on the command line before passing it along to the operating
system for execution. But in addition to providing the niceties of command resolution,
wildcard handling, and piping, Bash has its own powerful built-in programming
language.

A shell script is a program written for Bash. The simplest shell script is a
sequence of Linux commands, but when you add the power of variables and flow
control, you can do a lot more with it. Shell scripts are similar to DOS batch files
(those files that end in .bat), but shell scripts are more powerful and actually easier to
create.

Secured Intra Network Through Server Dominance 12


Dept. of CSE, MSRIT

Shell scripts are interpreted, which means that the shell reads each line
and acts on it immediately. This process differs from that of a formal programming
language like C or C++, where the program is compiled and optimized for faster
execution. So there’s a tradeoff--it’s easier to create quick little shell scripts, but if the
task at hand requires serious number crunching or complicated logic, a compiled
language is better.

An important thing to note is that all of the shell script syntax and examples in this
section will work in both the Bash and Korn (pdksh) shells. The C shell (tcsh) has
subtle differences in many areas, so scripts written for one shell may not work in
another. If you decide to use the C shell instead of Bash, use the man tcsh command
for more information on writing shell scripts for that environment.

2.7.1 Creating a Shell Script


The following example, although extremely simple, provides a useful
introduction to creating and using shell scripts. The script clears the monitor screen of
all previous lines and then writes the text Good morning, world on it.

All that is necessary to create this script is to open a text editor (but not a word
processor), such as gedit or vi, and type the following three lines exactly as shown on
a new, blank page:

#!/bin/bash

clear

echo “Good morning, world”

Alternatively, the above code could be copied from this page and pasted to a
blank page opened by the text editor page using the standard keyboard or mouse copy
and paste functions.

After saving this plain text file, with a file name such as morning (or anything
else desired), the script is complete and almost ready to run. Scripts are typically run
by typing a dot, a forward slash and the file name (with no spaces in between) and then
pressing the ENTER key. Thus, for example, if the above script were saved with the

Secured Intra Network Through Server Dominance 13


Dept. of CSE, MSRIT

name morning, an attempt could be made to execute it by issuing the following


command:

. /morning

However, the script probably will not run, in which case an error message will
appear on the screen such as bash: ./morning: Permission denied. This is because the
permissions for the file first have to be set to executable. (By default, the permissions
for new files are set to read and write only.) The problem can easily be solved by using
the chmod command with its 755 option (which will allow the file creator to read,
write and execute the file) while in the same directory as that in which the file is
located as follows:

chmod 755 morning

Now the script is ready to run by typing the following, again while in the same
directory, and then pressing the ENTER key:

./morning!

2.8 Socket programming

Fig 2.3 Diagram of client-server socket connection

2.8.1 Overview
Berkeley sockets (also known as the BSD socket API) originated with the

Secured Intra Network Through Server Dominance 14


Dept. of CSE, MSRIT

4.2BSD Unix operating system (released in 1983) as an API. Only in 1989, however,
could UC Berkeley release versions of its operating system and networking library free
from the licensing constraints of AT&T’s copyright-protected Unix.

The socket API forms the de facto standard abstraction for network sockets.
Most other programming languages use an interface similar to the C API. The API is
also used for Unix domain sockets, which are an interface to inter-process
communication (IPC) channels within a single computer.

The STREAMS-based Transport Layer Interface (TLI) API offers an alternative


to the socket API. However, recent systems that provide the TLI API also provide the
Berkeley socket API.

The socket interface, an application programming interface (API), allows


communications between hosts or between processes on one computer, using the
concept of an Internet socket. It can work with many different I/O devices and drivers,
although support for these depends on the operating-system implementation. This
interface implementation is implicit for TCP/IP, and it is therefore one of the
fundamental technologies underlying the Internet. It was first developed at the
University of California, Berkeley for use on Unix systems. All modern operating
systems now have some implementation of the Berkeley socket interface, as it became
the standard interface for connecting to the Internet.

Socket interfaces are accessible at three different levels, most powerfully and
fundamentally at the raw socket level. Very few applications need the degree of
control over outgoing communications that this provides, so raw sockets support was
intended to be available only on computers used for developing Internet-related
technologies. In recent years, most operating systems have implemented support for it
anyway, including Fedora and RedHat.

2.8.2 Description of different API used

Linux supports BSD style socket programming. Both connection oriented and
connectionless types of sockets are supported. In connection oriented communication,
the server and client establish a connection, before any data is exchanged. In
connectionless communication, data is exchanged as a part of the message. In either

Secured Intra Network Through Server Dominance 15


Dept. of CSE, MSRIT

case server always starts up first, binds itself to socket, and listens to messages. How
the server attempts to listen depends on the type of connection for which you have
programmed it.

Some of the API used for some of the system call are

•Socket()

•Bind()

•Accept()

•Listen()

•Connect()

•Sendto()

•Recvfrom()

Socket API

socket () creates an endpoint for communication and returns a file descriptor for the
socket. socket () takes three arguments:

 Domain, which specifies the protocol family of the created socket. For example:
 PF_INET for network protocol IPv4 or
 PF_INET6 for IPv6.
 PF_UNIX for local socket (using a file).
 Type, one of:
 SOCK_STREAM (reliable stream-oriented service or Stream Sockets)
 SOCK_DGRAM (datagram service or Datagram Sockets)
 SOCK_SEQPACKET (reliable sequenced packet service), or
 SOCK_RAW (raw protocols atop the network layer).
 Protocol, specifying the actual transport protocol to use. The most common are
IPPROTO_TCP, IPPROTO_SCTP, IPPROTO_UDP, IPPROTO_DCCP. These
protocols are specified in <netinet/in.h>. The value “0” may be used to select a
default protocol from the selecteddomain and type. The function returns -1 if an
Secured Intra Network Through Server Dominance 16
Dept. of CSE, MSRIT

error occurred. Otherwise, it returns an integer representing the newly-assigned


descriptor.

Prototype

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

Bind API

bind() assigns a socket an address. When a socket is created using socket(), it is only
given a protocol family, but not assigned an address. This association with an address
must be performed with the bind() system call before the socket can accept
connections to other hosts. bind() takes three arguments:

 sockfd, a descriptor representing the socket to perform the bind on


 my_addr, a pointer to a sockaddr structure representing the address to bind to.
 addrlen, a socklen_t field specifying the size of the sockaddr structure. Bind ()
returns 0 on success and -1 if an error occurs.

Prototype

int bind(int sockfd, const struct sockaddr *my_addr, socklen_t addrlen);

Listen API

After a socket has been associated with an address, listen() prepares it for incoming
connections. However, this is only necessary for the stream-oriented (connection-
oriented) data modes, i.e., for socket types (SOCK_STREAM, SOCK_SEQPACKET).
listen() requires two arguments:

 sockfd, a valid socket descriptor.


 backlog, an integer representing the number of pending connections that can be
queued up at any one time. The operating system usually places a cap on this
value.

Once a connection is accepted, it is dequeued. On success, 0 is returned. If an error


occurs, -1 is returned.

Prototype
Secured Intra Network Through Server Dominance 17
Dept. of CSE, MSRIT

int listen(int sockfd, int backlog);

Accept API:

When an application is listening for stream-oriented connections from other hosts, it is


notified of such events (cf. select () function) and must initialize the connection using
the accept() function. Accept() creates a new socket for each connection and removes
the connection from the listen queue. It takes the following arguments:

 sockfd, the descriptor of the listening socket that has the connection queued.
 cliaddr, a pointer to a sockaddr structure to receive the client’s address
information.
 addrlen, a pointer to a socklen_t location that specifies the size of the client
address structure passed to accept (). When accept () returns, this location
indicates how many bytes of the structure were actually used.

The accept() function returns the new socket descriptor for the accepted connection, or
-1 if an error occurs. All further communication with the remote host now occurs via
this new socket.

Datagram sock2ets do not require processing by accept() since the receiver may
immediately respond to the request using the listening socket.

Prototype

int accept(int sockfd, struct sockaddr *cliaddr, socklen_t *addrlen);

Connect API

The connect() system call connects a socket, identified by its file descriptor, to a
remote host specified by that host’s address in the argument list.

Certain types of sockets are connectionless, most commonly user datagram protocol
sockets. For these sockets, connect takes on a special meaning: the default target for
sending and receiving data gets set to the given address, allowing the use of functions
such as send() and recv() on connectionless sockets.

connect() returns an integer representing the error code: 0 represents success, while -1

Secured Intra Network Through Server Dominance 18


Dept. of CSE, MSRIT

represents an error.

Prototype

int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);

Fig 2.4: Sockets and Protocol relations

Secured Intra Network Through Server Dominance 19


Dept. of CSE, MSRIT

3. Software Requirements Specification

3.1 Introduction
Software requirement specification is a document that signifies the requirement
of the system to perform and also the initiative that has to be taken while handling the
system. The various situations under which the system functions is also taken into
consideration.

3.2 General description

3.2.1 Project perspective


The project that is planned will be mainly useful for the system admin or server
to monitor the intra network of the organization or the institution. This is done by
implementing various tools and modules in our project. Server or the admin will be
gaining the complete control over the network via this tools and modules.

3.2.2 End user expectation

The end user of our project system will be the admin of the organization or the
person controlling the server. They may expect good graphical interface which is
possible from Linux and shell programming and also quick access and performance of
the system which is possible from socket programming on Linux platform.

3.2.3 Assumptions and dependencies

We are assuming that the intra network where the system is working has
sufficient bandwidth to support the clients and also sufficient port and socket
connections which are prerequisites for the functioning of the system. And moreover

Secured Intra Network Through Server Dominance 20


Dept. of CSE, MSRIT

the client systems are also utilized in the intra network and this also makes us to assume
that we have sufficient number of clients in the network.

3.3 Specific Requirements

3.3.1 Software requirements


 Platform : Linux 9
 C, C++, Socket and shell programming complier.
 Gcc compiler

3.3.2 Hardware requirements


 Pentium 2 or above processor
 512MB or higher supporting RAM
 2 or more computer machines as client machines.

3.4 Interface requirements


Shell programming scripts are used mainly for the interfacing functions where
in the various functionalities of shell programming like ‘dialog’, ‘title’ and others are
used. We also use the property of shell programming for res, send warn etc for our
application.

Secured Intra Network Through Server Dominance 21


Dept. of CSE, MSRIT

4. SYSTEM DESIGN
System Design is the process or art of defining the architecture, components,
modules, interfaces, and data for a system to satisfy specified requirements. One
could see it as the application of systems theory to product development. There is
some overlap with the disciplines of systems analysis, systems architecture and
systems engineering.

4.1 Introduction and Design overview


If the broader topic of product development “blends the perspective of
marketing, design, and manufacturing into a single approach to product development,
then design is the act of taking the marketing information and creating the design of
the product to be manufactured. Systems design is therefore the process of defining
and developing a system to satisfy specified requirements of the user. Until the 1990s
systems design had a crucial and respected role in the data processing industry. In the
1990s standardization of hardware and software resulted in the ability to build modular
systems. The increasing importance of software running on generic platforms has
enhanced the discipline of software engineering.

Object-oriented analysis and design methods are becoming the most widely used
methods for computer system design. The UML has become the standard language
used in Object-oriented analysis and design. It is widely used for modeling software
systems and is increasingly used for high designing non-software systems and
organization

Secured Intra Network Through Server Dominance 22


Dept. of CSE, MSRIT

Fig 4.1: Client server Request and Reply


4.2 System Architectural Design

The System proposed will be helping the server or the admin in gaining the
complete control over the clients systems. For this, the system architecture is designed
in such a way that it reveals all the applications running on the clients systems.
For this purpose, the system will be using the concepts of socket programming
and Shell programming. For this purpose, the system is based on Linux platform which
supports both.

4.2.1 Chosen system architecture


As per the system proposed shown, it is connected to the hub which is further
connected to the clients systems in the intra systems. This will help the server to gain
complete control over the intra network.

Hub

Server Client Client Client


(Admin) System 1 System 2 System 3

Fig 4.2 Client - Server - hub structure

This system is divided in 3 major parts.

Secured Intra Network Through Server Dominance 23


Dept. of CSE, MSRIT

 The Server.
 The hub.
 The clients.

The Server is Mainly the admin which controls the intra networks. This process is done
via hub and the various clients in the intra network will be acted upon parallel by the
server.
This is how the system works. Every packet accessed by the client will be through the
hub. So whatever be the scenario, every packet entering the intra network must get the
permission of the server. I.e. the server will be monitoring the intra network through the
hub.

Incoming Packets
to Intra Network
Client
Hub
(End User) Client
Packets to Hub Outgoing
Packets from
Server Intra Network
Monitoring

Server
(Administrator)

Fig 4.3: Description of the system

Whenever the unauthorized packet enters the system, the server checks the packet
availability in the network. With this, the server can get the hold of each and every
packet coming and going out from the network.
Our project has a very important role to play in educational institutions,
where students hoodwink the lecturers pretending that they are working but instead
utilize the lab resources for their own amusement. By implementing our code in the all
lab systems the lecturer, sitting in the server can ensure that all students are doing the

Secured Intra Network Through Server Dominance 24


Dept. of CSE, MSRIT

intended work which they are supposed to do.


Our project can also be implemented in institutions where employees need to be
monitored closely to prevent sensitive data being pirated to other organizations. Here
the admin will play the role of the lecturer in the previous criteria monitoring the
employees and preventing any unnecessary advances of the employee with the system.

4.2.2 System interface design


The proposed system will be having a Linux based platform and hence the
system interface will be a kind of Linux based. This enables us for various interfaces
that can be implemented how the project works.

Remote login
and Telnet Run Remote Authentication
Session Login Service

User

Useful Client Status


Information Data Transfer and Hardware
Specifications

Administrator
Fig 4.4: System User Interface design

The System interface will be mainly the C, C++ coding on Linux platform which
consists of socket and shell programming. This helps us in having a much better
interface via command line prompt. Further the Linux also provides the security on the
interfaces.

4.3 Basic Workflow of the System


The basic system components are authentication by the administrator, the
response given by the client, and the communication between the system administrator
and the client system in specific cases where the user may need to contact the
administrator or the administrator may need to issue warnings or likewise information
to the clients. The basic interaction takes place between the following components:

Secured Intra Network Through Server Dominance 25


Dept. of CSE, MSRIT

 Server
 Hub
 End System Clients

These basic System Functionalities can be expressed through the diagram given below:

Autonomous System 1 Autonomous System 2

Fig. 4.5 Basic Workflow of the System

4.4 Detailed description of components


The system consists of 2 major components
 The Server
 The Client

4.4.1 The Server


The server is the main part of the system. In other words we can call it as ‘the
king of the network’. In the proposed system, we have decided to add additional
functionalities for the server. Usually server does not have complete control like
shutting down the system and also restarting the client system. We have decided to
implement that in our server system. This also helps us in viewing various aspects of
the server system.

Secured Intra Network Through Server Dominance 26


Dept. of CSE, MSRIT

4.4.2 The Clients


The clients of the system are the users who mainly use the outer internet through
the server. The clients in the system act similar to the various employees in the
organization accessing the intra network.

4.5 System Block Diagram


Server
(Administrator)

Authentication Successful? No

Yes Data
Transfer

Client Request and Remote Chat Help


Hardware status Facility Facility

Client 1 Client 2 Client 3


(End User 1) (End User 2) (End User 3)

Data Data
Transfer Violating Organization Transfer
Rules?

Yes No

Secured Intra Network Through Server Dominance 27


Dept. of CSE, MSRIT

Send Shut Down Shut Down Continue


Warning Application System Normal
Operation

Fig 4.6 System Block Diagram

The basic blocks in the system consists of the server, the end system client and
the various interactions taking place between them in the form of Data transfer or
System status or issue of the warning messages or shutting down the applications in the
end system or shutting down the end system entirely as well. Fig 4.6 is a pictorial
representation of the block diagram of the system:

4.6 User interface design

4.6.1 Description of the user interface


The user interface will be mainly consists of the user interaction with the system.
This also has the ways in which the user can use the system for the required purpose.
The user interface in the proposed system also consists of the following processes:

 The authentication
 Selection of the client system
 Viewing the various operations of the client

The Authentication
We are using the user name and password methodology for the authentication
purposes. This is shown in the figure 4.7. The user gives his username and password for
the process of authentication and this is done by the server.

Username

Password

Secured Intra Network Through Server Dominance 28


Dept. of CSE, MSRIT

Fig 4.7: Authentication mode used

Selecting of client systems


As per the system’s interface, the various clients logged in are found and only 1
is selected for monitoring it. This is done in selecting the various ip addresses that are
in the intra network. Further after selecting the systems, the server is responsible for
all the activities on the systems.

Viewing various options of the clients


The system admin after logging in to the server and selecting in the clients to be
operated on or viewed, the admin will now select the various operations to be
performed on the clients. This in the proposed system will include mainly the various
operations like viewing the current applications running, files of remote systems,
sending warning message, shut down the client system and also restarting the system.
5. Implementation
5.1 Use Case Diagram

Request for file

Client -1 Share and transfer data


Client-2

Run processes

Chat Facility

Retrieve data

Admin
Monitor Client Processes
Secured Intra Network Through Server Dominance 29

Monitor Client Communications


Dept. of CSE, MSRIT

Fig 5.1 Use Case Diagram - 1


5.1.2 Use Case Diagram – 2

Request Username

Request password

Enter Username and


password
Administrator Client

Verify User Name and


Password with Server

Confirm Login
Fig 5.2 Use Case Diagram 2

Secured Intra Network Through Server Dominance 30


Dept. of CSE, MSRIT

5.1.1 Documentation

The use case diagram above depicts the basic working of the system. The
interactions happening between the actors are also depicted accordingly.

Actors

 Administrator
 Clients

Description of the Use Cases

 Login and Authentication


o The administrator requests the client to enter his user name and
password. Upon entering the above details, the corresponding entries are
checked in the server side to verify the user’s authenticity. Once the
verification is successful, the administrator sends a ‘verification
successful’ message to confirm the login.

 Request for a file


o Once the verification is successful the clients may request for sharing a
file to the administrator or amongst the clients themselves.

 Share and Transfer Data


o Once a client finds that the data requested by him/her is available
with any other client, it may request transfer of the data from other
clients. The same may be applicable for the data request from the
server too.

 Run Processes
o The client systems in the intra-network may need to run several
processes for their purpose. While running processes, they may make
critical use of the system resources, like memory, CPU, system bus
etc.
Secured Intra Network Through Server Dominance 31
Dept. of CSE, MSRIT

 Chat Facility
o Through the chat facility, the clients can request the administrator for
certain information like the request access to files, passwords for
protected files if the user is eligible to access the file and similar other
information. The administrator can also use the chat facility to
communicate with the clients.

 Retrieve data
o The clients may request the administrator for access to any useful
information or files which may be stored in the server. The
administrator will first check if the user who has requested for the file
is eligible for accessing the file and if yes, he will retrieve the file and
share it with the requesting user.

 Monitor Client Processes


o The server can constantly monitor the client processes through the IP
address assigned to the client from his own system. In this way the
administrator can check the usage of the system resources like the
memory, CPU usage etc.

 Monitor Client Communications


o The server can also monitor the client communications including the
files they are sharing and the data they are sending or receiving to
other client systems in the intranet or in the internet.

 Send Warning Messages


o If the administrator finds the communications between the clients is
violating the organization norms, or the files being shared by the
client systems is against the ethics of the company he may send
warning messages to the clients to stop indulging in similar future
activities.

 Shut down Applications and systems

Secured Intra Network Through Server Dominance 32


Dept. of CSE, MSRIT

o If the client continues the unethical behaviour even after sending


warning messages, the administrator may surface in the picture and
either stop the client from indulging in such activities by shutting
down the application or by shutting down the whole system.

5.2 Sequence Diagram


: Server

: Client-1 : Client-2
: Admin

Enter usrname

Request password

Enter password

Verify reg. details

Verify

Confirm Login Confirm


verification
Request files

Retrieval Request

Retrieve File
Share files and Send file to client
transfer data
Secured Intra Network Through Server Dominance 33
Dept. of CSE, MSRIT

Run
Processes

Monitor process

Request info
through chat

REPLY

Monitor file
sharing

Send Warning
5.2.1 Description of the Sequence Shut
and down
Diagram
applications

 Verification of User Credentials


o This step involves entry of the User Name and the Password on behalf
of the user. These informations are received by the administrator and
then, he performs verification with the server and if the entries are
found to be matching, he sends the Login confirmation information to
the client.
 Flow of the Event

 If the user id and Password entry by the user matches with those
stored in the server side, the authentication is successful and the
subsequent login confirmed message is sent to the user.
 Otherwise the login is invalid and the user has to re-enter the
information.

 Request for Files and File Transfer


o Once the user’s login and password are verified, the user can request
for a file, either from the administrator or from another client. The
requested file may then be sent either by another client or by admin.
 Flow of the Event

Secured Intra Network Through Server Dominance 34


Dept. of CSE, MSRIT

 If the file requested is present with another client, then the file
may be sent directly by the client present within the intranet.
 If the requested file is present in the server, the request must be
passed to the administrator, who must retrieve the file from the
server and send it back to the client.

 Monitoring Processes and Applications


o The administrator can view the applications and processes running in
the client systems that are currently logged into the intranet. This
involves monitoring the system status including the critical system
resources like system memory, CPU usage, the functionalities being
accessed by the applications and likewise information.
 Flow of the Event
 Initially the administrator selects the targeted client (i.e. Client
which is to be viewed) by selecting its IP address which is
available in the intranetwork.
 Then the admin will get an interactive window where in it can see
the various applications and sessions running in the client. The
admin has the full authority over the targeted client applications
and it can act just like the client which is operating the
applications.
 Then the admin selects the applications and processes running in
the client and views its status and productivity towards the
organisation’s ethics and rules. This is fully dependent on the
admin as he can select any application which is executing in the
client. The admin can also view the hardware productivity that is
contributing to the process which is running in the client.

 Reply information through Chat


o The clients can get certain information from the administrator with the
help of the chat facility available within the intranet. In an industrial
organization, information like next program to be executed in the client
machine, reply to any messages from server and also mutual
information exchange between two clients which may or may not be
monitored by the admin.

Secured Intra Network Through Server Dominance 35


Dept. of CSE, MSRIT

 Flow of event
 The Chat Facility in the servers similar to that available in the
internet. That is similar like a window screen which shows the IP
address of the client to server. Selecting those IP address will
form a chat platform for both server and client.

 Send Warning messages and Shut Down the applications


o Once the client is found to be violating the code of ethics and rules of
the organisation, the admin can send warning messages to the client
regarding the use of those applications which are against the code of
ethics of the organisation.

 Flow of Event
 If the client is violating the code of rules of the organisation, the
client sends a warning message either through chat or separately.
 In Case if no reply found from the client either for the chat
message or for the Warning message, the admin can close the
situation without any concern of the client.

5.3 Architectural Design

Client-1 Client-2 Client-3 Client-4

Intranet

Server Client
Chat Facility (Admin) monitoring by
Secured Intra Network Through Server Dominance administrator 36
Dept. of CSE, MSRIT

Internet

File sharing Online help

Description of the Architectural Design

The system architecture shows the basic working of the system. As depicted in the
figure, a number of clients are logged into the intranetwork which is constantly
monitored by the system administrator.
In the due process, the clients may perform their normal operations like
running processes, applications and programs or sharing files and data with other
clients connected to the same intranetwork.
Each client system can be monitored through their unique IP address
assigned to them while connecting to the intranetwork. The network administrator
can view the processes running in the client systems including the usage of the
resources like the system bus and memory.
There is also a chat facility provided between the clients connected in the
intranetwork and the administrator for any sharing any important files or
requesting access permission to any files or requesting password and similar
issues.
In the second level of the hierarchy, the whole intranetwork is connected to
the internet, with the administrator sitting in between who monitors and controls
the flow of the packets coming in to the intranetwork from the internet and going
out from the intranetwork to the internet.

Secured Intra Network Through Server Dominance 37


Dept. of CSE, MSRIT

5.4 Activity Diagram

Client enters its


username
Wrong Username

User
name
accepted

Enter Password

File Password incorrect


Sharing

Accepted

Client (Already Client in Send Warning


Authenticated) intranet messages

Applications in
the client
Process Chat
Securedrunning
Intra Network Through Server Dominance 38
Admin
Monitor Monitor

You might also like