Network Security Lab Manual
Network Security Lab Manual
NETWORK SECURITY
LAB MANUAL
COURSE CODE: 15CS65P
BY
Mrs. UMADEVI.M
LECTURER
COMPUTER SCIENCE &
ENGINEERING RJS POLYTECHNIC
BANGALORE-34.
A host operating system (OS) is the original OS installed on a computer. Other operating
systems are sometimes installed on a computer.
Steps:
1. Download & install virtual box.
2. Enter a name for the new virtual machine and select the type of the guest
operating system you plan to install onto the virtual machine.
3. Select the amount of base memory (RAM) in megabytes to be allocated to the virtual
machine
4. If you wish you can now add a start-up disk to the new machine. You can either create
a new virtual disk or select one from the list or from another location using the folder
icon.
5.Please choose whether the new virtual disk file should be allocated as it is
used or if it should be created fully allocated.
6. After creating virtual machine start the machine and install another OS
7. Right click on the v machine and click start
8. Insert bootable CD into drive. Automatically installation will start as follows.
EXPT NO 2: PERFORM AN EXPERIMENT TO GRAB A BANNER
WITH TELNET AND PERFORM THE TASK USING NETCAT
UTILITY.
Banner Grabbing
Banner grabbing is an enumeration technique used to glean information about computer systems on a
network and the services running its open ports. Administrators can use this to take inventory of the
systems and services on their network. Tools commonly used to perform banner grabbing are Telnet,
which is included with most operating systems, and Netcat.
What is Telnet?
Telnet is a user command and an underlying CP/IP protocol for accessing remote computers. Through
Telnet, an administrator or another user can access someone else’s computer remotely. With Telnet, you
log on as a regular user with whatever privileges you may have been granted to the specific application
and data on that computer.
Steps:
1. Go to Command prompt
2. Type telnet followed by IP Address
Example:
As an example lets see if Google.com has port 80(HTTP) open…
3. If you get a blank screen with a blinking cursor you have successfully connected to that TCP port.
4. Now type following GET HTTP and press enter and you will see Google’s homepage being sent to you.
On the other hand if the TCP port is not open or not reachable you will see this: 0
Steps for Banner Grabbing using Netcat:
Netcat: Netcat is a featured networking utility which reads and writes data across n/w connections, using
the TCP/IP protocol. It is designed to be a reliable “back-end” tool that can be used directly or easily
driven by other programs and scripts.
Steps:
How to work with Netcat:
1.Go the command prompt
2.Copy the folder nc11nt to c:/from the netcat
s/w 3.In (c:\nc11nt\)
4.Type nc -v -n 192.168.1.111 80
5.You will get a blinking cursor that you have successfully connected to that TCP port.
6.Type GET HTTP.
Port Scanning
Port scanning is the process of connecting to TCP and UDP ports for the purpose
of finding which services and applications are open on the target device.
Port Scanning is one of the most popular techniques attackers use to discover
services they can break into. All machines connected to a LAN or connected to Internet via a modem run
many services that listen at well-known and not so well-known ports. By port scanning the attacker finds
which ports are available (i.e., being listened to by a service). Essentially, a port scan consists of sending
a message to each port, one at a time.
Port Numbers
The port numbers are unique only within a computer system. Port numbers
are 16-bit unsigned numbers. The port numbers are divided into three ranges: the Well Known Ports
(0..1023), the Registered Ports (1024..49151), and the Dynamic and/or Private Ports (49152..65535).
Well-Known Ports
All the operating systems now honor the tradition of permitting only the
super- user open the ports numbered 0 to 1023. These well-known ports (also called standard ports) are
assigned to services by the IANA (Internet Assigned Numbers Authority, www.iana.org).
NMAP
Nmap is one of the most well-known port scanning tools. Nmap is available for
windows and Linux as a GUI and command-line program and has ready availability of documentation,
and because of the way in which the tool has been developed and maintained. You can download Nmap
from http://insecure.org/nmap/download.html
Step 1: Install Nmap into a windows directory that is in the command path so that you can
run it easily from the command line regardless of the folder in which you are located.
From the command line, enter the following:
a.)C:\nmap -h
This will provide you with a listing of the command syntax of Nmap and some of the
types of scans it can perform.
b.)Syntax:Nmap -sP <IP address>
EX:Nmap -sP 192.168.1.112
Enter an IP address that is within your network and that you have permission to scan. If
you are not sure what the -sP switch (option) does,you may want to look back over the
results of
Step 2:
Scanning range of IP address
C:\Nmap -sS 192.168.1.112-200
c.) Nmap -sU <Ip Address>
Ex:nmap -sU 192.168.1.112
Remember that the -sU is a UDP scan,so the results may be as detailed as what was
returned from TCP scans
The exercise steps you through a port scanning with a GUI tool. The
scanning tool that is used is Superscan. You can download Superscan from
www.snapfiles.com/get/superscan.html
Step 1: After downloading , go to start programs system tools superscan to start
the program. The program interface will appear and look similar to Figure 4.10
Step 2: Enter a starting and ending IP address range to scan and press the > button.
Step 3: Click the Host and Service Discovery tab. Details will appear as shown in Figure
below.=
Step 4: Leave the default settings as shown in Figure above. Now, examine the scan options
tab.
Step 5: Notice the scan options shown in Figure above. Leave the scan options set as 1ms
to perform a fast scan.
Step 6: Click the start button, shown in the bottom of Figure 1. Allow the scan sometime
complete.
Step 7: When the scan is complete, click Generate HTML report. A report will be
generated, as shown in Figure 4-13.
Step 8. This report can be used to examine open services and determine which ports and
services can be further locked down and secured. It can also help identify that only
approved applications and services are running on the network.
EXPT NO 4: USING NMAP
1) FIND OPEN PORTS ON A SYSTEM
2) FIND MACHINES WHICH ARE ACTIVE
3) FIND THE VERSION OF REMOTE OS ON OTHER SYSTEMS
4) FIND THE VERSION OF S/W INSTALLED ON OTHER SYSTEM
Steps:
1. First download Nmap and install the nmap software.
These steps shown on GUI mode
2. Now open the Nmap software by clicking the start All programs Nmap
Nmap – Zenmap GUI
3. Now the Zenmap screen opens.
4. Now type the target IP Address: 216.58.197.78 or google.com & In Profile: use the
Intense scan & start scan process by clicking the scan tab.
5. Now a new output screen appears.
6. Now click on Host details and we can find the open ports of the system, machines
which are active, the version of the remote OS on the other systems and the version
of the software’s installed on other systems using Nmap.
These steps shown on DOS mode
Steps:
1. After the installation of the Nmap, open the terminal and enter the following
command.
2. Find open ports on a system
Nmap -v 192.168.1.112
3. Find machine which are active in the network.
Nmap -sP 192.168.1.198-253
It involves sending data to the target system and then see how it responds. Based on the
fact that teach system will respond differently, the response is compared with database
and the OS is identified. It is commonly used method though there are high chances of
getting detected. It can be performed by following ways.
Using Nmap : Nmap is a port scanning tool that can be used for active stack OS
fingerprinting.
Syntax: nmap -O IP_address
Example: nmap –O 192.168.56.101
Using Xprobe2: This UNIX tool for active fingerprinting.
Syntax: xprobe2 -v IP_address
Example: xprobe -v 192.168.56.101
Passive Fingerprinting involves examining traffic on network to determine the operating
system. There is no guarantee that the fingerprint will be accurate but usually they are
accurate. It generally means sniffing traffic rather than making actual contact and thus this
method is stealthier and usually goes undetected.
EXPT NO: 6 Perform an experiment to demonstrate how to sniff for router traffic
by using the tool Cain and Abel / wireshark / tcpdump
PACKET SNIFFER
A packet sniffer, sometimes referred to as a network monitor or network
analyzer, can be used by a network or system administrator to monitor and troubleshoot
network traffic. Using the information captured by the packet sniffer an administrator can
identify erroneous packets and use the data to pinpoint bottlenecks and help maintain
efficient network data transmission.
In its simple form a packet sniffer simply captures all of the packets of data
that pass through a given network interface. By placing a packet sniffer on a network in
promiscuous mode, a malicious intruder can capture and analyze all of the network traffic.
What is Wireshark?
Wireshark is a network packet analyzer. A network packet analyzer will try
to capture network packets and tries to display that packet data as detailed as possible.
You could think of a network packet analyzer as a measuring device used to
examine what's going on inside a network cable, just like a voltmeter is used by an
electrician to examine what's going on inside an electric cable (but at a higher level, of
course).
In the past, such tools were either very expensive, proprietary, or both.
However, with the advent of Wireshark, all that has changed.
Wireshark is perhaps one of the best open source packet analyzers available
today.
Some intended purposes
· Network administrators use it to troubleshoot network problems
· Network security engineers use it to examine security problems
· Developers use it to debug protocol implementations
· People use it to learn network protocol internals
OUTPUT
Download and install Wireshark network analyzer.
Steps to capture traffic:
1. Open Wireshark (Network Packet Analyser).
2. Select the Local Area Connection / Ethernet depends upon the Windows used.
Dumpsec’s GUI-based format makes it easy to take the results and port them
into a spreadsheet so that holes in system security are readily apparent and easily tracked.
It can provide you with usernames, SID’s, RID’s, account comments, account policies,
and dial-in information.
Step 2: Once it’s installed, open command prompt and establish a null session to a localhost.
The command syntax for doing so is as follows:
Step 3: Now open Dumpsec and select Report select Computer, as shown in Figure.
Step 4: Now select Report Dump Users as Table, and click OK.
Step 5: You need to select all items to the left of the screen and move them to the right
screen so that all fields will be selected, as shown in Figure.
Step 6: Click the OK button, and all the open fields will be populated. Notice that you now
have a complete list of users and related information, as shown in Figure
EXPT NO: 8 PERFORM AN WIRELESS AUDIT OF AN ACCESS POINT /
ROUTER AND DECRYPT WEP AND WPA.
NetStumbler (Network Stumbler) is one of the Wi-Fi hacking tool which only compatible
with windows, this tool also a freeware. With this program, we can search for wireless
network which open and infiltrate the network. Its having some compatibility and network
adapter issues.
Enumeration
Sniffing
Sniffing the network is one of the primary ways to determine which routing
protocols are running. If the network is still using hubs, all an attacker has to do is to plug
into an open RJ-45 wall jack to sniff the traffic. If no hubs are being used in the network,
the attacker must perform active sniffing.
Packet sniffing
Using the information captured by the packet sniffer an administrator can identify
erroneous packets and use the data to pinpoint bottlenecks and help maintain efficient
network data transmission.
In its simple form a packet sniffer simple captures all of the packets of data
that pass through a given network interface. Typically, the packet sniffer would only
capture packets that were intended for the machine in question. However, if placed into
promiscuous
mode, the packet sniffer is also capable of capturing all packets traversing the network
regardless of destination.
ARP stands for Address Resolution Protocol and it allows the network to
translate IP addresses into MAC addresses. It is a type of attack where the media access
control (MAC) address is changed by the attacker.
Also, called as ARP spoofing attacks, it is effective against both wired and
wireless local networks.
ARP poisoning is when an attacker is able to compromise the ARP table and
changes the MAC address so that the IP address points to another machine.
Steps:
Once cain & Abel and select the configuration Dialog box you should get a screen
like this:
If you have more than 1 network card choose 1 of the several!
If you have more than 1 network card choose 1 of the several!
4. Click on sniffer
Either leave it on the subnet scan or choose your own range to scan!
You should then see something like this:
12.Choose the password type (the number shows how many you may have sniffed):
STEPS:
1. Download and install jcryptool.
2. Open jcryptool.
1. Open the text editor in jcryptool & write the msg which you want to encrypt.
4. Select asymetric algoritham RSA.
1. Sniffer mode.
2. Packet Logger mode.
3. Network Intrusion Detection System mode.
1. Sniffer mode: Snort –v Print out the TCP/IP packets header on the screen.
Snort –vd show the TCP/IP ICMP header with application data in transit.
2. Packet Logger mode: Snort –dev -1 C:\log [Create this directory in the C drive]
and snort will automatically know to go into packet logger mode, it collects every
packet it sees and places it in log directory.
Snort –dev -1 C:\log –h IP address\24. This rule tells snort that you want to print
out the data link and TCP/IP headers as well as application data into the log
directory.
Snort -1 C:\log –b This is binary mode logs everything into a single file.
Steps:
C:\>snort -W
EXPT NO: 13 INSTALL ROOTKITS AND STUDY VARIETY OF OPTIONS.
A rootkit may consist of spyware and other programs that: monitor traffic and
keystrokes; create a “backdoor” into the system for the hacker’s use; alter log files;
Attack other machines on the network; and alter existing system tools to escape detection.
Steps:
The OpenSSL is a command line binary can perform a wide range of cryptographic
operation.
Steps:
1. Install OpenSSL setup file on to the default location.
2. Perform Full installation and click Next.
3. Create Document shortcuts in start menu and Click Next.
Complete the installation.
4. Execute the OpenSSL from command prompt available
at C:\ProgramFiles\OpenSSL-Win32\bin\openssl.exe
OpenSSL>(This is the OpenSSL prompt)
5. Now execute the command as follows for password generation.
6. Passwd -crypt [Type your password] This is limited to 8 characters
password generator.
7. Passwd -1 [Type your password] This allows you to insert password length
beyond 8 characters.
8. Type this command to generate 10-12 characters passwords of 10 numbers.
EXPT NO: 15 SETUP A HONEY POT AND MONITOR THE HONEY POT ON
NETWORK
WHAT IS A HONEYPOT?
Two or more honey pots on a network from a honey-net. Honey pots and
honey-net are usually implemented as a part of larger network IDS
Steps:
Honeypot is compatible with and has tested to work on windows 2000 and windows XP
computers. At least 128MB of ram is recommended.
Steps: