Added RiskInfo string
This commit is contained in:
@@ -1395,10 +1395,13 @@ static void process_chlo(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
if(ndpi_is_valid_hostname(flow->host_server_name,
|
||||
strlen(flow->host_server_name)) == 0) {
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_INVALID_CHARACTERS);
|
||||
char str[64];
|
||||
|
||||
snprintf(str, sizeof(str), "Invalid host %s", flow->host_server_name);
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_INVALID_CHARACTERS, str);
|
||||
|
||||
/* This looks like an attack */
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_POSSIBLE_EXPLOIT);
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_POSSIBLE_EXPLOIT, NULL);
|
||||
}
|
||||
|
||||
sni_found = 1;
|
||||
@@ -1426,7 +1429,7 @@ static void process_chlo(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
/* Add check for missing SNI */
|
||||
if(flow->host_server_name[0] == '\0') {
|
||||
/* This is a bit suspicious */
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_TLS_MISSING_SNI);
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_TLS_MISSING_SNI, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user