SlideShare a Scribd company logo
Writing Wireshark filter
expressions for packet capture
Group Members:
Zafran Ullah, Ihsan Ali,
Babar Naseer
Wireshark
O Wireshark is a free and open-source
packet analyzer.
O It is used for network troubleshooting,
analysis, software and communications
protocol development, and education.
O Two types of filter expressions are used in
wireshark
 Capture filter
 Display filter
Wireshark
Tasks
O Task1: Capturing and analyzing TCP
packets
O Task2: Capturing and analyzing http
packets
O Task3: Capturing and analyzing packets
from PLAYIT.PK
Capture all TCP traffic to/from Facebook, during
the time when you log in to your Facebook account
O Facebook ip = 31.13.86.8
O User ip =10.110.161.147
O Capture Filter: tcp and host 31.13.86.8
O Packets Captured: 643 over 25 seconds
O Packets sent to facebook: 252
Display Filter: ip.dst==31.13.86.8
O Packets received from facebook:
391
Display Filter:
ip.dst==10.110.161.147
SYN Flag
O The SYN flag synchronizes sequence
numbers to initiate a TCP connection
Capture all TCP traffic to/from Facebook, during
the time when you log in to your Facebook account
O SYN Flag:
For packets with SYN flag set
Display filter: tcp.flags.syn==1 , Packets: 5
For packets with SYN flag not set
Display filter: tcp.flags.syn==0 , Packets: 638
Number of packets with SYN set & sent to host:
Display filter :tcp.flags.syn==1 && ip.dst==10.110.161.147 ,
Packets:1
Number of TCP packets with SYN flag set and sent to
Facebook:
Display filter: tcp.flags.syn==1 && ip.dst== 31.13.86.8 ,
Packets:4
PUSH
O PSH- Push forces data delivery without
waiting for buffers to fill. This is used for
interactive traffic. The data will also be
delivered to the application on the
receiving end with out buffering.
Capture all TCP traffic to/from Facebook, during
the time when you log in to your Facebook account
O PSH Flag:
For packets with PUSH flag set
Display filter: tcp.flags.push==1 , Packets: 250
For packets with PUSH flag not set
Display filter: tcp.flags.push==0 , Packets:393
Number of packets with PUSH set & sent to host:
Display filter :tcp.flags.push==1 && ip.dst==10.110.164.135 ,
Packets:156
Number of TCP packets with PUSH flag set and sent to
Facebook:
Display filter: tcp.flags.push==1 && ip.dst== 31.13.67.1 ,
Packets:94
Capture all TCP traffic to/from Facebook, during
the time when you log in to your Facebook account
O PSH & SYN Flag:
For packets with PUSH & SYN flag set
Display filter: (tcp.flags.push==1&&tcp.flags.syn==1) ,
Packets: 0
For packets with PUSH & SYN flag not set
Display filter: (tcp.flags.push==0&&tcp.flags.syn==0) ,
Packets: 388
Number of packets with PUSH & SYN set & sent to host:
Display filter : (tcp.flags.push==1&&tcp.flags.syn==1)
&&ip.dst==10.110.161.147,
Packets:0
Number of TCP packets with PUSH & SYN flag set and sent to
Facebook:
Display filter (tcp.flags.push==1&&tcp.flags.syn==1)
&&ip.dst==31.13.86.8 , Packets:0
RST Flag
O RST- Reset is an instantaneous abort in
both directions or shows abnormal
session disconnection
Capture all TCP traffic to/from Facebook, during
the time when you log in to your Facebook account
O Reset Flag:
For packets with RESET flag set
Display filter: tcp.flags.reset==1 , Packets: 0
For packets with RESET flag not set
Display filter: tcp.flags. reset==0 , Packets: 625
Captured TCP Packets Statistics
Task: Capture all TCP traffic to/from Facebook
Total Captured Packets
Packets Sent to Facebook
Packets Received from Facebook
Packets Sent to Facebook with SYN flag set
Packets Sent to Facebook with PSH flag set
Packets Received from Facebook with SYN flag set
Packets Received from Facebook with PSH flag set
Packets Sent to Facebook with SYN & PSH flags set
Packets Received from Facebook with SYN & PSH flags
set
Total Packets With SYN flag set
Total Packets With PSH flag set
Total Packets With RST flag set
643
252
391
4
94
1
156
0
0
5
250
0
Task 2: Capture all HTTP traffic to and from
Facebook while logging
O Display Filter:
Tcp port 80 and host 31.13.86.8
O Packets received from Facebook
ip.dst==10.110.161.147
O Packets sent to Facebook
Display Filter:
ip.dst==3l.13.86.8
Task 3:capture all traffic to and from
Playit.pk while playing a Popular video
Playit.pk
Playit.pk :ip address 162.159.241.198)
No capture filters were utilized as Playit.pk servers may change
during streaming.
Task 3:capture all traffic to and from
Playit.pk while playing a Popular video
O Total Packets :223
O For packets with SYN flag set
Display filter: tcp.flags.syn==1 , Packets: 42
For packets PSH flag set
Display filter: tcp.flags.push==1, Packets: 47
Number of packets with RST flag set :
Display filter: tcp.flags.reset==1, Packets: 1
Number of TCP packets sent by host and received by
Facebook:
Display filter (ip.src== 10.110.164.135 and
ip.dst==162.159.241.198), Packets:117
Number of TCP packets sent by host and received by
Facebook:
Display filter (ip.src== 162.159.241.198 and ip.dst==
10.110.164.135), Packets:115
When Psh Flag==1
0
5
10
15
20
25
30
35
40
0 to 5 5 to 10 10 to 1515 to 2020 to 2525 to 30
Packets
Time sec
Histogram of Packets size
O Filter used:
frame.cap_len >= x && frame.cap_len <y
O From x to y
frame.cap_len >= 0 && frame.cap_len <100
Histogram of Packets size
0
50
100
150
200
250
300
NumberofPackets
Size
Writing Wireshark Filter Expression For Capturing Packets

