Csw-Lab Mannual Format
Csw-Lab Mannual Format
NAINI, PRAYAGRAJ
(Affiliated to Dr. A.P.J Abdul Kalam Technical University, Lucknow)
4th SEMESTER
NAME:----------------------------------------------------------------------------
ROLL NO:-------------------------------------------------------------------------
BRANCH/SEM/SE:--------------------------------------------------------------
Vision of the Department
M2. To foster skills and competency, generating novel ideas, entrepreneurship and
model creations focused towards deep knowledge, interpersonal skills and
leadership.
M3. To develop habitude of research among faculty and students in the area of
Computer Science & Allied disciplines by providing the desired environment, for
addressing the needs of industry and society.
M4. To mould the students with ethical principles in thoughts, expression and deeds.
General laboratory instructions
1. Students are advised to come to the laboratory at least 5 minutes before (to starting time),
those who come after 5 minutes will not be allowed into the lab.
2. Plan your task properly much before to the commencement, come prepared to the lab with
the synopsis/ program / experiment details.
3. Student should enter into the laboratory with: a. Laboratory observation notes with all the
details (Problem statement, Aim, Algorithm, Procedure, Program, Expected Output, etc.,)
filled in for the lab session. b. Laboratory Record updated up to the last session
experiments and other utensils (if any) needed in the lab. c. Proper Dress code and
Identity card.
4. Sign in the laboratory login register, write the TIME-IN, and occupy the computer system
allotted to you by the faculty.
5. Execute your task in the laboratory, and record the results / output in the lab observation
note book, and get certified by the concerned faculty.
6. All the students should be polite and cooperative with the laboratory staff, must maintain
the discipline and decency in the laboratory.
7. Computer labs are established with sophisticated and high end branded systems, which
should be utilized properly.
8. Students / Faculty must keep their mobile phones in SWITCHED OFF mode during the
lab sessions. Misuse of the equipment, misbehaviours with the staff and systems etc., will
attract severe punishment.
9. Students must take the permission of the faculty in case of any urgency to go out ; if
anybody found loitering outside the lab / class without permission during working hours
will be treated seriously and punished appropriately.
10. Students should LOG OFF/ SHUT DOWN the computer system before he/she leaves the
lab after completing the task (experiment) in all aspects. He/she must ensure the system / seat is
kept properly.
INDEX
Experiment No.-1
Objective: Introduction to IP address and Wireshark
Apparatus Required:
Theory:
What is IP address?
Types of IP Addresses:
1. Classful IP Address: In the early days of the Internet, IP addresses were divided into five
classes: A, B, C, D, and E. Classes A, B, and C were commonly used for addressing hosts,
while classes D and E were reserved for multicast and experimental purposes, respectively.
Address Range:
Class A: Addresses in Class A have their first bit set to 0, allowing for a range from 0.0.0.0 to
127.255.255.255. The first octet represents the network portion, and the remaining three
octets represent the host portion.
Class B: Addresses in Class B have their first two bits set to 10, allowing for a range from
128.0.0.0 to 191.255.255.255. The first two octets represent the network portion, and the
remaining two octets represent the host portion.
Class C: Addresses in Class C have their first three bits set to 110, allowing for a range from
192.0.0.0 to 223.255.255.255. The first three octets represent the network portion, and the
remaining octet represents the host portion.
2. Classless IP Address: CIDR allows for more flexible allocation of IP addresses by using
variable-length subnet masking (VLSM). Instead of rigidly defined address classes, CIDR
allows for the allocation of any contiguous range of IP addresses.
A MAC address, short for Media Access Control address, is a unique identifier assigned
to each device connected to a network. It is a 12-digit hexadecimal number,
typically displayed in a format like 00-00-00-00-00-00 or 00:00:00:00:00:00. The
MAC address is used to identify a device at the data link layer of the OSI model,
which is responsible for managing data transmission between devices on the same
network. It is fixed through the NIC (Network Interface Controller) card.
Unique identifier: Each device has a unique MAC address, which distinguishes it from
other devices on the same network.
Assigned by the manufacturer: MAC addresses are typically assigned by the device’s
manufacturer during the manufacturing process.
Burned into the NIC: MAC addresses are stored in the device’s network interface
controller (NIC) and cannot be changed.
Used for network communication: MAC addresses are used to identify devices on a
network and facilitate communication between them.
Used for troubleshooting: MAC addresses can be used to troubleshoot network issues,
as they can help identify which device is causing a problem.
Used for security: MAC addresses can be used to restrict access to a network by only
allowing devices with specific MAC addresses to connect.
A NIC (network interface controller) card, also known as a network adaptor or network
interface card, is a circuit board that is installed on a computer to connect to the
network. An NIC card works as an indispensable component for the network
connection of computers, helping to better communication between data
communication equipment (DCE). NIC cards are commonly found in most
computers and some network servers. They contain electrical circuitry in line with
data link and physical layer standards, including a port to connect to the local area
network's (LAN) medium.
Each communicating device (node) on a LAN must have at least one NIC card.
What is Wireshark?
Wireshark is a network protocol analyzer used for capturing and analyzing network
traffic in real-time. It allows users to examine data from a live network or from a
previously captured file.
Features of Wireshark:
Packet Capturing: Wireshark can capture packets from a wide range of network interfaces.
Protocol Support: It supports hundreds of protocols, allowing detailed analysis of various
types of network traffic.
Filtering and Search: Wireshark provides powerful filtering and search capabilities to
isolate and analyse specific packets.
Graphical Visualization: It offers graphical representations of network traffic, making it
easier to understand complex data.
Protocol Decoding: Wireshark can decode and display the contents of packets, providing
insights into the communication between network devices.
Exporting Data: Captured data can be exported in various formats for further analysis or
reporting.
Result:
Understanding IP addresses, MAC addresses, NIC card and Wireshark for analyzing
network traffic and capturing packets in real time.
Precaution:
1. Safe browsing of Internet while surfing through various websites.
2. Treating lab equipment kindly and not breaking anything.
3. Enabling firewall protection and updating antivirus software as a safety measure against
unexpected attacks.
Experiment No.-2
Objective: Basic Packet Inspection: Capture network traffic using Wire shark and
analyze basic protocols like HTTP, DNS, and SMTP to understand how data is
transmitted and received.
Apparatus Required:
Theory:
What is Wireshark?
Wireshark is a network protocol analyzer used for capturing and analyzing network
traffic in real-time. It allows users to examine data from a live network or from a
previously captured file.
SMTP is a protocol used for sending and receiving email messages over a network. It is
an application layer protocol that works in conjunction with other email protocols,
such as POP3 (Post Office Protocol) and IMAP (Internet Message Access Protocol),
to deliver email to its intended recipients. SMTP operates on TCP port 25 and
follows a client-server architecture. When an email is sent, SMTP is used to transfer
the message from the sender's email client or server to the recipient's email server.
SMTP is a text-based protocol that defines the format and rules for message
transmission, including addressing, message transfer, and error handling.
Observations:
List of Screenshots:
Fig 1.1
Fig 1.2
Fig 1.3
Fig 1.4
Fig 1.5
Fig 1.6
Fig 1.7
Result:
Understanding IP addresses, MAC addresses, NIC card and Wireshark for analyzing
network traffic and capturing packets in real time.
Precaution:
4. Safe browsing of Internet while surfing through various websites.
5. Treating lab equipment kindly and not breaking anything.
6. Enabling firewall protection and updating antivirus software as a safety measure against
unexpected attacks.
EXPERIMENT 5
From the Interface Options select the network interface that you want to monitor and
click Start. On your laptop you would be using your WiFi adapter or ethernet on a
VM.
Open Chrome and go to Altoro Mutual (testfire.net). This is a website designed to help
with cybersecurity exercises. Make sure to type http:// and not https:// .
Click on the Sign In and type admin/admin for username/password and click Login.
Chrome usually tries to save your credentials for this site. Hello Admin User page
Sign out of Testfire.net so Chrome does not cache your login. We will be logging to
Testfire.net again later. This screens confirms that you have successfully logged out.
Next switch to Wireshark which has been capturing all network activity between your
computer and the testfire site and click stop to end capture mode
As you see there are a lot of data (packets) captured. You need to set a filter to zoom in
on data (packets) of interest.
Scroll down till you see the packet that fetches the login screen.
Next go to the packet that shows the login data that you sent to the server. Look for
Expand the ‘HTML Form URL Encoded’ section to reveal the login information used to
Now repeat the same set of steps except this time go to https://demo.testfire.net instead
and using the captured packets show that the protocol is more secure and that you are
no longer able to sniff out the username and password. Hint: Because the
communication between your computer and web server is now encrypted it is not