tcpdump: network traffic capture



Similar documents
Network sniffing packet capture and analysis

Network sniffing packet capture and analysis

Introduction to Passive Network Traffic Monitoring

Host Configuration (Linux)

Unix System Administration

Introduction to Analyzer and the ARP protocol

Packet Sniffing with Wireshark and Tcpdump

CS197U: A Hands on Introduction to Unix

Lab VI Capturing and monitoring the network traffic

Network layer: Overview. Network layer functions IP Routing and forwarding

TCP Packet Tracing Part 1

Practical Network Forensics

Figure 1. Wireshark Menu Bar

Overview. Protocol Analysis. Network Protocol Examples. Tools overview. Analysis Methods

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

Network Traffic Analysis

netkit lab MPLS VPNs with overlapping address spaces 1.0 S.Filippi, L.Ricci, F.Antonini Version Author(s)

Packet Sniffers. * Windows and Linux - Wireshark

Packet Sniffing and Spoofing Lab

Innominate mguard Version 6

Host Fingerprinting and Firewalking With hping

netkit lab two-hosts Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

Tcpdump Lab: Wired Network Traffic Sniffing

Firewall Testing. Cameron Kerr Telecommunications Programme University of Otago. May 16, 2005

Computer Networks/DV2 Lab

Linux Networking: IP Packet Filter Firewalling

IP network tools & troubleshooting. AFCHIX 2010 Nairobi, Kenya October 2010


Network Connect Performance Logs on MAC OS

Introduction on Low level Network tools

TCPdump Basics. TCPdump and WinDump are available at: &

Linux Routers and Community Networks

EE984 Laboratory Experiment 2: Protocol Analysis

Troubleshooting the Firewall Services Module

Firewall Examples. Using a firewall to control traffic in networks

Unverified Fields - A Problem with Firewalls & Firewall Technology Today

Network Packet Analysis and Scapy Introduction

How To Gather Log Files On A Pulse Secure Server On A Pc Or Ipad (For A Free Download) On A Network Or Ipa (For Free) On An Ipa Or Ipv (For An Ubuntu) On Your Pc

H3C Firewall and UTM Devices DNS and NAT Configuration Examples (Comware V5)

Lab 1: Network Devices and Technologies - Capturing Network Traffic

Wireshark. Fakrul (Pappu) Alam

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Laboratory work 4. Application of Windows OS Built-in Networks Diagnostic Tools

Capture and analysis of the network traffic with Wireshark

Homework 3 TCP/IP Network Monitoring and Management

Snoopy. Objective: Equipment Needed. Background. Procedure. Due Date: Nov 1 Points: 25 Points

TECHNICAL NOTE. Technical Note P/N REV 03. EMC NetWorker Simplifying firewall port requirements with NSR tunnel Release 8.

CS244A Review Session Routing and DNS

Introduction to Network Security Lab 1 - Wireshark

Network Security. Network Packet Analysis

Snort ids. Alert (file) Fig. 1 Working of Snort

Project 2: Firewall Design (Phase I)

Lab Exercise SSL/TLS. Objective. Requirements. Step 1: Capture a Trace

Stateful Firewalls. Hank and Foo

+ iptables. packet filtering && firewall

Successful DB2 NETLOGON in LAB (Sniffer on LAB HUB)

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

CET442L Lab #2. IP Configuration and Network Traffic Analysis Lab

Packet Sniffers Submitted in partial fulfillment of the requirement for the award of degree Of MCA

Intrusion Detection and Prevention: Network and IDS Configuration and Monitoring using Snort

Chapter 14 Analyzing Network Traffic. Ed Crowley

Network Connect & Junos Pulse Performance Logs on Windows

Packet Capture, Filtering and Analysis

USING WIRESHARK TO CAPTURE AND ANALYZE NETWORK DATA

PktFilter A Win32 service to control the IPv4 filtering driver of Windows 2000/XP/Server

Ulogd2, Advanced firewall logging

Computer Networks/DV2 Lab

netkit lab static-routing Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

1 Introduction: Network Applications

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Information Security Training. Assignment 1 Networking

Packet Sniffer Detection with AntiSniff

Netcat Commands. I am going to give you insight and knowledge so that you can understand netcat Me0wwww. WOW, something useful and FREE

Packet Capture. Document Scope. SonicOS Enhanced Packet Capture

Hands On Activities: TCP/IP Network Monitoring and Management

Network Monitoring and Traffic Analysis

Technical Support Information Belkin internal use only

Application Layer -1- Network Tools

Cisco Configuring Commonly Used IP ACLs

Java Secure Application Manager

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

z/os V1R11 Communications Server system management and monitoring

EKT 332/4 COMPUTER NETWORK

Tools. Caution. What tcpdump can do for you? What Tcpdump can do for you. Network Analyzer

Framework for generating IDS benchmarking Data sets. Stian Skjølsvik

Network Diagnostic Tools. Jijesh Kalliyat Sr.Technical Account Manager, Red Hat 15th Nov 2014

Configuring IPSec VPN Tunnel between NetScreen Remote Client and RN300

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

CS155: Computer and Network Security

Application Monitoring using SNMPc 7.0

Linux MDS Firewall Supplement

Tools for penetration tests 1. Carlo U. Nicola, HT FHNW With extracts from documents of : Google; Wireshark; nmap; Nessus.

No. Time Source Destination Protocol Info DNS Standard query A weather.noaa.gov

