Towards High Performance Network Defense: Zhichun Li EECS Department Northwestern University
Towards High Performance Network Defense: Zhichun Li EECS Department Northwestern University
Towards High Performance Network Defense: Zhichun Li EECS Department Northwestern University
Defense
Zhichun Li
EECS Department
Northwestern University
Motivation
Attackers
Botnets
Challenges
Scalable to high speed networks with a
large number of users
Highly accurate
Adapt fast to the emerging threats
Have good attack coverage
Packet
streams
(I) Sketch
based monitoring
& detection
Scalability
Accuracy &
adapt fast
Accuracy &
adapt fast
0 1
h1(k)
K-1
hj(k)
hH(k)
6
Internet
Network
gateway
10111101
11111100
Our network
00010111
10
Current Work
Data center management and
configuration
Internet emergency response
AS topology study [CoNEXT09]
Recovery via IXP [Infocom10]
12
Outline
Motivation
High Speed Matching for Large Rulesets
High Speed Parsing
Evaluation
Research Contributions
13
NetShield Overview
NIDS/NIPS (Network Intrusion
Detection/Prevention System) operation
Signature
DB
Packets
NIDS/NIPS
Security
alerts
Accuracy
Speed
Attack Coverage
14
Pros
Can efficiently match multiple sigs simultaneously,
through DFA
Can describe the syntactic context
15
Cons of Regex
Limited expressive power, cannot describe
semantic context, thus inaccurate
Theoretical prospective
Regex
Protocol Context
Context
Sensitive
grammar
Free
Practical prospective
HTTP chunk encoding
DNS label pointers
Pros
Directly describe
semantic context
Very expressive, can
express the vulnerability
condition exactly
Accurate
Cons
Slow!
Existing approaches all
use sequential matching
Require protocol parsing
17
Motivation of NetShield
18
Motivation
Desired Features for Signature-based
NIDS/NIPS
Accuracy (especially for IPS)
Speed
Cannot capture
vulnerability Coverage: Large ruleset
condition well!
Regular
Expression
Vulnerability
Accuracy
Relative
Poor
Much Better
Speed
Good
??
Memory
OK
??
Coverage
Good
??
Shield
[sigcomm04]
Focus of
this work
19
Solutions
An efficient algorithm which matches multiple
sigs simultaneously
A tailored parsing design for high-speed
20
signature matching
Background
Vulnerability signature basic
Use protocol semantics to express vulnerabilities
Defined on a sequence of PDUs & one predicate for
Blastereach
WormPDU
(WINRPC) Example:
BIND:
Example: ver==1 && method==put && len(buf)>300
Outline
Motivation
High Speed Matching for Large Rulesets
High Speed Parsing
Evaluation
Research Contributions
22
DELETE
POST
Header.php
awstats.pl
fp40reg.dll
name==host; len(value)>300
name==User-Agent; len(value)>544
23
24
Good News
Measurement study on Snort and Cisco ruleset
The real-world rulesets are good: the
matchers are selective.
With our design O(K)
25
Matching Algorithms
Candidate Selection Algorithm
1.Pre-computation decides the rule order and
Integer range checking
matcher order
balanced binary search tree
String Match
exact matching
Trie
2.Decomposition.
each matcher
Regex DFA (XFA)
separately and iteratively combine the
results efficiently
26
Step 1: Pre-Computation
Optimize the matcher order based on buffering
constraint & field arrival order
Rule reorder:
1
Require
Matcher 1
Require
Matcher 1
Require
Matcher 2
Dont care
Matcher 1
Dont care
Matcher 1
&2
27
Si Ai 1
R1
R2
R3
1
2
DELETE
Header.php
awstats.pl
fp40reg.dll
SiPOST
* matcher i+1 *
Si Ai 1
require
In Ai+1 len(value)>300
name==host;
matcher i+1
name==User-Agent; len(value)>544
28
Complexity Analysis
Three HTTP traces:
avg(|Si|)<0.04
Merging complexity
Two WINRPC
Need k-1 merging iterations
traces: avg(|Si|)<1.5
For each iteration
Merge complexity O(n) the worst case, since Si can
have O(n) candidates in the worst case rulesets
For real-world rulesets, # of candidates is a small
constant. Therefore, O(1)
30
Outline
Motivation
High Speed Matching for Large Rulesets.
High Speed Parsing
Evaluation
Research Contribution
31
Outline
Motivation
High Speed Matching for Large Rulesets.
High Speed Parsing
Evaluation
Research Contributions
33
Evaluation Methodology
Fully implemented prototype
12,000 lines of C++ and
3,000 lines of Python
Release at:
www.nshield.org
Deployed at a university DC
with up to 106Mbps
Parsing Results
Trace
TH
DNS
TH
NU
TH
WINRPC WINRPC HTTP
NU
HTTP
DARPA
HTTP
77
879
596
Throughput
(Gbps)
Binpac
Our parser
0.31
3.43
1.41
16.2
1.11
12.9
Speed up ratio
11.2
11.5
11.6
3.6
3.1
3.9
15
15
15
14
14
14
35
Matching Results
8-core 11.0
Trace
TH
NU
TH
WINRPC WINRPC HTTP
NU
HTTP
DARPA
HTTP
879
596
6.6K
55K
2.1K
10.68
14.37
9.23
10.61
0.34
2.63
2.37 0.28
17.63 1.85
1.8
11.3
11.7
Avg # of Candidates
1.16
1.48
27
27
20
Throughput (Gbps)
Sequential
CS Matching
20
8.8
20
36
Throughput (Gbps)
0
1
2
3
Performance
decrease
gracefully
200
400
600
# of rules used
800
Accuracy
Create two polymorphic
WINRPC exploits which
bypass the original Snort
rules but detect
accurately by our
scheme.
For 10-minute clean
HTTP trace, Snort
reported 42 alerts,
NetShield reported 0
alerts. Manually verify
the 42 alerts are false
positives
37
Research Contribution
Make vulnerability signature a practical solution
for NIDS/NIPS
Regular Expression Exists Vul. IDS
NetShield
Accuracy
Poor
Good
Good
Speed
Good
Poor
Good
Memory
Good
??
Good
Coverage
Good
??
Good
38
Future work
Client
Server
Network Security
Data Center Security
Web/WebSecurity
WebPropeht[NSDI10]
WebShield
Q&A
Thanks!
40
Observations
PDU parse tree
Leaf nodes are
numbers or strings
PDU
array
43
Experiences
Working in process
In collaboration with MSR, apply the semantic
rich analysis for cloud Web service profiling.
To understand why slow and how to improve.
Interdisciplinary research
Student mentoring (three undergraduates,
six junior graduates)
44
Future Work
Near term
Web security (browser security, web server security)
Data center security
High speed network intrusion prevention system with
hardware support
Research Contributions
Demonstrate vulnerability signatures can be
applied to NIDS/NIPS, which can significantly
improve the accuracy of current NIDS/NIPS
Propose the candidate selection algorithm for
matching a large number of vulnerability
signatures efficiently
Propose parsing state machine for fast
protocol parsing
Implement the NetShield
46
Results
86.7% of rules can be improved by protocol semantic
vulnerability signatures.
Most of remaining rules (9.9%) are web DHTML and
scripts related which are not suitable for signature
based approach.
On average 4.5 Snort rules are reduced to one
vulnerability signature.
For binary protocol the reduction ratio is much higher
than that of text based ones.
For netbios.rules the ratio is 67.6.
48
Matcher order
Si 1 Si Ai 1 Bi 1
Reduce Si+1 Enlarge Si+1
Merging Overhead |Si| (use hash table to calculate
in Ai+1, O(1))
50
51
Backup Slides
52
Motivation
Network security has been recognized as
the single most important attribute of their
networks, according to survey to 395
senior executives conducted by AT&T
Many new emerging threats make the
situation even worse
53
Si
Si Ai 1
require
matcher i+1
In Ai+1
54
System Framework
Scalability
Accuracy &
Scalability &
Coverage
Accuracy &
adapt fast
Accuracy &
adapt56fast
Overflow!
Protocol message
Vulnerable
buffer
57
Old Slides
58
Conclusions
A novel network-based vulnerability
signature matching engine
Through measurement study on Snort ruleset,
prove the vulnerability signature can improve
most of the signatures in NIDS/IPS.
Proposed parsing state machine for fast
parsing
Propose a candidate selection algorithm for
matching a large number of vulnerability
signature simultaneously
59
Outline
Motivation
Feasibility Study: a measurement approach
Problem Statement
High Speed Parsing
High Speed Matching for massive
vulnerability Signatures.
Evaluation
Conclusions
61
Outline
Motivation
Feasibility Study: a measurement approach
Problem Statement
High Speed Parsing
High Speed Matching for massive
vulnerability Signatures.
Evaluation
Conclusions
62
Outline
Motivation
Feasibility Study: a measurement approach
Problem Statement
High Speed Parsing
High Speed Matching for a large number of
vulnerability Signatures.
Evaluation
Conclusions
63
Outline
Motivation
Feasibility Study: a measurement approach
Problem Statement
High Speed Parsing
High Speed Matching for massive
vulnerability Signatures.
Evaluation
Conclusions
64
10111101
Internet
Traffic
Filtering
X
X
11111100
Our network
00010111
Polymorphism!
Polymorphic attack (worm/botnet)
might not have exact regular
expression based signature
65
What we do?
Build a NIDS/NIPS with much better accuracy
and similar speed comparing with Regular
Expression based approaches
Feasibility: Snort ruleset (6,735 signatures) 86.7%
can be improved by vulnerability signatures.
High speed Parsing: 2.7~12 Gbps
High speed Matching:
Efficient Algorithm for matching massive vulnerability rules
HTTP, 791 vulnerability signatures at ~1Gbps
66
Problem Formulation
Parsing problem formulation
Given a PDU and the protocol specification as
input, output the set of fields which required
by matching.
67
Publications
Zhichun Li, Lanjia Wang, Yan Chen and Zhi (Judy) Fu, Network-based and
Attack-resilient Length Signature Generation for Zero-day Polymorohic Worms,
in the Proc. of IEEE ICNP 2007.
Robert Schweller, Zhichun Li, Yan Chen, Yan Gao, Ashish Gupta, Elliot Parons,
Yin Zhang, Peter Dinda, Ming-Yang Kao, and Gokhan Memik, Reversible
sketches: Enabling monitoring and analysis over high speed data streams, in
the IEEE/ACM Transaction on Networking, Volume 15, Issue 5, Oct, 2007
Zhichun Li, Manan Sanghi, Brian Chavez, Yan Chen and Ming-Yang Kao,
Hamsa: Fast Signature Generation for Zero-day Polymorphic Worms with
Provable Attack Resilience, in Proc. of IEEE Symposium on Security and
Privacy, 2006
Zhichun Li, Yan Chen and Aaron Beach, Towards Scalable and Robust
Distributed Intrusion Alert Fusion with Good Load Balacing, in Proc. of ACM
SIGCOMM LSAD 2006
Yan Gao, Zhichun Li and Yan Chen, A DoS Resilient Flow-level Intrusion
Detection Approach for High-speed Networks, In Proc. Of IEEE ICDCS 2006
Robert Schweller, Zhichun Li, Yan Chen, Yan Gao, Ashish Gupta, Elliot Parons,
Yin Zhang, Peter Dinda, Ming-Yang Kao, and Gokhan Memik, Reverse Hashing
for High-speed Network Monitoring: Algorithms, Evaluations, and Applications,
in the Proc. Of IEEE INFOCOM 2006
68
Current Status
Current Status
Part III: Signature matching engines
Work in progress, will be focus of this talk
Zhichun Li, Gao Xia, Yi Tang, Jian Chen, Ying He, Yan Chen
and Bin Liu, NetShield : Towards High Performance Networkbased Semantic Signature Matching, in submission
Current Status
Part I: Sketch based monitoring & detection
Result in [Infocom06,ToN,ICDCS06]
71
10111101
Internet
Traffic
Filtering
X
X
11111100
Our network
00010111
Polymorphism!
Polymorphic worm might not have
exact exploit based signature
72
Vulnerability Signature
Internet
Vulnerability
signature traffic
filtering
X
X
Our network
X
X
Vulnerability