Commit graph

163 commits

Author SHA1 Message Date
Simone Mainardi
0855f627a0 Allows alert access to admins and non-admins w/o allowed networks
Addresses #5324
2021-05-25 18:14:17 +02:00
Simone Mainardi
bc6008be28 Reports all alerts inside a flow alert (not jsut the predominant)
Implements #5316
2021-05-13 15:51:05 +02:00
Simone Mainardi
bb3f8ed168 Implements efficient unexpected_new_device alert 2021-05-11 19:03:40 +02:00
Simone Mainardi
74603b8fe6 Implements alerts summary page for engaged alerts 2021-05-10 12:20:27 +02:00
Luca Deri
a0ba02a5d9 More alert color fixes 2021-05-07 13:51:05 +02:00
Alfredo Cardigliano
10d8f1f2c5 Fix interface alert ts 2021-05-07 12:27:11 +02:00
Luca Deri
1a59a9cc80 Updated alarm widget 2021-05-07 11:38:24 +02:00
Simone Mainardi
ec06e6568f Simplifies and keeps per-family alert counters 2021-05-07 10:21:32 +02:00
Simone Mainardi
c0a3b4c288 Implements alert report global page
Implements #5291
2021-05-06 16:44:06 +02:00
Alfredo Cardigliano
e4ff578117 Dedup code for alert rest endpoints 2021-05-06 15:04:02 +02:00
Simone Mainardi
83f0c38937 Massive cleanup of old alerts code 2021-05-03 18:16:46 +02:00
Simone Mainardi
fce6454125 Updates ts.lua with new stacked charts by severity 2021-05-03 12:38:08 +02:00
Alfredo Cardigliano
f5138b71ac Sort severity colors in chart 2021-05-03 12:25:47 +02:00
Alfredo Cardigliano
9414a3ab25 Add colors to alert timeseries. Optimize queries by severity. 2021-05-03 12:06:41 +02:00
Alfredo Cardigliano
2173b18ea0 Alert histogram for flows and hosts now includes severity info (wip #5210) 2021-04-30 19:16:00 +02:00
Matteo Biscosi
4b699226c9 Fixes alert download button broken and changed to txt
Implements #5260
2021-04-30 12:38:52 +02:00
Simone Mainardi
5bd58b4109 Implements histogram for engaged alerts 2021-04-28 17:41:33 +02:00
Simone Mainardi
2278926da4 Merge branch 'alerts-store' into dev 2021-04-26 19:59:30 +02:00
Simone Mainardi
c7082a4647 Implements new alerts database and drilldown
alert store skeleton

Alert database type changes

Implement alert store for host alerts. All alert store skeletons.

Fix class method access

Enable tracing

Implements simple queries for host alerts

Implement flow alert store

Fixes escaping of INSERT queries

Flow alerts database schema fixes

Adds escaping for alert JSON in flows and hosts

Implements queries .select() for alerts store

Adds limit and offset to perform paginated queries

Adds new REST getter for flow alerts

Name changes alert_severity to severity, alert_json to json

Fixes alert message not shown

Implement active monitoring alerts store

Implements sort of queries in the new dataabase

Changes alert_type to alert_id

Implement mac alerts store

Fixes flow alert messages

Implement system alerts store

Implement snmp alert store

Add missing items to the flow alerts

Add missing items to the host alerts

Add missing items to the mac alerts

Implements COUNT aplerts api

Add device_name to snmp alerts

add flow alerts templates

updated gitignore

fix for missing order field

add families defined in `alert_store_schema.sql`

Reworks and simplifies alert store subclasses

Implements REST API to fetch alert timeseries

Fixes date in flow REST api

Host alert json fix

Add get/host/alert/list.lua

Move alert/list.lua to alert/past/list.lua

Add alert/past/list.lua for all alert families

Add entity_id to system table to identify the alert type based on <alert_id, entity_id>

Add missing field

Implements facilities to query engaged alerts via REST

Handle both historical and past alerts in alert/list.lua

Fix count

Update params of select_historical

Implement method to add family-specific filters

Add alert/ts.lua for all alert families

Implements facilities and REST endpoints to delete alerts

Implements ordering of alert queries

Fix add_order_by group_by

Rest API tests update

Tests output update

Remove debug trace

Use alert_id instead of type. Add more flow alert info.

Update http lint

Format obsolete tlv version alerts. Add more host info.

Add row_id to list of alerts

Fix selection of engaged alerts

Add test for mac alerts (bcast domains)

Removes attempt to format alerts as flow alerts

Fixes interface selection for active monitoring

Update test output with rest changes

Add more fields to be ignores

Set alert count to 1 for the time being

add bar timeseries chart

add apexcharts

improvements on timeseries bar chart

registered chart callbakcs

working on alert page

fix for date format

Fixes acrive monitoring REST API

Fixes alignment of grouped alert data

Additional fix for alert histogram

remove useless if

formatting alerts page

fixes on flows alert stats table

rename local networks to device

format host pagie in alert_stats

add tag support for hosts and flow

implemented single delete action

add release modal

Fixes format of threshold cross interface alerts

Fixes wrong increase of dropped alerts

Implements exclusion list for invalid dns queries

Reworks exclusions lists for hosts and flows

Addresses #5212
Addresses #5113

Adds host alert keys in host callbacks definitions

Adds alert ids to flow callbacks

fix for not working button (#5215)

Fixes reported timeseries name

removed any additional button inside chart's toolbar (#5200)

Add tables for interfaces, networks, users to the schema. Skeleton alert_store classes

fixed broken range picker layout in firefox (#5199)

Alert insert fixes

Add more info to network alerts

Add rest endpoint for interface, network, user alerts

Fix endpoint selection in alerts_stats

Unifies columns between engaged and past alerts

Fixes Missing mandatory 'alert_granularity'

Minor fixes for missing alert_severity

Fixes arithmetic on a nil value (field 'last_seen')

Fixes get/system/alert/list.lua

use tstamp for column names (#5221)

Implements host alert formatter

Add alerts_store format_record_common

Use common format_record for am, system alerts

Use common format_record for all alerts

Fixes formatting of alerts of all types

Fixes nil in function 'hostinfo2label'

fixes on disable modal

add pages for network, user and interface endpoint (#5224)

Set alert_entity in all classes

Unifies influxdb alerts into system alerts

Addresses #5224

Unifies process alerts into system alerts

Addresses #5224

Cleanup unused periodicActivityEntity

Unifies category lists alerts into system alerts

Addresses #5224

Aligns new alert enums

Addresses #5224

Fixes alert page links

Fixes insertion of interface alerts

Implement filters for Host alerts

Fixes active monitoring alerts not triggering

Implement filters on flow alerts

Fixes for internal alerts timestamp and subtype

implements disable for the alerts

formatted alert disable label

Add address and device type to mac alert records

fix for delete alert toggle

Fix access to entity_val in alert_unexpected_new_device

add mac address and device type inside table

Fixes for new alert fields not handled

Fixes alert_definitions to handle new fields

Add ip/port to snmp alert records

Implements deletion of stored flow alerts

Add alert_name to all alert records via rest. Fix duration.

fixes for snmp tab

Implements delete of past host alerts

Add name to snmp alert records

fixes on system tab

Fix Date column

fixes link

Update menu

Fixes bad argument #3 to 'format' in snmp alerts

updated interface link

new alerts url for host (#5228)

Fixes sort of engaged alert

Minor cleanup

Fixes data returned for local network alerts

Fix duration for one shot. Note.

Fix duration override

Fixes interface selection for system alerts

Move host alert page

fixes for local network tab

Minor fix

Fix engaged host alerts

fixes on user tab

Fix alert_user_activity message
2021-04-26 19:41:34 +02:00
Matteo Biscosi
e39f265f93 Fixes not correctly shown Thpt and improved performancies
Implements #5195
2021-04-23 11:19:28 +02:00
Matteo Biscosi
888133ccb2 Removed 'duplicated' flows stats function retriever
Implements #5195
2021-04-21 10:56:14 +02:00
Luca Deri
3dc84acdec Added hosts anomalies in traffic stats page 2021-04-10 11:01:18 +02:00
gabryon99
15e601e797 edit stub REST endpoint (#5151) 2021-04-07 15:29:41 +02:00
gabryon99
d20b1e4739 implemented stub for the new alerts page 2021-04-07 12:53:07 +02:00
Simone Mainardi
a0a4843dc7 Adds REST getter for host alerts
Partially addresses #5153
2021-04-07 11:34:19 +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
Simone Mainardi
ac0ff6fb89 Reworks get fingerprint data 2021-03-24 11:42:08 +01:00
Simone Mainardi
0eeb32bf8a Fixes invalid TLS host pagepage
Fixes #5121
2021-03-24 11:33:01 +01:00
gabryon99
86047585e7 fixed arp table 2021-03-22 16:37:04 +01:00
Francesco Carli
60f309ae52
Use datatable for ARP data (#5117)
* Creating datable for arp data

* Delete ntopng-config

* Remove debug tracings

* Add localization
2021-03-22 16:02:00 +01:00
gabryon99
d164d53f97 add bar chart to test picker page 2021-03-17 14:07:58 +01:00
Timotheus Bachinger
d34eba0f77
Fix table access in REST call (#5103)
... which resulted in alert conts key not beeing transmitted
2021-03-12 17:33:46 +01:00
gabryon99
88609de875 updated style range picker and added arrow buttons 2021-03-12 11:08:15 +01:00
gabryon99
59725e0355 add a test page containing datetimepicker range 2021-03-09 13:50:15 +01:00
gabryon99
be38dfa71c moved map.lua under rest/v1/charts 2021-03-08 11:27:56 +01:00
Luca Deri
c80dc8af00 Implemented traffic ratio in hosts map
Completed hosts map localization
2021-03-05 20:00:08 +01:00
gabryon99
9df8afc6cb refactored hosts map data provider (#5080) 2021-03-04 19:58:10 +01:00
Luca Deri
97d1a12661 Removed debug trace 2021-03-02 18:47:40 +01:00
Luca Deri
b47a801447 JA3 TLS fingerprints are not based on AJAX 2021-03-02 18:44:40 +01:00
Simone Mainardi
3659188002 Simplifies widgets backend 2021-03-02 15:06:20 +01:00
Simone Mainardi
174cedcb95 extends get/alert/ts.lua to retrieve per-host counters 2021-03-02 09:03:05 +01:00
Simone Mainardi
9ae7f01ccc Fixes REST ts.lua returning errors with just no data available
Fixes #5061
2021-03-01 13:03:53 +01:00
Simone Mainardi
4becc28029 Fixes alert ts shifted by 1-h due to Lua arrays indexed from 1
Fixes #5072
2021-03-01 12:58:19 +01:00
Matteo Biscosi
6a32b6ca6d Changed exclude alert path 2021-02-17 18:25:21 +01:00
Matteo Biscosi
8b890a4411 Implemented filter alert params check done in Ajax 2021-02-17 18:14:33 +01:00
Simone Mainardi
fc2be1fb40 Adds REST API and doc for broadcast domains (necessary for tests) 2021-02-08 18:58:17 +01:00
Simone Mainardi
069148753a Implements heatmap widget 2021-01-26 17:53:39 +01:00