Yue Cao
Off-‑Path ¡TCP ¡Exploits: ¡Global ¡Rate ¡Limit ¡ Considered ¡Dangerous
Yue ¡Cao, ¡Zhiyun ¡Qian, ¡Zhongjie ¡Wang, ¡Tuan ¡Dao, ¡ Srikanth ¡Krishnamurthy, ¡Lisa ¡M. ¡Marvel†
USENIX Security 2016 1
Off-Path TCP Exploits: Global Rate Limit Considered - - PowerPoint PPT Presentation
Off-Path TCP Exploits: Global Rate Limit Considered Dangerous Yue Cao , Zhiyun Qian, Zhongjie Wang, Tuan Dao, Srikanth Krishnamurthy, Lisa M. Marvel USENIX
Yue Cao
USENIX Security 2016 1
Yue Cao USENIX Security 2016
2
Yue Cao USENIX Security 2016
3
Yue Cao USENIX Security 2016
4
Yue Cao USENIX Security 2016
5 Client Server Attacker
Threat Model
Yue Cao USENIX Security 2016
6
Yue Cao USENIX Security 2016
7
Yue Cao USENIX Security 2016
8 Sender Receiver SYN
Out-of-Window
ACK back
In_Window
Reset Connection
After RFC 5961
Challenge ACK Challenge ACK
RCV.NXT RCV.NXT+RCV.WND RCV_Window
SEQ # Space
Before RFC 5961
SEQ #: Challenge ACK: ask sender to confirm if it indeed restarted
Yue Cao USENIX Security 2016
9 RST
Out-of-Window
Drop the Packet
In-Window
Reset Connection
After RFC 5961 Exactly match
Drop the Packet Challenge ACK Reset Connection
Sender Receiver
RCV.NXT RCV.NXT+RCV.WND RCV_Window
SEQ # Space
Before RFC 5961 SEQ #:
0/4G
Challenge ACK: tell sender to confirm if it indeed terminated the connection
Yue Cao USENIX Security 2016
10
In-RCV_Window
—> Check ACK #
After RFC 5961
In-Accpt_Window
Process Data
Out-of-Window
Drop
Challenge Window (Old ACK)
Challenge ACK Drop Process Data
SND.NXT SND.UNA
Accept Window
SND.UNA-2G
Challenge Window
RCV.NXT RCV.NXT+RCV.WND RCV_Window
SEQ # Space ACK # Space
Before RFC 5961 SEQ #: ACK #:
Yue Cao USENIX Security 2016
11
Port number SEQ number ACK number SYN-triggered challenge ACK RST-triggered challenge ACK ACK-triggered challenge ACK Rate limit of challenge ACK (recommended by RFC 5961)
Linux followed faithfully
Side-Channel Side-Channel Side-Channel
SYN RST Data
Yue Cao USENIX Security 2016
12
Yue Cao USENIX Security 2016
13
1 R S T 1 c h a l l e n g e A C K
Client Server Attacker
Side-Channel Vulnerability Example
Yue Cao USENIX Security 2016
14
1 R S T 9 9 c h a l l e n g e A C K
1 challenge ACK
Client Server Attacker
Spoofed SYN packets with client’s IP and a guessed src port
Guess Phase Check Phase
Port number Inference SEQ number Inference ACK number Inference SYN-triggered challenge ACK RST-triggered challenge ACK Data-triggered challenge ACK
Yue Cao USENIX Security 2016
15
1 R S T 1 c h a l l e n g e A C K
Spoofed SYN packets with client’s IP and a guessed src port No challenge ACK
Client Server Attacker
15
Yue Cao USENIX Security 2016
16
Spoofed SYN packets with client’s IP and guessed src port
Client Server Attacker
16
Yue Cao USENIX Security 2016
17
S E Q : S p
e d R S T P a c k e t s w i t h c l i e n t ’ s I P , k n
n s r c p
t a n d g u e s s e d S E Q
Client Server Attacker
17
RST packet with correct 4-tuples, SEQ # in-window Data packet with 4-tuples, SEQ # in-window, old ACK #
A C K : S p
e d R S T p a c k e t s w i t h C l i e n t ’ s I P , k n
n s r c p
t , S E Q a n d g u e s s e d A C K
O R
Port number Inference SEQ number Inference ACK number Inference SYN-triggered challenge ACK RST-triggered challenge ACK Data-triggered challenge ACK
Yue Cao USENIX Security 2016
18 18
RST packet with correct 4-tuples, SEQ # in-window Data packet with correct 4-tuples, SEQ # in-window, old ACK SYN packet with correct 4-tuples(src Port)
Dst IP, Src IP Dst Port
Src Port 104 SEQ number 109 ACK number 109
Possible to finish within 1 minute!
Yue Cao USENIX Security 2016
19
Yue Cao USENIX Security 2016
20 …… If Challenge ACK # ==100 If Challenge ACK # < 100 If Challenge ACK # ==100 If Challenge ACK # < 100 ……
Binary Search Algorithm
Yue Cao USENIX Security 2016
21
Yue Cao USENIX Security 2016
22
Pre-process: Time Synchronization Src Port Inference SEQ number Inference ACK number Inference Inference of existence of a TCP connection Connection Termination Attack Hijacking Attack
Yue Cao USENIX Security 2016
23 1 second …………. 200 time slots RST …………. RST RST
Time synchronization example
Yue Cao USENIX Security 2016
, dst IP and expected dst port:
24 Src Port # Step1: Identify Port Range Step2: Identify Exact Port Src Port # Range size: N
Yue Cao USENIX Security 2016
, dst IP , src Port, dst Port,
number
25 RCV.NXT RCV.NXT +RCV.WND RST SEQ Number Space RCV_Window Step1: identify the window range Step2: narrow down to a single window Step3: probe RCV.NXT
RCV_WND RCV_WND RCV_WND
Find Receive Window Find Exact SEQ #
SEQ # Space
Range Size: N*Win_size
Yue Cao USENIX Security 2016
26
Rough SEQ # Inference Exact SEQ # Inference
Termination Attack: Hijacking Attack:
RST-based Probing Data-based Probing
Rough ACK # Inference Exact SEQ # Inference
Yue Cao USENIX Security 2016
27
Yue Cao USENIX Security 2016
28
Time(s) 20 40 60 80 100 120 140 160 Attack intensity (packets/sec) 2000 4000 6000
Binary search Multibin search Time (s) 10 20 30 40 Time Synchronization Port Inference Seq Inference ACK Inference
Yue Cao USENIX Security 2016
29
Yue Cao USENIX Security 2016
Yue Cao USENIX Security 2016
31 Client Server 30s 30s 30s
Request Response
Yue Cao USENIX Security 2016
32 Client Server Attacker 30s
Request Spoofed Request Response Spoofed Response Spoofed Response
……
Spoofed Response
Desynchronized [1]ABRAMOV, R., AND HERZBERG, A. Tcp ack storm dos attacks. Journal Computers and Security (2013).
Yue Cao USENIX Security 2016
33
Yue Cao USENIX Security 2016
34
Yue Cao USENIX Security 2016
35
36