aboutsummaryrefslogtreecommitdiff
path: root/example/intrusion_detection.h
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-12-09 00:11:32 +0100
committerLuca Deri <deri@ntop.org>2019-12-09 00:11:32 +0100
commit23b0b8625d1f20596b2b20a149fb28c38046f4e1 (patch)
tree18fd529aa36a7fadf27fadc17a6d445a32b65043 /example/intrusion_detection.h
parent558983c99c274c122f0deb6f2e29d5eb0594a373 (diff)
Minor changes to the IDS score calculation
Diffstat (limited to 'example/intrusion_detection.h')
-rw-r--r--example/intrusion_detection.h42
1 files changed, 36 insertions, 6 deletions
diff --git a/example/intrusion_detection.h b/example/intrusion_detection.h
index b31890c96..f78095e67 100644
--- a/example/intrusion_detection.h
+++ b/example/intrusion_detection.h
@@ -1,14 +1,44 @@
+/*
+ * intrusion_detection.h
+ *
+ * Copyright (C) 2011-19 - ntop.org
+ *
+ * This file is part of nDPI, an open source deep packet inspection
+ * library based on the OpenDPI and PACE technology by ipoque GmbH
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/*
+ Code to detect attacks reported in
+
+ https://www.unb.ca/cic/datasets/ids-2017.html
+ https://www.unb.ca/cic/datasets/ids-2018.html
+*/
+
#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;
+ double upper_bound;
+ double lower_bound;
+ double weight;
+ double value;
+ double norm_value;
}ndpi_norm_value;
double normalize(ndpi_norm_value* tresholds);
@@ -31,4 +61,4 @@ 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
+double Ssh_patator_score(struct ndpi_flow_info* flow);