Security #3324
closedTCP evasion technique by overlapping a TCP segment with a fake packet
fa692df37a796c3330c81988d15ef1a219afc006
Description
It's possible to bypass/evade any tcp based signature by overlapping a TCP segment with a fake FIN packet.
The fake FIN packet is injected just before the PUSH ACK packet we want to bypass. The PUSH ACK packet (containing the data) will be ignored by suricata because it overlaps the FIN packet (the sequence and ack number are identical in the two packets).
The client will ignore the fake FIN packet because the ACK flag is not set.
Both linux and windows client are ignoring the injected packet.
Client =============== Legit TCP handshake ================= Evil Server Client <- [FIN] [Seq=80 Ack=100] XXXXXXX <- Evil Server # injected packet with fake data (ignored by the client) Client <- [PUSH, ACK] [Seq=80 Ack=100] MALWARE <- Evil Server # Legit data (ignored by suricata)
This evasion technique is referenced as CVE-2019-18792.
You can find attached :
- test.rule : A tcp rule that detects the string THIS_IS_A_TEST
- without_evasion.pcap : A web server which sends the string THIS_IS_A_TEST to a client without any evasion technique
- with_evasion_windows.pcap : A web server which sends the string THIS_IS_A_TEST to a windows 10 client with this evasion technique
- with_evasion_linux.pcap : A web server which sends the string THIS_IS_A_TEST to a linux client (tested with kernel 5.2.0) with this evasion technique
Files
Updated by Andreas Herz about 5 years ago
- Assignee set to OISF Dev
- Target version set to 70
Updated by Victor Julien about 5 years ago
- Status changed from New to Assigned
- Assignee changed from OISF Dev to Victor Julien
Updated by Victor Julien about 5 years ago
- Target version changed from 70 to 5.0.1
Updated by Victor Julien about 5 years ago
- Priority changed from Normal to High
- Label Needs backport added
Updated by Victor Julien almost 5 years ago
- Copied to Security #3394: TCP evasion technique by overlapping a TCP segment with a fake packet (4.1.x) added
Updated by Victor Julien almost 5 years ago
- Status changed from Assigned to Closed
- Private changed from Yes to No
- Label deleted (
Needs backport)
Updated by Victor Julien about 4 years ago
- Git set to fa692df37a796c3330c81988d15ef1a219afc006