Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/ftp-max-tx-rule/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Test Purpose

Test if rule triggers, when seeing to many ftp txs

# Pcap
generated with scapy
Binary file added tests/ftp-max-tx-rule/ftp.pcap
Binary file not shown.
6 changes: 6 additions & 0 deletions tests/ftp-max-tx-rule/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%YAML 1.1
---

app-layer:
ftp:
max-tx: 2
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should this pcap create more than 3 txs ?

Copy link
Copy Markdown
Author

@alinse-pltzr alinse-pltzr Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ve been asuming that a pair of a request and a response are one transaction, because of this part of the documentation: https://docs.suricata.io/en/latest/devguide/extending/app-layer/transactions.html#general-concepts

counting the pairs of requests and responses in my pcap, there are more than 3 tx in my understanding.

what did I get wrong, and whats the correct defintion of a tx?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max-tx is about the maximum live transactions.

Once we see the response (and have run detection and logging on it), the transaction gets freed and does not longer count as a live translation

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks, this makes sense, i ll generate a pcap with open live transactions

1 change: 1 addition & 0 deletions tests/ftp-max-tx-rule/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alert ftp any any -> any any (msg:"SURICATA FTP too many transactions"; app-layer-event:ftp.too_many_transactions; classtype:protocol-command-decode; sid:1;)
12 changes: 12 additions & 0 deletions tests/ftp-max-tx-rule/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
requires:
min-version: 9

args:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must add a:

requires:
   min-version: 9

To ensure that the CI checks pass for versions less than 9, so we could have the test merged.

- -k none

checks:
- filter:
count: 1
match:
event_type: alert
alert.signature_id: 1