Commit Graph

225 Commits (b800ace56fb08c29aadb0f68a3bad1fe3e4a0d67)

Author SHA1 Message Date
Philippe Antoine 7ee6f328aa rfb/jsonschema: add missing field
Ticket: 6478
(cherry picked from commit d0cc39c79a)
4 days ago
Victor Julien 08376ae63a detect/firewall: update discarded logic
Only count alert queue overflow here, not alerts in the queue after a drop.

(cherry picked from commit 90a837cef3)
3 months ago
Victor Julien 5868e54fca eve/alert: firewall default policy logging improvements
Add firewall.hook to indicate the hook that the policy was set on.

Ticket: #8566.
(cherry picked from commit 8572088b0f)
3 months ago
Victor Julien 6440d4486c detect/firewall: support alert in default app policy
Support `alert` as a secondary action in app-layer firewall policies.

To implement this a Signature object is created per policy that uses
alert, and this is stored in a hash table. When the policy is applied
the signature is looked up and used in the PacketAlert.

Ticket: #8566.
(cherry picked from commit 2d4f1968b8)
3 months ago
Juliana Fajardini 6f6d18492e exceptions: add dedicated flow drop reason
To better control stats counters.

(cherry picked from commit 8a8574b149)

Cherry-pick note: moved PKT_DROP_REASON_EP_FLOW_DROP to the last
non fw stop to keep the non-fw values the same.
3 months ago
Juliana Fajardini a261229aaf detect: add flow drop by firewall as drop reason
To track flow drops triggered by the firewall.
Add flow drop by firewall as drop reason.

As part of
Ticket #7699

(cherry picked from commit 312967f291)
3 months ago
Juliana Fajardini 680b54fa6f schema: expand stats.ips.replaced explanation
As this is a less obvious counter.

(cherry picked from commit 0acb136b40)
3 months ago
Juliana Fajardini e3a6f29836 detect/firewall: add dedicated stats counters
Add a `firewall` stats counter aggregator for all firewall-related
stats.
De-overload "detect.alert_queue_overflow", by adding
"firewall.discarded_alerts" to account for discarded drops in
Firewall mode.
Add Debug statements for tracking corner cases where it can be
difficult to know where a drop is coming from.

Added counters:
- stats.firewall.blocked
- stats.firewall.accepted
- stats.firewall.rejected
- stats.firewall.drop_reason.default_app_policy
- stats.firewall.drop_reason.default_packet_policy
- stats.firewall.drop_reason.flow_drop
- stats.firewall.drop_reason.pre_flow_hook
- stats.firewall.drop_reason.pre_stream_hook
- stats.firewall.drop_reason.rules
- stats.firewall.discarded_alerts

Ticket #7699

(cherry picked from commit 5b488feef5)

Cherry-pick notes:

- moved counter to keep struct layout the same as much as possible.
- moved the FLOW_ACTION_BY_FIREWALL to aux_flags and renamed to
  FLOW_AUX_ACTION_BY_FIREWALL
3 months ago
Jason Ish 1ceea76ac4 schema: map NTP fields to keywords
(cherry picked from commit 18f742fdbd)
4 months ago
Jason Ish 587e4871b8 ntp: convert reference_id to buffer and add keyword
Store the NTP reference ID as raw network-order bytes so it can be
exposed as a sticky buffer and matched with payload keywords. The
reference ID is often a 4 character string, or an IP address and not
just an integer identifier.

Updates the log reference ID to be a string of colon separated hex
digits as this matches what tshark does.

Ticket: #8488
(cherry picked from commit 713e4eb900)
4 months ago
Jason Ish e2b2737e8e ntp: create tx for all modes; log version, mode and stratum
Add logging for version, mode and stratum as these will be the first
keywords we will add.

Ticket: #8425
(cherry picked from commit 74bb525401)
4 months ago
Jason Ish fd742034a6 ntp: add transaction logging
Adds basic NTP transaction logging for the current supported message
types.

Includes small cleanups around reference ID.

Ticket: #8425
(cherry picked from commit 31b967b089)
4 months ago
Jason Ish 1a09a059dc eve: add rule generation source to alert record
When an alert is generated from firewall context, add an engine value of
"fw", otherwise "td" (for threat detect).

The engine field is only added when firewall mode is enabled.

Ticket: #8456
(cherry picked from commit 029fd1be59)
4 months ago
Victor Julien 7f7ab9299c detect/snmp: add snmp.trap_type keyword
Implemented as a U8 integer keyword.

Ticket: #8482.
(cherry picked from commit 670fdabd32)
5 months ago
Victor Julien 6c0673374a eve/schema: add snmp trap fields
(cherry picked from commit c94cb8e098)
5 months ago
Eric Leblond 9f82c45b81 etc/schema: add http_request_body
Ticket: 8161
(cherry picked from commit e4e5413478)
5 months ago
Juliana Fajardini 3b018b1aff schema: add descriptions to global memcaps/memuses
For FTP, Host, IP Pair and HTTP.

Related to
Task #6434

(cherry picked from commit 331bc8aeac)
9 months ago
Juliana Fajardini 9531f8791e schema: add additional properties to stats.capture
The `stats.capture` object may have different properties based on the
capture method used.

This adds the ones pertaining to AF_PACKET capture.

Related to
Task #6434

