Practical Wireshark
Practical Wireshark
☃
Practical Wireshark
Theory ⇒
What is Wireshark ?
• Wireshark is network traffic analyzer tool
• Very essential tool for any security professional or system admins
• Adisplay
network packet analyzer will try to capture network packets and tries to
that packet data as details as possible
• Best tool for troubleshooting issues in your network
Wireshark Features ⇒
• Capture live packet data from a network interface or more
• Open files containing packet data captured with tcpdump/WinDUMP, and
many other packet capture programs
• Display Packets with very detailed protocol information
• Filer and Search for packets is very useful
• Colorization of Packet is most useful feature of Wireshark
LearnHacking.online 1/33
Practical Wireshark
🔥 Remember ⇒
Wireshark is not tool for Intrusion Detection System [IDS]
Also, Wireshark will not manipulate things on the network
Wireshark is only use to measure packets
Wireshark doesn't send packets on the network
LearnHacking.online
2/33
Practical Wireshark
3/33
Practical Wireshark
You can download wireshark for windows and mac os from there
4/33
LearnHacking.online
Practical Wireshark
• You can select one or more of the network interfaces using “shift left-click."
• Once you have the network interface selected, you can start the capture, and
there are several ways to do that
• Click the first button on the toolbar, titled “Start Capturing Packets.”
5/33
Practical Wireshark
LearnHacking.online
6/33
Practical Wireshark
• Once you have captured all the packets you need, you use the same buttons
or menu options to stop the capture.
🔥 Best practice says that you should stop Wireshark packet capture before
you do analysis.
LearnHacking.online
7/33
Practical Wireshark
8/33
Practical Wireshark
(1) Title bar – trace file name, capture source, or “The Wireshark Network
Analyzer”
(2) Main menu – standard menu
(3) Main toolbar – learn to use this set of icon buttons!
(4) Display Filter and Filter Expressions area – focus on specific traffic
(5) Wireless toolbar – define 802.11 settings
(6) Packet List pane – packet relationship indicator and summary of each frame
(7) Packet Details pane – dissected frames
(8) Packet Bytes pane – hex and ASCII details
(9) Status Bar – access to the Expert, annotations, packet counts, and profiles
You will confuse about their icons for what meaning and purpose, So ⇒
9/33
Practical Wireshark
10/33
Practical Wireshark
Practical Time
Theory is enough for starting, Now time to learn wireshark practically, from various
pcap files to analyze them and find useful information from there
challenge1.pcap
11/33
Practical Wireshark
12/33
LearnHacking.online
Practical Wireshark
Task 1
Find out what HOST is using in pcap file ?
ANS ⇒
We know host is related to http part. So in filter type http
13/33
LearnHacking.online
Practical Wireshark
LearnHacking.online
14/33
Practical Wireshark
Task 2
LearnHacking.online
15/33
Practical Wireshark
What other information we can get from same challenge pcap file about Host
192.168.0.102
16/33
LearnHacking.online
Practical Wireshark
We, can see there is POST Request and username and password is in clear text
mean no encoding on challenge.php file
c1.pcap
LearnHacking.online 17/33
Practical Wireshark
Task 1
How many ping requests were sent in the c1.pcap capture?
Ans :
Open the packet capture and apply the following filter: icmp.type==8
This filter will show all ICMP (aka ping) packets that are Type 8, which is an echo
ping request
Above pic, in this you will see there are many options to use, so, this will let you
know what you need to filter for specific result. For now let's use icmp.type==8
LearnHacking.online
18/33
Practical Wireshark
So, you see there are total 6 icmp packets so we got our ans
So, answer is there are 6 ping requests
Task 2
What is the IP address of the device associated with 08 00 27 4b:e3 60?
Ok, now we need to find IP for mac address 08 00 27 4b:e3 60
So, to find out IP , we need to find hexadecimal value for MAC Address
This ⇒ 08 00 27 4b:e3 60 ⇒ is a six-byte hexadecimal value separated by
colon (:)
How to do this ?
First ⇒
19/33
LearnHacking.online
04/06/2021 Practical Wireshark
Second ⇒
20/33
LearnHacking.online
Practical Wireshark
Third ⇒
Now enter mac address and click on find
Task 3
21/33
LearnHacking.online
Practical Wireshark
22/33
LearnHacking.online
Practical Wireshark
Task 4
What is the name of the host located at 10.0.2.22?
ANS :
Host names can be identified in dynamic host configuration protocol (DHCP)
traffic
Using a filter ⇒ dhcp and ip.src == 10.0.2.22
where ip.src is source of IP
23/33
LearnHacking.online
Practical Wireshark
Task 5
What is the name of the host located at 10.0.2.15?
24/33
LearnHacking.online
Practical Wireshark
ANS:
In this case we are going to look for server message block (SMB) protocol activity,
which features host announcements
Filter for this ⇒ smb and ip.addr == 10.0.2.15
Task 6
What is the IP address of the attacker?
Now, suppose you want to know the IP of attacker, and for this we need to check
those IP Address which give lots of request to our server
So, we need to identify the attack activity in the capture.
Let's do this
25/33
LearnHacking.online
Practical Wireshark
Step 1 ⇒
Step 2 ⇒
Step 3 ⇒
26/33
LearnHacking.online
Practical Wireshark
Step 4 ⇒
27/33
LearnHacking.online
Practical Wireshark
28/33
LearnHacking.online
Practical Wireshark
Step 5 ⇒
29/33
LearnHacking.online
Practical Wireshark
So, we got our IP ⇒ 10.0.2.22 ⇒ this is the likely attacker IP and the threat actor
appears to have remote shell access to the victim box.
Now, if you want to know what actually attacker did ? or what command he used ?
then ⇒
Just follow any tcp stream index 5 and right click ⇒ follow ⇒ tcp stream and we
see ⇒ whoami command is run by attacker
30/33
LearnHacking.online
Practical Wireshark
So, we have learn many new things in this challenge through tasks. like how to use
filter for specific task
BONUS
31/33
LearnHacking.online
Practical Wireshark
Examples ⇒
• tcp.port eq 80 ⇒
• filter only that tcp protocol whose port is 80
• tcp.srcport===443 ⇒
• filter only that tcp whose source port is 443
• List
Filter for HTTP and HTTPS traffic:
tcp.port==443 or tcp.port==80
ssl or http
tcp.port in {80 443 8080}
tcp.port == 80 || tcp.port == 443 || tcp.port == 8080
• List
Filter for a protocol:
tcp
udp
dns
• Filter for IP Addresses ⇒
• ip.addr == 10.43.54.65
• ! ( ip.addr == 10.43.54.65
You will have doubt what actually is src and dst ?
32/33
LearnHacking.online