Wireshark

Источник: Wireshark Capture Filters

Настройки Capture Filters задаются при запуске и применяются на выбранном сетевом интерфейсе.

Фильтр Описание
host 172.18.5.4 Захватывать трафик на и с IP-адреса 172.18.5.4
net 192.168.0.0/24 Захватывать трафик из/в диапазон IP адресов
net 192.168.0.0 mask 255.255.255.0 То же самое, использование маски

  • src net 192.168.0.0/24
  • src net 192.168.0.0 mask 255.255.255.0
  • dst net 192.168.0.0/24
  • dst net 192.168.0.0 mask 255.255.255.0

port 53

Оба варианта эквивалентны:


port not 53 and not arp

Старый вариант:

(tcp[0:2] > 1500 and tcp[0:2] < 1550) or (tcp[2:2] > 1500 and tcp[2:2] < 1550)

Новый вариант (libpcap >= 0.9.1):

tcp portrange 1501-1549

ether proto 0x888e

not ether dst 01:80:c2:00:00:0e

ip

Полезно для отсеивания ARP/STP.


not broadcast and not multicast

Используется для поиска rogue RA:

dst host ff02::1


Отбор по сигнатуре GET :

port 80 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420

dst port 135 and tcp port 135 and ip[2:2]==48
icmp[icmptype]==icmp-echo and ip[2:2]==92 and icmp[8:4]==0xAAAAAAAA

Описание: Фильтр ищет ICMP Echo длиной 92 байта с первым 4-байтовым payload AAAAAAAA.


dst port 135 or dst port 445 or dst port 1433 and tcp[tcpflags] & (tcp-syn) != 0 and tcp[tcpflags] & (tcp-ack) = 0 and src net 192.168.0.0/24

%%tcp src port 443 and (tcp[((tcp[12] & 0xF0) >> 4 ) * 4] = 0x18) and (tcp[((tcp[12] & 0xF0) >> 4 ) * 4 + 1] = 0x03) and (tcp[((tcp[12] & 0xF0) >> 4 ) * 4 + 2] < 0x04) and ((ip[2:2] - 4 * (ip[0] & 0x0F)  - 4 * ((tcp[12] & 0xF0) >> 4) > 69))%%

Wireshark определяет, запущен ли он удалённо (SSH, RDP) и применяет фильтр для сокрытия трафика удалённой сессии.

Переменная окружения Применяемый фильтр
SSH_CONNECTION not (tcp port srcport and addr_family host srchost and tcp port dstport and addr_family host dsthost)
SSH_CLIENT not (tcp port srcport and addr_family host srchost and tcp port dstport)
REMOTEHOST not addr_family host host
DISPLAY not addr_family host host
CLIENTNAME not tcp port 3389