Renamed TLS requested server name
This commit is contained in:
@@ -1017,7 +1017,8 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
|||||||
snprintf(flow->telnet.username, sizeof(flow->telnet.username), "%s", flow->ndpi_flow->protos.telnet.username);
|
snprintf(flow->telnet.username, sizeof(flow->telnet.username), "%s", flow->ndpi_flow->protos.telnet.username);
|
||||||
snprintf(flow->telnet.password, sizeof(flow->telnet.password), "%s", flow->ndpi_flow->protos.telnet.password);
|
snprintf(flow->telnet.password, sizeof(flow->telnet.password), "%s", flow->ndpi_flow->protos.telnet.password);
|
||||||
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_SSH)) {
|
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_SSH)) {
|
||||||
snprintf(flow->ssh_tls.client_info, sizeof(flow->ssh_tls.client_info), "%s",
|
snprintf(flow->ssh_tls.client_requested_server_name,
|
||||||
|
sizeof(flow->ssh_tls.client_requested_server_name), "%s",
|
||||||
flow->ndpi_flow->protos.ssh.client_signature);
|
flow->ndpi_flow->protos.ssh.client_signature);
|
||||||
snprintf(flow->ssh_tls.server_info, sizeof(flow->ssh_tls.server_info), "%s",
|
snprintf(flow->ssh_tls.server_info, sizeof(flow->ssh_tls.server_info), "%s",
|
||||||
flow->ndpi_flow->protos.ssh.server_signature);
|
flow->ndpi_flow->protos.ssh.server_signature);
|
||||||
@@ -1032,8 +1033,9 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
|||||||
|| (flow->ndpi_flow->protos.stun_ssl.ssl.ja3_client[0] != '\0')
|
|| (flow->ndpi_flow->protos.stun_ssl.ssl.ja3_client[0] != '\0')
|
||||||
) {
|
) {
|
||||||
flow->ssh_tls.ssl_version = flow->ndpi_flow->protos.stun_ssl.ssl.ssl_version;
|
flow->ssh_tls.ssl_version = flow->ndpi_flow->protos.stun_ssl.ssl.ssl_version;
|
||||||
snprintf(flow->ssh_tls.client_info, sizeof(flow->ssh_tls.client_info), "%s",
|
snprintf(flow->ssh_tls.client_requested_server_name,
|
||||||
flow->ndpi_flow->protos.stun_ssl.ssl.client_certificate);
|
sizeof(flow->ssh_tls.client_requested_server_name), "%s",
|
||||||
|
flow->ndpi_flow->protos.stun_ssl.ssl.client_requested_server_name);
|
||||||
|
|
||||||
if(flow->ndpi_flow->protos.stun_ssl.ssl.server_names_len > 0)
|
if(flow->ndpi_flow->protos.stun_ssl.ssl.server_names_len > 0)
|
||||||
flow->ssh_tls.server_names = ndpi_strdup(flow->ndpi_flow->protos.stun_ssl.ssl.server_names);
|
flow->ssh_tls.server_names = ndpi_strdup(flow->ndpi_flow->protos.stun_ssl.ssl.server_names);
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ typedef struct ndpi_flow_info {
|
|||||||
|
|
||||||
struct {
|
struct {
|
||||||
u_int16_t ssl_version;
|
u_int16_t ssl_version;
|
||||||
char client_info[64], server_info[64],
|
char client_requested_server_name[64], server_info[64],
|
||||||
client_hassh[33], server_hassh[33], *server_names,
|
client_hassh[33], server_hassh[33], *server_names,
|
||||||
server_organization[64],
|
server_organization[64],
|
||||||
ja3_client[33], ja3_server[33],
|
ja3_client[33], ja3_server[33],
|
||||||
|
|||||||
@@ -1220,7 +1220,7 @@ struct ndpi_flow_struct {
|
|||||||
struct {
|
struct {
|
||||||
struct {
|
struct {
|
||||||
u_int16_t ssl_version, server_names_len;
|
u_int16_t ssl_version, server_names_len;
|
||||||
char client_certificate[64], *server_names, server_organization[64];
|
char client_requested_server_name[64], *server_names, server_organization[64];
|
||||||
u_int32_t notBefore, notAfter;
|
u_int32_t notBefore, notAfter;
|
||||||
char ja3_client[33], ja3_server[33];
|
char ja3_client[33], ja3_server[33];
|
||||||
u_int16_t server_cipher;
|
u_int16_t server_cipher;
|
||||||
|
|||||||
+4
-4
@@ -4219,7 +4219,7 @@ ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_st
|
|||||||
|| (flow->guessed_protocol_id == NDPI_PROTOCOL_WHATSAPP_CALL))
|
|| (flow->guessed_protocol_id == NDPI_PROTOCOL_WHATSAPP_CALL))
|
||||||
ndpi_set_detected_protocol(ndpi_str, flow, flow->guessed_protocol_id, NDPI_PROTOCOL_UNKNOWN);
|
ndpi_set_detected_protocol(ndpi_str, flow, flow->guessed_protocol_id, NDPI_PROTOCOL_UNKNOWN);
|
||||||
else if((flow->l4.tcp.tls.hello_processed == 1)
|
else if((flow->l4.tcp.tls.hello_processed == 1)
|
||||||
&& (flow->protos.stun_ssl.ssl.client_certificate[0] != '\0')) {
|
&& (flow->protos.stun_ssl.ssl.client_requested_server_name[0] != '\0')) {
|
||||||
ndpi_set_detected_protocol(ndpi_str, flow, NDPI_PROTOCOL_TLS, NDPI_PROTOCOL_UNKNOWN);
|
ndpi_set_detected_protocol(ndpi_str, flow, NDPI_PROTOCOL_TLS, NDPI_PROTOCOL_UNKNOWN);
|
||||||
} else {
|
} else {
|
||||||
if((flow->guessed_protocol_id == NDPI_PROTOCOL_UNKNOWN)
|
if((flow->guessed_protocol_id == NDPI_PROTOCOL_UNKNOWN)
|
||||||
@@ -4620,11 +4620,11 @@ void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_str,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flow->protos.stun_ssl.ssl.client_certificate[0] != '\0') {
|
if(flow->protos.stun_ssl.ssl.client_requested_server_name[0] != '\0') {
|
||||||
unsigned long id;
|
unsigned long id;
|
||||||
int rc = ndpi_match_custom_category(ndpi_str,
|
int rc = ndpi_match_custom_category(ndpi_str,
|
||||||
(char *)flow->protos.stun_ssl.ssl.client_certificate,
|
(char *)flow->protos.stun_ssl.ssl.client_requested_server_name,
|
||||||
strlen(flow->protos.stun_ssl.ssl.client_certificate),
|
strlen(flow->protos.stun_ssl.ssl.client_requested_server_name),
|
||||||
&id);
|
&id);
|
||||||
|
|
||||||
if(rc == 0) {
|
if(rc == 0) {
|
||||||
|
|||||||
@@ -1043,7 +1043,8 @@ int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
if(!unknown_tls_version) {
|
if(!unknown_tls_version) {
|
||||||
ndpi_serialize_start_of_block(serializer, "tls");
|
ndpi_serialize_start_of_block(serializer, "tls");
|
||||||
ndpi_serialize_string_string(serializer, "version", version);
|
ndpi_serialize_string_string(serializer, "version", version);
|
||||||
ndpi_serialize_string_string(serializer, "client_cert", flow->protos.stun_ssl.ssl.client_certificate);
|
ndpi_serialize_string_string(serializer, "client_requested_server_name",
|
||||||
|
flow->protos.stun_ssl.ssl.client_requested_server_name);
|
||||||
if(flow->protos.stun_ssl.ssl.server_names)
|
if(flow->protos.stun_ssl.ssl.server_names)
|
||||||
ndpi_serialize_string_string(serializer, "server_names", flow->protos.stun_ssl.ssl.server_names);
|
ndpi_serialize_string_string(serializer, "server_names", flow->protos.stun_ssl.ssl.server_names);
|
||||||
ndpi_serialize_string_string(serializer, "issuer", flow->protos.stun_ssl.ssl.server_organization);
|
ndpi_serialize_string_string(serializer, "issuer", flow->protos.stun_ssl.ssl.server_organization);
|
||||||
|
|||||||
@@ -987,8 +987,9 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
|
|
||||||
cleanupServerName(buffer, sizeof(buffer));
|
cleanupServerName(buffer, sizeof(buffer));
|
||||||
|
|
||||||
snprintf(flow->protos.stun_ssl.ssl.client_certificate,
|
snprintf(flow->protos.stun_ssl.ssl.client_requested_server_name,
|
||||||
sizeof(flow->protos.stun_ssl.ssl.client_certificate), "%s", buffer);
|
sizeof(flow->protos.stun_ssl.ssl.client_requested_server_name),
|
||||||
|
"%s", buffer);
|
||||||
|
|
||||||
if(ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TLS, buffer, strlen(buffer)))
|
if(ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TLS, buffer, strlen(buffer)))
|
||||||
flow->l4.tcp.tls.subprotocol_detected = 1;
|
flow->l4.tcp.tls.subprotocol_detected = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user