More Related Content

PPT
Pattern matching
PPS
PPT
Classical Encryption Techniques
PPT
3. mining frequent patterns
PPTX
Substitution cipher and Its Cryptanalysis
PDF
Introduction to python 3
PDF
Sequential Pattern Mining and GSP
Pattern matching
Classical Encryption Techniques
3. mining frequent patterns
Substitution cipher and Its Cryptanalysis
Introduction to python 3
Sequential Pattern Mining and GSP

What's hot (20)

PPTX
AI: AI & Searching
PPTX
Data Encryption Standard (DES)
PDF
Network Layer Numericals
PDF
Data visualization in Python
PPT
SHA 1 Algorithm.ppt
PPTX
Input-Buffering
PPTX
Block cipher modes of operation
PPTX
Local beam search example
PPTX
Diffie hellman key exchange algorithm
PPTX
Rules in Artificial Intelligence
PDF
Introduction to Python
PPTX
Heuristics Search Techniques in AI
PPTX
Restoring & Non-Restoring Division Algorithm By Sania Nisar
PPTX
Forward checking
PPTX
Rsa algorithm key generation
PPT
Network security cryptographic hash function
DOC
Chapter 1 (final)
PPTX
Transposition Cipher
PPTX
Product Cipher
PPTX
Cryptography - Block cipher & stream cipher
AI: AI & Searching
Data Encryption Standard (DES)
Network Layer Numericals
Data visualization in Python
SHA 1 Algorithm.ppt
Input-Buffering
Block cipher modes of operation
Local beam search example
Diffie hellman key exchange algorithm
Rules in Artificial Intelligence
Introduction to Python
Heuristics Search Techniques in AI
Restoring & Non-Restoring Division Algorithm By Sania Nisar
Forward checking
Rsa algorithm key generation
Network security cryptographic hash function
Chapter 1 (final)
Transposition Cipher
Product Cipher
Cryptography - Block cipher & stream cipher
Ad

