tcp sequence number inference attac [schreibgesch tzt]) · 2013-07-10 · known attacks against tcp...

41
Off-Path TCP Sequence Number Inference Attack (How Firewall Middleboxes Reduce Security) Zhiyun Qian, Z. Morley Mao University of Michigan 1 1 1

Upload: others

Post on 16-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Off-Path TCP Sequence Number Inference

Attack

(How Firewall Middleboxes Reduce Security)

Zhiyun Qian, Z. Morley Mao

University of Michigan

1111

Page 2: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Known Attacks against TCP

2222

� Man-in-the-middle based attacks

� Read, modify, insert TCP content

� Off-path attacks

� Write to existing TCP connection by guessing � Write to existing TCP connection by guessing

sequence numbers

� Defense: initial sequence number nowadays

are randomized (2^32)

X = ? Y = ?

Page 3: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Outline

3333

� TCP sequence number inference attack

-- threat model

� How firewall middleboxes enable it

� Attacks built on top of it

Page 4: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Outline

4444

� TCP sequence number inference attack

-- threat model

� How firewall middleboxes enable it

� Attacks built on top of it

Page 5: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

TCP sequence number inference

attack

5555

Seq = ?Seq = ?Seq = ?Seq = ?

� Required information

� Target four tuples (source/dest IP,

source/dest port)

� Feedback on whether guessed sequence

numbers are correct

Page 6: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Req 1 – obtaining target four

tuples

6666

� On-site unprivileged malware

� netstat (no root required)

� Four-tuple query

� Connection state can be leaked via ICMP

netstat -nn

Active Internet connections

Proto Recv-Q Send-Q Local Address Foreign Address � Connection state can be leaked via ICMP

probing

� Initiate fake connections

Proto Recv-Q Send-Q Local Address Foreign Address

(state)

tcp4 37 0 192.168.1.102.50469 199.47.219.159.443

CLOSE_WAIT

tcp4 37 0 192.168.1.102.50468 174.129.195.86.443

CLOSE_WAIT

tcp4 37 0 192.168.1.102.50467 199.47.219.159.443

CLOSE_WAIT

tcp4 0 0 192.168.1.102.50460 199.47.219.159.443

LAST_ACK

tcp4 0 0 192.168.1.102.50457 199.47.219.159.443

LAST_ACK

tcp4 0 0 192.168.1.102.50445 199.47.219.159.443

Page 7: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Req 2 – obtaining feedback

through side channels ?

7777

Seq = XSeq = XSeq = XSeq = X

Not Not Not Not Seq = YSeq = YSeq = YSeq = Y

correct!correct!correct!correct!

Not Not Not Not

correct!correct!correct!correct!

Seq = YSeq = YSeq = YSeq = Y

Correct!Correct!Correct!Correct!

Expecting seq Y

Page 8: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Outline

8888

� TCP sequence number inference attack

-- threat model

� How firewall middleboxes enable it

� Attacks built on top of it

Page 9: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

TCP sequence-number-checking

firewall

9999

� Purpose: drop blindly injected packets

� Cut down resource waste

� Prevent feedback on sequence number guessing

� 33% of the 179 tested carriers deploy such

firewalls

� Vendors: Cisco, Juniper, Checkpoint…

� Could be used in other networks as well

Page 10: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Attack model

10101010

� Required information

� Target four tuples (source/dest IP,

source/dest port)

� Feedback (if packets went through the

firewall)

Page 11: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Side-channels: Packet counter

and IPID

11111111

� Host packet counter (e.g., # of incoming

packets)

� “netstat –s” or procfs

� Error counters particularly useful

netstat –s

Tcp:

3466 active connections openings

HeaderHeaderHeaderHeader

Error Error Error Error

HeaderHeaderHeaderHeader

SeqSeqSeqSeq

HeaderHeaderHeaderHeader

Error Error Error Error

HeaderHeaderHeaderHeader

SeqSeqSeqSeq

� Error counters particularly useful

� IPID from intermediate hops

Error counter++

3466 active connections openings

242344 passive connection openings

19300 connection resets received

157921111 segments received

125446192 segments send out

39673 segments retransmited

489 bad segments received

679561 resets sent

TcpExt:

25508 ICMP packets dropped because they were out-of-

window

9491 TCP sockets finished time wait in fast timer

1646 packets rejects in established connections

because of timestamp

Page 12: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Side-channels: Packet counter

and IPID

12121212

� Host packet counter (e.g., # of incoming

packets)

