Commit graph

52 commits

Author SHA1 Message Date
GabrieleDeri
85fa6d1b1a
Updated host pool pages to vuejs, missing policy page TODO (#9469)
* Updated host pool pages to vuejs, missing policy page TODO

* Removed print
2025-08-02 16:24:29 +02:00
Matteo Biscosi
4d924a88c4 Fixes Host pool page not working (#8944) 2025-02-06 11:12:36 +01:00
Alfredo Cardigliano
86b07aee7f Normalize host pool members (to upper) 2024-07-12 15:13:52 +00:00
Matteo Biscosi
79def6afe4 Fixes missing import in host_pools 2024-05-10 11:50:32 -04:00
Matteo Biscosi
ddadaf3e77 Removed circular dependency on network_utils 2024-02-19 11:04:06 +00:00
Matteo Biscosi
dbf4bf2a2b Removed useless imports in lua code upping the memory usage 2024-02-15 15:21:40 +00:00
Luca Deri
55870e97b9 (C) Update 2024-01-12 11:44:18 +01:00
MatteoBiscosi
760b5a2c52 Fixes missing formatting in host pools (#6921) 2022-10-05 11:02:06 +02:00
Luca
74f03c3a38 Added script tracings 2022-08-30 19:32:05 +02:00
Alfredo Cardigliano
55d192d1fb Fix pool policy configuration 2022-03-14 16:00:04 +01:00
Alfredo Cardigliano
7173f86704 Fix ntop_find_member_pool 2022-03-03 09:47:04 +01:00
Alfredo Cardigliano
6886186418 Match AM notifications against Host Pools 2022-03-02 18:59:40 +01:00
Alfredo Cardigliano
29c0ba4594 Removed recipient selection from pools. Only severity and category are used as filters now. New filtering based on pool to be done. 2022-02-18 11:45:16 +01:00
Alfredo Cardigliano
257ece18c0 Copyright update (Lua) 2022-01-03 09:42:33 +01:00
Simone Mainardi
e4a6aa5be6 Fixes nEdge 'askToRefreshIPSRules' is not callable (a nil value) 2021-11-05 16:24:50 +01:00
Luca Deri
86435e3561 Removed call to ntop.reloadPeriodicScripts that is no longer required 2021-10-20 15:38:30 +02:00
Simone Mainardi
9937e576ec Handles the jailed hosts pool as a builtin pool like default
Addresses #5973
2021-10-13 17:46:49 +02:00
Simone Mainardi
7d10cda3fa Minor fix 2021-07-15 10:54:54 +02:00
Simone Mainardi
ddad633b3a Fixes checks and addition of host pools
Addresses #5677
2021-07-15 10:52:10 +02:00
l3wiz
f3126b42fe Changed progress-bar and badges palette color (Issue #5346) 2021-06-23 13:14:52 +02:00
Simone Mainardi
76fd315d1b Refactors user_scripts into checks (lua) 2021-06-16 18:02:22 +02:00
Alfredo Cardigliano
b99384494e Fix pools set policy 2021-05-18 18:06:44 +02:00
Matteo Biscosi
553a059557 Added getters and setters for host pools policy 2021-05-14 17:41:06 +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
Alfredo Cardigliano
fa311e3ade Rework user script working sets (a single configset is supported now) 2021-03-01 15:37:45 +01:00
Luca Deri
a1178a0791 Updated (C) 2021-01-02 12:08:23 +01:00
gabryon99
15772bd0fe refactor for endpoints and recipients (#4707) 2020-11-25 16:25:55 +01:00
Simone Mainardi
e7a6682aba Implements transactional host pools members add 2020-11-13 19:15:21 +01:00
Simone Mainardi
6c1280a8e5 Reworks recipients.lua as static rather than (useless) instance 2020-09-23 15:03:07 +02:00
Simone Mainardi
0bbcc12edb Fixes pools_alert_utils.lua:112: bad argument #1 to 'for iterator' 2020-09-16 18:26:39 +02:00
Simone Mainardi
fdf65adc62 Reworks recipient register/delete and Lua VMs reload 2020-09-15 15:58:48 +02:00
Simone Mainardi
9e99fa1403 Uses new in-memory queues for alert recipients (avoid Redis) 2020-09-08 18:36:18 +02:00
Simone Mainardi
2aa4588c07 UI fixes for new recipients 2020-09-08 14:57:55 +02:00
gabryon99
146e0f7945 rewrok gui for new recipients api 2020-09-08 14:08:44 +02:00
Simone Mainardi
32b4a1cca4 Refactors base_pools to pools 2020-09-01 10:53:36 +02:00
Alfredo Cardigliano
75ba792513 Check if pool recipients exist 2020-07-31 16:50:55 +02:00
Alfredo Cardigliano
06b1bcdce0 Add an empty list of members/recipients for host pools if there is none 2020-07-31 11:59:00 +02:00
Simone Mainardi
31f173cdad Prevents name changes for the default pool 2020-07-29 19:01:43 +02:00
Simone Mainardi
e0d936fc9c Fixes host pools getter returning non-existing pools 2020-07-29 16:39:31 +02:00
Alfredo Cardigliano
7ffb4df9a6 Handle host pool serialization (exception for backward compatibility).
Fix recipients add
Initial work for alerts dispatching to recipients
2020-07-23 06:22:17 +02:00
Simone Mainardi
ceba04f92c Fixes to associate pool ids with alerts 2020-07-21 14:59:12 +02:00
Simone Mainardi
42b7d8e7e9 Implements facility to add pool info to alerts 2020-07-21 13:09:27 +02:00
Simone Mainardi
f8645e76d0 Adds host key inside host pool member details 2020-07-20 15:19:56 +02:00
Simone Mainardi
2cc2b4bfa1 Augments host pool member information 2020-07-20 10:41:47 +02:00
Simone Mainardi
c623f21ba0 Refactors old host_pools_utils to nEdge-only host_pools_nedge 2020-07-16 18:17:19 +02:00
Simone Mainardi
06f191cb6d Implements timeseries dump in the new host pools lua class 2020-07-16 17:51:13 +02:00
Simone Mainardi
205eb8723c Reworks get_pools_data.lua to use the new host pools lua class 2020-07-16 15:44:02 +02:00
Simone Mainardi
ca6bd55132 Reworks get_pool_data.lua to use the new host pools lua class 2020-07-16 15:28:04 +02:00
Simone Mainardi
ccb5ce3c9c Simplifies get_pool_by_member 2020-07-15 16:23:40 +02:00
Simone Mainardi
1405107c13 Implements in-memory host pools bind checks 2020-07-15 15:32:42 +02:00