Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automatic Generation and Analysis of NIDS Attacks Shai Rubin Somesh Jha Barton P. Miller University of Wisconsin, Madison.

Similar presentations


Presentation on theme: "Automatic Generation and Analysis of NIDS Attacks Shai Rubin Somesh Jha Barton P. Miller University of Wisconsin, Madison."— Presentation transcript:

1 Automatic Generation and Analysis of NIDS Attacks Shai Rubin Somesh Jha Barton P. Miller University of Wisconsin, Madison

2 Rubin, Jha, Miller2 Attacker Network NIDS Signature database Misuse Network Intrusion Detection System (NIDS) GET /cmd.exe

3 Rubin, Jha, Miller3 Attacker Network NIDS Signature database Misuse Network Intrusion Detection System (NIDS) Misuse-NIDS task: detect known attacks GET /cmd.exe

4 Rubin, Jha, Miller4 Attacker Network NIDS Signature database Misuse Network Intrusion Detection System (NIDS) Misuse-NIDS task: detect known attacks The security a NIDS provides primarily depends on its ability to resists attackers’ attempts to evade it GET /%63md.exe GET /cmd.exe

5 Rubin, Jha, Miller5 Current NIDS Evaluation Many researchers (and attackers) have shown how to evade a NIDS –Ptacek and Newsham, 1998 –Handley and Paxson, 2001 –Marty, 2002 –Mutz, Vigna, and Kemmerer, 2003 –Vigna, Robertson, and Balzarotti, 2004 –Rubin, Jha, Miller, 2004 –And others... Observation: NIDS evaluation is not carried out using a well defined threat model based on formal methods.

6 Rubin, Jha, Miller6 Our Goal A formal threat model for NIDS testing Why a formal model? –enables solid reasoning about the system capabilities –facilitates applications beyond testing –successfully used in the past (e.g., protocol verification)

7 Rubin, Jha, Miller7 TCP streams NIDS Task: is it well defined? NIDS Task: Identify the “Sasser” set (threat) NIDS Testing: Compare “Sasser” to “NIDS Sasser” (NIDS behavior) NIDS Sasser Sasser

8 Rubin, Jha, Miller8 TCP streams NIDS Task: is it well defined? NIDS Sasser Sasser NIDS Task: Identify the “Sasser” set (threat) NIDS Testing: Compare “Sasser” to “NIDS Sasser” (NIDS behavior)

9 Rubin, Jha, Miller9 TCP streams NIDS Task: is it well defined? NIDS Sasser Sasser NIDS Task: Identify the “Sasser” set (threat) NIDS Testing: Compare “Sasser” to “NIDS Sasser” (NIDS behavior) NIDS task is not well defined unless the threat is well defined Consequently, NIDS testing is not well defined

10 Rubin, Jha, Miller10 Contributions A formal threat model for NIDS evaluation. –Black hat: generating attack variants (test cases) –White hat: determine if a TCP sequence is an attack –Unifies existing techniques for NIDS testing Practical tool. Used for black and white hat purposes Improving Snort. Found and proposed fixes for 5 vulnerabilities

11 Rubin, Jha, Miller11 The Attacker’s Mind: Transformations CWD CWD <long buffer> Fragmentation Retransmission Out-of-order Substitution Context padding Transformation Transport level Application level CWD <long buffer> CWD <long buffer> MKD CWD /tmp\nCWD

12 Rubin, Jha, Miller12 Composing Transformations CWD \n CWD /tmp\n CWD \n ytes>\n...CWD /tmp\nCWD <4000 Vulnerability: any pattern from the type foo*bar ytes>\n CWD /tmp\n...CWD <4000 Detected Not Detected FTP Attack: CAN-2002-0126Snort Behavior

13 Rubin, Jha, Miller13 Transformations: Summary Transformations are simple Transformations are semantics preserving (sound) Transformations are syntactic manipulations Transformations can be composed Idea: Transformations define the threat Goal: define/find a formal method that enables systematic composition of transformations

14 Rubin, Jha, Miller14 Natural Deduction A set of rules expressing how valid proofs may be constructed. Rules are simple, sound. Rules are syntactic transformations. Rules can be composed to derive theorems. If both P and Q are true, then P  Q is true (conjunction) P,Q P  Q :

15 Rubin, Jha, Miller15 Natural Deduction as a Transformation System Observation: natural deduction is a suitable mechanism to describe attack transformation: if A is an attack instance, then fragmentation of A is also an attack instance Rules derive attacks A set of rules defines an attack derivation model attack ack att :

16 Rubin, Jha, Miller16 Threat: Attack Derivation Model Transformation Rules Representative Instance root A AA closure(Root A,  A ) +

17 Rubin, Jha, Miller17 Main Ideas Formal model for attack derivation Black hat tool for attack generation White hat tool for attack analysis

18 Rubin, Jha, Miller18 AGENT: Attack Generation for NIDS Testing Transformation Rules Representative Instance Closure Generator Snort Detect? Yes, check another Eluding Instance No Attack Simulator Attack Instance Attack Derivation Model

19 Rubin, Jha, Miller19 Testing Methodology Rules for: –Transport level (TCP) –Application level (FTP, finger, HTTP) –Total of nine rules Representative attacks –finger (finger root) –HTTP (perl-in-CGI) –FTP (ftp-cwd) Testing phases –7 phases –2-3 rules each phase

20 Rubin, Jha, Miller20 Testing Results 5 vulnerabilities in less then 2 months –TCP reassembly –Interaction between the TCP reassembly and pattern matching algorithms –HTTP handling Positives results, show that Snort correctly identify all instances of a given type

21 Rubin, Jha, Miller21 AGENT: Practical Consideration Generates finite closure: truncate derivation paths Generates feasible closure: use a small set of rules each time Gap between theoretical threat model and practical tool: a lot of opportunity for future work Transformation Rules Representative Instance Inference Engine Attack Simulator Attack Derivation Model

22 Rubin, Jha, Miller22 Main Ideas Formal model for attack derivation Black hat tool for attack generation White hat tool for attack analysis

23 Rubin, Jha, Miller23 White Hat Capabilities TCP streams s R Provide a proof that a TCP sequence implements A

24 Rubin, Jha, Miller24 Capabilities Beyond Testing TCP streams R Provide a proof that a TCP sequence implements A Backward derivation –Automatic root construction –Found a single root

25 Rubin, Jha, Miller25 Capabilities Beyond Testing TCP streams Provide a proof that a TCP sequence implements A Backward derivation –Automatic root construction –Found a single root –Determine that a given TCP implements A –Determine that a given TCP sequence does not implement A s s R

26 Rubin, Jha, Miller26 Attack Analysis Results TCP streams 20 instances: ~600 transformations, ~1300 bytes, ~650 packets We nullify 10 instances We let AGENT to determine which instance is a real attack Results: 7 secs for real attacks 100 secs for false attack Forward derivation: ~650! steps

27 Rubin, Jha, Miller27 The Lessons to Take Home A well define threat model is necessary for a rigorous NIDS evaluation A formal threat model can be developed for large and complex security systems like NIDS A formal threat model provides solid insight into your NIDS The work is ongoing, you are welcome to join.

28 Back UP


Download ppt "Automatic Generation and Analysis of NIDS Attacks Shai Rubin Somesh Jha Barton P. Miller University of Wisconsin, Madison."

Similar presentations


Ads by Google