TechKnowSurge
Cisco CCST Networking 5.2 Cisco CyberOps Associate 4.6 CompTIA Network+ 1.4 Cisco CyberOps Associate 4.8 CompTIA A+ Core 1 2.1 Cisco CCNA 1.5 Cisco CCST Networking 1.5
VideoNetworkFree

DEMO: Wireshark, Ports

Wireshark is used to capture and analyze web traffic on a Windows machine, with a focus on identifying the TCP ports involved in an HTTP connection between two networked devices.

Complete this video to capture a CTF flag worth 1 point.

About this video

Wireshark is used to capture all traffic crossing a Windows machine's Ethernet interface during a simple HTTP session with a Raspberry Pi server. Before the web traffic begins, the capture reveals background noise from a Cisco switch performing Spanning Tree Protocol and device discovery — traffic that can be safely filtered out when focusing on the host-to-host communication. The actual session begins with an ARP request, where the client laptop queries the network for the MAC address associated with the server's IP, a necessary step before any Layer 2 frame can be properly addressed and transmitted. Once the MAC address is resolved, the TCP connection is established through a three-way handshake, the web page is requested and delivered, and the connection is then cleanly torn down — all visible as distinct phases in the capture. The central focus of the analysis is port behavior within that TCP session. The client laptop initiates the connection from an ephemeral source port and directs traffic to destination port 80 on the Pi, the standard port for HTTP. The server responds from port 80 back to the client's ephemeral port, and both values remain consistent throughout the exchange, allowing TCP to track the conversation as a single continuous thread. Wireshark's packet detail pane exposes the TCP header for any selected packet, showing the source and destination port fields alongside the raw hexadecimal and binary representations of the data — providing a direct view of how port information is encoded at the protocol level.

What you'll learn

What's covered

Web Traffic Analysis in Wireshark

Aligned to

Cisco CCST Networking
5.2 Perform a packet capture with Wireshark and save it to a file
1.5 Describe common network applications and protocols
Cisco CyberOps Associate
4.6 Extract files from a TCP stream when given a PCAP file and Wireshark
4.8 Interpret the fields in protocol headers as related to intrusion analysis
CompTIA Network+
1.4 Explain common networking ports, protocols, services, and traffic types
CompTIA A+ Core 1
2.1 Compare and contrast Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ports, protocols, and their purposes
Cisco CCNA
1.5 Compare TCP to UDP

Key terms

Port
A logical endpoint for communication in a network, identified by a number that specifies a particular service or application.
Transmission Control Protocol
TCP
A connection-oriented transport protocol that ensures reliable, ordered, and error-checked delivery of data.
Transport Layer
Layer 4 of the OSI model, responsible for end-to-end communication, flow control, and error recovery.
Hypertext Transfer Protocol
HTTP
An application-layer protocol that defines how web browsers and servers communicate to request and deliver web pages and other content, operating over TCP on port 80. HTTP transmits data in plaintext, which is why it has been largely replaced by HTTPS for sensitive content.
Source Port
The port number assigned to the sending application in a network communication, used to track the originating side of a session.
Destination Port
The port number identifying the target service or application on the receiving device in a network communication.
Wireshark
Wireshark is an open-source network protocol analyzer that captures and interactively displays packet-level traffic, used by security professionals for network forensics, vulnerability research, and incident investigation.

Transcript

Capturing the Data

First of all, we need to capture this data. So what I'm going to do is, with Wireshark, monitor the Ethernet connection. Then I'm going to go to the Pi address in my browser to bring up our web page. And then the last thing that I'm going to do is close out of the browser, because there's some TCP connections that get broken back down with this, so I want to make sure I capture that. And then I will stop my capture.

What's in the Capture

So now let's go back and look at some of the traffic that's gone across this Ethernet interface. One of the things that I see right off the bat is that there's this Cisco information that's coming across that Ethernet interface. Once again, that's just the switch that this is plugged into. It's trying to discover other switches, and it's trying to use Spanning Tree Protocol and some other protocols to make connections. So we can ignore all this stuff that's coming from the Cisco.

I scrolled to the top, and one of the first things as far as communication between my demo laptop — which is this Dell MAC address right here — and the Pi, which is this Raspberry MAC address right here. So one of the first things I see are these ARP requests, which makes sense, because I went out to this IP address, but it needs to know the MAC address to communicate on that layer 2, to know where the frame goes, what to put in the frame as a layer 2 destination. So it goes and does this ARP request and it says, who is 10.1.0.3, and the demo Pi replies back with the MAC address that's on that demo Pi.

The next thing it does is these three packets right here establish a TCP connection. But this establishes the TCP connection. Once that connection is established, then the demo laptop requests a web page, and then this is the reply back — the web page actually gets transferred back. So we see that that gets transferred back. So there's this TCP communication that happens back and forth. Once that is established, then there is some other chatter in here. We get down to here and we see the TCP connection ending, and then some more finish of the TCP connection, so it closes up that.

So we're going to be talking about all those components, but for now we're just going to take a look at the ports and what ports are being used for this transfer back and forth.

The Ports in Use

So I've scrolled up to the top here, and right after my ARP requests I can see that we have the communication that starts establishing that TCP connection. Right here in the info it shows us that we're using port 60425 to port 80. So we're reaching out on port 80. We know that that's HTTP now, and that it's requesting that web page — or it's going to request a web page — but it's reaching out to that port, and that demo Pi is listening on port 80 for requests for that web traffic. And then the response comes back from the demo Pi, from port 80 to 60425. And then there is another connection that happens from the demo laptop to the Pi: the demo laptop has a source port of 60425 and it's going to the destination port of port 80.

So we're seeing how these are communicating back and forth, and it's keeping track of this thread of communication via these ports right here — both the source port, where it's keeping track of the conversation, and the destination port, where it's keeping track of what service it's actually referencing.

This section right here just shows us a brief synopsis of that TCP connection that's establishing. But down here, if we go down to where our packet information is, we can see the Transmission Control Protocol right here, and it gives us a brief summary once again. The source port is 60425, destination port is port 80. We can open this up and then it breaks it down even further, and we can see the section down there of where the header looks like when it comes to the actual hexadecimal — or if I wanted to switch to binary, I can show it as bits.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →