::orphan: 未在目录树中引用的文档,故添加此说明。

Suricata 8.0 的 DNS EVE 日志变更

Suricata 8.0 将 dnsalert 记录中的 DNS 日志格式修改为版本 3。这些变更解决了 DNS 响应告警中信息不足的问题,同时统一了 dnsalert 对象中 dns 结构的格式。

工单: https://redmine.openinfosecfoundation.org/issues/6281

此外,版本 3 的 DNS 响应消息现在会将响应者的 IP 地址作为 src_ip,而非客户端 IP。工单: https://redmine.openinfosecfoundation.org/issues/6400

主要变更总结如下:

  • DNS 请求的类型现在使用 request 替代 query

  • DNS 响应的类型现在使用 response 替代 answer

  • DNS 请求现在会将多个查询记录在一个数组中,而不是像之前那样在请求包含多个查询时生成多条请求事件。该特性已在作为 alert 记录的 DNS 请求中实现。

    7.0

    8.0

    {
      "event_type": "dns",
      "dns": {
        "type": "query",
        "id": 0,
        "rrname": "www.suricata.io",
        "rrtype": "A",
        "tx_id": 0,
        "opcode": 0
      }
    }
    
    {
      "event_type": "dns",
      "dns": {
        "version": 3,
        "type": "request",
        "tx_id": 0,
        "id": 0,
        "flags": "100",
        "rd": true,
        "opcode": 0,
        "rcode": "NOERROR",
        "queries": [
          {
            "rrname": "www.suricata.io",
            "rrtype": "A"
          }
        ]
      }
    }
    
  • DNS 响应现在将查询记录在 queries 数组中,而非直接将首个 rrnamerrtype 记录在 dns 对象内。

    7.0

    8.0

    {
      "event_type": "dns",
      "dns": {
        "version": 2,
        "type": "answer",
        "id": 0,
        "flags": "8180",
        "qr": true,
        "rd": true,
        "ra": true,
        "opcode": 0,
        "rrname": "www.suricata.io",
        "rrtype": "A",
        "rcode": "NOERROR",
        "answers": [
          {
            "rrname": "www.suricata.io",
            "rrtype": "CNAME",
            "ttl": 3597,
            "rdata": "suricata.io"
          },
          {
            "rrname": "suricata.io",
            "rrtype": "A",
            "ttl": 597,
            "rdata": "35.212.0.44"
          }
        ]
      }
    }
    
    {
      "event_type": "dns",
      "dns": {
        "version": 3,
        "type": "response",
        "tx_id": 1,
        "id": 0,
        "flags": "8180",
        "qr": true,
        "rd": true,
        "ra": true,
        "opcode": 0,
        "rcode": "NOERROR",
        "queries": [
          {
            "rrname": "www.suricata.io",
            "rrtype": "A"
          }
        ],
        "answers": [
          {
            "rrname": "www.suricata.io",
            "rrtype": "CNAME",
            "ttl": 3597,
            "rdata": "suricata.io"
          },
          {
            "rrname": "suricata.io",
            "rrtype": "A",
            "ttl": 597,
            "rdata": "35.212.0.44"
          }
        ],
      }
    }
    
  • 告警对象中的 DNS 请求现在会将 answers 记录为数组。格式参见上方 8.0 示例。dns 对象现在在 DNS 请求、响应以及 alert 记录中保持统一。

    • DNS 请求告警示例

      7.0

      8.0

      {
        "event_type": "alert",
        "dns": {
          "query": [
            {
              "type": "query",
              "id": 0,
              "rrname": "www.suricata.io",
              "rrtype": "A",
              "tx_id": 0,
              "opcode": 0
            }
          ]
        }
      }
      
      {
        "event_type": "alert",
        "dns": {
          "version": 3,
          "type": "request",
          "tx_id": 0,
          "id": 0,
          "flags": "100",
          "rd": true,
          "opcode": 0,
          "rcode": "NOERROR",
          "queries": [
            {
              "rrname": "www.suricata.io",
              "rrtype": "A"
            }
          ]
        },
      }
      
    • DNS 响应告警示例

      7.0

      8.0

      {
        "event_type": "alert",
        "dns": {
          "answer": {
            "version": 2,
            "type": "answer",
            "id": 0,
            "flags": "8180",
            "qr": true,
            "rd": true,
            "ra": true,
            "opcode": 0,
            "rrname": "www.suricata.io",
            "rrtype": "A",
            "rcode": "NOERROR"
          }
        }
      }
      
      {
        "event_type": "alert",
        "dns": {
          "version": 3,
          "type": "response",
          "tx_id": 1,
          "id": 0,
          "flags": "8180",
          "qr": true,
          "rd": true,
          "ra": true,
          "opcode": 0,
          "rcode": "NOERROR",
          "queries": [
            {
              "rrname": "www.suricata.io",
              "rrtype": "A"
          ],
          "answers": [
            {
              "rrname": "www.suricata.io",
              "rrtype": "CNAME",
              "ttl": 3597,
              "rdata": "suricata.io"
            },
            {
              "rrname": "suricata.io",
              "rrtype": "A",
              "ttl": 597,
              "rdata": "35.212.0.44"
            }
          ]
        },
      }