27
CPS 590.5 Computer Security Lecture 10: IP Traceback Xiaowei Yang [email protected]

CPS 590.5 Computer Security Lecture 10: IP Traceback

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CPS 590.5 Computer Security Lecture 10: IP Traceback

CPS 590.5 Computer Security Lecture 10: IP Traceback

Xiaowei Yang [email protected]

Page 2: CPS 590.5 Computer Security Lecture 10: IP Traceback

Roadmap

•  Previous lecture – Practical network security

•  Today –  IP traceback

•  Packet state based •  Router state based

Page 3: CPS 590.5 Computer Security Lecture 10: IP Traceback

How to Attack : Exhausting shared resources

•  Flooding traffic to exhaust the bandwidth, memory, or CPU of a victim –  Spoof addresses to hide

•  Passport –  Distributed DoS (DDoS) to hide and to maximize damage

•  Multiple (weak) machines against (strong) victim

L!

Page 4: CPS 590.5 Computer Security Lecture 10: IP Traceback

IP address spoofing

•  IP source address can be spoofed •  Challenges

– No accountability – Filters do not work well – Reflector attacks

Page 5: CPS 590.5 Computer Security Lecture 10: IP Traceback

Smurf/Reflector Attack

10/21/13 Networks: IP and TCP 5

Attacker Victim

Amplifying Network

echo request

echo response

echo response

echo response

Page 6: CPS 590.5 Computer Security Lecture 10: IP Traceback

Practical Network Support for IP Traceback

Stefan Savage University of Washington/ University of California, San Diego

David Wetherall, Anna Karlin and Tom Anderson University of Washington, Seattle

Page 7: CPS 590.5 Computer Security Lecture 10: IP Traceback

Single-Packet IP Traceback

Alex C. Snoeren

BBN Technologies

(with Craig Partridge, Tim Strayer, Christine Jones, Fabrice Tchakountio, Beverly Schwartz, Matthew Condell,

Bob Clements, and Steve Kent)

Page 8: CPS 590.5 Computer Security Lecture 10: IP Traceback

8

Low-rate attacks

•  Not all attacks are large flooding DOS attacks •  Well-placed single packet attacks •  Packets may have spoofed IP addresses

•  How to track these attacks and find their origin?

Page 9: CPS 590.5 Computer Security Lecture 10: IP Traceback

9

IP Traceback

V"

R"

R1" R2"

R3"

R""R""

R""R""

R4"

A" R"

R"R7"

R6"

"R5""

Page 10: CPS 590.5 Computer Security Lecture 10: IP Traceback

10

Logging Challenges

•  Attack path reconstruction is difficult – Packet may be transformed as it moves through

the network

•  Full packet storage is problematic – Memory requirements are prohibitive at high line

speeds (OC-192 is ~10Mpkt/sec)

•  Extensive packet logs are a privacy risk – Traffic repositories may aid eavesdroppers

Page 11: CPS 590.5 Computer Security Lecture 10: IP Traceback

11

Single-Packet Traceback: Goals

•  Trace a single IP packet back to source – Asymmetric attacks (e.g., Fraggle, Teardrop,

ping-of-death) •  Minimal cost (resource usage)

One solution: Source Path Isolation Engine (SPIE)

Page 12: CPS 590.5 Computer Security Lecture 10: IP Traceback

12

SPIE Architecture •  DGA: Data Generation Agent

–  computes and stores digests of each packet on forwarding path. –  Deploy 1 DGA per router

•  SCAR: SPIE Collection and Reduction agent –  Long term storage for needed packet digests –  Assembles attack graph for local topology

•  STM: SPIE Traceback Manager –  Interfaces with IDS –  Verifies integrity and authenticity of Traceback call –  Sends requests to SCAR for local graphs –  Assembles attack graph from SCAR input

Page 13: CPS 590.5 Computer Security Lecture 10: IP Traceback

13

Data Generation Agents

•  Compute “packet digest” •  Store in Bloom filter •  Flush filter periodically

Page 14: CPS 590.5 Computer Security Lecture 10: IP Traceback

14

Packet Digests

•  Compute hash(p) –  Invariant fields of p only –  28 bytes hash input, 0.00092% WAN collision rate – Fixed sized hash output, n-bits

•  Compute k independent digests –  Increased robustness – Reduced collisions, reduced false positive rate

Page 15: CPS 590.5 Computer Security Lecture 10: IP Traceback

15

Hash input: Invariant Content

Total Length

Identification

Checksum

Ver TOS HLen

TTL Protocol

Source Address

Destination Address

Fragment Offset M F

D F

Options

Remainder of Payload

First 8 bytes of Payload

28 bytes

