Commit graph

920 commits

Author SHA1 Message Date
Luca Deri
19d6b74457 Host anomalies code cleanup and timeseries dump 2021-04-10 10:38:26 +02:00
Alfredo Cardigliano
db6746e1a3 Enqueue host alert release status to avoid concurrency issues. Change SPSCQueue dequeue to behave similar to std lists. 2021-04-09 09:45:11 +02:00
Matteo Biscosi
61c636f63b Fixes compilation error 2021-04-08 09:47:58 +02:00
Matteo Biscosi
efd35057c7 Implemented realtime traffic data rest for the new dashboard 2021-04-07 18:06:16 +02:00
Simone Mainardi
5faf713bd0 Handles new <type,id> alerts in alert pages and dropdowns 2021-04-07 16:08:36 +02:00
Matteo Biscosi
9fc31a68db Added top talkers and top scores for the new dashboard 2021-04-07 15:23:51 +02:00
Alfredo Cardigliano
a42f7c66fe Cleanup 2021-04-07 10:38:15 +02:00
Simone Mainardi
b12fc91a6b Merge branch 'host-user-scripts' into dev 2021-04-03 10:18:09 +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
Luca Deri
fe74fb4f14 Fixed traffic stats chart in flows 2021-04-01 13:50:11 +02:00
Matteo Biscosi
aa565a3c41 Added throughput chart into filtered flow page 2021-04-01 11:51:58 +02:00
Matteo Biscosi
4678789d1e Added traffic counters based on flow filters 2021-03-31 17:31:38 +02:00
Matteo Biscosi
53b27a023c Added interface anomalies timeseries 2021-03-29 19:35:30 +02:00
Simone Mainardi
183eefb84a Renames the flow alerts queue 2021-03-23 10:45:49 +01:00
Alfredo Cardigliano
692380ba34 Use meaningful names. Flush flow alerts on shutdown. 2021-03-22 16:55:21 +01: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
Luca Deri
8f37e1d77d Added anomaly counter 2021-03-18 19:08:17 +01:00
Luca Deri
e10a3a3135 Enhanced anomly debug messages
Cleaned up brodcast domain code
2021-03-18 15:46:58 +01:00
Simone Mainardi
76006d6250 Fixes IP reassignment code that is now per-interface
Implements #5038
2021-02-26 11:21:04 +01:00
Alfredo Cardigliano
db9adb9060 Add support for Malicious JA3 signature using nDPI (#5045) 2021-02-23 18:35:19 +01:00
Matteo Biscosi
9632c62bfa Implements cleanup IP reassignment code
Implements #5038
2021-02-19 15:36:27 +01:00
Alfredo Cardigliano
c658b8ed24 Full purge idle scan on shutdown when processing pcap 2021-02-11 15:56:43 +01:00
Simone Mainardi
265472728d Improves guess of local networks from broadcast traffic
Fixes #5011
2021-02-08 17:23:05 +01:00
Simone Mainardi
537bc5210a Adds Layer-7 Applications to Exporters (backend)
Addresses #4976
2021-02-04 11:01:22 +01:00
Matteo Biscosi
288463b5d0 Implements #4973 partial local broadcast domain calculation 2021-01-27 09:59:05 +01:00
Matteo Biscosi
c4dd51e9b6 Implements dynamic menu for periodicity and service map
Implements #4939
2021-01-22 16:18:57 +01:00
Alfredo Cardigliano
f2e64bb9ef Support 4-byte INPUT/OUTPUT SNMP 2021-01-22 10:24:56 +01:00
Matteo Biscosi
4c3d1d628d Implements Service/Periodicity map: add ageing an protocol filter
Implements #4939
2021-01-22 10:12:56 +01:00
Matteo Biscosi
f6fcce5e0b Fixed #4937 top sites generation is broken 2021-01-21 18:05:25 +01:00
Simone Mainardi
8a62783e2d Cleanup old partial host groups code
Fixes #1599
2021-01-21 11:27:17 +01:00
Matteo Biscosi
43fa8cf6e9 Implements OperatingSystem Hash
Implements #1599
2021-01-21 11:14:52 +01:00
Matteo Biscosi
864723c151 Fixed top sites problem and added a slice of top OS stats 2021-01-18 18:12:53 +01:00
Simone Mainardi
c183008859 Prints SNMP details in interfaces dropdown when available 2021-01-17 12:49:54 +01:00
Matteo Biscosi
acba25becb Added unicast filter to service/periodicity map 2021-01-13 18:31:23 +01:00
Matteo Biscosi
1d9b034974 Added host pool and vlan filter for periodicity map 2021-01-13 18:09:09 +01:00
Matteo Biscosi
faf44e0a64 Added vlan and host_pool_id for the service map 2021-01-13 11:57:49 +01:00
Matteo Biscosi
4586833114 Fixed #4896 service map nodes have numerical label even though a symbolic name exists 2021-01-11 17:42:49 +01:00
Matteo Biscosi
e1627733fe Reviewed top sites table graphic 2021-01-11 10:41:36 +01:00
Matteo Biscosi
023b7fd1df Reviewed Top Sites per host and Added Top Sites per Interface 2021-01-08 20:07:19 +01:00
Luca Deri
a1178a0791 Updated (C) 2021-01-02 12:08:23 +01:00
Alfredo Cardigliano
351210be45 Use the interface mac to compute traffic direction when not available 2020-12-30 09:42:55 +01:00
Alfredo Cardigliano
9d8419ff29 Show traffic direction in mirror mode if mac-based direction is configured 2020-12-29 15:59:09 +01:00
Alfredo Cardigliano
33415ad2dd Add support for traffic direction based on the MAC address (implement #4852) 2020-12-29 09:36:51 +01:00
Simone Mainardi
9aed6f7bd9 Adds flow hooks Lua VM reload upon recipient/config changes
Fixes #4842
2020-12-18 12:07:47 +01:00
matteo
e9fb6a3b3a merged and resolved the conflict 2020-12-16 16:51:51 +01:00
Alfredo Cardigliano
b8cff9b5b5 Rename FifoStringsQueue to StringFifoQueue 2020-12-15 12:27:18 +01:00
Simone Mainardi
72502711ea Additional cleanup of unused volatile members 2020-11-26 19:00:19 +01:00
Simone Mainardi
d21fe7d6e1 Cleanup of unused volatile members 2020-11-26 18:50:19 +01:00
Simone Mainardi
a8340ff131 Implements per-interface engaged alert upon alert drops 2020-11-18 18:26:33 +01:00