Internet Traffic Measurements. Exercise 4 Capturing and Analyzing Network Traffic. School of Electrical Engineering AALTO UNIVERSITY

Similar documents
Lab VI Capturing and monitoring the network traffic

Tcpdump Lab: Wired Network Traffic Sniffing

Introduction to Network Security Lab 1 - Wireshark

VM-Series Firewall Deployment Tech Note PAN-OS 5.0

Introduction to Passive Network Traffic Monitoring

Host Configuration (Linux)

Introduction to NetGUI

Wireless LAN Apple Bonjour Deployment Guide

Network Security. Network Packet Analysis

CS244A Review Session Routing and DNS

LAB THREE STATIC ROUTING

VLAN for DekTec Network Adapters

Network Agent Quick Start

Packet Sniffing and Spoofing Lab

Workshop on Scientific Applications for the Internet of Things (IoT) March

EE984 Laboratory Experiment 2: Protocol Analysis

Configuring IP to Serial with Auto Answer and Serial to IP

Network Administration and Monitoring

Packet Sniffing with Wireshark and Tcpdump

Introduction to Analyzer and the ARP protocol

BASIC TCP/IP NETWORKING

tcpdump: network traffic capture

Quick Start for Network Agent. 5-Step Quick Start. What is Network Agent?

How to monitor network traffic inside an ESXi host

Linux TCP/IP Network Management

AlliedWare Plus OS How To Use sflow in a Network

vsphere Networking vsphere 6.0 ESXi 6.0 vcenter Server 6.0 EN

1.0 Basic Principles of TCP/IP Network Communications

PBX DIGITAL TELEPHONE EXCHANGE MAINTENANCE GUIDE

Setting Up A High-Availability Load Balancer (With Failover and Session Support) With Perlbal/Heartbeat On Debian Etch

6. INTRODUCTION TO THE LABORATORY: SOFTWARE TOOLS

COMP416 Lab (1) Wireshark I. 23 September 2013

Network Probe User Guide

Forensic Network Analysis Tools

BASIC ANALYSIS OF TCP/IP NETWORKS

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

NetStream (Integrated) Technology White Paper HUAWEI TECHNOLOGIES CO., LTD. Issue 01. Date

Twin Peaks Software High Availability and Disaster Recovery Solution For Linux Server

Model 2120 Single Port RS-232 Terminal Server Frequently Asked Questions

CS197U: A Hands on Introduction to Unix

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Network Security: Workshop

Cisco IOS Flexible NetFlow Command Reference

Packet Sniffer A Comparative Study

Packet Sniffers. * Windows and Linux - Wireshark

How To Monitor And Test An Ethernet Network On A Computer Or Network Card

Work No. 1 Samba. What is Samba?

Guideline for setting up a functional VPN

RARP: Reverse Address Resolution Protocol

Unix System Administration

ITL Lab 5 - Performance Measurements and SNMP Monitoring 1. Purpose

vsphere Networking vsphere 5.5 ESXi 5.5 vcenter Server 5.5 EN

Savera Tanwir. Internet Protocol

3. The Domain Name Service

Create bridges, add ports, show bridge and port statistics, status, as well as the OVS database

IP Address: the per-network unique identifier used to find you on a network

Introduction To Computer Networking

How To Analyze Bacnet (Bacnet) On A Microsoft Computer (Barcnet) (Bcfnet) And Get A Better Understanding Of The Protocol (Bafnet) From A Microsatellite) (Malware)

Quick Start for Network Agent. 5-Step Quick Start. What is Network Agent?

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Websense Web Security Gateway: What to do when a Web site does not load as expected

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

HP IMC User Behavior Auditor

finger, ftp, host, hostname, mesg, rcp, rlogin, rsh, scp, sftp, slogin, ssh, talk, telnet, users, w, walla, who, write,...

This howto is also a bit old now. But I thought of uploading it in the howtos section, as it still works.

Lab 5 Explicit Proxy Performance, Load Balancing & Redundancy

11.1. Performance Monitoring

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

Capture and analysis of the network traffic with Wireshark

CSMA/CA. Information Networks p. 1

Performance of VMware vcenter (VC) Operations in a ROBO Environment TECHNICAL WHITE PAPER

The Barracuda Network Connector. System Requirements. Barracuda SSL VPN

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

Internet Protocol Address

Lab 1: Network Devices and Technologies - Capturing Network Traffic

McAfee Asset Manager Sensor

