CAP6135: Malware and Software Vulnerability Analysis Network Traffic Monitoring Using Wireshark Cliff Zou Spring 2013.

Slides:



Advertisements
Similar presentations
SHARKFEST '08 | Foothill College | March 31 - April 2, 2008 T1-1: I’ve downloaded Wireshark… Now what? Monday, March 31, 2008 – 10:30am – 12:00pm Betty.
Advertisements

Ubiquitous Computing Technology Research Institute Sungkyunkwan University Using Ethereal - Packet Capturing & Analysis Tool Sungkyunkwan University.
Snort & ACID. UTSA IS 6973 Computer Forensics SNORT.
Department of Computer Science, The University of Houston 4. TCP/IP & Software Tools 1 Intrusion Detection Module Stephen Huang Department of Computer.
Section 2.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE
1 Capturing & Analyzing Network Traffic: tcpdump/tshark and Wireshark EE 122: Intro to Communication Networks Vern Paxson / Jorge Ortiz / Dilip Anthony.
Tcpdump Tutorial EE122 Fall 2006 Dilip Antony Joseph, Vern Paxson, Sukun Kim.
Chapter 11 - Monitoring Server Performance1 Ch. 11 – Monitoring Server Performance MIS 431 – created Spring 2006.
Network Analyzer Example
Computer Security and Penetration Testing
TSS Academy Troubleshooting with.
Practical Networking. Introduction  Interfaces, network connections  Netstat tool  Tcpdump: Popular network debugging tool  Used to intercept and.
© 2006, The Technology Firm Ethereal The Technology Firm.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
TCP/IP Tools Lesson 5. Objectives Skills/ConceptsObjective Domain Description Objective Domain Number Using basic TCP/IP commands Understanding TCP/IP3.6.
Linux Networking Commands
Drinking straight from the network hose. So What is WireShark? Packet sniffer/protocol analyzer Open Source Network Tool Latest version of the ethereal.
Wireshark Presented By: Hiral Chhaya, Anvita Priyam.
1 Lab 3 Transport Layer T.A. Youngjoo Han. 2 Transport Layer  Providing logical communication b/w application processes running on different hosts 
1 Ethereal.  Freeware sniffing tool.  Captures live network traffic.  The user interface separates it from other sniffers.
University of Calgary – CPSC 441.  Wireshark (originally named Ethereal)is a free and open-source packet analyzer.  It is used for network troubleshooting,
Packet capture and protocol analysis 1. Content TCP/IP Networking Review Packet Capture Protocol Analysis 2.
CPSC 441 Tutorial TA: Fang Wang The content of these slides are taken from CPSC 526 TUTORIAL by Nashd Safa (Extended and partially modified)
Network Security: Lab#4-2 Packet Sniffers J. H. Wang Dec. 2, 2013.
Packet Analysis Fluke Protocol Expert & Misc Applications Brian D. Sterck.
Network Management Tool Amy Auburger. 2 Product Overview Made by Ipswitch Affordable alternative to expensive & complicated Network Management Systems.
Packet Analysis Using Wireshark for Beginners 22AF
1 TAC2000/ LABORATORY 117 Outline of the Hands-on Tutorial  SIP User-Agent Register Register Make calls Make calls  Fault-Finding Tools Observe.
Ethereal (Network Protocol Analyzer) 백 일 우
1 TAC2000/ LABORATORY 117 Analyzing SIP Call Flows Dr. Quincy Wu National Chiao Tung University
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
Linux Networking and Security
CAP6135: Malware and Software Vulnerability Analysis Network Traffic Monitoring Using Wireshark Cliff Zou Spring 2014.
© 2010 Cisco Systems, Inc. All rights reserved. 1 CREATE Re-Tooling Exploring Protocols with Wireshark March 12, 2011 CREATE CATC and Ohlone College.
Scanning & Enumeration Lab 3 Once attacker knows who to attack, and knows some of what is there (e.g. DNS servers, mail servers, etc.) the next step is.
Practice 4 – traffic filtering, traffic analysis
Sniffer, tcpdump, Ethereal, ntop
Network Analyzer :- Introduction to Wireshark. What is Wireshark ? Ethereal Formerly known as Ethereal GUINetwork Protocol Analyzer Wireshark is a GUI.
Monitoring Troubleshooting TCP/IP Chapter 3. Objectives for this Chapter Troubleshoot TCP/IP addressing Diagnose and resolve issues related to incorrect.
Advanced Packet Analysis and Troubleshooting Using Wireshark 23AF
1 Microsoft Windows 2000 Network Infrastructure Administration Chapter 4 Monitoring Network Activity.
PACKET SNIFFING Dr. Andy Wu BCIS 4630 Fundamentals of IT Security.
POSTECH 1/39 CSED702D: Internet Traffic Monitoring and Analysis James Won-Ki Hong Department of Computer Science and Engineering POSTECH, Korea
COMP2322 Lab 1 Introduction to Wireshark Weichao Li Jan. 22, 2016.
Ethereal/WireShark Tutorial Yen-Cheng Chen IM, NCNU April, 2006.
Ethernet WireShark Utkarsh Mahajan Id: A1238. Download: Referance:
WIRESHARK Lab#3. Computer Network Monitoring  Port Scanning  Keystroke Monitoring  Packet sniffers  takes advantage of “friendly” nature of net. 
Network Analyzer :- Introduction to Ethereal Computer Networking (Graduate Class)
Victoria Manfredi September 13, 2016.
Traffic Analysis– Wireshark
Traffic Analysis– Traffic Forensic Example
Wireshark Tutorial KUAS, Hao-Xiang Gu.
CAP6135: Malware and Software Vulnerability Analysis Network Traffic Monitoring Using Wireshark Cliff Zou Spring 2016.
Lab 2: Packet Capture & Traffic Analysis with Wireshark
Network Commands 2 Linux Ubuntu A.S.
A Quick Guide to Ethereal/Wireshark
COMP2322 Lab 1 Wireshark Steven Lee Jan. 25, 2017.
Wireshark Lab#3.
Traffic Analysis with Ethereal
Intro to Ethical Hacking
Intro to Ethical Hacking
Using Ethereal - Packet Capturing & Analysis Tool
Introduction to Packet Sniffing using Ethereal
Ethereal/WireShark Tutorial
Traffic Analysis– Traffic Forensic Example
Network Analyzer :- Introduction to Wireshark
Wireshark(Ethereal).
TCP Protocol Analysis Access UMKC Home Page.
Network Analyzer :- Introduction to Wireshark
COEN 252 Computer Forensics
Presentation transcript:

