Project

General

Profile

Actions

Feature #6802

open

Support Domain rollup using existing dataset library

Added by Francois Methot 8 months ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Effort:
medium
Difficulty:
medium
Label:

Description

Support domain rollup using specialized Matcher leveraging dataset code.

The matcher would navigate the input buffer string, backward, and for each . (dot) would query the dataset for the presence of the subdomain.
ex:
api.google.com on the inspection buffer:

iterate the string backward, and stop at the first dot:
com -> check the dataset
keep going
google.com -> check the dataset
api.google.com -> check the dataset

It would introduce a new signature keyword:
dns.query; domain-rollup <dataset-name>;

The matcher would automatically automatically perform a dataset:isset internally using the DatasetLookup function directly

An optimization that could be explored is to support a new type of dataset type: domain
In this case the domain would be calculated in reverse order when they are added to the dataset
if we add google.com to the dataset, it would be stored as hash of moc.elgoog
when we navigate the inspection buffer in reverse, it would compute the hash as it move along the char byte array.
upon reaching a . (dot), the hash is ready to be check, no need rehash the string.


Related issues 2 (2 open0 closed)

Related to Suricata - Feature #5639: Allow dataset to match on extracted domainIn ReviewEric LeblondActions
Related to Suricata - Feature #5681: datasets: add more transform layers to match on domainsNewOISF DevActions
Actions

Also available in: Atom PDF