SlideShare a Scribd company logo
CAP6135: Malware and Software
Vulnerability Analysis
Network Traffic Monitoring Using Wireshark
Cliff Zou
Spring 2013
Acknowledgement
 http://ilta.ebiz.uapps.net/ProductFiles/prod
uctfiles/672/wireshark.ppt
 UC Berkley course “EE 122: Intro to
Communication Networks”
 http://www.eecs.berkeley.edu/~jortiz/courses/
ee122/presentations/Wireshark.ppt
 Other resources:
 http://openmaniak.com/wireshark_filters.php
2
Motivation for Network Monitoring
 Essential for Network Management
 Router and Firewall policy
 Detecting abnormal/error in networking
 Access control
 Security Management
 Detecting abnormal traffic
 Traffic log for future forensic analysis
3
4
Tools Overview
 Tcpdump
 Unix-based command-line tool used to intercept
packets
 Including filtering to just the packets of interest
 Reads “live traffic” from interface specified using -i
option …
 … or from a previously recorded trace file specified
using -r option
 You create these when capturing live traffic using -w option
 Tshark
 Tcpdump-like capture program that comes w/
Wireshark
 Very similar behavior & flags to tcpdump
 Wireshark
 GUI for displaying tcpdump/tshark packet traces
5
Tcpdump example
01:46:28.808262 IP danjo.CS.Berkeley.EDU.ssh > adsl-69-228-230-
7.dsl.pltn13.pacbell.net.2481: . 2513546054:2513547434(1380) ack
1268355216 win 12816
01:46:28.808271 IP danjo.CS.Berkeley.EDU.ssh > adsl-69-228-230-
7.dsl.pltn13.pacbell.net.2481: P 1380:2128(748) ack 1 win 12816
01:46:28.808276 IP danjo.CS.Berkeley.EDU.ssh > adsl-69-228-230-
7.dsl.pltn13.pacbell.net.2481: . 2128:3508(1380) ack 1 win 12816
01:46:28.890021 IP adsl-69-228-230-7.dsl.pltn13.pacbell.net.2481 >
danjo.CS.Berkeley.EDU.ssh: P 1:49(48) ack 1380 win 16560
• Ran tcpdump on a Unix machine
• First few lines of the output:
6
01:46:28.808262 IP danjo.CS.Berkeley.EDU.ssh >
adsl-69-228-230-7.dsl.pltn13.pacbell.net.2481: .
2513546054:2513547434(1380) ack 1268355216 win 12816
Timestamp This is an IP packetSource host nameSource port number (22)
Destination host name Destination port number
TCP specific information
• Different output formats for different packet types
What does a line convey?
7
Similar Output from Tshark
1190003744.940437 61.184.241.230 -> 128.32.48.169
SSH Encrypted request packet len=48
1190003744.940916 128.32.48.169 -> 61.184.241.230
SSH Encrypted response packet len=48
1190003744.955764 61.184.241.230 -> 128.32.48.169
TCP 6943 > ssh [ACK] Seq=48 Ack=48 Win=65514
Len=0 TSV=445871583 TSER=632535493
1190003745.035678 61.184.241.230 -> 128.32.48.169
SSH Encrypted request packet len=48
1190003745.036004 128.32.48.169 -> 61.184.241.230
SSH Encrypted response packet len=48
1190003745.050970 61.184.241.230 -> 128.32.48.169
TCP 6943 > ssh [ACK] Seq=96 Ack=96 Win=65514
Len=0 TSV=445871583 TSER=632535502
8
Demo 1 – Basic Run
 Syntax:
tcpdump [options] [filter expression]
 Unfortunately, Eustis machine does not
allow normal users to run tcpdump
 I will demonstrate it on my group’s Unix
machine: cnsserver.eecs.ucf.edu
 $ sudo tcpdump –i eth0
 On your own Unix machine, you can run it
using “sudo” or directly run “tcpdump”
 Observe the output
9
Filters
 We are often not interested in all packets
flowing through the network
 Use filters to capture only packets of
interest to us
10
Demo 2
1. Capture only udp packets
• tcpdump “udp”
1. Capture only tcp packets
• tcpdump “tcp”
11
Demo 2 (contd.)
1. Capture only UDP packets with
destination port 53 (DNS requests)
• tcpdump “udp dst port 53”
1. Capture only UDP packets with source
port 53 (DNS replies)
• tcpdump “udp src port 53”
1. Capture only UDP packets with source
or destination port 53 (DNS requests and
replies)
• tcpdump “udp port 53”
12
Demo 2 (contd.)
1. Capture only packets destined to
quasar.cs.berkeley.edu
• tcpdump “dst host quasar.cs.berkeley.edu”
1. Capture both DNS packets and TCP
packets to/from quasar.cs.berkeley.edu
• tcpdump “(tcp and host
quasar.cs.berkeley.edu) or udp port 53”
13
How to write filters
 Refer the tcpdump/tshark man page
 Many example webpages on the Internet
14
Running tcpdump
 Requires superuser/administrator privileges on
Unix
 http://www.tcpdump.org/
 You can do it on your own Unix machine
 You can install a Linux OS in Vmware on your
machine
 Tcpdump for Windows
 WinDump: http://www.winpcap.org/windump/
 Free software
So What is WireShark?
 Packet sniffer/protocol analyzer
 Open Source Network Tool
 Latest version of the ethereal tool
What is tShark?
 The command-line based packet capture
tool
 Equivalent to Wireshark
16
Wireshark Interface
17
18
Wireshark Interface
Status Bar
19
Capture Options
Capture Filter
Capture Filter examples
host 10.1.11.24
host 192.168.0.1 and host 10.1.11.1
tcp port http
ip
not broadcast not multicast
ether host 00:04:13:00:09:a3
Capture Buffer Usage
Capture Interfaces
Interface Details: Characteristics
Interface Details: Statistics
Interface Details: 802.3 (Ethernet)
Display Filters (Post-Filters)
 Display filters (also called post-filters) only
filter the view of what you are seeing. All
packets in the capture still exist in the
trace
 Display filters use their own format and
are much more powerful then capture
filters
Display Filter
Display Filter Examples
ip.src==10.1.11.00/24
  
ip.addr==192.168.1.10 && ip.addr==192.168.1.20
  
tcp.port==80 || tcp.port==3389
  
!(ip.addr==192.168.1.10 && ip.addr==192.168.1.20) 
  
(ip.addr==192.168.1.10 && ip.addr==192.168.1.20) && (tcp.port==445 || 
tcp.port==139)
 
(ip.addr==192.168.1.10 && ip.addr==192.168.1.20) && (udp.port==67 || 
udp.port==68)
 
tcp.dstport == 80
Display Filter
32
Display Filter
 String1, String2 (Optional settings):
 Sub protocol categories inside the protocol.
 Look for a protocol and then click on the "+"
character.
 Example:
 tcp.srcport == 80
 tcp.flags == 2
 SYN packet
 Tcp.flags.syn==1
 tcp.flags == 18
 SYN/ACK
 Note of TCP Flag field:
33
Display Filter Expressions
 snmp || dns || icmp
 Display the SNMP or DNS or ICMP
traffics.
 tcp.port == 25
 Display packets with TCP source or
destination port 25.
 tcp.flags
 Display packets having a TCP flags
 tcp.flags.syn == 0x02
 Display packets with a TCP SYN flag.
34
If the filter syntax is correct, it will be highlighted in green,
otherwise if there is a syntax mistake it will be highlighted in red.
Correct syntax
Wrong syntax
Save Filtered Packets After Using Display Filter
 We can also save all filtered packets in text file
for further analysis
 Operation:
35
FileExport packet dissections
as “plain text” file
1). In “packet range” option,
select “Displayed”
2). In choose “summary line” or
“detail”
Protocol Hierarchy
Protocol Hierarchy
Follow TCP Stream
Follow TCP Stream
red - stuff you sent       blue - stuff you get
Filter out/in Single TCP Stream
 When click “filter out this TCP stream” in previous
page’s box, new filter string will contain like:
 http and !(tcp.stream eq 5)
 So, if you use “tcp.stream eq 5” as filter string, you keep
this HTTP session
40
Expert Info
Expert Info
Conversations
Conversations
 Use the “Copy” button to copy all text into
clipboard
 Then, you can analyze this text file to get
what statistics you want
45
Find EndPoint Statistics
 Menu “statistics”  “endpoint list” 
“TCP”
 You can sort by field
 “Tx” : transmit “Rx” : receive
46
Find EndPoint Statistics
 Use the “Copy” button to copy all text into
clipboard
 Then, you can analyze this text file to get
what statistics you want
47
Flow Graphs
Flow Graphs
• The “displayed packet” option could let you only
Show the flow of packets shown up
for example, only display http traffic, then show
The flow to analyze
Flow Graphs
Export HTTP
Export HTTP Objects
HTTP Analysis
HTTP Analysis – Load Distribution
Click “Create Stat” button
You can add “filter” to only
Show selected traffic
HTTP Analysis – Packet Counter
HTTP Analysis – Requests
Improving WireShark Performance
 Don’t use capture filters
 Increase your read buffer size
 Don’t update the screen dynamically
 Get a faster computer
 Use a TAP
 Don’t resolve names
Post-Processing Text File
 For saved text-format packet files, further
analysis needs coding or special tools
 One useful tool on Unix: Grep
 On Windows: PowerGrep
http://www.powergrep.com/
 Command-line based utility for searching
plain-text data sets for lines matching a
regular expression.
58
Basic usage of Grep
 Command-line text-search program in Linux
 Some useful usage:
 Grep ‘word’ filename # find lines with ‘word’
 Grep –v ‘word’ filename # find lines without ‘word’
 Grep ‘^word’ filename # find lines beginning with ‘word’
 Grep ‘word’ filename > file2 # output lines with ‘word’ to file2
 ls -l | grep rwxrwxrwx # list files that have ‘rwxrwxrwx’ feature
 grep '^[0-4]‘ filename # find lines beginning with any of the numbers
from 0-4
 Grep –c ‘word’ filename # find lines with ‘word’ and print out the
number of these lines
 Grep –i ‘word’ filename # find lines with ‘word’ regardless of case
 Many tutorials on grep online
 http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/
 http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-
examples/
59

More Related Content

What's hot

Day2
Day2Day2
Day2
Jai4uk
 
Wireshark
WiresharkWireshark
Wireshark
btohara
 
Introduction to tcpdump
Introduction to tcpdumpIntroduction to tcpdump
Introduction to tcpdump
Lev Walkin
 
Network Packet Analysis with Wireshark
Network Packet Analysis with WiresharkNetwork Packet Analysis with Wireshark
Network Packet Analysis with Wireshark
Jim Gilsinn
 
Tc pdump mod
Tc pdump modTc pdump mod
Tc pdump mod
Sini
 
Nmap
NmapNmap
Understanding NMAP
Understanding NMAPUnderstanding NMAP
Understanding NMAP
Phannarith Ou, G-CISO
 
Part 6 : Internet applications
Part 6 : Internet applicationsPart 6 : Internet applications
Part 6 : Internet applications
Olivier Bonaventure
 
Packet analysis using wireshark
Packet analysis using wiresharkPacket analysis using wireshark
Packet analysis using wireshark
Basaveswar Kureti
 
Lab 1 reference manual
Lab 1 reference manualLab 1 reference manual
Lab 1 reference manual
trayyoo
 
Iptables fundamentals
Iptables fundamentalsIptables fundamentals
Iptables fundamentals
ram_b17
 
Webinar NETGEAR Prosafe Switch, la sicurezza della LAN
Webinar NETGEAR Prosafe Switch, la sicurezza della LANWebinar NETGEAR Prosafe Switch, la sicurezza della LAN
Webinar NETGEAR Prosafe Switch, la sicurezza della LAN
Netgear Italia
 
Part 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCPPart 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCP
Olivier Bonaventure
 
SnortUsersWebcast-Rules_pt2
SnortUsersWebcast-Rules_pt2SnortUsersWebcast-Rules_pt2
SnortUsersWebcast-Rules_pt2
Liễu Hồng
 
#1 (TCPvs. UDP)
#1 (TCPvs. UDP)#1 (TCPvs. UDP)
#1 (TCPvs. UDP)
Ghadeer AlHasan
 
6 app-tcp
6 app-tcp6 app-tcp
Nmap
NmapNmap
Iptables
IptablesIptables
Iptables
leminhvuong
 
Tcpdump
TcpdumpTcpdump
Tcpdump
Mohamed Gamel
 

What's hot (19)

Day2
Day2Day2
Day2
 
Wireshark
WiresharkWireshark
Wireshark
 
Introduction to tcpdump
Introduction to tcpdumpIntroduction to tcpdump
Introduction to tcpdump
 
Network Packet Analysis with Wireshark
Network Packet Analysis with WiresharkNetwork Packet Analysis with Wireshark
Network Packet Analysis with Wireshark
 
Tc pdump mod
Tc pdump modTc pdump mod
Tc pdump mod
 
Nmap
NmapNmap
Nmap
 
Understanding NMAP
Understanding NMAPUnderstanding NMAP
Understanding NMAP
 
Part 6 : Internet applications
Part 6 : Internet applicationsPart 6 : Internet applications
Part 6 : Internet applications
 
Packet analysis using wireshark
Packet analysis using wiresharkPacket analysis using wireshark
Packet analysis using wireshark
 
Lab 1 reference manual
Lab 1 reference manualLab 1 reference manual
Lab 1 reference manual
 
Iptables fundamentals
Iptables fundamentalsIptables fundamentals
Iptables fundamentals
 
Webinar NETGEAR Prosafe Switch, la sicurezza della LAN
Webinar NETGEAR Prosafe Switch, la sicurezza della LANWebinar NETGEAR Prosafe Switch, la sicurezza della LAN
Webinar NETGEAR Prosafe Switch, la sicurezza della LAN
 
Part 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCPPart 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCP
 
SnortUsersWebcast-Rules_pt2
SnortUsersWebcast-Rules_pt2SnortUsersWebcast-Rules_pt2
SnortUsersWebcast-Rules_pt2
 
#1 (TCPvs. UDP)
#1 (TCPvs. UDP)#1 (TCPvs. UDP)
#1 (TCPvs. UDP)
 
6 app-tcp
6 app-tcp6 app-tcp
6 app-tcp
 
Nmap
NmapNmap
Nmap
 
Iptables
IptablesIptables
Iptables
 
Tcpdump
TcpdumpTcpdump
Tcpdump
 

Viewers also liked

Watching And Manipulating Your Network Traffic
Watching And Manipulating Your Network TrafficWatching And Manipulating Your Network Traffic
Watching And Manipulating Your Network Traffic
Josiah Ritchie
 
Ceh V5 Module 07 Sniffers
Ceh V5 Module 07 SniffersCeh V5 Module 07 Sniffers
Ceh V5 Module 07 Sniffers
Mina Fawzy
 
Tcpdump hunter
Tcpdump hunterTcpdump hunter
Tcpdump hunter
Andrew McNicol
 
Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)
laonap166
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commands
Hanan Nmr
 
OSINT for Attack and Defense
OSINT for Attack and DefenseOSINT for Attack and Defense
OSINT for Attack and Defense
Andrew McNicol
 
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
tmavroidis
 
Tcpdump basico
Tcpdump basicoTcpdump basico
Tcpdump basico
Josu Orbe
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
Brendan Gregg
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
Brendan Gregg
 

Viewers also liked (10)

Watching And Manipulating Your Network Traffic
Watching And Manipulating Your Network TrafficWatching And Manipulating Your Network Traffic
Watching And Manipulating Your Network Traffic
 
Ceh V5 Module 07 Sniffers
Ceh V5 Module 07 SniffersCeh V5 Module 07 Sniffers
Ceh V5 Module 07 Sniffers
 
Tcpdump hunter
Tcpdump hunterTcpdump hunter
Tcpdump hunter
 
Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)Linux Network Administration (LPI-1,LPI-2)
Linux Network Administration (LPI-1,LPI-2)
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commands
 
OSINT for Attack and Defense
OSINT for Attack and DefenseOSINT for Attack and Defense
OSINT for Attack and Defense
 
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
 
Tcpdump basico
Tcpdump basicoTcpdump basico
Tcpdump basico
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 

Similar to Traffic monitoring

Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
ToffeeLomerz
 
Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
Senthil Vit
 
Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
ssuser0a05422
 
wireshark.pdf
wireshark.pdfwireshark.pdf
wireshark.pdf
ssuserafc27c
 
Workshop Wireshark
Workshop Wireshark Workshop Wireshark
Workshop Wireshark
Fabio Rosa
 
Wireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance toolsWireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance tools
Sachidananda Sahu
 
Wireshark Inroduction Li In
Wireshark Inroduction  Li InWireshark Inroduction  Li In
Wireshark Inroduction Li In
mhaviv
 
