Commit Graph

1403 Commits (2fa10052cf4181b6edb1a8bd84bd57463464eee4)

Author SHA1 Message Date
Victor Julien 6c3169cee0 doc/userguide: add ether and arp to intro 3 weeks ago
Victor Julien 6298c47145 doc/userguide: improve protocol docs 3 weeks ago
Victor Julien e6381a3c22 doc/userguide: add note on rule reloads
Cannot be combined with --firewall-rules-exclusive
3 weeks ago
Victor Julien f99b86beab doc/userguide: document L2 firewall handling of ARP 3 weeks ago
Victor Julien 2e2132a16f doc/userguide: improve pkthdr docs 3 weeks ago
Victor Julien 61a7f47a69 detect: add ether.hdr keyword
Sticky buffer to inspect the ethernet header.

Example rule:

        alert ether any any -> any any ( \
                ether.hdr; content:"|08 06|"; offset:12; depth:2; \
                sid:1;)

Ticket: #8327.
3 weeks ago
Jeff Lucovsky e7dc0d885b doc/config: Update flushing description
Update output flushing description to reflect EVE based approach in
documentation and config template.

Issue: 8286
4 weeks ago
Juliana Fajardini c790a9f774 userguide/exceptions: update for qa-simulation use
The docs still referred to ``debug`` mode.

Related to
Task #7885
1 month ago
Juliana Fajardini 56917cf8f3 rules: fix typos & missing keywords in examples
Task #8372
1 month ago
Juliana Fajardini 8c29c471b4 userguide: add references to rules/README to docs
To make it more visible/easier to find.
1 month ago
Jason Ish 8c7172e707 lib: remove the built-in library run-mode
This run-mode does not allow for capture ThreadVars to be created at
the appropriate place in the application life cycle. Instead,
applications should register their own custom run-mode.

Ticket: #8259
2 months ago
Philippe Antoine 1e0f344ab7 doc: be more precise for decompress transforms
Ticket: 7846
2 months ago
Jeff Lucovsky 5a3a2d5fd1 doc/output: Document the IPv6 display behavior
Issue: 7399

Document the IPv6 display behavior and how to display IPv6 addresses in
their compressed form (per RFC-5952).
2 months ago
Shivani Bhardwaj 0e345c93ca app-layer: check ipproto enabled setting first
If the key `app-layer.protocols.PROTO.enabled` is present, the protocol
is enabled for all carrier protocols. This is not ideal.
Only if the key `app-layer.protocols.PROTO.enabled` is missing, an
attempt is made to look for a setting specific to the ipproto passed
at the time of registration e.g.
`app-layer.protocols.PROTO.udp.enabled`.

By default, check for carrier proto specific setting. If it is not
found, then fall back to the generic setting.
Issue a warning in case an inconsistent combination of global and
ipproto specific setting is found.

Bug 8205
2 months ago
Victor Julien 2480f8c038 doc: fix dcerpc.opnum documentation
Docs were claiming greater than, less than, etc. support even though this was never supported.

Fixes: 51be8f0238 ("doc/dcerpc: add proto keywords")

Ticket: #8330.
2 months ago
Victor Julien fe3cce895c doc/userguide: add igmp keyword docs 2 months ago
Victor Julien 7e6fd09e90 doc/userguide: add missing ipopts values 2 months ago
Juliana Fajardini 90823fa90e devguide: add policy on patches w unasigned ticket 2 months ago
Jason Ish 66473f6ad7 doc: add more public datasets
Add:
- UNSW-NB15
- CIC-IDS2017
- CSE-CIC-IDS2018
- CIC-DDoS2019

Update formatting for better display.
2 months ago
Juliana Fajardini 926fde859e userguide: fix Deprecations, warn about syslog
The Deprecation note on Syslog was partly conveying the opposite
message, and we were missing a deprecation notice on the Syslog output
section.
2 months ago
Philippe Antoine d5ea973791 detect/ike: move ike.ike.chosen_sa_attribute keyword to rust
Ticket: 8310

And increases expressivity on the way by supporting other modes
than equality
2 months ago
Sven Cuyt 1246f1cf8c doc/userguide: add link to differences-from-snort
Ticket: #8031.
2 months ago
Sven Cuyt a0cc534471 doc/userguide: fix table showing example payload
Ticket: #8031.
2 months ago
Sven Cuyt 2d662538e5 doc/userguide: add example with non-zero offset for relative isdataat
Ticket: #8031.
2 months ago
Victor Julien 7c5285e5e6 doc/userguide: explain isdataat absolute vs relative difference
Ticket: #8031.
2 months ago
Philippe Antoine d378610e93 stream: non infinite default value for reassembly.depth
So that empty config have a safer default.

Ticket: 8290
2 months ago
Ofer Dagan e1f9d8a067 pcap: refactor delete-when-done to support non-alerts
Refactor pcap file deletion to use a single delete-when-done option
with three values instead of separate boolean options:
- false (default): No deletion
- true: Always delete files
- "non-alerts": Delete only files with no alerts

Also account for alerts produced by pseudo packets (flow timeout / shutdown flush):
- Introduce small capture hooks and invoke on pseudo-packet creation so the
  capture layer can retain references and observe alerts emitted after the last
  live packet
- Call the hook from both TmThreadDisableReceiveThreads and TmThreadDrainPacketThreads

Key changes:
- Replace should_delete/delete_non_alerts_only bools with enum
- Move alert counter from global to per-file PcapFileFileVars
- Relocate alert counting from PacketAlertFinalize to pcap module
- Ensure thread safety for both single and continuous pcap modes
- Add unit tests for configuration parsing and pseudo-packet alert path

The --pcap-file-delete command line option overrides YAML config
and forces "always delete" mode for backward compatibility.