Similar to Writing Wireshark Filter Expression For Capturing Packets (20)

PDF
Tutorial of SF-TAP Flow Abstractor
PPT
Traffic-Monitoring.ppt
PPT
Traffic-Monitoring.ppt
PPT
Traffic-Monitoring.ppt
DOCX
Type of DDoS attacks with hping3 example
PDF
PPT
Intro to Ethernet
PDF
Handy Networking Tools and How to Use Them
PPT
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 Final
PDF
PPTX
SnorGen User Guide 2.0
PPT
08 module interconnecting cisco router
PPT
Traffic monitoring
PDF
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
PDF
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
PPTX
Cyber security and ethical hacking 3
PPT
Day2
PPTX
Open source network forensics and advanced pcap analysis
PPT
Chapter 01 - Overview
Tutorial of SF-TAP Flow Abstractor
Traffic-Monitoring.ppt
Traffic-Monitoring.ppt
Traffic-Monitoring.ppt
Type of DDoS attacks with hping3 example
Intro to Ethernet
Handy Networking Tools and How to Use Them
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 Final
SnorGen User Guide 2.0
08 module interconnecting cisco router
Traffic monitoring
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Cyber security and ethical hacking 3
Day2
Open source network forensics and advanced pcap analysis
Chapter 01 - Overview
Ad

Recently uploaded (20)

PDF
composite construction of structures.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Well-logging-methods_new................
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
composite construction of structures.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
CYBER-CRIMES AND SECURITY A guide to understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Geodesy 1.pptx...............................................
additive manufacturing of ss316l using mig welding
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Operating System & Kernel Study Guide-1 - converted.pdf
Safety Seminar civil to be ensured for safe working.
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Well-logging-methods_new................
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
UNIT 4 Total Quality Management .pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
CH1 Production IntroductoryConcepts.pptx
R24 SURVEYING LAB MANUAL for civil enggi
UNIT-1 - COAL BASED THERMAL POWER PLANTS

