You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suricata/doc/userguide/rules
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
..
dataset-examples
dns-keywords
fast-pattern
flow-keywords
header-keywords
http-keywords
intro
normalized-buffers
payload-keywords
pcre
rule-types
app-layer.rst
base64-keywords.rst
bypass-keyword.rst
config.rst
datasets.rst
dcerpc-keywords.rst doc/userguide: add initial protocols overview 7 months ago
decode-layer.rst
dhcp-keywords.rst
differences-from-snort.rst
dnp3-keywords.rst detect: dnp3.func is now a generic integer 6 months ago
dns-keywords.rst doc/userguide: add initial protocols overview 7 months ago
email-keywords.rst
enip-keyword.rst
fast-pattern-explained.rst
file-keywords.rst doc: minor verbiage tweaks and reST fix 6 months ago
flow-keywords.rst doc: add elephant.flow usage section 4 months ago
ftp-keywords.rst
header-keywords.rst detect: tcp.window is now a generic integer 6 months ago
http-keywords.rst doc/userguide: add initial protocols overview 7 months ago
http2-keywords.rst detect: http2.errorcode is now a generic integer 6 months ago
ike-keywords.rst
index.rst
integer-keywords.rst detect/integers: rename index all1 to all 6 months ago
intro.rst detect: new command line option : list-rule-protos 5 months ago
ip-reputation-rules.rst
ipaddr.rst
ja-keywords.rst doc/userguide: add initial protocols overview 7 months ago
kerberos-keywords.rst
ldap-keywords.rst
lua-detection.rst
mdns-keywords.rst
meta.rst
modbus-keyword.rst
mqtt-keywords.rst detect/integers: generalize support for bitflags modifier 6 months ago
multi-buffer-matching.rst
nfs-keywords.rst
noalert.rst
payload-keywords.rst doc/userguide: endswith can be mixed with offset/distance/within 3 months ago
pgsql-keywords.rst
prefilter-keywords.rst
quic-keywords.rst
rfb-keywords.rst
rule-types.rst
rules-internals.rst
sdp-keywords.rst
sip-keywords.rst
smb-keywords.rst doc/userguide: add initial protocols overview 7 months ago
smtp-keywords.rst
snmp-keywords.rst
ssh-keywords.rst
tag.rst
thresholding.rst detect/detection_filter: add unique_on option 3 months ago
tls-keywords.rst detect/ssl: properly handle negation in ssl_version keyword 5 months ago
transforms.rst doc/luaxform: Clarify luaxform calling convention 4 months ago
vlan-keywords.rst
websocket-keywords.rst detect/integers: generalize support for bitflags modifier 6 months ago
xbits.rst doc/userguide: add xbits tx scope support 7 months ago