� “netstat –s” or procfs

� Error counters particularly useful� Error counters particularly useful

� IPID from intermediate hops

IPID++

Page 13: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Sequence number inference – an

example

13131313

Seq = 0Seq = 0Seq = 0Seq = 0

X

Seq = 0Seq = 0Seq = 0Seq = 0

Seq = 2WINSeq = 2WINSeq = 2WINSeq = 2WIN

Seq = 4WINSeq = 4WINSeq = 4WINSeq = 4WIN

Seq = 2GSeq = 2GSeq = 2GSeq = 2G

XX

Error counter++

Counter++Counter++Counter++Counter++

Page 14: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Binary search on sequence

number14141414

� Total # of packets required: 4G/2WIN

� Typically, WIN = 256K, 512K, 1M

� # of packets = 4096 – 16384

� Time: 4 – 9 seconds

Page 15: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Outline

15151515

� TCP sequence number inference attack

-- threat model

� How firewall middleboxes enable it

� Attacks built on top of it

Page 16: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Attacks built on top of it

16161616

� TCP connection hijacking

� TCP active connection inference

� No malware requirement

� Target long-lived connections� Target long-lived connections

� Spoofed TCP connections to a target

server

� Denial of service

� Spamming

Page 17: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Attacks built on top of it

17171717

� TCP connection hijacking

� TCP active connection inference

� No malware requirement

� Target long-lived connections� Target long-lived connections

� Spoofed TCP connections

� Denial of service

� Spamming

Page 18: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Facebook login page hijack

demo18181818

Page 19: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

A step further – TCP connection

hijack: Reset-the-server

19191919

SYNSYNSYNSYN

NotificatiNotificatiNotificatiNotificatiNotificatiNotificatiNotificatiNotificati

onononon

Success rate: 65%

onononononononon

SYNSYNSYNSYN----ACKACKACKACK

Connection reset

Seq Seq Seq Seq

-------- endendendend

Seq Seq Seq Seq

inference inference inference inference

-------- endendendend

SeqSeqSeqSeq

-------- startstartstartstart

SeqSeqSeqSeq

inference inference inference inference

-------- startstartstartstart

Spoofed Spoofed Spoofed Spoofed

RSTsRSTsRSTsRSTs

Spoofed Spoofed Spoofed Spoofed

RSTsRSTsRSTsRSTs

ACK/RequestACK/RequestACK/RequestACK/Request

payloadpayloadpayloadpayload

Malicious Malicious Malicious Malicious

payloadpayloadpayloadpayload

Page 20: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

TCP connection hijacks

20202020

ResetResetResetReset----thethethethe----serverserverserverserver Preemptive SYNPreemptive SYNPreemptive SYNPreemptive SYN HitHitHitHit----andandandand----runrunrunrun

Bandwidth requirement Additional attack

phone

Low bandwidth

requirement

Succ rate: 65% Succ rate: 65% Succ rate: 85%Succ rate: 65% Succ rate: 65% Succ rate: 85%

Page 21: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Lessons learned

21212121

� Failed to secure sensitive state against

side-channels

� Firewall middlebox stores sensitive state

(sequence number)

� IPID and packet counter side-channels allows

sequence number inference

� Future network middlebox design needs to

better secure sensitive state (e.g.,

cryptographic keys)

� Mitigations

� Eliminate or access control on the side-

channel

Remove the redundant state

HTTP

TCP

Page 22: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Thanks

22222222

� Q/A

� Zhiyun Qian, [email protected]

Page 23: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Backup slides

23232323

Page 24: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Outline

24242424

� TCP sequence number inference attack --

threat model

� How firewall middleboxes enable it

TCP connection hijacking� TCP connection hijacking

� TCP active connection inference

� Spoofed TCP connections

Page 25: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

TCP active connection

inference25252525

?:? -> ?:?

1.1.1.1:11111 ->

2.2.2.1:80

1.1.1.2:22222 ->

2.2.2.2:80

1.1.1.3:33333 ->

2.2.2.3:80

...

Page 26: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

TCP active connection

inference26262626

How many clients are

connected to Android

push notification

1.1.1.1:11111 ->

2.2.2.1:80

1.1.1.2:22222 ->

2.2.2.2:80

1.1.1.3:33333 ->

2.2.2.3:80

...

push notification

server?

7.8% IPs have active

connections to the

server

Page 27: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Outline

27272727

� TCP sequence number inference attack --

threat model

