Commit Graph

485 Commits (2b4e10224eaebb613352e9b82556b60035d032a1)

Author SHA1 Message Date
Philippe Antoine 0291d37009 websocket: configurable logging of payload in alerts 11 months ago
Philippe Antoine 44b6aa5e4b app-layer: websockets protocol support
Ticket: 2695
11 months ago
Sascha Steinbiss 120313f4da ja4: implement for TLS and QUIC
Ticket: OISF#6379
11 months ago
Juliana Fajardini 72146b969c eve/stats: allow hiding counters whose valued is 0
Some stats can be quite verbose if logging all zero valued-counters.
This allows users to disable logging such counters. Default is still
true, as that's the expected behavior for the engine.

Task #5976
11 months ago
Juliana Fajardini 0f6dbf650e yaml: minor wording fix on Suricata package version 11 months ago
Juliana Fajardini 8defee93b2 yaml: explicitly mention exception policy in conf
While our documentation indicated what were the possible configuration
settings for exception policies, our yaml only explicitly mentioned
exception policy for the master switch. Clearly indicate which config
settings are about exception policies.

Related to
Task #5816
11 months ago
Juliana Fajardini a71ace8575 applayer: add stats counters for exception errors
Add stats counters for exception policy are applied for app-layer errors

Part of
Task #5816
11 months ago
Victor Julien 829bab295b eve/frame: implement payload-buffer-size option
Modeled after the same option in eve/alert. Defaults to 4k.
12 months ago
Giuseppe Longo add95002b9 suricata.yaml: define SIP_PORTS 1 year ago
Philippe Antoine 8f73a0ac55 smtp: config limit maximum number of live transactions
Ticket: #6477
1 year ago
Philippe Antoine 4175680a8a http1: configurable max number of live tx per flow
Ticket: #5921

Co-authored-by: Jason Ish <jason.ish@oisf.net>
1 year ago
Philippe Antoine aff54f29f8 http2: handle reassembly for continuation frames
Ticket: 5926

HTTP2 continuation frames are defined in RFC 9113.
They allow header blocks to be split over multiple HTTP2 frames.
For Suricata to process correctly these header blocks, it
must do the reassembly of the payload of these HTTP2 frames.
Otherwise, we get incomplete decoding for headers names and/or
values while decoding a single frame.

Design is to add a field to the HTTP2 state, as the RFC states that
these continuation frames form a discrete unit :
> Field blocks MUST be transmitted as a contiguous sequence of frames,
> with no interleaved frames of any other type or from any other stream.
So, we do not have to duplicate this reassembly field per stream id.

Another design choice is to wait for the reassembly to be complete
before doing any decoding, to avoid quadratic complexity on partially
decoding of the data.
1 year ago
Lukas Sismis 2a2898053c dpdk: add interrupt (power-saving) mode
When the packet load is low, Suricata can run in interrupt
mode. This more resembles the classic approach of processing
packets - CPU cores run low and only fetch packets
on interrupt.

Ticket: #5839
1 year ago
Jeff Lucovsky ff609f5dc3 conf/log: Remove sguil mode
Issue: 6347
1 year ago
Juliana Fajardini 0437173848 output/drop: add verdict field
Related to
Bug #5464
2 years ago
Juliana Fajardini 53b8defd79 output/alert: add verdict field
Related to
Bug #5464
2 years ago
Jeff Lucovsky ac8f91f44f config: Document cluster_rollover deprecation
Issue: 6128

cluster_rollover is no longer permitted; using it will generate a
warning message and it'll be replaced with cluster_flow
2 years ago
Jason Ish ed4d27fdc1 config: uncomment datasets configuration
Uncomment the datasets configuration for easier editing by users.  The
values are left commented out as their defaults.
2 years ago
Jason Ish 93b64939d1 datasets: flag to disable "write" actions
Add a new configuration flag, "datasets.rules.allow-write" to control
if rules can contain "save" or "state" rules which allow write access
to the file system.

