Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

UNIVERSITY INSTITUTE OF ENGINEERING AND TECHNOLOGY, PANJAB

UNIVERSITY, CHANDIGARH

(NSC PRACTICAL)

NETWORK SECURITY AND CRYPTOGRAPHY

SUBMITTED BY: SUBMITTED TO:


VANSHIKA SINGLA M/S Sukhvir Kaur
UE218107
IT (3rd year)
PRACTICAL-1

AIM: Capturing packets from UIET Website using Wireshark.

1. What is Packet Sniffer?


Packet sniffers are applications or utilities that read data packets traversing the
network within the Transmission Control Protocol/Internet Protocol layer. When
in hands of network administrators, these tools “sniff” internet traffic in real-
time, monitoring the data, which can then be interpreted to evaluate and diagnose
performance problems within servers, networks, hubs and applications.

2. What is the purpose of Packet Sniffers?


a. Network troubleshooting: Packet sniffing can be used to identify network problems by
examining the packets and identifying issues such as network congestion, packet loss, or
improper configuration.
b. Security analysis: Packet sniffing can be used to detect and analyze security threats, such
as network intrusions, malware infections, or unauthorized access attempts.
c. Network optimization: Packet sniffing can be used to optimize network performance by
identifying bottlenecks and optimizing the network configuration.
d. Protocol analysis: Packet sniffing can be used to analyze network protocols and identify
areas where they can be improved or optimized.

3. What are the popular Packet Sniffers?


These are the popular Packet Sniffers:
i) SolarWinds Network Packet Sniffer: It provides the information of the application or the
network whether it is affecting the end-user experience or not. It comes with the SolarWinds
Network Performance Monitor (NPM). SolarWinds NPM will provide you an at-a-glance
overview of real performance stats based on packet-level data through a dashboard. This
helps with pinpointing problematic traffic. It performs a deep packet inspection.
ii) WireShark: Wireshark is a network protocol analyzer. You will get to see what is happening
on your network at a microscopic level with the help of this tool. It is a popular tool and is
used in many commercial and non-profit enterprises, government agencies, and educational
institutions as a de facto standard. It supports various platforms such as Windows, Mac,
Linux, Solaris, FreeBSD, NetBSD, etc. In this practical file we will be using the WireShark
only for Packet Capturing.
iii) Paessler PRTG: Paessler PRTG network monitor is a professional all-in-one packet sniffing
tool. It will provide valuable insights into your infrastructure and network performance. It
supports Windows. It has various possibilities for monitoring everything like bandwidth and
traffic. PRTG makes the use of various technologies like SNMP, NetFlow, WMI, network
sniffing, etc. while monitoring the data packets.

Components found in capturing the packets of UIET Website:


 Collecting Packets:
 IP V6:

IPv4 produces 4 billion addresses, and the developers think that these addresses
are enough, but they were wrong. IPv6 is the next generation of IP addresses.
The main difference between IPv4 and IPv6 is the address size of IP addresses.
The IPv4 is a 32-bit address, whereas IPv6 is a 128-bit hexadecimal address.

 ICMP V6:

ICMPv6 is used by IPv6 nodes to report errors encountered in processing packets,


and to perform other internet-layer functions, such as diagnostics (ICMPv6
"ping"). ICMPv6 is an integral part of IPv6, and the base protocol must be fully
implemented by every IPv6 node.
Internet Control Message Protocol (both ICMPv4 and ICMPv6) is a protocol
which acts as a communication messenger protocol between the communicating
devices in IP network. ICMP messages provide feedback, error reporting and
network diagnostic functions in IP networks which are necessary for the smooth
operation of IPv6.

 IP V4:

IPv4 is a version 4 of IP. It is a current version and the most commonly used IP address. It is a 32-
bit address written in four numbers separated by 'dot', i.e., periods. This address is unique for each
device.

For example, 66.94.29.13

 TCP:

TCP (Transmission Control Protocol) is one of the main protocols of the Internet
protocol suite. It lies between the Application and Network Layers which are used
in providing reliable delivery services. It is a connection-oriented protocol for
communications that helps in the exchange of messages between different devices
over a network. The Internet Protocol (IP), which establishes the technique for
sending data packets between computers, works with TCP.
 ARP:

The acronym ARP stands for Address Resolution Protocol which is one of the
most important protocols of the Data link layer in the OSI model. It is responsible
to find the hardware address of a host from a known IP address. There are three
basic ARP terms. ARP finds the hardware address, also known as the Media
Access Control (MAC) address, of a host from its known IP address.
There are 3 types of ARP:

 Reverse ARP
 Proxy ARP
 Inverse ARP

 QUIC:

QUIC (Quick UDP Internet Connections) is an experimental transport layer


network protocol designed by Google. The overall goal is to reduce latency
compared to that of TCP. Think of QUIC as being similar to TCP+TLS+HTTP/2
implemented on UDP. Because TCP is implemented at the lowest levels of
machinery (operating systems, routing firmware), making changes to TCP is next to
impossible given the amount of upgrades that would need to occur. Since QUIC is
built on top of UDP, it suffers from no such limitations and can be integrated into
end host applications.
 DNS:

Domain Name System (DNS) is a hostname for IP address translation service.


DNS is a distributed database implemented in a hierarchy of name servers. It is
an application layer protocol for message exchange between clients and servers.
It is required for the functioning of the Internet. It is very difficult to find out
the IP address associated with a website because there are millions of websites
and with all those websites we should be able to generate the IP address
immediately, there should not be a lot of delays for that to happen organization
of the database is very important.
PRACTICAL-2
AIM: Socket programming

Server:

CODE:

import socket
s = socket.socket()
print("Socket successfully created")
port = 12348
s.bind(('',port))
print("Socket binded to %s" %(port))
s.listen(5)
print("socket is listening")
while True:
c,addr = s.accept()
print("got connection from", addr)
c.send("Thank you for connecting ".encode())
c.close()
break

OUTPUT:
CLIENT:
CODE:
import socket
s = socket.socket()
port = 12348
s.connect(('127.0.0.1',port))
print(s.recv(1024).decode())
s.close()

OUTPUT:
PRACTICAL-3
AIM: DES Algorithm programming

You might also like