Documentation updated to reflect the new three-value configuration.

Fixes OISF#7786
2 months ago
Philippe Antoine 539e4ee665 detect/transforms: add zlib_deflate transform
Ticket: 7846
2 months ago
Philippe Antoine dbea660729 detect/transforms: add gunzip transform
Ticket: 7846
2 months ago
Jason Ish 1b182025bc output-eve: expose SCEveFileType to Rust with bindgen
There is an unfortunate side-affect that one has to read
output-eve-bindgen.h for the documentation on this type, however, I
think we can resolve that in time.
2 months ago
Jason Ish 2defd5ae5a userguide/Makefile: don't add "install" to EXTRA_DIST
Adding the directory "install" to EXTRA_DIST, actually triggers make
to run "make install", which is not what we want. Instead, avoid this
magic keyword and list the files in the install directory
individually.

If the user doesn't have permission to install files to the prefix,
like "/usr", then "make dist" can fail. Worse, even they do have
permission to write into the prefix, a "make dist" will install files
there when it shouldn't.

Ticket: #8279
2 months ago
Philippe Antoine a079d1c68a src: remove unused enum values 2 months ago
Philippe Antoine 06f78b2a22 rust: move StreamSlice definition to C
and bindgen it to rust

Will make easier the bindgen of RustParser structure which uses
a callback which uses StreamSlice
3 months ago
Andreas Dolp 69eb567dea doc/userguide: fix within-distance pointer graphics in payload-keywords doc
Redmine ticket: #8261

According to [1], the within pointer (if combined with distance)
includes the distance pointer, which is not clearly visible in the
graphic.

Fixed this in a new graphic by some GIMP arts.

PS: Special thanks to one of our team members Annika C. for initially
spotting this!

[1] https://forum.suricata.io/t/is-within-affected-by-distance/1688
3 months ago
Mingyu Jeon c98112eb67 doc: update tls_cert_notafter/before
refs #3065

* add explanation on omitted values
3 months ago
Jeff Lucovsky 45a36e961f doc/byte_jump: Clarify bitmask operation
Issue: 6693

Clarify how the bitmask value is used for byte_jump

Snort compatibility says:
- The bitmask value is applied to the extracted value before the
  multiplier is applied.
- The result of the bitmask operation is to be right shifted by the
  number of trailing 0's in the bitmask value.
3 months ago
Fupeng Zhao f7ec1c8813 redis: Add authentication support
Add authentication support to the Redis logging output.
It introduces `username` and `password` configuration options for Redis,
allowing Suricata to authenticate with Redis servers that require it.

Ticket: 7062
3 months ago
Ofer Dagan 7627756360 detect/detection_filter: add unique_on option
Add optional unique_on {src_port|dst_port} to detection_filter for
exact distinct port counting within the seconds window.

Features:
- Runtime uses a single 64k-bit (8192 bytes) union bitmap per
  threshold entry with O(1) updates.
- Follows detection_filter semantics: alerting starts after the
  threshold (> count), not at it.
- On window expiry, the window is reset and the current packet's
  port is recorded as the first distinct of the new window.

Validation:
- unique_on requires a ported transport protocol; reject rules
  that are not tcp/udp/sctp or that use ip (protocol any).

Memory management:
- Bitmap memory is bounded by detect.thresholds.memcap.
- New counters: bitmap_memuse and bitmap_alloc_fail.

Tests:
- C unit tests for parsing, distinct counting, window reset, and
  allocation failure fallback.
- suricata-verify tests for distinct src/dst port counting.

Task #7928
3 months ago
Juliana Fajardini 2c216e2b73 devguide/exceptions: minor fixes
- cleaner YouTube link
- fix weird sentence

Follow-up of
Task #5612
3 months ago
Philippe Antoine 54cc752cf9 ssh: hassh can be truly disabled
Rules will not re-enable it

Ticket: 8223
3 months ago
Philippe Antoine c960b7d7c1 app-layer: AppLayerParserFPtr uses a mut pointer to local storage
So, fix the fn prototype in rust ParseFn
3 months ago
Juliana Fajardini 48b15ac152 devguide: add chapter about exception policies
Adds a chapter indicating what are the main steps when adding exception
policies, how is it possible to extend them, as well as main aspects and
files to consider when doing so.

Task #5612
3 months ago
Lukas Sismis 56c1552c3e hs: warn about the same cache directory
This is especially relevant for multi-instance simultaneous setups
as we might risk read/write races.
3 months ago
Lukas Sismis 15c83be61a hs: prune stale MPM cache files
Hyperscan MPM can cache the compiled contexts to files.
This however grows as rulesets change and leads to bloating
the system. This addition prunes the stale cache files based
on their modified file timestamp.

Part of this work incorporates new model for MPM cache stats
to split it out from the cache save function and aggregate
cache-related stats in one place (newly added pruning).

Ticket: 7830
3 months ago
Victor Julien 73a873ecfe doc/userguide: endswith can be mixed with offset/distance/within
Bug: #5030.
3 months ago
Philippe Antoine dd6baccabd src: doc: remove more double-space typos
Found with git grep -E '[a-z]  [a-z]'
3 months ago
Juliana Fajardini a1f088cc65 docs: use correct suricata version mentions
Found with 'git grep suricata-7'

Task #8113
3 months ago
Philippe Antoine 7422c97bf2 quic: encryption-handling config parameters
Ticket: 8116
3 months ago
Shivani Bhardwaj 6702791a9c doc: add dcerpc.max-stub-size config param 3 months ago
Jason Ish 2c95f1ff44 dnp3: bound the maximum number of objects per tx
Default to 2048, but provide a user configuration value.

Ticket: #8181
3 months ago