Ticket: #6123
2 years ago
Jason Ish fd79b337ca datasets: don't allow absolute or paths with directory traversal
For dataset filenames coming from rules, do not allow filenames that
are absolute or contain a directory traversal with "..". This prevents
datasets from escaping the define data-directory which may allow a bad
rule to overwrite any file that Suricata has permission to write to.

Add a new configuration option,
"datasets.rules.allow-absolute-filenames" to allow absolute filenames
in dataset rules. This will be a way to revert back to the pre 6.0.13
behavior where save/state rules could use any filename.

Ticket: #6118
2 years ago
Jason Ish f119b29701 lua: disable lua rules by default
To protect against possible supply chain attacks, disable Lua rules by
default. They can be enabled under the "security" section of
suricata.yaml.

Ticket: #6122
2 years ago
Philippe Antoine 7e725c650d flow: optionally use livedev for hash
So that in a setup with different interfaces capturing different
networks, flows do not get mixed up

Ticket: #5270
2 years ago
Jason Ish e7d3904c3f suricata.yaml: use include list for example
For 7.0 multiple includes are allowed, but marked as
deprecated. Update the example to show the new way of pulling in
multiple includes.
2 years ago
Jason Ish f8620d0ed2 docs: update url to docs.suricata.io 2 years ago
Eric Leblond ea95e85755 profiling: set sample rate to power of 2
For the rules profiling, we really want to limit the performance
impact to the maximum. So let's use an hash size that is a power
of 2. This will allow to not use the modulo operation that is
costly and simply use a single binary operator.

This code is only active for rules profiling so we are backward
compatible.
2 years ago
Victor Julien a945982e8f yaml: spelling 2 years ago
Jeff Lucovsky 62f4049705 config/pfring: Document add'l pf-ring cluster types
This commit adds additional cluster-types for use with the pf-ring
packet source.

Issue: 5975
2 years ago
Juliana Fajardini 31066c7c3b docs: clarify exception policy's supported values
As flow.memcap-policy and defrag.memcap-policy do not support flow
actions, clarify that in the documentation. Also fix some typos, and
add missing values in some places where the exception policies were
explained.

Related to
Bug #5940
2 years ago
Jason Ish c6c781ef67 config: put version in configuration as a proper value
Adds a new field, "suricata-version" to the configuration file with
the major and minor version of the Suricata that generated the
configuration file.

This may be useful in the future for presenting warnings about
important changes, or even providing different defaults based on what
the user might expect.

Ticket: 5822
2 years ago
Victor Julien 01b7ccc224 stream: add liberal timetamps option
Linux is slightly more permissive wrt timestamps than many
other OS'. To avoid many events/issues with linux hosts, add an
option to allow for this slightly more permissive behavior.

Ideally the host-os config would be used, but in practice this
setting is rarely set up correctly, if at all.

This option is enabled by default.
2 years ago
Victor Julien 83a16a7a89 eve/stream: per packet stream engine logging
Debug facility to get a per packet view into the stream engine's state.

Logs after a packet has been processed in the stream engine, so the view
into the state includes the updates based on the current packet.

Marked as experimental so it can be changed w/o notice.

Bug: #5876.
2 years ago
Victor Julien 3948b160c7 stream: implement config option for SYN queue
Default to allowing 10 SYNs to not trigger an event on a connection
attempt that times out.
2 years ago
Philippe Antoine e3105a6614 ftp: adds a config option ftp-hash for autofp-scheduler
This allows ftp-data and ftp flows to be processed by the same
thread. Otherwise, there may be a concurrency issue where the
would-be ftp-data flow is first processed, and thus not recognized
as such. And the ftp flow gets processed later and the expectation
coming from it is never found.

To do so, the flow hash gets used as usual, except for flows that
may be either ftp or ftp-data, that is either one port is 21, or
both ports are high ones.

Ticket: #5205
2 years ago
Philippe Antoine b52293b609 dcerpc: config limit maximum number of live transactions
As is done for other protocols

Ticket: #5779
2 years ago
Juliana Fajardini 0d9289014b exceptions: add master switch config option
This allows all traffic Exception Policies to be set from one
configuration point. All exception policy options are available in IPS
mode. Bypass, pass and auto (disabled) are also available in iDS mode

