When I was testing, I found that rules with packet keywords like dsize would perform mpm on every packet(MPMB_TCP_PKT_TC), which would cause serious packet loss. Why doesn’t Suricata default to not matching such rules, for example, through detect.yaml? If so, where is it?
I would like to ask, when conducting certain stress tests, should such rules not exist?
E: alert tcp any any → any any (msg:“test”; dsize:25; content:“xxx”;sid:1111;)
Or let me ask it another way, why does dsize need to be reversed after MPM hits? If the current packet length is obviously not within the dsize range, why run MPM? Why not group the rules containing dsize again, just like port.
Sorry to bother you again. Is the example I wrote above a rule with low performance? I still stubbornly believe that it will perform mpm on every packet, so the performance of such a rule is very low. Am I right?