Implemented TLS Certificate Sibject matching

Improved AnyDesk detection
This commit is contained in:
Luca Deri
2021-02-22 22:37:33 +01:00
parent a21ad2fbe4
commit fc3db8f169
14 changed files with 211 additions and 141 deletions
+2 -2
View File
@@ -180,7 +180,7 @@ extern "C" {
* Returns a new initialized detection module
* Note that before you can use it you can still load
* hosts and do other things. As soon as you are ready to use
* it do not forget to call first ndpi_finalize_initalization()
* it do not forget to call first ndpi_finalize_initialization()
*
* You can call this function multiple times, (i.e. to create multiple
* indipendent detection contexts) but all these calls MUST NOT run
@@ -198,7 +198,7 @@ extern "C" {
* @par ndpi_str = the struct created for the protocol detection
*
*/
void ndpi_finalize_initalization(struct ndpi_detection_module_struct *ndpi_str);
void ndpi_finalize_initialization(struct ndpi_detection_module_struct *ndpi_str);
/**
* Frees the dynamic memory allocated members in the specified flow
+8 -3
View File
@@ -1099,8 +1099,8 @@ struct ndpi_detection_module_struct {
content_automa, /* Used for HTTP subprotocol_detection */
subprotocol_automa, /* Used for HTTP subprotocol_detection */
bigrams_automa, impossible_bigrams_automa, /* TOR */
risky_domain_automa;
/* IMPORTANT: please update ndpi_finalize_initalization() whenever you add a new automa */
risky_domain_automa, tls_cert_subject_automa;
/* IMPORTANT: please update ndpi_finalize_initialization() whenever you add a new automa */
struct {
ndpi_automa hostnames, hostnames_shadow;
@@ -1422,7 +1422,7 @@ struct ndpi_flow_struct {
typedef struct {
char *string_to_match, *proto_name;
int protocol_id;
u_int16_t protocol_id;
ndpi_protocol_category_t protocol_category;
ndpi_protocol_breed_t protocol_breed;
} ndpi_protocol_match;
@@ -1432,6 +1432,11 @@ typedef struct {
ndpi_protocol_category_t protocol_category;
} ndpi_category_match;
typedef struct {
char *string_to_match;
u_int16_t protocol_id;
} ndpi_tls_cert_name_match;
typedef struct {
u_int32_t network;
u_int8_t cidr;