Project

General

Profile

Actions

Feature #6621

closed
JI HA

Task #4772: tracking: parity between fields logged and fields available for detection

Feature #5642: DNS: parity between log fields and detection

dns: add keyword for dns rcode: dns.rcode

Feature #6621: dns: add keyword for dns rcode: dns.rcode

Added by Jason Ish over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
Effort:
Difficulty:
Label:

Description

DNS records log the rcode, but it is not available for detection. For example:

{
    "@timestamp": "2023-12-11T17:31:16.621Z",
    "community_id": "1:wQg9tR3nlxBAH4VrGg6YGsAa6AA=",
    "dest_ip": "10.16.1.1",
    "dest_port": 53,
    "dns": {
        "answers": [
            {
                "rdata": "l-0007.l-msedge.net",
                "rrname": "config-edge-skype.l-0007.l-msedge.net",
                "rrtype": "CNAME",
                "ttl": 152
            }
        ],
        "flags": "8180",
        "id": 49242,
        "opcode": 0,
        "qr": true,
        "ra": true,
        "rcode": "NOERROR",
        "rd": true,
        "rrname": "config.edge.skype.com",
        "rrtype": "HTTPS",
        "type": "answer",
        "version": 2
    },
    "event_type": "dns",
}

The dns.opcode keyword should be a good starter for the rcode as both are present in the header as integers. Even though we long to string representation of the rcode, the keyword should probably first start by accepting the integer value, then maybe we could add string representations after.


Related issues 1 (0 open1 closed)

Blocked by Suricata - Bug #6281: dns: structure of query differs between "alert" and "dns" event typesClosedJason IshActions

HA Updated by Hadiqa Alamdar Bukhari over 2 years ago Actions #1

  • Target version changed from TBD to 8.0.0-beta1

HA Updated by Hadiqa Alamdar Bukhari over 2 years ago Actions #2

Can this keyword be negated?

JF Updated by Juliana Fajardini Reichow over 2 years ago Actions #3

Hadiqa Alamdar Bukhari wrote in #note-2:

Can this keyword be negated?

Answered here: https://github.com/OISF/suricata/pull/10087#discussion_r1435191583

HA Updated by Hadiqa Alamdar Bukhari over 2 years ago Actions #5

  • Status changed from New to In Progress

JT Updated by Jason Taylor over 2 years ago Actions #6

Thanks for working on this Hadiqa! We (ET team) were wondering if it would be possible to add comparison functionality (e.g. <, >, <>) similar to urilen?

One thing that came up also was if it would be possible to allow an array of values [0, 11, 23], for example?

PA Updated by Philippe Antoine about 2 years ago Actions #7

  • Blocked by Bug #6281: dns: structure of query differs between "alert" and "dns" event types added

PA Updated by Philippe Antoine about 2 years ago Actions #8

@Jason Taylor array of values are not supported for integers yet... :-/

JT Updated by Jason Taylor about 2 years ago Actions #9

Philippe Antoine wrote in #note-8:

@Jason Taylor array of values are not supported for integers yet... :-/

Ah okay. Would the comparison options be possible?

PA Updated by Philippe Antoine about 2 years ago Actions #10

  • Status changed from In Progress to In Review

JF Updated by Juliana Fajardini Reichow about 2 years ago Actions #11

Jason Taylor wrote in #note-9:

Philippe Antoine wrote in #note-8:

@Jason Taylor array of values are not supported for integers yet... :-/

Ah okay. Would the comparison options be possible?

The comparison options, yes :)

JF Updated by Juliana Fajardini Reichow about 2 years ago Actions #12

  • Status changed from In Review to Resolved

PA Updated by Philippe Antoine over 1 year ago Actions #13

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom