Added new risk for clear text credentials

This commit is contained in:
Luca Deri
2021-09-10 22:00:04 +02:00
parent 1fadf4754a
commit 00857abf2c
15 changed files with 56 additions and 7 deletions
+2
View File
@@ -162,6 +162,8 @@ void ndpi_search_mail_imap_tcp(struct ndpi_detection_module_struct *ndpi_struct,
/* xxxx LOGIN "username" "password" */
char str[256], *item;
u_int len = packet->payload_packet_len >= sizeof(str) ? sizeof(str)-1 : packet->payload_packet_len;
ndpi_set_risk(ndpi_struct, flow, NDPI_CLEAR_TEXT_CREDENTIALS);
strncpy(str, (const char*)packet->payload, len);
str[len] = '\0';