Tcpdump. Hints
Версия от 16:30, 23 августа 2022; Cless (обсуждение | вклад) (Cless переименовал страницу Tcpdump в Tcpdump. Hints без оставления перенаправления)
Слушаем порт 30333 на внешнем интерфейсе eth1 и записываем в лог tcpdump_30333.log
tcpdump -l -i eth1 -n -nn -X port 30333 | tee -a /root/tcpdump_30333.log
Отслеживаем SIP RTP трафик
tcpdump -n -i eth0 udp port 5060 or udp portrange 10000-20000 -s 0
Сделать дамп для открытия в Wireshark
tcpdump -i eth0 port 23 -s 65535 -w /root/tcp.dump
Посмотреть ASCII содержимое пакетов
если подключаться по телнету то можно увидеть в том числе логин и пароль
tcpdump -A -i eth0 port 23 -s 65535
DHCP packets sniff
tcpdump -i eth0 -vvv -s 1500 '((port 67 or port 68) and (udp[8:1] = 0x1))'
... tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1500 bytes 10:58:31.113040 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto UDP (17), length 382) 192.168.17.7.bootps > centos7-test01.bootps: [udp sum ok] BOOTP/DHCP, Request from cc:2d:e0:39:20:c0 (oui Unknown), length 354, hops 1, xid 0xa04b64f5, secs 37, Flags [Broadcast] (0x8000) Gateway-IP 192.168.111.1 Client-Ethernet-Address cc:2d:e0:39:20:c0 (oui Unknown) Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Parameter-Request Option 55, length 8: Subnet-Mask, Classless-Static-Route, Default-Gateway, Static-Route Domain-Name-Server, NTP, Option 138, Vendor-Option Hostname Option 12, length 27: "cless_home_hap-mini-111-212" Client-ID Option 61, length 7: ether cc:2d:e0:39:20:c0 Agent-Information Option 82, length 60: Circuit-ID SubOption 1, length 22: MikroTik-Cless eth 0/3 Remote-ID SubOption 2, length 34: ether2-lan_cless-switch-ap-111-224 END Option 255, length 0 ...