Writing Wireshark Filter Expression For Capturing Packets

  • 1. Writing Wireshark filter expressions for packet capture Group Members: Zafran Ullah, Ihsan Ali, Babar Naseer
  • 2. Wireshark O Wireshark is a free and open-source packet analyzer. O It is used for network troubleshooting, analysis, software and communications protocol development, and education.
  • 3. O Two types of filter expressions are used in wireshark  Capture filter  Display filter Wireshark
  • 4. Tasks O Task1: Capturing and analyzing TCP packets O Task2: Capturing and analyzing http packets O Task3: Capturing and analyzing packets from PLAYIT.PK
  • 5. Capture all TCP traffic to/from Facebook, during the time when you log in to your Facebook account O Facebook ip = 31.13.86.8 O User ip =10.110.161.147 O Capture Filter: tcp and host 31.13.86.8 O Packets Captured: 643 over 25 seconds O Packets sent to facebook: 252 Display Filter: ip.dst==31.13.86.8 O Packets received from facebook: 391 Display Filter: ip.dst==10.110.161.147
  • 6. SYN Flag O The SYN flag synchronizes sequence numbers to initiate a TCP connection
  • 7. Capture all TCP traffic to/from Facebook, during the time when you log in to your Facebook account O SYN Flag: For packets with SYN flag set Display filter: tcp.flags.syn==1 , Packets: 5 For packets with SYN flag not set Display filter: tcp.flags.syn==0 , Packets: 638 Number of packets with SYN set & sent to host: Display filter :tcp.flags.syn==1 && ip.dst==10.110.161.147 , Packets:1 Number of TCP packets with SYN flag set and sent to Facebook: Display filter: tcp.flags.syn==1 && ip.dst== 31.13.86.8 , Packets:4
  • 8. PUSH O PSH- Push forces data delivery without waiting for buffers to fill. This is used for interactive traffic. The data will also be delivered to the application on the receiving end with out buffering.
  • 9. Capture all TCP traffic to/from Facebook, during the time when you log in to your Facebook account O PSH Flag: For packets with PUSH flag set Display filter: tcp.flags.push==1 , Packets: 250 For packets with PUSH flag not set Display filter: tcp.flags.push==0 , Packets:393 Number of packets with PUSH set & sent to host: Display filter :tcp.flags.push==1 && ip.dst==10.110.164.135 , Packets:156 Number of TCP packets with PUSH flag set and sent to Facebook: Display filter: tcp.flags.push==1 && ip.dst== 31.13.67.1 , Packets:94
  • 10. Capture all TCP traffic to/from Facebook, during the time when you log in to your Facebook account O PSH & SYN Flag: For packets with PUSH & SYN flag set Display filter: (tcp.flags.push==1&&tcp.flags.syn==1) , Packets: 0 For packets with PUSH & SYN flag not set Display filter: (tcp.flags.push==0&&tcp.flags.syn==0) , Packets: 388 Number of packets with PUSH & SYN set & sent to host: Display filter : (tcp.flags.push==1&&tcp.flags.syn==1) &&ip.dst==10.110.161.147, Packets:0 Number of TCP packets with PUSH & SYN flag set and sent to Facebook: Display filter (tcp.flags.push==1&&tcp.flags.syn==1) &&ip.dst==31.13.86.8 , Packets:0
  • 11. RST Flag O RST- Reset is an instantaneous abort in both directions or shows abnormal session disconnection
  • 12. Capture all TCP traffic to/from Facebook, during the time when you log in to your Facebook account O Reset Flag: For packets with RESET flag set Display filter: tcp.flags.reset==1 , Packets: 0 For packets with RESET flag not set Display filter: tcp.flags. reset==0 , Packets: 625
  • 13. Captured TCP Packets Statistics Task: Capture all TCP traffic to/from Facebook Total Captured Packets Packets Sent to Facebook Packets Received from Facebook Packets Sent to Facebook with SYN flag set Packets Sent to Facebook with PSH flag set Packets Received from Facebook with SYN flag set Packets Received from Facebook with PSH flag set Packets Sent to Facebook with SYN & PSH flags set Packets Received from Facebook with SYN & PSH flags set Total Packets With SYN flag set Total Packets With PSH flag set Total Packets With RST flag set 643 252 391 4 94 1 156 0 0 5 250 0
  • 14. Task 2: Capture all HTTP traffic to and from Facebook while logging O Display Filter: Tcp port 80 and host 31.13.86.8 O Packets received from Facebook ip.dst==10.110.161.147 O Packets sent to Facebook Display Filter: ip.dst==3l.13.86.8
  • 15. Task 3:capture all traffic to and from Playit.pk while playing a Popular video Playit.pk Playit.pk :ip address 162.159.241.198) No capture filters were utilized as Playit.pk servers may change during streaming.
  • 16. Task 3:capture all traffic to and from Playit.pk while playing a Popular video O Total Packets :223 O For packets with SYN flag set Display filter: tcp.flags.syn==1 , Packets: 42 For packets PSH flag set Display filter: tcp.flags.push==1, Packets: 47 Number of packets with RST flag set : Display filter: tcp.flags.reset==1, Packets: 1 Number of TCP packets sent by host and received by Facebook: Display filter (ip.src== 10.110.164.135 and ip.dst==162.159.241.198), Packets:117 Number of TCP packets sent by host and received by Facebook: Display filter (ip.src== 162.159.241.198 and ip.dst== 10.110.164.135), Packets:115
  • 17. When Psh Flag==1 0 5 10 15 20 25 30 35 40 0 to 5 5 to 10 10 to 1515 to 2020 to 2525 to 30 Packets Time sec
  • 18. Histogram of Packets size O Filter used: frame.cap_len >= x && frame.cap_len <y O From x to y frame.cap_len >= 0 && frame.cap_len <100
  • 19. Histogram of Packets size 0 50 100 150 200 250 300 NumberofPackets Size