10.6.7 Lab - Using Wireshark To Examine HTTP and HTTPS Traffic
10.6.7 Lab - Using Wireshark To Examine HTTP and HTTPS Traffic
Objectives
Part 1: Capture and view HTTP traffic
Part 2: Capture and view HTTPS traffic
Background / Scenario
HyperText Transfer Protocol (HTTP) is an application layer protocol that presents data via a web browser.
With HTTP, there is no safeguard for the exchanged data between two communicating devices.
With HTTPS, encryption is used via a mathematical algorithm. This algorithm hides the true meaning of the
data that is being exchanged. This is done through the use of certificates that can be viewed later in this lab.
Regardless of HTTP or HTTPS, it is only recommended to exchange data with websites that you trust. Just
because a site uses HTTPS does not mean it is a trustworthy site. Threat actors commonly use HTTPS to
hide their activities.
In this lab, you will explore and capture HTTP and HTTPS traffic using Wireshark.
Required Resources
• CyberOps Workstation VM
• Internet connection
Instructions
© 2017 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 7 www.netacad.com
Lab - Using Wireshark to Examine HTTP and HTTPS Traffic
c.
While in the terminal application, enter the command sudo tcpdump –i enp0s3 –s 0 –w
httpdump.pcap. Enter the password cyberops for the user analyst when prompted.
[analyst@secOps ~]$ sudo tcpdump –i enp0s3 –s 0 –w httpdump.pcap
[sudo] password for analyst:
tcpdump: listening on enp0s3, link-type EN10MB (Ethernet), capture size 262144 bytes
This command starts tcpdump and records network traffic on the enp0s3 interface.
The -i command option allows you to specify the interface. If not specified, the tcpdump will capture all
traffic on all interfaces.
The -s command option specifies the length of the snapshot for each packet. You should limit snaplen to
the smallest number that will capture the protocol information in which you are interested. Setting snaplen
to 0 sets it to the default of 262144, for backwards compatibility with recent older versions of tcpdump.
© 2017 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 7 www.netacad.com
Lab - Using Wireshark to Examine HTTP and HTTPS Traffic
The -w command option is used to write the result of the tcpdump command to a file. Adding the
extension .pcap ensures that operating systems and applications will be able to read to file. All recorded
traffic will be printed to the file httpdump.pcap in the home directory of the user analyst.
Use the man pages for tcpdump to determine the usage of the -s and -w command options.
d. Open a web browser from the launch bar within the CyberOps Workstation VM. Navigate to
http://www.altoromutual.com/login.jsp
Because this website uses HTTP, the traffic is not encrypted. Click the Password field to see the warning
pop up.
e. Enter a username of Admin with a password of Admin and click Login.
f. Close the web browser.
g. Return to the terminal window where tcpdump is running. Enter CTRL+C to stop the packet capture.
© 2017 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 7 www.netacad.com
Lab - Using Wireshark to Examine HTTP and HTTPS Traffic
c. Browse through the different HTTP messages and select the POST message.
d. In the lower window, the message is displayed. Expand the HTML Form URL Encoded: application/x-
www-form-urlencoded section.
Question:
This command will start tcpdump and record network traffic on the enp0s3 interface of the Linux
workstation. If your interface is different than enp0s3, please modify it when using the above command.
All recorded traffic will be printed to the file httpsdump.pcap in the home directory of the user analyst.
b. Open a web browser from the launch bar within the CyberOps Workstation VM. Navigate to
www.netacad.com.
Note: If you receive a “Secure Connection Failed” webpage it probably means the date and time are
incorrect. Update the day and time with the following command, changing to the current day and time:
© 2017 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 7 www.netacad.com
Lab - Using Wireshark to Examine HTTP and HTTPS Traffic
© 2017 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 7 www.netacad.com
Lab - Using Wireshark to Examine HTTP and HTTPS Traffic
b. In the Wireshark application, expand the capture window vertically and then filter by HTTPS traffic via port
443.
Enter tcp.port==443 as a filter, and click Apply.
c. Browse through the different HTTPS messages and select an Application Data message.
What has replaced the HTTP section that was in the previous capture file?
© 2017 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 7 www.netacad.com
Lab - Using Wireshark to Examine HTTP and HTTPS Traffic
After the TCP section, there is now a Secure Sockets Layer (SSL/TLS 1.2) section
instead of HTTP.
a. Completely expand the Secure Sockets Layer section.
Reflection Questions
1. What are the advantages of using HTTPS instead of HTTP?
When using HTTPS, the data payload of a message is encrypted and can only be viewed by the devices
that are part of the encrypted conversation.
1. Are all websites that use HTTPS considered trustworthy?
No, because malicious websites can utilize HTTPS to appear legitimate while still capturing user data
and logins.
•
End of document
© 2017 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 7 www.netacad.com