Page 16: CPS 590.5 Computer Security Lecture 10: IP Traceback

16

Hashing Properties

•  Each hash function – Uniform distribution of input -> output H1(x) = H1(y) for some x,y -> unlikely

•  Use k independent hash functions – Collisions among k functions independent – H1(x) = H2(y) for some x,y -> unlikely

•  Cycle k functions every time interval, t

Page 17: CPS 590.5 Computer Security Lecture 10: IP Traceback

17

Digest Storage: Bloom Filters

•  Fixed structure size –  Uses 2n bit array –  Initialized to zeros

•  Insertion –  Use n-bit digest as indices

into bit array –  Set to ‘1’

•  Membership –  Compute k digests, d1, d2,

etc… –  If (filter[di]=1) for all i, router

forwarded packet

1 n bits

2n bits

H(P) H2(P)

Hk(P)

H3(P)

H1(P)

1

1

1

. . .

Page 18: CPS 590.5 Computer Security Lecture 10: IP Traceback

R1"

False Positive Distribution

V"

R"

R2"

R3"

R""R""

R""R""

R4"

A" R"

R"R7"

R6"

"R5""

R1"

"R5""

R"

R"

R"

R"

Page 19: CPS 590.5 Computer Security Lecture 10: IP Traceback

Adjusting Graph Accuracy

•  False positives rate depends on: – Length of the attack path, N – Complexity of network topology, d – Capacity of Bloom filters, P

•  Bloom filter capacity is easy to adjust – Required filter capacity varies with router speed

and number of neighbors – Appropriate capacity settings achieve linear error

growth with path length

Page 20: CPS 590.5 Computer Security Lecture 10: IP Traceback

Simulation Results

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30 Length of Attack Path (N)

Random Graph

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30 0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30

Real ISP, 100% Utilization

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30

Degree-Independent

Exp

ecte

d N

umbe

r of F

alse

Pos

itive

s Real ISP, Actual Utilization

N/7 Nρ/(1-ρ) → ρ = 1/8

P = ρ/d

P = ρ

May be able to assume degree independence

Page 21: CPS 590.5 Computer Security Lecture 10: IP Traceback

How Big are Digests? •  Quick rule of thumb:

–  ρ = 1/8, assuming degree independence –  Bloom filter k = 3, M/n = 5 bits per packet. –  Assume packets are ~1000 bits

•  Filters require ~0.5% of link capacity –  Four OC-3s require 47MB per minute –  128 OC-192 links need <100GB per minute

•  Access times are equally important –  Current drives can write >3GB per minute –  OC-192 needs SRAM access times

Page 22: CPS 590.5 Computer Security Lecture 10: IP Traceback

Filter Paging

•  “Small” Bloom filters –  Random access –  Need fast memory

•  Store multiple filters –  Increase time span –  Ring buffer avoids

memory copies •  Timestamp each bin

–  Fence-post issues

G

E

C

A

Page 23: CPS 590.5 Computer Security Lecture 10: IP Traceback

Transformations

•  Occasionally invariant content changes – Network Address Translation (NAT) –  IP/IPsec Encapsulation, etc. –  IP Fragmentation –  ICMP errors/requests

•  Routers need to invert these transforms – Often requires additional information – Can store this information at the router

Page 24: CPS 590.5 Computer Security Lecture 10: IP Traceback

Transform Lookup Table

•  Only need to restore invariant content –  Often available from the transform (e.g., ICMP)

•  Otherwise, save data at transforming router –  Index required data by transformed packet digest –  Record transform type and sufficient data to invert

•  Bounded by transform performance of router

Digest Packet Data C Type

28 bits 4 bits 32 bits

Page 25: CPS 590.5 Computer Security Lecture 10: IP Traceback

Prototype Implementation

•  Implemented in PC-based routers – Both FreeBSD and Linux implementations

•  Packet digesting on kernel forwarding path

– Zero-copy kernel/user digest tables •  Digest tables and TLT stored in kernel space

•  User-level query-support daemons – Supports automatic topology discovery – Queries automatically triggered by IDS

Page 26: CPS 590.5 Computer Security Lecture 10: IP Traceback

SPIEDER Approach

Router

DGA

Each router has an internal Data Generation Agent (DGA)

SPIE DGA Encompassing Router (SPIEDER)

Page 27: CPS 590.5 Computer Security Lecture 10: IP Traceback

Summary

•  Hash-based traceback is viable – With reasonable memory constraints – Supports common packet transforms – Timely tracing of individual packets

•  Publicly available implementations – FreeBSD/Linux versions available now – SPIEDER-based solution in development

http://www.ir.bbn.com/projects/SPIE