+ All Categories
Home > Documents > Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Date post: 23-Feb-2016
Category:
Upload: admon
View: 41 times
Download: 0 times
Share this document with a friend
Description:
Multi-Core Packet Scattering to Disentangle Performance Bottlenecks. Yotam Harchol The Hebrew University Joint work with Y. Afek , A. Bremler -Barr, D. Hay and Y. Koral . This work was supported by European Research Council (ERC) Starting Grant - PowerPoint PPT Presentation
Popular Tags:
43
Multi-Core Packet Scattering to Disentangle Performance Bottlenecks Yotam Harchol The Hebrew University Joint work with Y. Afek, A. Bremler-Barr, D. Hay and Y. Koral. This work was supported by European Research Council (ERC) Starting Grant no. 259085, and appeared in HPSR'11 and ANCS’12.
Transcript
Page 1: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Yotam HarcholThe Hebrew University

Joint work with Y. Afek, A. Bremler-Barr, D. Hay and Y. Koral.

This work was supported by European Research Council (ERC) Starting Grant no. 259085, and appeared in HPSR'11 and ANCS’12.

Page 2: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Network Intrusion Detection Systems

Internet

• Very popular middlebox– May be deployed in various places within the network

• Reports or drops malicious packets– How to identify malicious packets?

Page 3: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Deep Packet Inspection (DPI)

• Search for malicious patterns within packets’ payload– Exact string patterns/signatures– Patterns defined as regular expressions– Often combined with information from header fields

• DPI is the heaviest processing component of NIDS– Why not use many machines/cores to speed it up?

1. Pipeline multi-core, not efficient.– Imbalance of pipeline stations, DPI much heavier

2. Parallel multi-core?

Page 4: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Multi-Core Deep Packet Inspection (DPI)

• Option 1: Each core scans for a subset of the pattern-set

Core 1

Core 2

Core 3

Core 4

Pattern Set 1

Pattern Set 2Pattern Set 3

Pattern Set 4

Page 5: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Multi-Core Deep Packet Inspection (DPI)

• Option 2: All cores are the same, Load-balance between cores

Core 1

Core 2

Core 3

Core 4

DPI

DPIDPI

DPI

Page 6: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Complexity DoS Attack Over NIDS

• Regular operation• 2 Steps attack:

Attacker

2. Launch original attack (e.g., steal credit cards)

1. Kill IPS/FW

normal

malicious

heavy

Internet

• Malicious packets aim to hurt the applicationNIDS should be able to deal with them with no degradation in performance

• Heavy packets aim to hurt the NIDSThey will do nothing to the application

Page 7: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Attack on Security Elements

Combined Attack:DDoS on Security Element

exposed the network – theft of customers’

information

Page 8: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Attack on Snort

The most widely deployed IDS/IPS worldwide.

Heavy packets rate

Page 9: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

OUR GOAL:

MCA2: Multi-Core Architecture for Mitigating Complexity Attacks

Page 10: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Airline Desk Example

Page 11: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Airline Desk Example

Boarding pass,

please

Page 12: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

20 min.

Airline Desk Example

An isle seat near window!!

Three carry on

handbags!!!

Free first class

upgrade!!

Can’t find passport!!

Overweight!!!

1 min.

Page 13: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Airline Desk Example

Page 14: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Airline Desk Example

4 min.1 min.

Domain Properties

1. Heavy & Light customers.

2. Easy detection of heavy customers.

3. Moving customers between queues is cheap.

4. Heavy customers have special more efficient processing method.

Special training

packets

packets

packets

packets

Page 15: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Some packets are much “heavier” than others

The Snort-attack experiment

Property 1 in Snort Attack

Page 16: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

•DPI mechanism is a main bottleneck in Snort•Allows single step for each input symbol•Holds transition for each alphabet symbol

Snort uses Aho-Corasick DFA

Fast & Huge

Best for normal trafficExposed to cache-miss attack

Cache

Main Memory

Page 17: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Crafting HEAVY packets

Snort patterns databaseHeavy packets factory

Chop last 2 bytes

Page 18: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Snort-Attack Experiment

Cache

Main Memory

Normal Traffic Attack Scenario

Cache-miss!!!Does not require many packets!!!

Domain Properties

1. Heavy & Light packets.

2. Easy detection of heavy packets

3. Moving packets between queues is cheap.

4. Heavy packets have special more efficient processing method.

Page 19: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Detecting heavy packets is feasible

Property 2 in Snort Attack

Page 20: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

How Do We Detect?

• Common states are detected through training traffic set

threshold

non-common states percentage

Tradeoff: Attack effectiveness vs. false

positive/negative rates

Page 21: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

How Do We Detect?

Common States

NonCommon States

Heavy packet : # Not Common States # Common States ≥ α After at least

20 bytes

Page 22: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Domain Properties

1. Heavy & Light packets.

2. Easy detection of heavy packets

3. Moving packets between queues is cheap.

4. Heavy packets have special more efficient processing method.

Page 23: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

System Architecture

P

roce