Figure 1. Wireshark Menu Bar

Analyze Traffic with Monitoring Interfaces and Packet Forwarding

A Research Study on Packet Sniffing Tool TCPDUMP

Emerald. Network Collector Version 4.0. Emerald Management Suite IEA Software, Inc.

Customer Tips. Network Packet Analyzer Tips. for the user. Purpose. Introduction to Packet Capture. Xerox Multifunction Devices.

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

Wireshark Deep packet inspection with Wireshark

ICS 351: Today's plan

Network Traffic Evolution. Prof. Anja Feldmann, Ph.D. Dr. Steve Uhlig

HIGH AVAILABILITY (HA) WITH OPENSIPS

NetFlow Aggregation. Feature Overview. Aggregation Cache Schemes

PRI (T1/E1) Call Recorder User Manual Rev 1.0 (December 2013)

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

Written by Saif ur Rab Monday, 07 December :19 - Last Updated Monday, 27 December :19

OpenCPN Garmin Radar Plugin

Instructor Notes for Lab 3

Network Load Balancing

Installing and Using Wireshark for Capturing Network Traffic

Red Hat Linux Networking

Evidence Acquisition. Network Forensics. Jae Woong Joo

Who s Doing What? Analyzing Ethernet LAN Traffic

Network Connect Performance Logs on MAC OS

Bridgewalling - Using Netfilter in Bridge Mode

Transcription:

Internet Traffic Measurements Exercise 4 Capturing and Analyzing Network Traffic School of Electrical Engineering AALTO UNIVERSITY

Page 1 Contents Introduction... 2 Prerequisites... 2 Knowledge base... 2 Full packets capture or just capturing the headers?... 3 Interactive analysis... 3 Mass analysis tools... 3 crl_flow and t2_top basic usage... 4 tstat basic usage... 4 Network interface statistics... 5 Task 1... 5 Section 1... 5 Section 2... 6

Page 2 Introduction This exercise will cover the main topics related to capturing and analyzing network traffic using tools such as TCPdump, Wireshark and tshark. After completion of this exercise the students must have good understanding of available technics for capturing network traffic and how to analyze the captured data. Prerequisites This exercise requires students have basic understanding of Wireshark, Linux shell and command line including TCPdump, tshark, coralreef and tstat. More information about Wireshark and TCPdump can be found from material section of course web page on https://mycourses.aalto.fi/. Knowledge base The first task for a network data analysis is to capture network packets. When networks are using the shared medium like Ethernet or WLAN, everyone is able to capture the traffic by just putting the network card into promiscuous mode and starts listening to the link. In normal operations NICs will filters out all the packets not destined to their own MAC address except the broadcast or any multicast messages (if the host has joined any multicast group) but In promiscuous mode, all packets are accepted and will delivered to operating system. These days almost all local area networks (LAN) use switches with point-to-point links where each NIC is directly connected to a separate switch port and thus a computer connected to wired network can only see its own, multicast, and broadcast traffic. There are several solutions to capture traffic from switched network links such as link taps or more advanced method of port monitoring and mirroring (where switch will replicate a copy of each frame to the mirrored link).capturing network traffic on personal computers usually requires administrative permissions from root or Administrator. Traffic capture can be performed by following common tools: Wireshark The most famous GUI based network and protocol analyzer TCPdump Classical Unix based traffic capture and display tool available for almost all *nix based distributions. Dumpcap Command line based traffic capture tool (part of Wireshark distribution). Tshark

Page 3 Another command line based traffic capture tool (part of Wireshark distribution). For example following command has been used to capture traffic from eth0 interface using dumpcap tool for duration of one hour and save the result in capture.pcap file: dumpcap -a duration:3600 -i eth0 -P -w capture.pcap Full packets capture or just capturing the headers? For many types of analysis, capturing only IP and TCP or UDP headers is sufficient but on other hand when the analysis is utilizing the payloads then the full packet capture is mandatory. Full packet captures requires more storage and more complex algorithms to analyze the data within data payloads. It is possible to specify desired capture length size using -s option in tcpdump, tshark and dumpcap. Value 0 corresponds maximum length where 64 or 96 bytes can be considered as acceptable sizes for most of the analysis. Interactive analysis When traffic has been captured, it is usually good idea to have brief look on it to check if it is correctly captured and if there are any interesting features. The Wireshark is the most widely used tool for this purpose. Wireshark has a good documentation including many video tutorials and forums which can assist you to master this tool (Wireshark does not have a good performance in handling larger capture files). Text based tools like tshark and tcpdump are also suitable for analysis and more often if you already know what to do and want to produce data file from network trace to complement analysis. With tcpdump you need to parse textual file to identify the right fields while tshark can be configured to print only desired fields. Following command outputs for each packet time it was received (seconds since 1 st Jan 1970), IP addresses and IP packet length in tab separated fields: tshark -r capture.pcap -T fields -e frame.time_epoch -e ip.addr -e ip.len Mass analysis tools Sustained analysis of terabytes of data does need tools optimized for this usage. There are many tools originating from research or information security communities available for massive data analysis while no single analysis tool can answer all the requirements imposed by different scenarios. Following tools are tested and believed to be useful tools for data analysis. These are available either as standard tools in Aalto Linux environment or installed in course directory. CoralReef CoralReef is a set of tools (more important tools in the set are crl_flow, t2_top and t2_convert) for flow based analysis.

