Commit graph

33 commits

Author SHA1 Message Date
Luca Deri
f26d56959c Renamed HostBlackHoleContactsAlert to HostScannerAlert 2024-04-08 18:35:49 +02:00
Nicolò Maio
2deb42a7a2
Add the blackhole contacts alerts and update the scan detection alert. (#8290) 2024-03-28 08:55:45 +01:00
Matteo Biscosi
af9011684b Moved host traffic checks to unused 2024-02-27 05:30:20 -05:00
Luca Deri
2ee2c180a5 Removed alerts no longer necessary as they have been replaced by local traffic rules 2024-02-21 22:54:22 +01:00
Luca Deri
55870e97b9 (C) Update 2024-01-12 11:44:18 +01:00
Alfredo Cardigliano
73af3fa521 Add support for external (REST) host alerts (#7170) 2023-01-26 15:34:54 +01:00
Luca Deri
c42fdd60c9 Added traffic volume alert 2022-12-19 23:17:44 +01:00
MatteoBiscosi
cde463a324 Added RST scan alert (#5903) 2022-11-30 17:01:49 +01:00
Luca Deri
71fbbdbf58 Implemented custom host script (WIP) 2022-11-24 12:34:14 +01:00
MatteoBiscosi
2e27e21cc8 Added SNMP flood check (#5905) 2022-11-23 12:14:42 +01:00
MatteoBiscosi
71bb0efbc2 Added DNS flood alert (#5905) 2022-11-22 11:13:02 +01:00
MatteoBiscosi
7b51a4ca61 Added Fin Scan check (#5903) 2022-05-16 17:18:11 +02:00
Luca Deri
269e9da142 (C) Update 2022-02-20 23:17:50 +01:00
Alfredo Cardigliano
257ece18c0 Copyright update (Lua) 2022-01-03 09:42:33 +01:00
Simone Mainardi
e89fe31dc1 Comments 2021-12-22 17:48:03 +01:00
Simone Mainardi
ac0969eddc Additional fixes for PktThresholdAlert 2021-11-18 18:30:25 +01:00
MatteoBiscosi
7c10fba84b Implements ICMP flood check (#5904) 2021-10-07 11:40:51 +02:00
MatteoBiscosi
c15b62407c Separated Score Threshold and Anomaly alert (#5845) 2021-09-07 11:38:48 +02:00
Francesco Amodeo
de27966413
Implemented countries host check (#5713)
* Added check and alert implementation

* Fixed size of estimation and some typo

* Added HLL counters and DES structure
Co-authored-by: Paolo Junior Mollica <p.mollica@studenti.unipi.it>

* fixes according comments of PR

* decreased memory footprint

* resolved conflicts

* fixed HostCheckID

* Removed wrongly committed file

Co-authored-by: paolo-junior-mollica <paolo.junior.mollica@gmail.com>
Co-authored-by: Matteo Biscosi <49585191+MatteoBiscosi@users.noreply.github.com>
2021-08-25 15:50:07 +02:00
Gaetano Barresi
f650a3700a
Domain Names host check (#5723)
* Adding/modifying .cpp for Domain Names host check

* Adding/modifying .h/.lua for Domain Names host check

* minor synstax fix

* dns_contacts

Co-authored-by: Stefano Russo <55586218+D0kken@users.noreply.github.com>
Co-authored-by: Stefano Russo <s.russo41@studenti.unipi.it>
2021-08-25 11:22:41 +02:00
Simone Mainardi
0c6392d8c7 Recycles an host alert id 2021-07-27 14:24:49 +02:00
Simone Mainardi
5fe995ecfe Implements host check for NTP traffic 2021-07-27 12:19:52 +02:00
Luca Deri
c76cce1c4f Renamed Host Ban to Dangerous Host 2021-06-09 22:54:17 +02:00
Matteo Biscosi
bcc717689f Partially Implements traffic blocking (#5387) 2021-05-21 18:40:49 +02:00
Alfredo Cardigliano
8dd0f903a1 Move host log alerts to host alerts. Fix syslog alerts. 2021-05-03 17:37:18 +02:00
Simone Mainardi
1782734e0c Removes unused host callbacks 2021-04-13 11:01:06 +02:00
Matteo Biscosi
fa5910c06f Implemented flow and host alert for remote access 2021-04-12 16:34:36 +02:00
Luca Deri
73c61e1308 Implemented score anomaly plugin 2021-04-11 18:57:23 +02:00
Simone Mainardi
b5717ea209 Adds manifest.lua file for network anomaly plugin 2021-04-11 14:36:53 +02:00
Luca Deri
8b2faf21f5 Added script for checking flow number anomalies 2021-04-11 13:59:47 +02:00
Simone Mainardi
fbbcb18bf8 Cleanup HTTPRepliesRequestsRatio 2021-04-08 18:15:52 +02:00
Simone Mainardi
7d7e84a7a9 Reworks implementation of {DNS,HTTP}RepliesRequestsRatio 2021-04-08 10:02:47 +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