filtering by domain

Eray Balkanli picture Eray Balkanli · Feb 26, 2014 · Viewed 30.9k times · Source

I want to filter my pcap file by their domains. I mean, I want to see the packets comes on a website ends with ".com", ".org" or ".net".

I tried: dns contains "com", ip.src_host == com, ip.src_host == com, http contains "com". None of them worked correctly.

Answer

Thaddeus Albers picture Thaddeus Albers · Feb 26, 2014

Assuming it's http web traffic, try http.host contains ".com"

Better yet, try http.host matches "\.com$"

Neither one will require DNS resolution since they search on the web host.

From http://wiki.wireshark.org/DisplayFilters

The matches operator makes it possible to search for text in string fields 
and byte sequences using a regular expression, using Perl regular expression 
syntax. Note: Wireshark needs to be built with libpcre in order to be able to 
use the matches operator.