Logo Khaganat
Traductions de cette page?:

Ceci est une ancienne révision du document !


Tcpflow

Fonction

TcpFlow permet de faire des capture comme tcpdump.

Il écrit dans des fichiers (un fichier par connexion émetteur/récepteur/port

Installation

apt-get install tcpflow

Utilisation

  • Récupérer l'interface utilisé pour communiquer
ip a
  • préparer le répertoire réceptionnant les capture
mkdir -p /home/gameserver/capture
  • Lancer tcpflow

(ici, l'interface et eth0)

tcpflow -o /home/gameserver/capture -i eth0
  • Lancer en tache de fond tcpflow
nohup tcpflow -o /home/gameserver/capture -i eth0 &
  • Arreter les captures
pkill tcpflow

Utilisation avec tcpdump

  • Lancer la capture tcpdump
tcpdump -i eth0 -w capture.pcap
  • Arreter la capture tcpdump
pkill tcpdump>
  • Lire le fichier pcap (generer par tcpdump)
tcpflow -o /home/gameserver/capture -r capture.pcap 

Analyse

Fichier pcap (tcpdump)

# show flow
tcpdump -r capture.pcap

# show data raw
tcpdump -qns 0 -A -r capture.pcap

# show data with hexa
tpdump -qns 0 -X -r capture.pcap 

# show data without ssh and show in hexa
tcpdump -qns 0 -X -r capture.pcap 'port not 22'

Fichier tcpflow

Analyser les captures

  1. fichier report.xml (contient la liste de tous les fichiers de capture avec la taille, heure de capture, …)
  2. fichier contenant les données : <ip source>.<port source>-<ip destination>.<port destination>
  3. fichier contenant les index : <ip source>.<port source>-<ip destination>.<port destination>.findx

format index: byte-index|timestamp|length

Doc

CC Attribution-Share Alike 4.0 International Driven by DokuWiki
fr/tcpflow.1529096730.txt.gz · Dernière modification : 2021/12/03 19:18 (modification externe)

Licences Mentions légales Accueil du site Contact