3.2.11 Lab - Network Sniffing With Wireshark - ILM
3.2.11 Lab - Network Sniffing With Wireshark - ILM
Objectives
In this lab, you will use the Linux utility tcpdump to capture and save network traffic. You will then use
Wireshark to investigate the traffic capture.
Prepare the host to capture network traffic.
Capture and save network traffic.
View and Analyze the Packet capture.
Background / Scenario
Wireshark is a network packet capture utility that can be used by network administrators to troubleshoot
network problems. It can also be used to eavesdrop on network communications to passively collect
information about users and services. Wireshark is considered a passive tool because it does not create
traffic on the network.
Required Resources
Kali VM customized for Ethical Hacker course
Internet access
Instructions
Record the IP address and MAC address of the eth0 network interface. This will be the source address
for packets originating on the Kali machine.
2023 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 5
Lab – Network Sniffing with Wireshark
Record the IP address of the default gateway. The default gateway responds to ARP requests for
destination IP address located off the source network.
<Type answer here>
Note: The IP address of the default gateway must be on the same IP subnet as the Ethernet (eth0)
interface address.
d. Determine the address of the configured default DNS server by displaying the contents of the
/etc/resolv.conf file. You can view the file using the cat command.
┌──(kali㉿Kali)-[~]
└─$ cat /etc/resolv.conf
question:
Record the IP address of the configured default DNS server. The DNS server IP address will be the
destination address of standard query packets and the source address for DNS reply packets.
<Type answer here>
2023 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 5
Lab – Network Sniffing with Wireshark
b. Open a second tab in the browser, enter skillsforall.com on the launch bar. When the page appears,
click the user icon at the top right of the page. Log in with your Skills for All login information.
c. Return to the terminal window that is running the tcpdump utility and enter CTRL-C to complete the
packet capture.
d. The tcpdump utility saved the output to a file named packetdump.pcap. This file should be saved in the
default home directory. Verify that the file exists in the directory using the ls command.
┌──(kali㉿Kali)-[~]
└─$ ls packetdump.pcap
packetdump.pcap
What are some of the websites that are listed in the DNS Standard queries?
<Type your answer here>
b. Click the magnifying glass search icon or choose Find Packet from the Edit menu. Search for the
skillsforall.com hostname. Select String in the Display filter dropdown box and enter skillsforall in the
search box. Click Find.
c. Select the first Standard query for the skillsforall.com website. Expand the query details pane below the
packet list to view the contents of the query packet.
d. Expand the Ethernet II information to display the Layer 2 header data contained in the packet. The
source MAC address is the MAC of the sending device interface, in this case the Kali VM, and the
destination MAC address is the MAC of the default gateway because the DNS server is not on the same
Layer 2 network.
Question
Does the source MAC address match the address that you recorded in Part 1?
<Type your answer here>
2023 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 5
Lab – Network Sniffing with Wireshark
e. Expand the Domain Name System (query) section to see the details of what is being sent to the DNS
server. It also indicates the line that contains the reply packet that was received in response to the query.
Double-click the link to the response. The details of the Standard query response packet are shown.
Question
What value is being set in the cookie being sent from the web server to the Kali client?
<Type your answer here>
2023 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 5
Lab – Network Sniffing with Wireshark
h. Examine the next GET packet being sent from the Kali client browser after receiving the cookie
information. Expand the Hypertext Transfer Protocol section. Look for the Cookie values being sent in the
packet.
Question
Does the PHPSESSID being sent back to the server in the GET request the same as the one sent from
server in the earlier reply?
<Type your answer here>
i. Close Wireshark. You will have the option to save the .pcap file containing the capture or to quit without
saving. The .pcap file will be saved in the current working directory unless otherwise specified.
Reflection
1. In this lab, you became familiar with capturing packets in both the tcpdump utility and the Wireshark
application. What are the benefits of using packet capture utilities when performing passive reconnaissance
on a potential target?
<Type your answer here>
2. What pieces of information can be gathered using packet captures?
End of document
2023 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 5