tech:notes_tcpdump
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:notes_tcpdump [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:notes_tcpdump [2026/01/08 15:34] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| {{tag> | {{tag> | ||
| - | = Notes commande tcpdump | + | # Notes commande tcpdump |
| Ligne 16: | Ligne 17: | ||
| * [[Notes analyse de paquets réseau avec Wireshark|Wireshark]] | * [[Notes analyse de paquets réseau avec Wireshark|Wireshark]] | ||
| - | < | + | ~~~bash |
| tcpdump -s0 -C 100 -i eth0 -n -w NOUVEAU_FICHIER.cap | tcpdump -s0 -C 100 -i eth0 -n -w NOUVEAU_FICHIER.cap | ||
| - | </ | + | ~~~ |
| Les options suivantes sont souvent utilisées : | Les options suivantes sont souvent utilisées : | ||
| * '-s taille' | * '-s taille' | ||
| - | * '-i interface' | + | * '-i interface' |
| * ' | * ' | ||
| * ' | * ' | ||
| - | * ' | + | * ' |
| - | * '-w fichier' | + | * '-w fichier' |
| * '-r fichier' | * '-r fichier' | ||
| * '-C taille' | * '-C taille' | ||
| - | * ' | + | * ' |
| * ' | * ' | ||
| Ligne 35: | Ligne 36: | ||
| Audit flux réseaux .Voir [[audit]] | Audit flux réseaux .Voir [[audit]] | ||
| - | < | + | ~~~bash |
| tcpdump -p -qtn -i eth0 tcp and not host 192.168.1.11 | tcpdump -p -qtn -i eth0 tcp and not host 192.168.1.11 | ||
| tcpdump -p -qtn -i eth0 tcp and dst net 192.168.3.0/ | tcpdump -p -qtn -i eth0 tcp and dst net 192.168.3.0/ | ||
| - | </ | + | ~~~ |
| Le reste de la commande utilise la syntaxe BPF | Le reste de la commande utilise la syntaxe BPF | ||
| - | [[http:// | + | * http:// |
| - | [[http:// | + | * http:// |
| Autres exemples | Autres exemples | ||
| - | < | + | ~~~bash |
| tcpdump -i eth0 src 192.168.2.100 and dst 192.168.2.11 and icmp | tcpdump -i eth0 src 192.168.2.100 and dst 192.168.2.11 and icmp | ||
| # Dans les 2 sens | # Dans les 2 sens | ||
| tcpdump -i eth0 host 192.168.2.100 and host 192.168.2.11 and icmp | tcpdump -i eth0 host 192.168.2.100 and host 192.168.2.11 and icmp | ||
| - | </ | + | ~~~ |
| Trafique entrant (input) seulement | Trafique entrant (input) seulement | ||
| - | < | + | ~~~bash |
| tcpdump -Qin | tcpdump -Qin | ||
| - | </ | + | ~~~ |
| Trafique sortant (output) seulement | Trafique sortant (output) seulement | ||
| - | < | + | ~~~bash |
| tcpdump -Qout | tcpdump -Qout | ||
| - | </ | + | ~~~ |
| Web | Web | ||
| - | < | + | ~~~bash |
| tcpdump -s 0 -v -n -l host 192.168.142.19 or host 192.168.238.21 or host 192.168.222.19 |egrep -i "POST /|GET / | tcpdump -s 0 -v -n -l host 192.168.142.19 or host 192.168.238.21 or host 192.168.222.19 |egrep -i "POST /|GET / | ||
| - | </ | + | ~~~ |
| - | < | + | ~~~bash |
| - | tcpdump -nn -A -s1500 -l | grep " | + | tcpdump -nn -A -s1500 -l | grep " |
| - | </ | + | ~~~ |
| - | === Autres | + | ### Autres |
| - | < | + | ~~~bash |
| tcpdump -x -X -s128 host 192.168.230.17 and host 192.168.70.235 and port 4440 -w / | tcpdump -x -X -s128 host 192.168.230.17 and host 192.168.70.235 and port 4440 -w / | ||
| tcpdump -s0 -ni 0.0:nnnp host 192.168.230.17 -vv -w / | tcpdump -s0 -ni 0.0:nnnp host 192.168.230.17 -vv -w / | ||
| - | </ | + | ~~~ |
tech/notes_tcpdump.1742825205.txt.gz · Dernière modification : de 127.0.0.1
