|
|
| Ligne 636 : |
Ligne 636 : |
| === Observer le trafic === | | === Observer le trafic === |
| ==== tshark ==== | | ==== tshark ==== |
| Version en ligne de commande de Wireshark. Il est plus léger que l'interface graphique complète et peut être utilisé pour capturer et analyser le trafic réseau.
| | [[Tshark| (Voir page Tshark)]] |
| <syntaxhighlight lang="bash" line copy>
| |
| sudo apt-get install tshark
| |
| </syntaxhighlight>
| |
| <syntaxhighlight lang="bash" line copy>
| |
| sudo tshark -i eth0
| |
| </syntaxhighlight>
| |
| <syntaxhighlight lang="bash" line copy>
| |
| sudo tshark -i eth0 -f "host 192.168.1.10"
| |
| </syntaxhighlight>
| |
| <syntaxhighlight lang="bash" line copy>
| |
| sudo tshark -i eth0 -f "port 853"
| |
| </syntaxhighlight>
| |
| Afficher les paquets en temps réel
| |
| <syntaxhighlight lang="bash" line copy>
| |
| sudo tshark -i eth0 -Y "ip.addr == 192.168.1.10"
| |
| </syntaxhighlight>
| |
| Analyse DNS ciblée
| |
| <syntaxhighlight lang="bash" line copy>
| |
| sudo tshark -i eth0 -f "port 53" -Y "dns" -T fields \
| |
| -e frame.time -e ip.src -e ip.dst -e dns.qry.name -e dns.qry.type -e dns.flags.response \
| |
| -E separator=, -E quote=d
| |
| </syntaxhighlight>
| |
| Analyse DNS ciblée (montre seulement le trafic qui vient OU va vers 192.169.1.100) <br />
| |
| ex : 192.169.1.100 = pihole
| |
| <syntaxhighlight lang="bash" line copy>
| |
| sudo tshark -i eth0 -f "port 53" -Y "ip.src == 192.168.1.100 || ip.dst == 192.168.1.100" -T fields \
| |
| -e frame.time -e ip.src -e ip.dst -e dns.qry.name -e dns.qry.type -e dns.flags.response \
| |
| -E separator=, -E quote=d
| |
| </syntaxhighlight>
| |
|
| |
|
| ==== tcpdump ==== | | ==== tcpdump ==== |