Commit Graph

433 Commits (suricata-6.0.17)

Author SHA1 Message Date
Philippe Antoine ffed4b35cb 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.

(cherry picked from commit aff54f29f8)
2 years ago
Juliana Fajardini 5eeb81563f output/drop: add verdict field
Related to
Bug #5464

(cherry picked from commit 0437173848)
2 years ago
Juliana Fajardini 8ef2940af4 output/alert: add verdict field
Related to
Bug #5464

(cherry picked from commit 53b8defd79)
2 years ago
Juliana Fajardini 6a32139a65 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

(cherry picked from commit 0d9289014b)
2 years ago
Jason Ish bcb9edc9b0 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 735f5aa9ca 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 aee1523b45 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 b95bbcc66d 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
Jeff Lucovsky ae15d3369c 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
(cherry picked from commit 62f4049705)
2 years ago
Juliana Fajardini 35b275654f 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

(cherry picked from commit 31066c7c3b)
2 years ago
Jason Ish 289e996a39 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

(cherry picked from commit c6c781ef67)
2 years ago
Victor Julien 7f4a800156 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.

(cherry picked from commit 01b7ccc224)
2 years ago
Victor Julien 855e04ca79 app-layer: explicitly enable sip, rdp and mqtt
In the default config these were enabled implicitly, as their `enabled`
field was commented out. This lead to warnings in the default config.

Ticket: #5299.
3 years ago
Philippe Antoine 18c616394e mqtt: make max transactions configurable
Allows users to find balance between completeness of decoding
and increases resource consumption, which can DOS suricata.

(cherry picked from commit e42094f238)
3 years ago
Juliana Fajardini fff9d529b7 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

(cherry picked from commit bbd968c738)
3 years ago
Juliana Fajardini 38cdfdfdf7 suricata.yaml: add exception policy config options
Related to
Task #5468

(cherry picked from commit fc81c80c04)
3 years ago
Jason Ish caa7e28388 suricata.yaml: include version that generated this file
Add a line to the configuration that says which version generated the
configuration file.  For example:

    # This configuration generated by:
    #     Suricata 7.0.0-dev

Issue: #4784
(cherry picked from commit b5d1a80002)
3 years ago
Juliana Fajardini b699be4da9 decode: make packet_alert_max configurable
The maximum of possible alerts triggered by a unique packet was
hardcoded to 15. With usage of 'noalert' rules, that limit could be
reached somewhat easily. Make that configurable via suricata.yaml.

Conf Bug#4941

Task #4207

(cherry picked from commit 3ace577d54)
3 years ago
Jeff Lucovsky c1506ebde4 logging: Stacktrace on signal term setting
This commit adds a configuration setting to enable a stack trace message
if Suricata receives a signal that terminates execution, such as
SIGSEGV, SIGABRT.

(cherry picked from commit 163f70be9d)
3 years ago
Jeff Lucovsky 1b2ab0e8d4 suricata.yaml: Add per-thread stack size setting
Issue: 4550
(cherry picked from commit d79a317cea)
3 years ago
Victor Julien 7d3f39939e stream: update memcaps in code to match config
(cherry picked from commit b08a7b9a66)
4 years ago
Philippe Antoine 590e917e94 http2: document HTTP1 keywords enabling
For HTTP signatures to match on HTTP2 traffic if configure
option app-layer.protocols.http2.http1-rules is enabled
4 years ago
Victor Julien 2f3524f7e2 mqtt: move sub/unsub limits into app-layer config
(cherry picked from commit 3c1cc1e345)
4 years ago
Sascha Steinbiss 07669cd70a detect/mqtt: add topic inspection limit
We add a new 'mqtt.(un)subscribe-topic-match-limit' option
to allow a user to specify the maximum number of topics in
a MQTT SUBSCRIBE or UNSUBSCRIBE message to be evaluated
in detection.

(cherry picked from commit 4c0ef73bf2)
4 years ago
Jeff Lucovsky 301bc0d120 decode/vntag: By default, disable vntag decoding
This commit makes the VNTag decoder off by default.
4 years ago
Victor Julien 6fb346ee00 detect: set HTTP SWF decompress limits
(cherry picked from commit af13d4de18)
4 years ago
Philippe Antoine 82a8124f58 decode: limits the number of decoded layers
so as to avoid overrecursion leading to stack exhaustion