(cherry picked from commit 2855574a2c)
9 months ago
Juliana Fajardini 707815068e schema: add desc for each main stats module
Part of the schema documentation effort.

Related to
Task #6434

(cherry picked from commit 12e0e51864)
9 months ago
Juliana Fajardini 7bd22f492d schema: allow stats.stream event counters
While the counters exist, they're not present in the schema, causing
validation to fail if stats.stream-events is enabled.

Task #7858

(cherry picked from commit 025ffa6135)
9 months ago
Juliana Fajardini 4824df3bef schema/stats: flow_mgr is actually flow.mgr
The schema accounts for a stats counters group that is a subgroup of the
flows stats counters. Remove `flow_mgr`, thus.

(cherry picked from commit 173fec81f8)
9 months ago
Victor Julien 4905f38470 exception-policy: add 'reject-both' option
Allow rejecting both sides of a connection. Has the same support
as regular reject (which is essentially rejectsrc).

Ticket: #5974.
(cherry picked from commit acb769291a)
10 months ago
Philippe Antoine dae9264120 doc: really enforce more the completeness of json schema
Completes commit f1f32a39ee

End better describe exception_policy
12 months ago
Philippe Antoine 2028a3f9f8 doc: complete json schema with integer keywords 1 year ago
Philippe Antoine f1f32a39ee doc: enforce more the completenes of json schema
see jq 'paths( objects | (.type == "object" and (has("additionalProperties") | not) )) | join(".")' etc/schema.json

fix and complete bittorrent on the way
1 year ago
Philippe Antoine 421fb8ac31 doc/ldap: complete json schema 1 year ago
Jeff Lucovsky 17e7387ff4 doc/fileinfo: Document fileinfo context/usage
Issue: 6498
1 year ago
Juliana Fajardini 8f9f414866 schema: document stats.detect counters
... that were missing.

Task #7795
1 year ago
Juliana Fajardini 051715a7eb schema/description: capitalize initial letters
For existing descriptions that weren't like that, yet.
1 year ago
Juliana Fajardini 1d27e268d1 schema: add descriptions for flow stats counters
Task #7794
1 year ago
Juliana Fajardini 49629f7cb6 schema/decoder: add descriptions for stats counters
Task #7793
1 year ago
Juliana Fajardini 342c649186 schema/arp: fix invalid pkt event output
Task #7857
1 year ago
Juliana Fajardini a8453d73cd detect: remove unused non-pf stats counters
Remove unused rule prefilter-related stats counters that aren't in use.

94644ac960 (detect: move non-pf rules into special prefilter engines)
removed the logic that made use of and incremented the stats counters:
- det_ctx->counter_fnonmpm_list
- det_ctx->counter_nonmpm_list

Some code was left, registering them, and mentioning them in the
json schema.

Ticket #7834
1 year ago
Philippe Antoine fe9da8acd6 http2: do not log empty objects for request or response
Ticket: 7741
1 year ago
Jeff Lucovsky 97b03b4076 doc/netflow: Discuss netflow
Add discussion for netflow configuration, event type and fields
contained in netflow records.

Issue: 5139
1 year ago
Philippe Antoine f4378eb306 doc/devguide: document app-layer protocol detection
Ticket: 6022
1 year ago
Philippe Antoine 68827a4ace schema: document kerberos fields
Ticket: 6566
1 year ago
Jason Ish ddb77d061e eve/schema: map mdns properties that have keywords
Also add descriptions for the EVE index.
1 year ago
Juliana Fajardini cbe621fb09 decode: add stats counters for ipv4/ipv6 over ipv4
These existed for ipv6 over ipv6, and ipv4 over ipv6, but not for the
ipv4 counterpart.

Task #7758
1 year ago
Eric Leblond 23f643a4a7 eve/schema: fix ordering 1 year ago
Eric Leblond b03d4f8e1a datajson: output context to "context"
Using `alert.extra` was not really reflecting the nature of what
was added. So renaming it to `alert.context`.
1 year ago
Eric Leblond 61ac7b46c1 eve/schema: remove reference to datajson 1 year ago
Eric Leblond e2d8217934 eve/schema: document datajson output 1 year ago
Eric Leblond 0e88e36020 eve/schema: pktvars is a container
It can contain any vars so need addition properties.
1 year ago
Alice Akaki 3065374314 json/schema: link file.name to email.attachment
As a Suricata keyword.

Ticket: #7683
1 year ago
Victor Julien df7fe5b0ce detect: add pre_flow hook
Allows dropping of packets before a flow is created/updated.
Directionless as direction is inferred from the flow.

Ticket: #7714.
1 year ago
Victor Julien 8f2b925e09 detect: add pre_stream hook
Meant to be used from the detection engine, to allow rules to drop
traffic before it modifies the stream state.

Ticket: #7712.
1 year ago
Victor Julien 17ed70dcb5 eve/schema: reformat with clang-format 1 year ago
Jeff Lucovsky a292670443 detect/entropy: Add calculated entropy value to flowvars
When the entropy keyword is used, record the calculated entropy value to
a flow variable for logging use.
1 year ago
Juliana Fajardini f3aa0085a0 pgsql: rename copy in/out response field
We used `copy_column_count`, while just `columns` is more accurate with
what PostgreSQL describes, and what Wireshark shows.

Related to
Task #7644
Task #7645
1 year ago