Commit graph

222 commits

Author SHA1 Message Date
Alfredo Cardigliano
ed7ebaa6ac Add flag to use proxy in email settings 2023-09-28 11:07:28 +02:00
Luca Deri
72aee7ffab Implemented Utils::execCmd for avoiding lua popen
Refreshed VS modules
2023-09-20 12:23:51 +02:00
Alfredo Cardigliano
12303db959 Add debug mode for the email endpoint (redis-cli set ntopng.prefs.debug_email 1) 2023-09-14 15:24:56 +02:00
Luca
68172fc882 Enhanced UTF-8 string validation 2023-08-22 19:32:34 +02:00
Luca
c70d0a2adf Reworked flow aggregation 2023-07-10 20:04:14 +02:00
Alfredo Cardigliano
56f54a33b2 Add support for cloud keys generation 2023-06-08 13:01:48 +02:00
Luca Deri
56d507a708 Implemented Radius CHAP support 2023-05-01 19:51:02 +02:00
lucaderi
d395deac4e Automated commit of clang-format CI changes. 2023-04-07 14:20:44 +00:00
Alfredo Cardigliano
a3ac67d70b Remove get_first_XXX_interface API. Cleanup. 2023-03-31 10:50:10 +02:00
Luca Deri
05ecf9eb90 Remove un-necessary VLANid type in order to simplify code and avoid un-necessary and's 2023-02-20 22:30:12 +01:00
Alfredo Cardigliano
c846bd6d4e Add support for Bearer Token in postHTTPJsonData 2023-02-08 17:15:05 +01:00
Luca Deri
133423cfa8 Reworked flow swap handling 2023-01-20 21:38:14 +01:00
Luca Deri
e846fef24b ZMQ encryotion key is now reported in hex to avoid escape problems 2023-01-07 10:00:38 +01:00
Luca Deri
f726b867c7 Updated (C) 2023-01-01 16:37:57 +01:00
Luca Deri
eacb58cb30 Changes for Kafka flow collection 2022-10-25 23:28:17 +02:00
MatteoBiscosi
fc89dd11cc Lowered memory consumption due to alert score 2022-10-19 11:36:07 +02:00
MatteoBiscosi
692ae0bfcc Added critical and emergency status to alerts 2022-10-19 10:18:51 +02:00
Alfredo Cardigliano
8845ca8573 Add Utils::openSocket/Utils::closeSocket to label sockets 2022-07-29 10:11:57 +02:00
Alfredo Cardigliano
80a4acab95 Add Flow Checks profiling (execution time in System -> Health -> Behavioural Checks) 2022-07-15 16:22:48 +02:00
Luca Deri
90c983e106 Patch for avoid seting hostnames with invalid strings 2022-05-26 19:18:25 +02:00
MatteoBiscosi
72f814c36c Added vlan support to exclusion lists (#6510) 2022-05-24 12:22:24 +02:00
Luca Deri
2ed9a5b7e9 Chnaged Utils::hashString() signature 2022-04-10 15:20:34 +02:00
Alfredo Cardigliano
e3fff1ee80 Add utility functions to convert country code to u16 ( #6472) 2022-03-25 12:09:57 +01:00
Alfredo Cardigliano
19310ffd06 Initial cleanup of useless consts towards migration to modern C++ (#6271) 2022-02-03 15:57:34 +01:00
Alfredo Cardigliano
f2060f2488 Copyright update (C) 2022-01-03 09:35:09 +01:00
MatteoBiscosi
e92135e776 Reorganized periodic scripts 2021-12-28 15:41:28 +01:00
MatteoBiscosi
fc4bbe38d4 Fixes not working host pool filter in service/periodicity map (#tmp_filters) 2021-12-07 16:54:57 +01:00
Simone Mainardi
71063ee7c6 Refactors getFlowRiskScore
Addresses #5743
2021-09-14 09:41:38 +02:00
Luca Deri
6d00ebc93f Removed old dependency and dead code 2021-08-26 11:33:08 +02:00
Alfredo Cardigliano
4edfd178ca Read link type from the timeline (#5770) 2021-08-24 14:42:21 +02:00
MatteoBiscosi
31ed07156a Fixes unicast addresses filter, periodicity/service map (#5776) 2021-08-19 11:21:10 +02:00
Alfredo Cardigliano
aad505f87a Add support for domain name match in Unexpected Server checks (required by #4869) 2021-08-11 09:53:06 +02:00
Simone Mainardi
d31bf861a1 Minor fixes for the new PeriodicityHash 2021-08-10 15:18:59 +02:00
Alfredo Cardigliano
0b45253b7c Support for nsec pcap 2021-08-05 11:01:04 +02:00
Simone Mainardi
ab80e3b4ee Allows service/periodicity maps search by MAC
Addresses #5625
2021-07-27 17:31:17 +02:00
MatteoBiscosi
773b5389c7 Removed duplicated function to lower (#5681) 2021-07-15 11:53:56 +02:00
MatteoBiscosi
532831acb0 Set all resolved names to lower case (#5681) 2021-07-15 10:27:45 +02:00
Simone Mainardi
343fc335c2 Implements support for non-community {host,flow} checks 2021-07-12 12:32:06 +02:00
Luca Deri
620823cf33 Cleaned up code for ZMQ collectors (some extra cleanup is necessary however) 2021-07-07 01:38:45 +02:00
Simone Mainardi
e33af8a23c Refactors script_categories into check_categories (c++ and lua) 2021-06-16 18:43:55 +02:00
Simone Mainardi
3d1ab71f9b Reworks scores for nDPI-risk flow alerts
Addresses #5402
2021-06-11 15:22:32 +02:00
Luca Deri
d81d8a3295 Fixes bug that precvented session key to work when multiple ntopng instances are started per host 2021-05-21 23:29:15 +02:00
Simone Mainardi
38b47d5aa8 Unifies scores using nDPI for Lua-triggered alerts 2021-05-15 10:37:42 +02:00
Alfredo Cardigliano
e3708bf017 Move buildSqliteAllowedNetworksFilters to Utils as AlertsManager is going to be removed 2021-05-10 10:45:49 +02:00
Alfredo Cardigliano
ef65671794 Remove alert severity from Alerts. Always use score (convert to severity when required for UI or similar) 2021-05-05 09:54:14 +02:00
Simone Mainardi
37dd9612f2 Reworks reqs/repls host plugin 2021-04-06 15:02:24 +02:00
Luca
a4047c5a1c Implements flow callbacks and alerts in C++
Scaffolding code of the host scripts

Scaffolding code for host alerts

Adds host_callbacks/ for .cpp files

Implements all classes for host callbacks

Removes pro/enterprise host callbacks

Adds typedefs with callback deltas

Compilation fix

Creates instances of host callbacks in loader

Link fix

Removes redundant/non-necessary host alerts

Merges Scan and Flood callbacks together

Removes outdated API files

Refactors alert keys into entity|id

Refactors all flow alert_{...} into flow_alert_{...}

Refactors C++ flow alert_{...} into flow_alert_{...}

Reworks alert ids to include an entity type

Cleanup and merge alertTypeRaw with getAlertType

Minor fix

Refactors alert definitions and keys into sub directories

Implement host alert callback execution and trigger/release logic

Update callbacks API

Adds base CallbacksLoader for {Host,Flow}CallbacksLoader

Implements load of host user scripts with periodicities

Implements runtime reload of host callbacks

Add logic for periodic callbacks

Add 'expired' flag to host alerts

Implements execution of host callbacks and SYN flood checks

Adds triggerAlertAsync calls to SYNFlood

Implements JSON host alert generation info

Handle callback getPeriod. Optimize callback lookup.

Implements host recipients in C++

Add callback status

Define destructor

Iterator fixes

Cleanup host Lua calls (now performed in C++)

Changes to show new host alerts in SQLite

Adds release/engage action on alert JSON

Move AlertableEntity to OtherAlertableEntity, inheriting from a new AlertableEntity. Add HostAlertableEntity.

Implements SYN Flood Attacker with params

Uses parametrized thresholds to trigger syn flood alerts

Implements build alert of both attacker and victim

Implement HostAlertableEntity

Implements SYN scan attacker/victim alerts

Implements flow flood attacker/victim alerts

Removes a debug flag

Add virtual allocStatus

Add HostAlert disableAutoRelease()

Add Ãexplicit releaseAlert()

Implements SYNFloodHostCallbackStatus

Implements SYNScanHostCallbackStatus

Implements FlowFloodHostCallbackStatus

Change trigger API to handle cli/src score

Implements {DNS,SMTP,NTP}ServerContactsAlert

Reworks ServerContacts host alerts

Implement exclusion bitmaps for host alerts

Implements {SMTP,DNS,NTP}ServerContactsAlert

Adds host_info to the generated alert JSON

Minor cleanup

Optimize access to callback status

Move RepliesRequestsRatio to pro

Rework triggerAlert on host to avoid multiple call and unneeded status data

Compilation fix

Reworked host alerts API (wip)

Cleanup unused host callbacks

Compilation fixes

Finishes backend implementation of host alerts exclusions

Rework host callbacks executor

Implements disable of host alerts

Port SYNFlood to the new api

Cleanup

Reduce duplicated code

Comments

Port ServerContacts to the new api

Clenaup

Adds parsing of configuration for host callbacks

Port SYNScanAlert to the new API

Port FlowFlood to the new API

Cleanup unused HostAlert getName

Reworks DNSRequestsErrorsRatioAlert

Adds JSON for DNSTrafficAlert

Adds FlowsAlert

Adds P2PTrafficAlert

Add RepliesRequestsRatioAlert

Adds ScoreAlert

Adds ThroughputAlert

Adds TrafficAlert

Fixes for scan/flood alerts

DNS ratio alert support

Add HTTP stats getters

Implements deltas for many host callbacks

Host score inc

Adds missing Alert params to host alerts

Release all host alerts on idle

Refactors score classes

Implements class Score to contain scores for hosts, flows, etc

Adds scores to VLANs, Networks, ASes and Countries

Host callbacks can trigger a single alert now

FlowFlood, SYNFloo, SYNScan now inherit from FlowHits

Move severity and score to constructor

Add else branch to hits callbacks

Alert definition update for flows_flood, syn_flood, syn_scan

Update field name

Engaged alert init

Adds score incs/decs for AS, VLAN, country, os and network

Restore network scripts

Restored other alert definitions for floods

Handle decreasing alert score

Removes include

Rename flows_flood to flow_flood for consistency

Restored alert_tcp_syn_flood_victim alert_tcp_syn_scan_victim definitions

Fixes for non-host engaged/release alerts

Cleanup LuaEngineFlow and LuaEngineHost classes

Fixes old calls to host lua during shutdown

Removes AlertCheckLuaEngine instance

Fixes purging of flows

Fixes alerts release upon shutdown causing wrong uses

Removes a debug flag

Fix getNumEngagedAlerts

Cleanup unnecessary host callbacks

Removes array of callback statuses inside host

Bitmap fixes

Refactors Bitmap into Bitmap128

Implements 16-bits bitmaps for host alerts

Adds class HostCallbacksStatus

Moves callback status p2p and DNS inside HostCallbacksStatus

Removes unused callbacks in typedefs

Minor cleanup

Adds trigger/release for DNS/p2p alerts

Reworks UI of hosts user scripts

Rename HostCallbackType to HostCallbackID, getType to getID, others
2021-04-03 09:53:15 +02:00
Simone Mainardi
f61ffc045b Merge branch 'c-user-scripts' into dev 2021-03-22 10:36:13 +01:00
Simone Mainardi
aea9138bfb Implements flow callbacks and alerts in C++ 2021-03-22 09:51:36 +01:00
Tomoaki
e3d881d9b9
Add facility to flows dumping to syslog (#5097)
* Add syslog facility configuration for dumping.

* Fix indents.

* Fix log message.
2021-03-12 17:33:02 +01:00