Score:2

Wireshark find DNS response "Refused"

ru flag

I'm looking for a way to filter a packet capture in wireshark for instances where our server responds with "Refused" to a recursive DNS query.

dns.resp.type== doesn't seem to offer anything that I see as a match to my request, do I need to look somewhere other than under dns.resp altogether?

Score:2
cn flag

Based on https://www.wireshark.org/docs/dfref/d/dns.html you need to use dns.flags.rcode defined as:

dns.flags.rcode Reply code Unsigned integer, 2 bytes 1.0.0 to 3.4.9

"Reply code" is defined in §4.1.1. of RFC 1035 as "response code" with "Refused" being value 5:

5 Refused - The name server refuses to perform the specified operation for policy reasons. For example, a name server may not wish to provide the information to the particular requester, or a name server may not wish to perform a particular operation (e.g., zone transfer) for particular data.

As Wireshark defines it as 2 bytes, maybe it is the whole structure depicted in the RFC:

                                    1  1  1  1  1  1
      0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                      ID                       |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |QR|   Opcode  |AA|TC|RD|RA|   Z    |   RCODE   |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

So to compare RCODE to value 5 you may have to mask other bits.

tink avatar
ru flag
Thank you; `dns.flags.rcode==5 and ip.dst==u.v.w.x` gives me exactly what I'm after.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.