Practical 7 - Using Wireshark Tutorial and Hands-on
Practical 7 - Using Wireshark Tutorial and Hands-onPractical 7 - Using Wireshark Tutorial and Hands-on
Practical 7 - Using Wireshark Tutorial and Hands-on
QaisSaifQassim
 
Introduction to ns3
Introduction to ns3Introduction to ns3
Introduction to ns3
Shahid Beheshti University
 
Packet capture in network security
Packet capture in network securityPacket capture in network security
Packet capture in network security
Chippy Thomas
 
A22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle HaileyA22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle Hailey
Insight Technology, Inc.
 
Wireshark network analysing software
Wireshark network analysing softwareWireshark network analysing software
Wireshark network analysing software
dharmesh nakum
 
Wireshark Basics
Wireshark BasicsWireshark Basics
Wireshark Basics
Yoram Orzach
 
Network traffic analysis course
Network traffic analysis courseNetwork traffic analysis course
Network traffic analysis course
TECHNOLOGY CONTROL CO.
 
Wireshark
Wireshark Wireshark
Wireshark
antivirusspam
 
Wireshark lecture
Wireshark lectureWireshark lecture
Wireshark lecture
Bhupesh Rawat
 
Wireshark lecture
Wireshark lectureWireshark lecture
Wireshark lecture
Bhupesh Rawat
 
Network monotoring
Network monotoringNetwork monotoring
Network monotoring
Programmer
 
an_introduction_to_network_analyzers_new.ppt
an_introduction_to_network_analyzers_new.pptan_introduction_to_network_analyzers_new.ppt
an_introduction_to_network_analyzers_new.ppt
Iwan89629
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
Yoram Orzach
 

Similar to Traffic monitoring (20)

Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
 
Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
 
Traffic-Monitoring.ppt
Traffic-Monitoring.pptTraffic-Monitoring.ppt
Traffic-Monitoring.ppt
 
wireshark.pdf
wireshark.pdfwireshark.pdf
wireshark.pdf
 
Workshop Wireshark
Workshop Wireshark Workshop Wireshark
Workshop Wireshark
 
Wireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance toolsWireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance tools
 
Wireshark Inroduction Li In
Wireshark Inroduction  Li InWireshark Inroduction  Li In
Wireshark Inroduction Li In
 
Practical 7 - Using Wireshark Tutorial and Hands-on
Practical 7 - Using Wireshark Tutorial and Hands-onPractical 7 - Using Wireshark Tutorial and Hands-on
Practical 7 - Using Wireshark Tutorial and Hands-on
 
Introduction to ns3
Introduction to ns3Introduction to ns3
Introduction to ns3
 
Packet capture in network security
Packet capture in network securityPacket capture in network security
Packet capture in network security
 
A22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle HaileyA22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle Hailey
 
Wireshark network analysing software
Wireshark network analysing softwareWireshark network analysing software
Wireshark network analysing software
 
Wireshark Basics
Wireshark BasicsWireshark Basics
Wireshark Basics
 
Network traffic analysis course
Network traffic analysis courseNetwork traffic analysis course
Network traffic analysis course
 
Wireshark
Wireshark Wireshark
Wireshark
 
Wireshark lecture
Wireshark lectureWireshark lecture
Wireshark lecture
 
Wireshark lecture
Wireshark lectureWireshark lecture
Wireshark lecture
 
Network monotoring
Network monotoringNetwork monotoring
Network monotoring
 
an_introduction_to_network_analyzers_new.ppt
an_introduction_to_network_analyzers_new.pptan_introduction_to_network_analyzers_new.ppt
an_introduction_to_network_analyzers_new.ppt
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
 

Recently uploaded

bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 

Recently uploaded (20)

bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 

