Commit graph

100 commits

Author SHA1 Message Date
MatteoBiscosi
755c90e0c2 Changed from UDP unidirection to unidirectiont traffic 2022-06-21 15:11:54 +02:00
MatteoBiscosi
4f8c5c6cec Moved UDP unidirection to nDPI alerts 2022-06-21 11:37:46 +02:00
Luca Deri
9d364c69b4 Fixed TCP with no answer alert definition 2022-06-07 13:11:35 +02:00
MatteoBiscosi
3509b3b74b Added dns fragmented alert 2022-05-31 18:34:22 +02:00
MatteoBiscosi
167cf6484a Updated ndpi flow risk alerts 2022-05-31 17:15:21 +02:00
MatteoBiscosi
e9147aa37d Implemented connection failed alert (#6622) 2022-05-27 10:45:25 +02:00
Luca Deri
cdbb0e5380 Implements #6598 2022-05-15 16:57:48 +02:00
Luca Deri
7c038e29da Implemented IEC104 Invalid Command Transition check/alert 2022-05-11 23:16:45 +02:00
MatteoBiscosi
2bcf7c8dfa Added Suspicious Entropy alert (#6563) 2022-05-04 22:11:44 +02:00
Luca Deri
64dd3fa940 Improved ICMP data exfiltration detection 2022-05-04 00:31:55 +02:00
Luca Deri
269e9da142 (C) Update 2022-02-20 23:17:50 +01:00
MatteoBiscosi
4528e5a660 Added Broadcast non-UDP traffic alert and minor fixes to apexcharts 2021-12-17 13:33:11 +01:00
MatteoBiscosi
3d5fb6c3b1 Remove duplicated information from tls flows (#6073) 2021-11-24 13:31:01 +01:00
Simone Mainardi
fef7723445 Implements dynamic loading of flow risk alerts in Lua
Addresses #5743
2021-09-15 13:57:43 +02:00
Simone Mainardi
3db5843db2 Implements fallback check and alert classes to handle risks
Addresses #5743
2021-09-14 11:47:27 +02:00
Simone Mainardi
e34fca9af0 Implements getFlowRiskAlertType
Addresses #5743
2021-09-14 09:57:52 +02:00
Simone Mainardi
71063ee7c6 Refactors getFlowRiskScore
Addresses #5743
2021-09-14 09:41:38 +02:00
Simone Mainardi
6d119be51e Initial work to allow dynamic nDPI risks addition (C++)
Addresses #5743
2021-09-13 18:32:50 +02:00
Simone Mainardi
5f70c1eff7 Implements support for obsolete client SSH version
Addresses #5861
2021-09-10 12:32:42 +02:00
Simone Mainardi
4b55e02899 Reworks check for Obsolete SSH that was not handling cli and srv
Addresses #5861
2021-09-10 11:58:46 +02:00
Simone Mainardi
ef9597140b nEdge compilation fix 2021-08-11 17:23:03 +02:00
Simone Mainardi
f6560d1974 Implements and rework alert for flow periodicity change 2021-08-11 15:11:44 +02:00
MatteoBiscosi
73be980960 Fixes lateral movement alert 2021-08-05 20:29:38 +02:00
Simone Mainardi
aef24d06b0 Implements TLS cert validity check and corresponding test
Addresses https://github.com/ntop/ntopng/issues/5434
Addresses https://github.com/ntop/nDPI/issues/1196
2021-07-14 18:04:00 +02:00
MatteoBiscosi
638bf881fd Migrated periodicity update alert into flow alert 2021-06-21 17:47:03 +02:00
MatteoBiscosi
2d61babeaf Removed unused lateral movement variable 2021-06-17 16:59:15 +02:00
MatteoBiscosi
a89c95dba4 Migrated Lateral Movement alert from interface to flow (Fixes #5485) 2021-06-17 11:07:29 +02:00
Simone Mainardi
a160ccf2d6 Refactors callback to check #defines (c++) 2021-06-16 15:56:07 +02:00
Simone Mainardi
40f5c4e821 Refactors {flow,host}callbacks into {flow,host}checks (C++) 2021-06-16 15:27:38 +02:00
Simone Mainardi
3d1ab71f9b Reworks scores for nDPI-risk flow alerts
Addresses #5402
2021-06-11 15:22:32 +02:00
Alfredo Cardigliano
38b31bdb9c Add getDefaultScore 2021-06-11 13:15:24 +02:00
Simone Mainardi
b166b07007 Adds base class FlowRiskAlert 2021-06-11 12:38:57 +02:00
Simone Mainardi
62e20d471b Adds scores to flow-risk based alerts 2021-06-11 12:35:32 +02:00
Alfredo Cardigliano
3a2c8052f2 Fix floe callbacks cli/src score 2021-06-11 12:15:15 +02:00
Simone Mainardi
9b8e2a1f79 Adds per-alert scores in alert classes
Addresses #5402
2021-06-10 18:06:10 +02:00
Alfredo Cardigliano
86e92ce0d2 Cleanup PotentiallyDangerous callback as overlaps with FlowRiskUnsafeProtocol (#5402) 2021-06-07 16:11:20 +02:00
Simone Mainardi
86a6491c18 Cleanup of flow alerts API 2021-05-19 12:45:31 +02:00
Simone Mainardi
ef61b6db4a Fixes for descriptions of blacklisted and suspicious 2021-05-05 15:23:11 +02:00
Alfredo Cardigliano
509f6a9939 Remove alerts for suspicious TCP/SYN flows leading to false positives (#5255) 2021-04-30 13:04:35 +02:00
Simone Mainardi
fb61a2a73d Fixes enable/disable user scripts with editions
Fixes #5191
2021-04-21 10:48:49 +00:00
Matteo Biscosi
fa5910c06f Implemented flow and host alert for remote access 2021-04-12 16:34:36 +02:00
Matteo Biscosi
8d2cf80f95 Added JA3 hash to flow alert
Implements #5159
2021-04-08 12:34:45 +02:00
Simone Mainardi
0748866745 Minor fixes 2021-04-03 10:30:53 +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
Matteo Biscosi
1cd7c288e2 Implements trigger alert for TCP flows with no data exchanged
Implements #2801
2021-03-30 15:59:40 +02:00
Matteo Biscosi
0c1937786d Implements DGA alarms do not report the domain name
Implements #4725
2021-03-26 18:00:49 +01:00
Simone Mainardi
fa238d4bb4 Severity can now be set to FlowAlert instances via a method 2021-03-23 12:37:19 +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