diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2019-12-09 00:01:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 00:01:09 +0100 |
commit | 558983c99c274c122f0deb6f2e29d5eb0594a373 (patch) | |
tree | 154ac419d9f7b9b9199de0a92c979fae9fbb893d /example/intrusion_detection.h | |
parent | c8d6f2845fbb33a681a45a4ae46debf1da411c8a (diff) | |
parent | a65c959940dd57bd71c4870e3c179664ee34a96c (diff) |
Merge pull request #813 from SimoneRicci97/dev
Fixed intrusion detection
Diffstat (limited to 'example/intrusion_detection.h')
-rw-r--r-- | example/intrusion_detection.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/example/intrusion_detection.h b/example/intrusion_detection.h new file mode 100644 index 000000000..b31890c96 --- /dev/null +++ b/example/intrusion_detection.h @@ -0,0 +1,34 @@ +#include <stdio.h> +#include <stdlib.h> +#include "reader_util.h" +#include "ndpi_api.h" + +typedef struct norm_values{ + double upper_bound; + double lower_bound; + double weight; + double value; + double norm_value; +}ndpi_norm_value; + +double normalize(ndpi_norm_value* tresholds); + +double get_flow_score(ndpi_norm_value* scores, int n_metrics); + +/* ********************************** */ + +double Ddos_score(struct ndpi_flow_info* flow); + +double Dos_goldeneye_score(struct ndpi_flow_info* flow); + +double Dos_hulk_score(struct ndpi_flow_info* flow); + +double Dos_slow_score(struct ndpi_flow_info* flow); + +double Ftp_patator_score(struct ndpi_flow_info* flow); + +double Hearthbleed_score(struct ndpi_flow_info* flow); + +double Infiltration_score(struct ndpi_flow_info* flow); + +double Ssh_patator_score(struct ndpi_flow_info* flow);
\ No newline at end of file |