Complexity Attack Resistant Flow Lookup Schemes for IPv6: A - - PowerPoint PPT Presentation

complexity attack resistant flow lookup schemes for ipv6
SMART_READER_LITE
LIVE PREVIEW

Complexity Attack Resistant Flow Lookup Schemes for IPv6: A - - PowerPoint PPT Presentation

Complexity Attack Resistant Flow Lookup Schemes for IPv6: A Measurement Based Comparison David Malone and Josh Tobin. 2008-12-11 1 Hash Table Lookup scheme to avoid cost of searching full list. carrot zuchinni . . . . . . apricot apple


slide-1
SLIDE 1

Complexity Attack Resistant Flow Lookup Schemes for IPv6: A Measurement Based Comparison

David Malone and Josh Tobin. 2008-12-11

1

slide-2
SLIDE 2

Hash Table

Lookup scheme to avoid cost of searching full list. carrot zuchinni . . . . . . apricot apple becomes: a apricot, apple b banana . . . . z zuchinni Hash function h(x), XOR typical. Cost: O(N) → O(N/H).

2

slide-3
SLIDE 3

Algorithmic Attacks

Worst case rather than typical behaviour. (Crosby and Wallach, 2003). Suppose attacker controls keys. a abduce, abducens, abducent, abduct, abduction, abductor . . . b . z Attacker finds xi so that f(x1) = f(x2) = . . . = f(xi).

3

slide-4
SLIDE 4

Flow Lookup

  • Security applications often track IP flows.
  • Lookup single flow by tuple (src IP, dst IP, src port,

dst port).

  • Hash table is one possible optimisation.
  • For IPv4 96 bits of input.
  • For IPv6 288 bits of input.
  • Aim — ipfw for FreeBSD.
  • Note inexact flow matching different!

4

slide-5
SLIDE 5

Demonstration attack

10 20 30 40 50 60 5 10 15 20 Packets Forwarded (pps) Time (s) Random Attack Complexity Attack

5

slide-6
SLIDE 6

Xor

h ← 0 foreach (byte[i]) h ← h ⊕ byte[i] return h

DJB2

h ← 5381 foreach (byte[i]) h ← 33 ∗ h + byte[i] return h

XorSum

h ← 0 foreach (byte[i]) h ← h + (byte[i] ⊕ K[i]) return h

SumXor

h ← 0 foreach (byte[i]) h ← h ⊕ (byte[i] + K[i]) return h;

6

slide-7
SLIDE 7

Universal

h ← 0 foreach (byte[i]) h ← h + K[i] ∗ byte[i] return h mod 65537

Pearson

h1 ← h2 ← 0 foreach (byte[i]) h1 ← T1[byte[i] ⊕ h1] h2 ← T2[byte[i] ⊕ h2] return h1 + h2 ∗ 256

MD5

return two bytes of MD5(bytes)

SHA

return two bytes of SHA(bytes)

7

slide-8
SLIDE 8

Hash Chain Length

10 100 1000 10000 100000 SHA MD5 Pearson DJB2 SumXor XorSum Xor Universal Mean Lookup Chain Length Hash sequential hamming xor zero xor one sum zero random

8

slide-9
SLIDE 9

CPU Cost

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 SHA MD5 Pearson DJB2 SumXor XorSum Xor Universal CPU used Hash sequential hamming xor zero xor one sum zero random dont

9

slide-10
SLIDE 10

Other options

Don’t need to use hash. Tree Use lexical order to insert into tree. Red/Black Tree Tree balanced by colouring. Splay Tree Moves frequently accessed to top. Treap Tree balanced using random heap. Tree is baseline (and subject to attack). Others are not (obviously) subject to attack.

10

slide-11
SLIDE 11

Design Aims/Method

Want flow lookup to:

  • Should perform OK under typical traffic.
  • Should not degrade badly under attack.
  • . . . typical performance depends on keys.
  • . . . collect trace of traffic,
  • . . . assess using pcap framework,
  • . . . check performance in kernel.

11

slide-12
SLIDE 12

Traffic Trace

1 10 100 1000 10000 100000 1 10 100 1000 10000 100000 Flow size (packets) Flow size rank Testlog 2 sample Testlog 2

12

slide-13
SLIDE 13

Big CPU

0.5 1 1.5 2 2.5 500000 1e+06 1.5e+06 2e+06 2.5e+06 3e+06 3.5e+06 4e+06 4.5e+06 5e+06 Average CPU per packet (us) Packets processed Pearson (Byte) Hash Table Xor (Byte) Hash table Treap Unbalanced Tree Red/Black Tree Splay Tree SHA Hash Table MD5 Hash Table Pearson (Word) Hash Table Univesal Hash Table Xor (Word) Hash Table

13

slide-14
SLIDE 14

Small CPU

10 20 30 40 50 60 50000 100000 150000 200000 250000 300000 350000 400000 450000 Average CPU per packet (us) Packets processed Pearson (Byte) Hash Table Xor (Byte) Hash table Treap Unbalanced Tree Red/Black Tree Splay Tree SHA Hash Table MD5 Hash Table Pearson (Word) Hash Table Univesal Hash Table Xor (Word) Hash Table

14

slide-15
SLIDE 15

Peak Forwarding

200 400 600 800 1000 1200 1400 1600 1800 1000 2000 3000 4000 5000 6000 Packets Out Packets In No ipfw ipfw with Xor ipfw with Universal ipfw with Pearson

15

slide-16
SLIDE 16

Summary

  • Looked at flow lookup schemes.
  • Wanted attach resistant scheme,
  • . . . with good typical performance.
  • Future: get code into FreeBSD.
  • Future: look at attacks on hashes.
  • Future: new hashing schemes.

16