� How firewall middleboxes enable it

TCP connection hijacking� TCP connection hijacking

� TCP active connection inference

� Spoofed TCP connections

Page 28: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Spoofed TCP connections

28282828

Sequence number inference

IPID side channel

� Denial of service

attack

� Spamming

Page 29: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

IP ID

29292929

Page 30: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Introspective side-channels

– Packet counter and IPID

30303030

� Host packet counter (e.g., # of incoming

packets)

� “netstat –s” or procfs

� Error counters particularly useful

netstat –s

Tcp:

3466 active connections openings

242344 passive connection openings

19300 connection resets received� Error counters particularly useful

� IPID from intermediate hops

HeaderHeaderHeaderHeader

Error Error Error Error

HeaderHeaderHeaderHeader

SeqSeqSeqSeq

HeaderHeaderHeaderHeader

Error Error Error Error

HeaderHeaderHeaderHeader

SeqSeqSeqSeqError counter++

19300 connection resets received

157921111 segments received

125446192 segments send out

39673 segments retransmited

489 bad segments received

679561 resets sent

TcpExt:

25508 ICMP packets dropped because they were out-of-

window

9491 TCP sockets finished time wait in fast timer

1646 packets rejects in established connections

because of timestamp

SeqSeqSeqSeq = = = =

2WIN2WIN2WIN2WIN

SeqSeqSeqSeq = = = =

Y Y Y Y –

2WIN2WIN2WIN2WINSeqSeqSeqSeq = Y = Y = Y = Y

TTL TTL TTL TTL

expiredexpiredexpiredexpired

TTL TTL TTL TTL

expiredexpiredexpiredexpired

IPID++IPID++IPID++IPID++

Page 31: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Identification of introspective

side-channel

31313131

� Packet checking sequence in Linux (and

other OS)

Page 32: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Sensitive network state “TCP

sequence number” also stored on

end-hosts32323232

Page 33: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

More efficient probing to extract

sequence number from introspective

side channels33333333

� 4-way search

Total # of packets required:

96

Inference time: ~1s

Page 34: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Network-level defenses against

spamming34343434

� Attack: BotnetBotnetBotnetBotnet----basedbasedbasedbased spamming to hide real

identity

� Defense:

� IPIPIPIP----based blacklist: based blacklist: based blacklist: based blacklist: making IP addresses

important resources,

limit spammer’s throughputlimit spammer’s throughput

� Port 25 blocking: Port 25 blocking: Port 25 blocking: Port 25 blocking: limit end-user IP addresses

for spamming

Page 35: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Triangular spamming

35353535

� Relatively unknown but real attack [NANOG

Mailing list Survey]

� Not proposing a new attack

� But “how it can bypass SMTP port blocking”

3.3.3.

Legend

SrcSrcSrcSrcSrcSrcSrcSrc

IPIPIPIP

DstDstDstDstDstDstDstDst

IPIPIPIP

Msg Msg Msg Msg

TypeTypeTypeType

3333

3.3.3.3.3.3.3.3.3.3.3.3.

3333

2222

2.2.2.2.2.2.2.2.2.2.2.2.

2222

1.1.1.

1

2.2.2.

2

3333

3.3.3.3.3.3.3.3.3.3.3.3.

3333

2222

2.2.2.2.2.2.2.2.2.2.2.2.

2222

2222

2.2.2.2.2.2.2.2.2.2.2.2.

2222 1111

1.1.1.1.1.1.1.1.1.1.1.1.

1111

3

SYNSYNSYNSYN

ACKACKACKACK

SYNSYNSYNSYN----

ACKACKACKACK

ACKACKACKACK

SYNSYNSYNSYN----

ACKACKACKACK

Legend

IPIPIPIPIPIPIPIP IPIPIPIPIPIPIPIP TypeTypeTypeTypeTypeTypeTypeType

Page 36: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Sensitive state – port blocking

policy

36363636

� Hypothesis on current ISP’s policy

� Directional traffic blocking

� Blocking outgoing traffic with dst port 25 (OUT)

� NOT blocking incoming traffic with src port 25 (IN)

� Relay bot’s IP can be used to send spam

SrcSrcSrcSrc Port: Port: Port: Port:

25252525

SrcSrcSrcSrc Port: Port: Port: Port:

****

DstDstDstDst Port: Port: Port: Port:

25252525

X

SrcSrcSrcSrc Port: Port: Port: Port:

25252525

SrcSrcSrcSrc Port: Port: Port: Port:

