Hi everyone,
I hope that I can provide sufficient information here, apologies in advance as I’m very new to Suricata. We are running 5.0.2 and have two rules.
- pass tls any any <> any any
- drop tcp any any → any any (flow:established,to_server; sid: 100; rev:1;)
The strange behavior we are seeing is that after running a curl command, e.g. curl https://www.google.com, in the alert logs we are dropping TCP packets, even though the curl command completes and the flow logs show a complete flow.
Sorry the flow IDs are not the same, but there are cases where they are from the same flow, so please do not focus on that aspect.
Allowed:
{
"firewall_name": "FW",
"availability_zone": "us-east-1a",
"event_timestamp": "1623779566",
"event": {
"timestamp": "2021-06-15T17:52:46.000070+0000",
"flow_id": 1387274044176656,
"event_type": "netflow",
"src_ip": "10.0.0.78",
"src_port": 41874,
"dest_ip": "52.46.138.63",
"dest_port": 443,
"proto": "TCP",
"app_proto": "tls",
"netflow": {
"pkts": 22,
"bytes": 5207,
"start": "2021-06-15T17:51:23.588048+0000",
"end": "2021-06-15T17:51:43.624026+0000",
"age": 20,
"min_ttl": 254,
"max_ttl": 254
},
"tcp": {
"tcp_flags": "1f",
"syn": true,
"fin": true,
"rst": true,
"psh": true,
"ack": true
}
}
}
{
"firewall_name": "FW",
"availability_zone": "us-east-1a",
"event_timestamp": "1623779566",
"event": {
"timestamp": "2021-06-15T17:52:46.000155+0000",
"flow_id": 1387274044176656,
"event_type": "netflow",
"src_ip": "52.46.138.63",
"src_port": 443,
"dest_ip": "10.0.0.78",
"dest_port": 41874,
"proto": "TCP",
"app_proto": "tls",
"netflow": {
"pkts": 24,
"bytes": 7151,
"start": "2021-06-15T17:51:23.588048+0000",
"end": "2021-06-15T17:51:43.624026+0000",
"age": 20,
"min_ttl": 232,
"max_ttl": 248
},
"tcp": {
"tcp_flags": "1b",
"syn": true,
"fin": true,
"psh": true,
"ack": true
}
}
}
but then also says dropped:
{
"firewall_name": "FW",
"availability_zone": "us-east-1a",
"event_timestamp": "1623779845",
"event": {
"timestamp": "2021-06-15T17:57:25.816443+0000",
"flow_id": 641178119007310,
"event_type": "alert",
"src_ip": "10.0.0.78",
"src_port": 41912,
"dest_ip": "52.46.138.63",
"dest_port": 443,
"proto": "TCP",
"alert": {
"action": "blocked",
"signature_id": 1999999,
"rev": 1,
"signature": "Deny all other TCP traffic",
"category": "",
"severity": 3
}
}
}
Similar behavior was seen when we replaced the drop TLS with drop HTTP. Is there some nuanced behavior with layer mixing rules cases?
Thanks in advance