Traffic monitoring

  • 1. CAP6135: Malware and Software Vulnerability Analysis Network Traffic Monitoring Using Wireshark Cliff Zou Spring 2013
  • 2. Acknowledgement  http://ilta.ebiz.uapps.net/ProductFiles/prod uctfiles/672/wireshark.ppt  UC Berkley course “EE 122: Intro to Communication Networks”  http://www.eecs.berkeley.edu/~jortiz/courses/ ee122/presentations/Wireshark.ppt  Other resources:  http://openmaniak.com/wireshark_filters.php 2
  • 3. Motivation for Network Monitoring  Essential for Network Management  Router and Firewall policy  Detecting abnormal/error in networking  Access control  Security Management  Detecting abnormal traffic  Traffic log for future forensic analysis 3
  • 4. 4 Tools Overview  Tcpdump  Unix-based command-line tool used to intercept packets  Including filtering to just the packets of interest  Reads “live traffic” from interface specified using -i option …  … or from a previously recorded trace file specified using -r option  You create these when capturing live traffic using -w option  Tshark  Tcpdump-like capture program that comes w/ Wireshark  Very similar behavior & flags to tcpdump  Wireshark  GUI for displaying tcpdump/tshark packet traces
  • 5. 5 Tcpdump example 01:46:28.808262 IP danjo.CS.Berkeley.EDU.ssh > adsl-69-228-230- 7.dsl.pltn13.pacbell.net.2481: . 2513546054:2513547434(1380) ack 1268355216 win 12816 01:46:28.808271 IP danjo.CS.Berkeley.EDU.ssh > adsl-69-228-230- 7.dsl.pltn13.pacbell.net.2481: P 1380:2128(748) ack 1 win 12816 01:46:28.808276 IP danjo.CS.Berkeley.EDU.ssh > adsl-69-228-230- 7.dsl.pltn13.pacbell.net.2481: . 2128:3508(1380) ack 1 win 12816 01:46:28.890021 IP adsl-69-228-230-7.dsl.pltn13.pacbell.net.2481 > danjo.CS.Berkeley.EDU.ssh: P 1:49(48) ack 1380 win 16560 • Ran tcpdump on a Unix machine • First few lines of the output:
  • 6. 6 01:46:28.808262 IP danjo.CS.Berkeley.EDU.ssh > adsl-69-228-230-7.dsl.pltn13.pacbell.net.2481: . 2513546054:2513547434(1380) ack 1268355216 win 12816 Timestamp This is an IP packetSource host nameSource port number (22) Destination host name Destination port number TCP specific information • Different output formats for different packet types What does a line convey?
  • 7. 7 Similar Output from Tshark 1190003744.940437 61.184.241.230 -> 128.32.48.169 SSH Encrypted request packet len=48 1190003744.940916 128.32.48.169 -> 61.184.241.230 SSH Encrypted response packet len=48 1190003744.955764 61.184.241.230 -> 128.32.48.169 TCP 6943 > ssh [ACK] Seq=48 Ack=48 Win=65514 Len=0 TSV=445871583 TSER=632535493 1190003745.035678 61.184.241.230 -> 128.32.48.169 SSH Encrypted request packet len=48 1190003745.036004 128.32.48.169 -> 61.184.241.230 SSH Encrypted response packet len=48 1190003745.050970 61.184.241.230 -> 128.32.48.169 TCP 6943 > ssh [ACK] Seq=96 Ack=96 Win=65514 Len=0 TSV=445871583 TSER=632535502
  • 8. 8 Demo 1 – Basic Run  Syntax: tcpdump [options] [filter expression]  Unfortunately, Eustis machine does not allow normal users to run tcpdump  I will demonstrate it on my group’s Unix machine: cnsserver.eecs.ucf.edu  $ sudo tcpdump –i eth0  On your own Unix machine, you can run it using “sudo” or directly run “tcpdump”  Observe the output
  • 9. 9 Filters  We are often not interested in all packets flowing through the network  Use filters to capture only packets of interest to us
  • 10. 10 Demo 2 1. Capture only udp packets • tcpdump “udp” 1. Capture only tcp packets • tcpdump “tcp”
  • 11. 11 Demo 2 (contd.) 1. Capture only UDP packets with destination port 53 (DNS requests) • tcpdump “udp dst port 53” 1. Capture only UDP packets with source port 53 (DNS replies) • tcpdump “udp src port 53” 1. Capture only UDP packets with source or destination port 53 (DNS requests and replies) • tcpdump “udp port 53”
  • 12. 12 Demo 2 (contd.) 1. Capture only packets destined to quasar.cs.berkeley.edu • tcpdump “dst host quasar.cs.berkeley.edu” 1. Capture both DNS packets and TCP packets to/from quasar.cs.berkeley.edu • tcpdump “(tcp and host quasar.cs.berkeley.edu) or udp port 53”
  • 13. 13 How to write filters  Refer the tcpdump/tshark man page  Many example webpages on the Internet
  • 14. 14 Running tcpdump  Requires superuser/administrator privileges on Unix  http://www.tcpdump.org/  You can do it on your own Unix machine  You can install a Linux OS in Vmware on your machine  Tcpdump for Windows  WinDump: http://www.winpcap.org/windump/  Free software
  • 15. So What is WireShark?  Packet sniffer/protocol analyzer  Open Source Network Tool  Latest version of the ethereal tool
  • 16. What is tShark?  The command-line based packet capture tool  Equivalent to Wireshark 16
  • 22. Capture Filter examples host 10.1.11.24 host 192.168.0.1 and host 10.1.11.1 tcp port http ip not broadcast not multicast ether host 00:04:13:00:09:a3
  • 24.
  • 29. Display Filters (Post-Filters)  Display filters (also called post-filters) only filter the view of what you are seeing. All packets in the capture still exist in the trace  Display filters use their own format and are much more powerful then capture filters
  • 33. Display Filter  String1, String2 (Optional settings):  Sub protocol categories inside the protocol.  Look for a protocol and then click on the "+" character.  Example:  tcp.srcport == 80  tcp.flags == 2  SYN packet  Tcp.flags.syn==1  tcp.flags == 18  SYN/ACK  Note of TCP Flag field: 33
  • 34. Display Filter Expressions  snmp || dns || icmp  Display the SNMP or DNS or ICMP traffics.  tcp.port == 25  Display packets with TCP source or destination port 25.  tcp.flags  Display packets having a TCP flags  tcp.flags.syn == 0x02  Display packets with a TCP SYN flag. 34 If the filter syntax is correct, it will be highlighted in green, otherwise if there is a syntax mistake it will be highlighted in red. Correct syntax Wrong syntax
  • 35. Save Filtered Packets After Using Display Filter  We can also save all filtered packets in text file for further analysis  Operation: 35 FileExport packet dissections as “plain text” file 1). In “packet range” option, select “Displayed” 2). In choose “summary line” or “detail”
  • 40. Filter out/in Single TCP Stream  When click “filter out this TCP stream” in previous page’s box, new filter string will contain like:  http and !(tcp.stream eq 5)  So, if you use “tcp.stream eq 5” as filter string, you keep this HTTP session 40
  • 45.  Use the “Copy” button to copy all text into clipboard  Then, you can analyze this text file to get what statistics you want 45
  • 46. Find EndPoint Statistics  Menu “statistics”  “endpoint list”  “TCP”  You can sort by field  “Tx” : transmit “Rx” : receive 46
  • 47. Find EndPoint Statistics  Use the “Copy” button to copy all text into clipboard  Then, you can analyze this text file to get what statistics you want 47
  • 49. Flow Graphs • The “displayed packet” option could let you only Show the flow of packets shown up for example, only display http traffic, then show The flow to analyze
  • 54. HTTP Analysis – Load Distribution Click “Create Stat” button You can add “filter” to only Show selected traffic
  • 55. HTTP Analysis – Packet Counter
  • 56. HTTP Analysis – Requests
  • 57. Improving WireShark Performance  Don’t use capture filters  Increase your read buffer size  Don’t update the screen dynamically  Get a faster computer  Use a TAP  Don’t resolve names
  • 58. Post-Processing Text File  For saved text-format packet files, further analysis needs coding or special tools  One useful tool on Unix: Grep  On Windows: PowerGrep http://www.powergrep.com/  Command-line based utility for searching plain-text data sets for lines matching a regular expression. 58
  • 59. Basic usage of Grep  Command-line text-search program in Linux  Some useful usage:  Grep ‘word’ filename # find lines with ‘word’  Grep –v ‘word’ filename # find lines without ‘word’  Grep ‘^word’ filename # find lines beginning with ‘word’  Grep ‘word’ filename > file2 # output lines with ‘word’ to file2  ls -l | grep rwxrwxrwx # list files that have ‘rwxrwxrwx’ feature  grep '^[0-4]‘ filename # find lines beginning with any of the numbers from 0-4  Grep –c ‘word’ filename # find lines with ‘word’ and print out the number of these lines  Grep –i ‘word’ filename # find lines with ‘word’ regardless of case  Many tutorials on grep online  http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/  http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command- examples/ 59

Editor's Notes

  1. Depending on the kind of traffic, make some general observations – sources, destinations, kinds of traffic, DNS requests etc. Too much of output.
  2. Ping quasar.cs.berkeley.edu. Demonstrates the use of “or”