Replaced malicious JA3-md5/SSL-cert-sha1 ac automata with hashmaps.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -971,6 +971,12 @@ typedef struct _ndpi_automa {
|
||||
void *ac_automa; /* Real type is AC_AUTOMATA_t */
|
||||
} ndpi_automa;
|
||||
|
||||
typedef struct ndpi_str_hash {
|
||||
unsigned int hash;
|
||||
void *value;
|
||||
u_int8_t private_data[0];
|
||||
} ndpi_str_hash;
|
||||
|
||||
typedef struct ndpi_proto {
|
||||
/*
|
||||
Note
|
||||
@@ -1060,8 +1066,8 @@ struct ndpi_detection_module_struct {
|
||||
/* HTTP/DNS/HTTPS/QUIC host matching */
|
||||
ndpi_automa host_automa, /* Used for DNS/HTTPS */
|
||||
risky_domain_automa, tls_cert_subject_automa,
|
||||
malicious_ja3_automa, malicious_sha1_automa,
|
||||
host_risk_mask_automa, common_alpns_automa;
|
||||
host_risk_mask_automa, common_alpns_automa;
|
||||
ndpi_str_hash *malicious_ja3_hashmap, *malicious_sha1_hashmap;
|
||||
/* IMPORTANT: please update ndpi_finalize_initialization() whenever you add a new automa */
|
||||
|
||||
ndpi_list *trusted_issuer_dn;
|
||||
@@ -1623,14 +1629,6 @@ struct ndpi_bin {
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
typedef struct ndpi_str_hash {
|
||||
unsigned int hash;
|
||||
void *value;
|
||||
u_int8_t private_data[0];
|
||||
} ndpi_str_hash;
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
#define HW_HISTORY_LEN 4
|
||||
#define MAX_SQUARE_ERROR_ITERATIONS 64 /* MUST be < num_values_rollup (256 max) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user