Improved alert on suspicious DNS traffic

This commit is contained in:
Luca Deri
2024-03-05 11:14:34 +01:00
parent e7f1946ae7
commit 65b9ad88a9
3 changed files with 6 additions and 7 deletions
+2 -3
View File
@@ -773,14 +773,13 @@ static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, st
if(dot) {
uintptr_t first_element_len = dot - _hostname;
if((first_element_len > 32) && (!is_mdns)) {
if((first_element_len > 48) && (!is_mdns)) {
/*
The lenght of the first element in the query is very long
and this might be an issue or indicate an exfiltration
*/
/* printf("**** %lu [%s][%s]\n", first_element_len, dot, _hostname); */
ndpi_set_risk(ndpi_struct, flow, NDPI_DNS_SUSPICIOUS_TRAFFIC, NULL);
ndpi_set_risk(ndpi_struct, flow, NDPI_DNS_SUSPICIOUS_TRAFFIC, "Long DNS host name");
}
}