Skip to content

tests: add test cases for bug 8489#3041

Open
jlucovsky wants to merge 1 commit intoOISF:masterfrom
jlucovsky:8489/1
Open

tests: add test cases for bug 8489#3041
jlucovsky wants to merge 1 commit intoOISF:masterfrom
jlucovsky:8489/1

Conversation

@jlucovsky
Copy link
Copy Markdown
Contributor

Issue: 8489

Three test cases:

  • bug-8489-01: two commands with max-tx=1 (limit exceeded) raises the too_many_transactions anomaly and fires the corresponding alert.
  • bug-8489-02: six commands under max-tx=10 raise no anomaly and no alert (negative regression).
  • bug-8489-03: burst of commands exceeding the limit followed by a new command after a server response — verifies the flow keeps parsing after the event fires, so later commands are still logged.

Each test has a response_command_too_long rule alongside the too_many_transactions rule so the to_client FTP parsing path stays active; without a to_client app-layer-event signature Suricata skips response parsing and the max-tx check does not fire.

Ticket

If your pull request is related to a Suricata ticket, please provide
the full URL to the ticket here so this pull request can monitor
changes to the ticket status:

Redmine ticket: https://redmine.openinfosecfoundation.org/issues/8489

@jufajardini jufajardini added the requires suricata fix This PR requires an issue in Suricata to be fixed first label Apr 22, 2026
Copy link
Copy Markdown
Contributor

@jufajardini jufajardini left a comment

Choose a reason for hiding this comment

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

It looks good to me -- I did miss README files to explain the .syn and Makefile files, but overall, from the explanation, it looks good.

I labeled it as requiring a fix as I didn't see a Suricata PR yet.

@@ -0,0 +1,5 @@
# response rule is required to keep Suricata's to_client FTP parsing active
# so responses complete pending transactions; without it the max-tx check
# does not fire in the to_server direction.
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.

I wonder if running inline would make it possible to alert on sid 3 without sid 2...

Issue: 8489

Three test cases:

- bug-8489-01: two commands with max-tx=1 (limit exceeded) raises the
  too_many_transactions anomaly and fires the corresponding alert.
- bug-8489-02: six commands under max-tx=10 raise no anomaly and no
  alert (negative regression).
- bug-8489-03: burst of commands exceeding the limit followed by a new
  command after a server response — verifies the flow keeps parsing
  after the event fires, so later commands are still logged.

Each test has a response_command_too_long rule alongside the
too_many_transactions rule so the to_client FTP parsing path stays
active; without a to_client app-layer-event signature Suricata skips
response parsing and the max-tx check does not fire.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires suricata pr Depends on a PR in Suricata

Development

Successfully merging this pull request may close these issues.

4 participants