Exception Policies set up individually will overwrite this setup for the
given traffic exception.

Task #5219
2 years ago
Philippe Antoine 55c4834e4e smb: configurable max number of transactions per flow
Ticket: #5753
2 years ago
Jason Ish 531c4336c9 logging: use ISO-like timestamp in file log
Also update suricata.yaml to show this default, as updating the
"default-log-format" does not affect the file output.
2 years ago
Jason Ish 761e7c2a63 suricata.yaml: update default-log-format current state
The default-log-format has changed, reflect this in the suricata.yaml.
2 years ago
Jeff Lucovsky e7c2298203 config: Clarify when log format can be overridden 2 years ago
Jeff Lucovsky f8474344cd log: Add module and subsystem identifiers to log
Issue: 2497

This changeset provides subsystem and module identifiers in the log when
the log format string contains "%S". By convention, the log format
surrounds "%S" with brackets.

The subsystem name is generally the same as the thread name. The module
name is derived from the source code module name and usually consists of
the first one or 2 segments of the name using the dash character as the
segment delimiter.
2 years ago
Richard McConnell 6e128f48a2 af-xdp: Add AF_XDP socket support
AF_XDP support is a recent technology introduced that aims at improving
capture performance. With this update, Suricata now provides a new
capture source 'af-xdp' that attaches an eBPF program to the network
interface card. Packets received in the NIC queue are forwarded to
a RX ring in user-space, bypassing the Linux network stack.

Note, there is a configuration option (force-xdp-mode) that forces the
packet through the normal Linux network stack.

libxdp and libbpf is required for this feature and is compile time
configured.

This capture source operates on single and multi-queue NIC's via
suricata.yaml. Here, various features can be enabled, disabled
or edited as required by the use case.

This feature currently only supports receiving packets via AF_XDP,
no TX support has been developed.

Ticket: https://redmine.openinfosecfoundation.org/issues/3306

Additional reading:
https://www.kernel.org/doc/html/latest/networking/af_xdp.html
2 years ago
Todd Mortimer 15c77be937 swf-decompression: Disable by default.
Add an entry to the upgrade guide noting the change.

Ticket: #5632
2 years ago
Aaron Bungay 86037885a9 bittorrent-dht: add bittorrent-dht app layer
Parses and logs the bittorrent-dht protocol.

Note: Includes some compilation fixups after rebase by Jason Ish.

Feature: #3086
2 years ago
Philippe Antoine a003640ecf security: prevents process creation
with setrlimit NPROC.

So that, if Suricata wants to execve or such to create a new process
the OS will forbid it so that RCE exploits are more painful to write.

Ticket: #5373
2 years ago
Lukas Sismis aeb690317a dpdk: allow specifying RSS hash function flags in the config
Ticket: #5400
2 years ago
Philippe Antoine af40873127 pgsql: config limit maximum number of live transactions
As is done for other protocols

Ticket: #5527
2 years ago
Eric Leblond 485d5a4ea4 landlock: basic implementation
This patch is adding support for Landlock, a Linux
Security Module available since Linux 5.13.

The concept is to prevent any file operation on directories where
Suricata is not supposed to access.

Landlock support is built by default if the header is present. The
feature is disabled by default and need to be activated in the YAML
to be active.

Landlock documentation: https://docs.kernel.org/userspace-api/landlock.html

Feature: #5479
3 years ago
Juliana Fajardini bbd968c738 exceptions: add reject support to exception policy
This enables the usage of 'reject' as an exception policy. As for both
IPS and IDS modes the intended result of sending a reject packet is to
reject the related flow, this will effectively mean setting the reject
action to the packet that triggered the exception condition, and then
dropping the associated flow.

Task #5503
3 years ago
Juliana Fajardini fc81c80c04 suricata.yaml: add exception policy config options
Related to
Task #5468
3 years ago
jason taylor 05bca0b6fb config: update commented value to default status
Signed-off-by: jason taylor <jtfas90@gmail.com>
3 years ago