Project

General

Profile

Actions

Security #3324

closed

TCP evasion technique by overlapping a TCP segment with a fake packet

Added by Nicolas Adba about 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Affected Versions:
Label:
Git IDs:

fa692df37a796c3330c81988d15ef1a219afc006

Severity:
Disclosure Date:

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

without_evasion.pcap (1.01 KB) without_evasion.pcap Nicolas Adba, 11/06/2019 10:10 PM
with_evasion_linux.pcap (1.16 KB) with_evasion_linux.pcap Nicolas Adba, 11/06/2019 10:10 PM
with_evasion_windows.pcap (1.13 KB) with_evasion_windows.pcap Nicolas Adba, 11/06/2019 10:10 PM
test.rule (147 Bytes) test.rule Nicolas Adba, 11/06/2019 10:11 PM

Related issues 1 (0 open1 closed)

Copied to Suricata - Security #3394: TCP evasion technique by overlapping a TCP segment with a fake packet (4.1.x)ClosedVictor JulienActions
Actions #1

Updated by Andreas Herz about 5 years ago

  • Assignee set to OISF Dev
  • Target version set to 70
Actions #2

Updated by Victor Julien about 5 years ago

  • Status changed from New to Assigned
  • Assignee changed from OISF Dev to Victor Julien
Actions #3

Updated by Victor Julien about 5 years ago

  • Target version changed from 70 to 5.0.1
Actions #4

Updated by Victor Julien about 5 years ago

  • Priority changed from Normal to High
  • Label Needs backport added
Actions #5

Updated by Victor Julien about 5 years ago

  • Copied to Security #3394: TCP evasion technique by overlapping a TCP segment with a fake packet (4.1.x) added
Actions #6

Updated by Victor Julien about 5 years ago

  • Status changed from Assigned to Closed
  • Private changed from Yes to No
  • Label deleted (Needs backport)
Actions #7

Updated by Victor Julien over 4 years ago

  • Tracker changed from Bug to Security
Actions #8

Updated by Victor Julien over 4 years ago

  • CVE set to 2019-18792
Actions #9

Updated by Victor Julien over 4 years ago

  • Git set to fa692df37a796c3330c81988d15ef1a219afc006
Actions #10

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions #11

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions #12

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions #13

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions #14

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions #15

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions #16

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions #17

Updated by Victor Julien over 4 years ago

  • Git IDs updated (diff)
Actions

Also available in: Atom PDF