(cherry picked from commit 7500c29300)
4 years ago
Philippe Antoine eb2a5587fb http: makes decompression time limit configurable
(cherry picked from commit a04b5566a6)
5 years ago
Phil Young dc5349a30c napatech: Add Deprecation Warning Message for HBA
Added a message that HBA will be deprecated in the future and removed
hba from default conf file.
5 years ago
Jeff Lucovsky 8f009cf9b5 output/json: Update threaded filename example 5 years ago
Shivani Bhardwaj 1286b0a8f1 datasets: parse defaults section from yaml
Datasets can now have a global defaults setting in suricata.yaml. In
case the settings for memcap and hashsize are not find in the yaml or
rule, this shall be the fallback.

Example:

datasets:
  defaults:
    memcap: 100mb
    hashsize: 2048
  ua-seen:
    type: string
    load: datasets.csv
5 years ago
Philippe Antoine 9b5c923327 http: disables lzma by default for HTTP 5 years ago
Victor Julien 57a611b429 decode/geneve: add config to yaml 5 years ago
Ali Jad Khalil 5d955c1836 decode/geneve: Add Geneve decoding functionality
These changes are in response to feature request 3063. Geneve is
very similar to VXLAN, but uses a slightly different encapsulation
scheme.
5 years ago
Jason Ish 5d5eef624b suricata.yaml: mark http2 as experimental
Make it clear that HTTP2 is experimental and disabled by default.
5 years ago
Philippe Antoine 1422b18a99 http2: initial support 5 years ago
Sascha Steinbiss 4e1a41a17d output-json: add MAC address output
This commit adds MAC address output to the EVE-JSON format. We follow the
remarks made in Redmine ticket #962: for packets, log MAC src/dst as a
scalar field in EVE; for flows, log MAC src/dst as lists in EVE. Field names
are different between flow and packet context to avoid type confusion
(src_mac vs. src_macs). Configuration approach and JSON representation is
taken from previous GitHub PR #2700.
5 years ago
Victor Julien 5db1d9b841 eve/yaml: move mqtt down 5 years ago
Sascha Steinbiss c31360070b rust/mqtt: add MQTT parser 5 years ago
Jeff Lucovsky 30ae98f658 output/json: Multi-threaded EVE logging support
This commit modifies the JSON loggers with changes necessary to support
multi-threaded EVE output.

Each "thread-init" function sets up the per-thread log file context for
subsequent calls to the JSON output to buffer function.
5 years ago
Shivani Bhardwaj 9f9670ebdc logging: Add DCERPC logger 5 years ago
Jeff Lucovsky a58fdcd41d suricata.yaml.in: update stream-depth description 5 years ago
Vadym Malakhatko a80f705d4b userguide: add documentation for Hassh usage
1. Rules keywords
2. Json keywords
3. Usage in lua
4. Enabling in configuration file
5 years ago
Jason Ish e26718aea3 drop-log: remove drop log (deprecated)
Remove the old style line based drop log.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2381
5 years ago
Jason Ish 6ce9b2972b rdp: enable by default
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3255
5 years ago
Jason Ish 5a7ba62493 sip: enable by default
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3256
5 years ago
Jason Ish 6850dbc852 suricata.yaml: remove filestore v1 configuration 5 years ago
Victor Julien 1aaf9a80c5 decode/vxlan: minor yaml example clarrification 5 years ago
Victor Julien e97cdb48f3 decode/teredo: implement port support
Implement support for limiting Teredo detection and decoding to specific
UDP ports, with 3544 as the default.

If no ports are specified, the old behaviour of detecting/decoding on any
port is still in place. This can also be forced by specifying 'any' as the
port setting.
5 years ago
Frank Honza 1c8943dedd add RFB parser
This commit adds support for the Remote Framebuffer Protocol (RFB) as
used, for example, by various VNC implementations. It targets the
official versions 3.3, 3.7 and 3.8 of the protocol and provides logging
for the RFB handshake communication for now. Logged events include
endpoint versions, details of the security (i.e. authentication)
exchange as well as metadata about the image transfer parameters.
Detection is enabled using keywords for:

 - rfb.name: Session name as sticky buffer
 - rfb.sectype: Security type, e.g. VNC-style challenge-response
 - rfb.secresult: Result of the security exchange, e.g. OK, FAIL, ...

The latter could be used, for example, to detect brute-force attempts
on open VNC servers, while the name could be used to map unwanted VNC
sessions to the desktop owners or machines.

We also ship example EVE-JSON output and keyword docs as part of the
Sphinx source for Suricata's RTD documentation.
5 years ago