UnixDroid

Lesson 01 of 5

What is Wireshark? Install Wireshark and Capture Your First Packets

4 min read

What Wireshark does, how to install it on Kali, Ubuntu and Windows, and how to read your first capture.

Wireshark is the world's most popular free tool for looking inside network traffic. It captures the packets going in and out of your computer and shows you every detail: who talked to whom, which protocol they used and exactly what was sent. Network engineers use it to fix slow or broken connections, and SOC analysts and incident responders use it to investigate suspicious activity.

Wireshark is free and open source. Gerald Combs started it in 1998 under the name Ethereal, and it was renamed Wireshark in 2006.

Wireshark interface explained: display filter bar, packet list, packet details and packet bytes panes
Wireshark interface explained: display filter bar, packet list, packet details and packet bytes panes

What can you do with Wireshark?

  • Troubleshoot networks – find out why a website is slow, why DNS fails or why a connection keeps dropping
  • Learn how protocols really work – watch a TCP handshake, a DNS lookup or an HTTP request happen live
  • Investigate incidents – see which machine talked to a suspicious IP and what it sent
  • Check your own security – find apps on your network that still send data without encryption

Capturing traffic on your own computer and network is fine. Capturing other people's traffic without permission, for example on office, college or public Wi-Fi, can break privacy laws and the IT Act 2000. Stick to your own devices, your own lab, and the free sample captures we use later in this course.

How to install Wireshark

Kali Linux – Wireshark is pre-installed. Open it from the menu or type wireshark in a terminal.

Ubuntu and Debian:

sudo apt update
sudo apt install wireshark -y
sudo usermod -aG wireshark $USER

During the install, choose Yes when it asks whether non-superusers should be able to capture packets. Then log out and back in so the group change takes effect. Now you can capture without running Wireshark as root, which is safer.

Windows and macOS – download the installer from wireshark.org. On Windows, let it install Npcap, the driver Wireshark needs to capture packets.

Capture your first packets

  • Open Wireshark. The start screen lists your network interfaces with a small live graph next to each one.
  • Double-click the interface with activity, usually eth0 on Linux or Wi-Fi / Ethernet on Windows.
  • Open a website in your browser so there's some traffic.
  • Click the red square Stop button after 10–20 seconds.
  • Save the capture with File → Save As. The default .pcapng format keeps everything.

The three panes

  • Packet list (top) – one line per packet: number, time, source, destination, protocol and a short summary
  • Packet details (middle) – the selected packet broken into layers: Frame, Ethernet, IP, TCP or UDP, then the application protocol
  • Packet bytes (bottom) – the raw packet in hex on the left and readable text on the right

Click a line in any pane and Wireshark highlights the matching bytes in the others. This is the best way to learn how headers are built.

What do the colours mean?

Wireshark colours packets so you can scan them quickly. With the default rules, light purple is usually TCP, light blue is UDP (like DNS), light green is HTTP, and black rows with red text point to problems such as retransmissions or bad checksums. You can see or change every rule under View → Coloring Rules.

Simple words mein (Hinglish)

Wireshark ek free tool hai jo network ke packets pakad kar dikhata hai: kisne kisko kya bheja aur kaunsa protocol use hua. Kali Linux mein ye pehle se aata hai. Interface select karo, capture start karo, website kholo aur stop karo. Upar packet list, beech mein details aur neeche raw bytes. Bas yaad rakho: sirf apna network ya apni lab capture karo.

FAQ

Is Wireshark free? Yes. Wireshark is free and open source on Windows, Linux and macOS.

Can Wireshark see HTTPS traffic? It can see that an HTTPS connection happened, and which site it was for, but the content is encrypted. Lesson 5 shows how to decrypt your own browser's traffic for learning.

What is a .pcapng file? The default file format Wireshark uses to save captures. Older tools use .pcap, and Wireshark opens both.

Do I need root to run Wireshark? No. Add your user to the wireshark group as shown above. Running the whole GUI as root isn't recommended.

Practice task

  • Capture 30 seconds of traffic while you open two websites
  • Click one DNS packet and expand every layer in the details pane
  • Save the capture as first-capture.pcapng, because we'll reuse it in the next lesson

Next lesson: capture filters vs display filters, with a cheat sheet you'll use every day.