Practice 4 – traffic filtering, traffic analysis

Slides:



Advertisements
Similar presentations
Enabling Secure Internet Access with ISA Server
Advertisements

Click to continue Network Protocols. Click to continue Networking Protocols A protocol defines the rules of procedures, which computers must obey when.
Intermediate TCP/IP TCP Operation.
Capture Packets using Wireshark. Introduction Wireshark – – Packet analysis software – Open source.
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.
Network Analyzer Example
TSS Academy Troubleshooting with.
Practical Networking. Introduction  Interfaces, network connections  Netstat tool  Tcpdump: Popular network debugging tool  Used to intercept and.
CAP6135: Malware and Software Vulnerability Analysis Network Traffic Monitoring Using Wireshark Cliff Zou Spring 2013.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
COEN 445 Communication Networks and Protocols Lab 3
Process-to-Process Delivery:
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
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,
Forensic and Investigative Accounting
Computer Networks  Network - A system of computers interconnected in order to share information.  Data transmission - consists of sending and receiving.
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)
Hands-On Microsoft Windows Server 2003 Networking Chapter Three TCP/IP Architecture.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 3: TCP/IP Architecture.
Presentation on Osi & TCP/IP MODEL
Section 2.2 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
Chapter 1: Introduction to Web Applications. This chapter gives an overview of the Internet, and where the World Wide Web fits in. It then outlines the.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
Packet Analysis Using Wireshark for Beginners 22AF
Forensic and Investigative Accounting Chapter 14 Internet Forensics Analysis: Profiling the Cybercriminal © 2005, CCH INCORPORATED 4025 W. Peterson Ave.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
TCP/IP Transport and Application (Topic 6)
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.
The Inter-network is a big network of networks.. The five-layer networking model for the internet.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
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.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network, Enhanced Chapter 3: TCP/IP Architecture.
Sniffer, tcpdump, Ethereal, ntop
Network Analyzer :- Introduction to Wireshark. What is Wireshark ? Ethereal Formerly known as Ethereal GUINetwork Protocol Analyzer Wireshark is a GUI.
Networks Part 3: Packet Paths + Wireshark NYU-Poly: HSWP Instructor: Mandy Galante.
Computer Networking.  The basic tool for observing the messages exchanged between executing protocol entities  Captures (“sniffs”) messages being sent/received.
Advanced Packet Analysis and Troubleshooting Using Wireshark 23AF
CS1001 Lecture 7. Overview Computer Networks Computer Networks The Internet The Internet Internet Services Internet Services Markup Languages Markup Languages.
1. Layered Architecture of Communication Networks: TCP/IP Model
COMP2322 Lab 1 Introduction to Wireshark Weichao Li Jan. 22, 2016.
Ethereal/WireShark Tutorial Yen-Cheng Chen IM, NCNU April, 2006.
Ch 2. Application Layer Myungchul Kim
COMPUTER NETWORKS Hwajung Lee. Image Source:
1 Network Communications A Brief Introduction. 2 Network Communications.
Introduction Chapter 1. TCP/IP Reference Model Why Another Model? Although the OSI reference model is universally recognized, the historical and technical.
Network Analyzer :- Introduction to Ethereal Computer Networking (Graduate Class)
Traffic Analysis– Wireshark
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
資料通訊與網路 教授: 吳照輝 助教: 鄺福全.
A Quick Guide to Ethereal/Wireshark
COMP2322 Lab 1 Wireshark Steven Lee Jan. 25, 2017.
Networking for Home and Small Businesses – Chapter 6
Networking for Home and Small Businesses – Chapter 6
Ethereal/WireShark Tutorial
Process-to-Process Delivery:
Network Analyzer :- Introduction to Wireshark
Wireshark(Ethereal).
Network Analyzer :- Introduction to Wireshark
Networking for Home and Small Businesses – Chapter 6
Computer Networks Protocols
Presentation transcript:

Practice 4 – traffic filtering, traffic analysis Computer Networks Practice 4 – traffic filtering, traffic analysis

Overview Examples of network protocols Protocol Analysis Tools Verify Correctness Analyze performance Better understanding of existing protocols Optimization and debugging of new protocols Tools tcpdump & tshark Wireshark

Network Protocol Examples Defines the rules of exchange between a pair (or more) machines over a communication network HTTP (Hypertext Transfer Protocol) Defines how web pages are fetched and sent across a network TCP (Transmission Control Protocol) Provides reliable, in-order delivery of a stream of bytes Your protocol here

Protocol Analysis Verify correctness Debug/detect incorrect behavior Analyze performance Gain deeper understanding of existing protocols by “seeing” how they behave in actual use

Analysis Methods Instrument the code Use available tools Difficult task, even for experienced network programmers Tedious and time consuming Use available tools tcpdump / tshark Wireshark ipsumdump Write your own tool libpcap

Tools overview Tcpdump Tshark Wireshark 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

Tcpdump example Ran tcpdump First few lines of the output: 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

What does a line convey? Timestamp This is an IP packet Source host name Source port number (22) 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 Destination port number Destination host name TCP specific information Different output formats for different packet types

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

tcpdump [options] [filter expression] Demo 1 – Basic Run Syntax: tcpdump [options] [filter expression] Run the following command tcpdump Observe the output Depending on the kind of traffic, make some general observations – sources, destinations, kinds of traffic, DNS requests etc. Too much of output.

Filters We are often not interested in all packets flowing through the network Use filters to capture only packets of interest to us

Demo 2 Capture only udp packets Capture only tcp packets tcpdump “udp” tcpdump “tcp”

Demo 2 (contd.) Capture only UDP packets with destination port 53 (DNS requests) tcpdump “udp dst port 53” Capture only UDP packets with source port 53 (DNS replies) tcpdump “udp src port 53” Capture only UDP packets with source or destination port 53 (DNS requests and replies) tcpdump “udp port 53”

Demo 2 (contd.) Capture only packets destined to quasar.cs.berkeley.edu tcpdump “dst host quasar.cs.berkeley.edu” 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” Ping quasar.cs.berkeley.edu. Demonstrates the use of “or”

How to write filters Refer cheat sheet slides at the end of this presentation Refer the tcpdump/tshark man page

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

Wireshark System Overview

Wireshark Interface

Wireshark Interface

Wireshark display 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 Expressions can be interconnected with logical ops: or, and, xor, not. Examples: tcp.flags.ack==1 and tcp.dstport==80

Download This document is basically a digest from “Wireshark User's Guide 25114 for Wireshark 1.0.0” You can download the portable software http://www.wireshark.org/ http://wiki.wireshark.org

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

Assignment – sample2.pcap: List the DNS queries in the pcap file? List the domain names to be resolved, and the resolved IP addresses of them! What kind of traffic can be seen on the UDP port 53? Determine the packets carrying http://lakis.web.elte.hu/results/nevsor0910II.pdf pdf file! Did the file successfully downloaded? What was the authorization string? List the SNMP messages sent to 157.181.166.210! What applications or protocols use UDP in the pcap file? What is the content of the pdf file mentioned above? Are there recursive DNS queries in the pcap? Sándor Laki (C) Számítógépes hálózatok I.

Assignment- sample3.pcap: How many UDP packets are in the capture? Determine the first http connection? Show an example how an ordinary TCP connection is established and closed! Determine the packets whose frame size is less than 100 bytes or equals to 618 bytes! List the tcp traffic that uses port 49170! Sándor Laki (C) Számítógépes hálózatok I.

Assignment - HTTP Download http_out.pcapng and answer the following questions (use WireShark): List the web pages downloaded! Which browser was used? How many images were downloaded? (hint: webp.) Are there encrypted communication in the file? (hint: SSL/TLS.) What can we say about encoded traffic?