Network Monitoring. By: Delbert Thompson Network & Network Security Supervisor Basin Electric Power Cooperative

Passive Network Traffic Analysis: Understanding a Network Through Passive Monitoring Kevin Timm,

COMP416 Lab (1) Wireshark I. 23 September 2013

Debugging OVS. Jus.n Pe0t April 14, 2011

Transcription:

tcpdump: network traffic capture David Morgan The Big Daddy of Open Source Capture tcpdump is the core Open Source packet sniffer program simple, text based program many other programs (such as Ethereal) that use the same file-save format can be used to display or interpret tcpdump files 1

Many options Must be root to run Some of them Category what to capture where to capture what to show how to show save/restore Option -c -p -i -t -q -v -vv -vvv -x -n -nn -w -r Description count of packets to capture just mine (alternatively everyone s) interface specification omit timestamp quiet minimal output verbose loquacious blabby packet content as well as header no address-to-name conversion nor port/protocol-to-name conversion write capture to file replay previous capture from file 2

tcpdump -i i <interface> Are we in promiscuous mode here? Capturing a ping [root@rh clientserver]# tcpdump -i eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 14:24:54.265612 vclient > rh: icmp: echo request (DF) 14:24:54.265791 rh > vclient: icmp: echo reply While vclient pinged rh 3

Effect of -n [root@rh clientserver]# tcpdump -i eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 14:24:54.265612 vclient > rh: icmp: echo request (DF) 14:24:54.265791 rh > vclient: icmp: echo reply [root@rh clientserver]# tcpdump -ni eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 14:36:13.651382 200.2.2.2 > 200.2.2.1: icmp: echo request (DF) 14:36:13.651564 200.2.2.1 > 200.2.2.2: icmp: echo reply While vclient (200.2.2.2) pinged rh (200.2.2.1) Effect of -t [root@rh clientserver]# tcpdump -i eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 14:24:54.265612 vclient > rh: icmp: echo request (DF) 14:24:54.265791 rh > vclient: icmp: echo reply [root@rh clientserver]# tcpdump -ti eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 vclient > rh: icmp: echo request (DF) rh > vclient: icmp: echo reply While vclient pinged rh 4

Effect of -v [root@rh clientserver]# tcpdump -i eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 14:24:54.265612 vclient > rh: icmp: echo request (DF) 14:24:54.265791 rh > vclient: icmp: echo reply [root@rh clientserver]# tcpdump -vi eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 14:52:58.436857 vclient > rh: icmp: echo request (DF) (ttl 64, id 0, len 84) 14:52:58.437045 rh > vclient: icmp: echo reply (ttl 255, id 6268, len 84) While vclient pinged rh Effect of -x [root@rh clientserver]# tcpdump -xi eth1 eth1: Setting promiscuous mode. tcpdump: listening on eth1 14:55:52.549777 vclient > rh: icmp: echo request (DF) 4500 0054 0000 4000 4001 a6a1 c802 0202 c802 0201 0800 c97c 4407 0100 2842 cd3e faf7 0e00 0809 0a0b 0c0d 0e0f 1011 1213 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435 14:55:52.549966 rh > vclient: icmp: echo reply 4500 0054 187d 0000 ff01 0f24 c802 0201 c802 0202 0000 d17c 4407 0100 2842 cd3e faf7 0e00 0809 0a0b 0c0d 0e0f 1011 1213 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 3435 While vclient pinged rh 5

What to capture Category what to capture Option -c -p Description count of packets to capture just mine (alternatively everyone s) there s s more to it than that. Two what-to to-capture restrictions Voluntary: packet filter expressions Involuntary: can t capture what doesn t appear on the interface in the first place 6

Packet filter expressions using address primitives host 200.2.2.1 src host 200.2.2.2 dst host 200.2.2.2 ip[16]>=224 ip[2:2]>512 ether[0]&1=1 Packet filter expressions using protocol primitives ip tcp udp icmp 7

Booleans and or not Filter example 8

Write to File -w <file name> will redirect output to a file Replay with -r r option tcpdump -r <rawfile> <text file> 9

-v v works on playback too View file with Wireshark too 10

Can't sniff across a switch? SWITCH? telnet and tcpdump Use telnet to start tcpdump on one of the stations writing to a file SWITCH Upload the trace file and replay with Ethereal 11

Analysis tools for dump files sanitize tcpdpriv tcpflow tcp-reduce tcpshow tcpslice trafshow sanitize 12

sanitize Collection of shell scripts sanitize-tcp sanitize-syn-fin sanitize-udp sanitize-encap sanitize-other Each filters out all packets except Rewrites remaining packets less info renumbered (not actual) addresses tcpflow 13

tcpflow apply to tcpdump-style capture file segregates traffic by TCP connection uniquely identified by quartet of 2 IP addresses and 2 ports extracts data only, from each connection stores it in separate files whose names reflect the connection tcp-reduce 14

tcp-reduce single-line summary, each TCP connection information fields time and duration protocol bytes sent, each side TCP state at termination tcpslice 15

tcpslice extract dump file parcels by timestamp interval glue them together browseclassweb: : a sample capture file contains session of browsing homepage.smc.edu/morgan_david entails 2 TCP conversations primary fetch html file for the page secondary fetch of enigma.jpg, referenced within the page 16

browseclassweb Target page enigma.jpg 17

tcpflow tcp-reduce 18

sanitize tcpslice 19