ssor

Chi

p

Core #8NI

C Core #1Q

Core #2Q

Q

Q

Q

Detects heavy

packets

Core #9

Core #10

Routine Mode:

Load balance between cores

Page 24: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

System Architecture

P

roce

ssor

Chi

p

Core #8Dedicated Core

#9

NIC Core #1Q

Core #2Q

Q

QB

Dedicated Core #10 B

Q

Detects heavy

packets

Alert Mode:Dedicated cores for heavy packets

Others detect and move heavy to Dedicated.

B

B

Page 25: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Inter-Thread Communication• Non-blocking IN-queues

– Single reader, single writer, lock-free queues

• Dedicated cores in-queues are blocking (using test&set locks)

– Non-dedicated threads “steal” packets from the HoL when sending a heavy packet

P

roce

ssor

Chi

p

Core #8Dedicated Core

#9

NIC Core #1Q

Core #2Q

Q

QB

Dedicated Core #10 B

Q

B

B

Page 26: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Inter-Thread Communication• In queues and Heavy packets queues are lock-free

– no locking mechanisms are used

• Cyclic queue, conflicts are resolved by marking two phases on the queue.

– Changes after the entire queue is written to

• Writer writes to the queue from right to left:– Check whether reader_phase=writer_phase or tail>head; otherwise queue is full– Right_phase writer_phase– Write packet_pointer + offset– Left_phase writer_phase

• Reader reads in the opposite direction:– First reads left_phase bit, then packet, then right_phase bit.– If left_phase != right_phase: record is being written; retry. – If left_phase = right_phase != reader_phase: queue is empty– Otherwise, valid packet is read

Page 27: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Domain Properties

1. Heavy & Light packets.

2. Easy detection of heavy packets

3. Moving packets between queues is cheap.

4. Heavy packets have special more efficient processing method.

Page 28: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Snort uses Aho-Corasick DFA

Huge memory footprintSingle memory access per input symbol

Small memory footprintMultiple memory accesses per input symbol

Page 29: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Full Matrix vs. Compressed

Heavy packets rate

In cache

Not in cache

Always in cacheMultiplememory accessesper symbol

One memory access per symbol

Page 30: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Domain Properties

1. Heavy & Light packets.

2. Easy detection of heavy packets

3. Moving packets between queues is cheap.

4. Heavy packets have special more efficient processing method.

Page 31: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Experimental Results

Page 32: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

System Throughput Over Time

Reaction time can be smaller

Page 33: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Different Algorithms Goodput

BandwidthAttack

ComplexityAttack

Page 34: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Additional Application for MCA2

The Hybrid-FA-attack experiment

Page 35: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Hybrid-FA

• Space-efficient data structure for regular expression matching

• Faster than NFA• Structure:

– Head DFA– Border states– Tail DFAs

• More than one state can be activeat the same time!

s0

s7

s12

s1 s2

s3 s5s4

C

C

E

D

B

E D

s14

s13 s6

D

s8

Bs9

Cs10

As11

B

A

A

.*

[^\n]*

Page 36: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Hybrid-FA Attack

Normal Traffic Attack Scenario

Again: Does not require many packets!!!

s0

s7

s12

s1 s2

s3 s5s4

C

C

E

D

B

E D

s14

s13 s6

D

s8

B

s9

Cs10

As11

B

A

A

.*

[^\n]*

s0

s7

s8

s9

s10

s11

s12

s2

s5

s13

Input: C D B B C AB

Page 37: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Heavy Packet Detection

threshold

Page 38: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

MCA2 With Hybrid-FA

Page 39: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Concluding Remarks

• A multi-core system architecture, which is robust against complexity DoS attacks

• This talk focused on specific NIDS and complexity attack– But also shows other NIDS (e.g., Hybrid-FA)– More issues are dealt in the paper (e.g., dealing

with flows rather than single packets etc.)• We believe this approach can be generalized

(outside the scope of NIDS).

Page 40: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Thank You!!

Page 41: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Extra Slides…

Page 42: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Detection Tradeoff

• Attacker can use "lighter" heavy packets toget below threshold

0%10%

20%30%

40%50%

60%70%

80%90%

100%0.00%

0.01%

0.02%

0.03%

Attack Intensity

False

Pos

itive

Rat

e0%

10%20%

30%40%

50%60%

70%80%

90%100%

0.00%

5.00%

10.00%

15.00%

20.00%

25.00%

30.00%

Attack Instensity

False

Neg

ative

Rat

e

non-common states percentage

Perc

enta

ge o

f pac

kets

"Regular" traffic

Different attack trafficWith growing "heaviness"

Medium Semi-Heavy Heavy VeryHeavy

Page 43: Multi-Core Packet Scattering to Disentangle Performance Bottlenecks

Detection Tradeoff

• The effect of "lighter" packets on throughput

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Very LightLightMediumSemi-HeavyHeavyVery Heavy

Attack Intensity

Thro

ughp

ut [M

bps] -23%

-62%

-66%

-17%

-41%

-44%


Recommended