CAP6135: Malware and Software Vulnerability Analysis Network Traffic Monitoring Using Wireshark Cliff Zou Spring 2013

Acknowledgement  uctfiles/672/wireshark.ppt uctfiles/672/wireshark.ppt  UC Berkley course “EE 122: Intro to Communication Networks”  ee122/presentations/Wireshark.ppt ee122/presentations/Wireshark.ppt  Other resources:  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: IP danjo.CS.Berkeley.EDU.ssh > adsl dsl.pltn13.pacbell.net.2481: : (1380) ack win :46: IP danjo.CS.Berkeley.EDU.ssh > adsl dsl.pltn13.pacbell.net.2481: P 1380:2128(748) ack 1 win :46: IP danjo.CS.Berkeley.EDU.ssh > adsl dsl.pltn13.pacbell.net.2481:. 2128:3508(1380) ack 1 win :46: IP adsl dsl.pltn13.pacbell.net.2481 > danjo.CS.Berkeley.EDU.ssh: P 1:49(48) ack 1380 win Ran tcpdump on a Unix machine First few lines of the output:

6 01:46: IP danjo.CS.Berkeley.EDU.ssh > adsl dsl.pltn13.pacbell.net.2481: : (1380) ack win TimestampThis is an IP packetSource host name Source 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 > SSH Encrypted request packet len= > SSH Encrypted response packet len= > TCP 6943 > ssh [ACK] Seq=48 Ack=48 Win=65514 Len=0 TSV= TSER= > SSH Encrypted request packet len= > SSH Encrypted response packet len= > TCP 6943 > ssh [ACK] Seq=96 Ack=96 Win=65514 Len=0 TSV= TSER=

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” 2. 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” 2. Capture only UDP packets with source port 53 (DNS replies) tcpdump “udp src port 53” 3. 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” 2. 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   You can do it on your own Unix machine  You can install a Linux OS in Vmware on your machine  Tcpdump for Windows  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 host and host 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: (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== /24 ip.addr== && ip.addr== tcp.port==80 || tcp.port==3389 !(ip.addr== && ip.addr== ) (ip.addr== && ip.addr== ) && (tcp.port==445 || tcp.port==139) (ip.addr== && ip.addr== ) && (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

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

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

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  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   examples/ examples/ 59