Added NDPI_MINOR_ISSUES risk used for storing generic/relevant information about issues found on traffic.
This commit is contained in:
@@ -122,6 +122,7 @@ typedef enum {
|
||||
are received in the opposite direction */
|
||||
NDPI_HTTP_OBSOLETE_SERVER,
|
||||
NDPI_PERIODIC_FLOW, /* Set in case a flow repeats at a specific pace [used by apps on top of nDPI] */
|
||||
NDPI_MINOR_ISSUES, /* Generic packet issues (e.g. DNS with 0 TTL) */
|
||||
|
||||
/* Leave this as last member */
|
||||
NDPI_MAX_RISK /* must be <= 63 due to (**) */
|
||||
|
||||
@@ -167,6 +167,7 @@ static ndpi_risk_info ndpi_known_risks[] = {
|
||||
{ NDPI_UNIDIRECTIONAL_TRAFFIC, NDPI_RISK_LOW, CLIENT_FAIR_RISK_PERCENTAGE, NDPI_CLIENT_ACCOUNTABLE },
|
||||
{ NDPI_HTTP_OBSOLETE_SERVER, NDPI_RISK_MEDIUM, CLIENT_LOW_RISK_PERCENTAGE, NDPI_SERVER_ACCOUNTABLE },
|
||||
{ NDPI_PERIODIC_FLOW, NDPI_RISK_LOW, CLIENT_LOW_RISK_PERCENTAGE, NDPI_CLIENT_ACCOUNTABLE },
|
||||
{ NDPI_MINOR_ISSUES, NDPI_RISK_LOW, CLIENT_LOW_RISK_PERCENTAGE, NDPI_BOTH_ACCOUNTABLE },
|
||||
|
||||
/* Leave this as last member */
|
||||
{ NDPI_MAX_RISK, NDPI_RISK_LOW, CLIENT_FAIR_RISK_PERCENTAGE, NDPI_NO_ACCOUNTABILITY }
|
||||
|
||||
@@ -2005,7 +2005,7 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) {
|
||||
|
||||
case NDPI_DNS_LARGE_PACKET:
|
||||
return("Large DNS Packet (512+ bytes)");
|
||||
|
||||
|
||||
case NDPI_DNS_FRAGMENTED:
|
||||
return("Fragmented DNS Message");
|
||||
|
||||
@@ -2047,6 +2047,9 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) {
|
||||
case NDPI_PERIODIC_FLOW:
|
||||
return("Periodic Flow");
|
||||
break;
|
||||
|
||||
case NDPI_MINOR_ISSUES:
|
||||
return("Minor Issues");
|
||||
|
||||
default:
|
||||
ndpi_snprintf(buf, sizeof(buf), "%d", (int)risk);
|
||||
|
||||
@@ -412,8 +412,8 @@ static int search_valid_dns(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
rsp_ttl = ntohl(*((u_int32_t*)&packet->payload[x+2]));
|
||||
|
||||
if(rsp_ttl == 0)
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_DNS_SUSPICIOUS_TRAFFIC, "DNS Record with zero TTL");
|
||||
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_MINOR_ISSUES, "DNS Record with zero TTL");
|
||||
|
||||
#ifdef DNS_DEBUG
|
||||
printf("[DNS] TTL = %u\n", rsp_ttl);
|
||||
printf("[DNS] [response] response_type=%d\n", rsp_type);
|
||||
|
||||
Reference in New Issue
Block a user