****

DstDstDstDst Port: Port: Port: Port:

25252525

SrcSrcSrcSrc Port: Port: Port: Port:

****

SrcSrcSrcSrc Port: Port: Port: Port:

****

DstDstDstDst Port: Port: Port: Port:

****

SrcSrcSrcSrc Port: Port: Port: Port:

Port: Port: Port: Port:

* * * *

SrcSrcSrcSrc Port: Port: Port: Port:

25252525

DstDstDstDst Port: Port: Port: Port:

* * * *

Page 37: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Introspective side-channel –

IPID37373737

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

25 25 25 25 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

25 25 25 25 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

25252525

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

25252525

688 Networks

block IN or OUT

traffic

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

25 25 25 25 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

25 25 25 25 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

25 25 25 25 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

25 25 25 25 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

80808080

SrcSrcSrcSrc: : : :

25 25 25 25 DstDstDstDst: : : :

80808080

SrcSrcSrcSrc: : : :

: : : :

IPID: 2IPID: 2IPID: 2IPID: 2

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

25252525

IPID: 2IPID: 2IPID: 2IPID: 2

SrcSrcSrcSrc: : : :

: : : :

IPID: 3IPID: 3IPID: 3IPID: 3

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

25252525

IPID: 3IPID: 3IPID: 3IPID: 3

SrcSrcSrcSrc: : : :

: : : :

IPID: 4IPID: 4IPID: 4IPID: 4

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

25252525

IPID: 4IPID: 4IPID: 4IPID: 4

SrcSrcSrcSrc: : : :

: : : :

IPID: 5IPID: 5IPID: 5IPID: 5

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

25252525

IPID: 5IPID: 5IPID: 5IPID: 5

SrcSrcSrcSrc: : : :

: : : :

IPID: 6IPID: 6IPID: 6IPID: 6

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

25252525

IPID: 6IPID: 6IPID: 6IPID: 6

SrcSrcSrcSrc: : : :

: : : :

IPID: 1IPID: 1IPID: 1IPID: 1

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

80808080

IPID: 1IPID: 1IPID: 1IPID: 1

SrcSrcSrcSrc: : : :

: : : :

IPID: 7IPID: 7IPID: 7IPID: 7

SrcSrcSrcSrc: : : :

80 80 80 80 DstDstDstDst: : : :

80808080

IPID: 7IPID: 7IPID: 7IPID: 7

� IPID Side-channel (identifier in IP header)

� Monotonically increasing

96.8% networks

block only OUT

traffic!

traffic

Page 38: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

IPID from intermediate hop

38383838

TTLTTLTTLTTL

Small Small Small Small

TTLTTLTTLTTL

XXXX

IP ID = IP ID = IP ID = IP ID =

XXXX

SeqSeqSeqSeq

SeqSeqSeqSeq

IPID++

TTLTTLTTLTTL

Small Small Small Small

TTLTTLTTLTTL

X+2X+2X+2X+2

IP ID = IP ID = IP ID = IP ID =

X+2X+2X+2X+2

IPID++IPID++

X+1X+1X+1X+1

IP ID = IP ID = IP ID = IP ID =

X+1X+1X+1X+1

Page 39: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

TCP connection hijack:

Preemptive SYN

39393939

-No bandwidth requirement

-But requires another

attack phone

-Success rate: 65%

Page 40: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

TCP connection hijack 3:

Hit-and-run40404040

Success rate: 85%

Page 41: TCP Sequence Number Inference Attac [Schreibgesch tzt]) · 2013-07-10 · Known Attacks against TCP 222 Man-in-the-middle based attacks Read, modify, insert TCP content Off-path attacks

Side-channels: Packet counter

and IPID

41414141

� Host packet counter (e.g., # of incoming

packets)

� “netstat –s” or procfs

� Error counters particularly useful� Error counters particularly useful

� IPID from intermediate hops

TTLTTLTTLTTL

Small Small Small Small

TTLTTLTTLTTL

XXXX

IP ID = IP ID = IP ID = IP ID =

XXXX

SeqSeqSeqSeq

SeqSeqSeqSeq

IPID++

TTLTTLTTLTTL

Small Small Small Small

TTLTTLTTLTTL

X+2X+2X+2X+2

IP ID = IP ID = IP ID = IP ID =

X+2X+2X+2X+2

IPID++IPID++

X+1X+1X+1X+1

IP ID = IP ID = IP ID = IP ID =

X+1X+1X+1X+1