Feature #6802
openSupport Domain rollup using existing dataset library
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.