Added NDPI_SMB_INSECURE_VERSION for detecting insecure SMB versions (e.g. v1)

This commit is contained in:
Luca Deri
2020-07-27 13:05:06 +02:00
parent 69f140878c
commit da87cc3157
4 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -44,8 +44,9 @@ void ndpi_search_smb_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
NDPI_LOG_INFO(ndpi_struct, "found SMB\n");
if(memcmp(&packet->payload[4], smbv1, sizeof(smbv1)) == 0) {
if(packet->payload[8] != 0x72) /* Skip Negotiate request */ {
if(packet->payload[8] != 0x72) /* Skip Negotiate request */ {
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV1, NDPI_PROTOCOL_NETBIOS);
NDPI_SET_BIT(flow->risk, NDPI_SMB_INSECURE_VERSION);
}
} else
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV23, NDPI_PROTOCOL_NETBIOS);