Project

General

Profile

Actions

Bug #4522

open

Rules with stream_size greater than not working

Added by Serge Lulu almost 3 years ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

With a default configuration, when reading a PCAP, a basic rule trying to detect a tcp session bigger than a specific size with the flow keyword "stream_size" does not behave as expected.

The test PCAP contains a single TCP flow, with mote than 5Mb from client to server.
The test rule is
alert tcp any any -> any any (msg:"STEAMSIZE"; stream_size:client,>,5000;sid:100001; rev:1;)
The test command line is suricata -c /etc/suricata/suricata.yaml -r ./ldap_session_test.pcap, with the rule file referenced in the suricata.yaml

The expected behaviour is one alert per packet when the size of the stream from the client to the server gets bigger than 5000 bytes. The current results is no alert triggered.
Alerts are only triggered on the condition stream_size:client,=,1; (or stream_size:client,<,X;, with X>1)

In the suricata.yaml, editing the "stream:" parameters and increasing the "depth" parameter to 50mb does not change the behaviour.
Suricata version : 6.0.1, installed via apt on debian

Thanks for your help and amazing development ! :)


Files

ldap_session_test.pcap (5.05 MB) ldap_session_test.pcap Test pcap used Serge Lulu, 06/09/2021 01:19 PM
Actions #1

Updated by Philippe Antoine 10 months ago

  • Assignee set to OISF Dev
  • Target version set to 8.0.0-beta1

Reproduced ssn->client.next_seq seems stuck at b6ac5379

So likely a TCP engine issue (SACK ?)

Actions

Also available in: Atom PDF