Added NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE flow risk
Added ndpi_set_tls_cert_expire_days() API call to modify the number of days for triggering the above alert that by default is set to 30 days
This commit is contained in:
@@ -964,6 +964,18 @@ extern "C" {
|
||||
ndpi_protocol_category_t *category,
|
||||
ndpi_protocol_breed_t *breed);
|
||||
|
||||
/**
|
||||
* Specifies the threshold used to trigger the NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE
|
||||
* flow risk that by default is set to 30 days
|
||||
*
|
||||
* @par ndpi_struct = the struct created for the protocol detection
|
||||
* @par days = the number of days threshold for emitting the alert
|
||||
*
|
||||
*/
|
||||
void ndpi_set_tls_cert_expire_days(struct ndpi_detection_module_struct *ndpi_str,
|
||||
u_int8_t days);
|
||||
|
||||
|
||||
/* Utility functions to set ndpi malloc/free/print wrappers */
|
||||
void set_ndpi_malloc(void* (*__ndpi_malloc)(size_t size));
|
||||
void set_ndpi_free(void (*__ndpi_free)(void *ptr));
|
||||
|
||||
@@ -61,7 +61,6 @@ typedef enum {
|
||||
- nDPI/wireshark/ndpi.lua
|
||||
- ndpi_risk2str (in ndpi_utils.c)
|
||||
- doc/flow_risks.rst
|
||||
- https://github.com/ntop/ntopng/blob/dev/scripts/lua/modules/flow_risk_utils.lua
|
||||
- ndpi_risk_enum (in python/ndpi.py)
|
||||
- ndpi_known_risks (ndpi_main.c)
|
||||
|
||||
@@ -116,7 +115,8 @@ typedef enum {
|
||||
NDPI_DNS_FRAGMENTED,
|
||||
NDPI_INVALID_CHARACTERS,
|
||||
NDPI_POSSIBLE_EXPLOIT, /* Log4J and other exploits */
|
||||
|
||||
NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE,
|
||||
|
||||
/* Leave this as last member */
|
||||
NDPI_MAX_RISK /* must be <= 63 due to (**) */
|
||||
} ndpi_risk_enum;
|
||||
@@ -1029,7 +1029,8 @@ struct ndpi_detection_module_struct {
|
||||
u_int32_t ticks_per_second;
|
||||
u_int16_t num_tls_blocks_to_follow;
|
||||
u_int8_t skip_tls_blocks_until_change_cipher:1, enable_ja3_plus:1, _notused:6;
|
||||
|
||||
u_int8_t tls_certificate_expire_in_x_days;
|
||||
|
||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||
void *user_data;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user