Page 4 Tstat Tstat provides more stateful analysis on data. TCPtrace TCPtrace is used to analyze TCP connections. Wireshark Wireshark and tshark provide analysis capabilities too. Corsaro This tool provides aggregate statistics and might be more suitable for security studies, but also useful in this course. crl_flow and t2_top basic usage Following command generates flow information from capture.pcap file: crl_flow -Ci=3600 -cl -Tf60 -O %i.t2 -Cai=1 capture.pcap Where some of the options are as follows: Period defined is one hour -Ci=3600 Counters cover whole lifetime of flow -cl Flows expire after 60-second inactivity -Tf60 Output to sequentially numbered files -O %i.t2 Intervals aliened round intervals -Cai=1, hour at this time. Created file above (1.t2) can be then sorted e.g. by bytes (-Sb) to show only the 10 largest flows (-n 10): t2_top -Sb -n 10 1.t2 tstat basic usage tstat is designed to be run over long period of times with large set of options where for better results, few options should be defined. -N net.conf This defines internal network. If capture is done in single machine, there should be just one file containing host IP address with 32-bit prefix like: 192.0.2.5/32 -H histo.conf This defines included histograms. If you want all, the file contains just line include ALL. Example: tstat -N net.conf -H histo.conf capture.pcap

Page 5 Above command will read trace from file capture.pcap and outputs results to file capture.pcap.out directory. You can specify output directory with -s outdir option. You can supply also multiple trace files, but those must be in chronological order. Network interface statistics Operating systems provide statistics of network traffic (By default Windows provide only small amount of information about network traffic, counters and more advanced configurations are needed to extract those information from a Windows machine). By checking interface properties there are information of sent packets, bytes or both. In Linux systems, for example, ifconfig reports following information: [root@gplinux ~]# ifconfig Eth0: flags=4163<up,broadcast,running,multicast> mtu 1500 inet 192.168.200.134 netmask 255.255.255.0 broadcast 192.168.200.255 inet6 fe80::20c:29ff:fead:fad7 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:ad:fa:d7 txqueuelen 1000 (Ethernet) RX packets 90 bytes 14876 (14.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 85 bytes 11823 (11.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Other useful command is netstat -s that is available on many platforms. It does report overall statistics, including packets that are communicated only locally between processes. Task 1 To use some of the course-specific tools some environment settings are needed. Depending on your login shell you need to run one of following commands. First command is used if you have any Bourne Shell compatible (like bash in Aalto or zsh). Second one is for C Shell compatibles (like tcsh or csh in TKK ). 1. source /work/courses/unix/t/elec/e7130/general/use.sh 2. source /work/courses/unix/t/elec/e7130/general/use.csh Section 1 Try to capture network traffic for duration of one hour and try to record interface counters and overall statistics in beginning and end of the packet capture. After you finished capturing the packets try to do the first sanity check son captured data for:

Page 6 Size of trace file. Number of packets in trace file. Total size of packets. Compare values from interface counters to capture file. Is there any difference? Section 2 Analyze the captured data using suitable tools and answer following questions: I. How many IP (and IPv6 if any) hosts are communicating? II. How many hosts were tried to contact to, but failed III. Top 15 hosts by byte counts. IV. Top 15 hosts by packet counts. V. Top 10 TCP and top 5 UDP port numbers (by packet count). VI. Top 10 fastest TCP connections VII. Top 10 longest TCP connections Note: You need to provide the tool/s name and method (command line if any) you have used to answer above questions in your report file.