How to Test an IDS? GENESIDS: An Automated System for Generating - - PowerPoint PPT Presentation
How to Test an IDS? GENESIDS: An Automated System for Generating - - PowerPoint PPT Presentation
How to Test an IDS? GENESIDS: An Automated System for Generating Attack Traffjc WTMC 2018 Felix Erlacher , Falko Dressler Network Intrusion Detection Systems (NIDS) Analyze network traffjc for malicous activity Felix Erlacher: How to Test an
Network Intrusion Detection Systems (NIDS)
Analyze network traffjc for malicous activity
▶ Anomaly based NIDS
▶ Have a model of ’normal’ traffjc ▶ Detect and alert deviations from ’normal’ traffjc
▶ Signature based NIDS
▶ Have rule-set of known attacks and incidents ▶ Detect rule patterns in analyzed network traffjc
→ Example: Snort
Felix Erlacher: How to Test an IDS? GENESIDS 2
How to test a NIDS?
▶ Real traffjc?
▶ hard to get ▶ public traces: old, no payload ▶ contains only very few attacks
Manually creating attack traffjc?
time intensive cumbersome
SUMMARY: traces do not contain enough unique attacks
Felix Erlacher: How to Test an IDS? GENESIDS 3
How to test a NIDS?
▶ Real traffjc?
▶ hard to get ▶ public traces: old, no payload ▶ contains only very few attacks
▶ Manually creating attack traffjc?
▶ time intensive ▶ cumbersome
SUMMARY: traces do not contain enough unique attacks
Felix Erlacher: How to Test an IDS? GENESIDS 3
How to test a NIDS?
▶ Real traffjc?
▶ hard to get ▶ public traces: old, no payload ▶ contains only very few attacks
▶ Manually creating attack traffjc?
▶ time intensive ▶ cumbersome
SUMMARY: traces do not contain enough unique attacks
Felix Erlacher: How to Test an IDS? GENESIDS 3
How to test a NIDS! GENESIDS:
Generating Events for Signature-based Intrusion Detection Systems
▶ INPUT: Set of attack descriptions
▶ Snort syntax ▶ HTTP attacks
▶ OUTPUT: Stateful network traffjc containing attack patterns
▶ One fmow per attack ▶ Annotated with an attack ID Felix Erlacher: How to Test an IDS? GENESIDS 4
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Rule example:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;) genesids -f example.rule -s example.com
Felix Erlacher: How to Test an IDS? GENESIDS 5
Example traffjc in Wireshark:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;)
Felix Erlacher: How to Test an IDS? GENESIDS 6
Example traffjc in Wireshark:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;)
Felix Erlacher: How to Test an IDS? GENESIDS 6
Example traffjc in Wireshark:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;)
Felix Erlacher: How to Test an IDS? GENESIDS 6
Example traffjc in Wireshark:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;)
Felix Erlacher: How to Test an IDS? GENESIDS 6
Example traffjc in Wireshark:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST"; http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;)
Felix Erlacher: How to Test an IDS? GENESIDS 6
Example traffjc in Wireshark:
alert tcp any any -> any any ( msg:"This is an example rule"; content:"POST";http_method; uricontent:"|2F|evil.jpg"; pcre:"/AttackBody-V[0-9].*/P"; sid:1234567; rev:0;)
Felix Erlacher: How to Test an IDS? GENESIDS 6
GENESIDS Evaluation: Goals & Rules
▶ Ability to generate a variety of difgerent attacks ▶ Generated attacks trigger expected event
All supported Snort rules from: Snort.org subscriber rule-set Snort.org community rule-set Emerging Threats rule-set TOTAL 8101 difgerent rules
Felix Erlacher: How to Test an IDS? GENESIDS 7
GENESIDS Evaluation: Goals & Rules
▶ Ability to generate a variety of difgerent attacks ▶ Generated attacks trigger expected event
All supported Snort rules from:
▶ Snort.org subscriber rule-set ▶ Snort.org community rule-set ▶ Emerging Threats rule-set
TOTAL 8101 difgerent rules
Felix Erlacher: How to Test an IDS? GENESIDS 7
GENESIDS Evaluation steps
Signatures
GENESIDS TCP Connection
Signatures
HTTP Server tcpdump Step 1
Rules
00101100101 01001010010 00001110111 11100110100 10111010010 01010111111Network Trace Felix Erlacher: How to Test an IDS? GENESIDS 8
GENESIDS Evaluation steps
Rules Signatures
Snort
00101100101 01001010010 00001110111 11100110100 10111010010 01010111111Network Trace Alerts
Step 2 GENESIDS TCP Connection HTTP Server tcpdump Step 1
Rules
00101100101 01001010010 00001110111 11100110100 10111010010 01010111111Network Trace Felix Erlacher: How to Test an IDS? GENESIDS 8
Evaluation results: Generated attacks
20 40 60 80 100 2000 4000 6000 8000 10000 Experiment Run Attacks Attacks Sent
▶ GENESIDS: 8101 attacks generated (out of 8101 rules)
Felix Erlacher: How to Test an IDS? GENESIDS 9
Evaluation results: True positives
20 40 60 80 100 2000 4000 6000 8000 10000 Experiment Run Attacks Attacks Sent Snort True Pos. Alerts
▶ Snort: 7877 (avg) true positive alerts triggered (out of 8101)
Felix Erlacher: How to Test an IDS? GENESIDS 10
Evaluation results: False positives
20 40 60 80 100 100 200 500 1000 2000 5000 10000 Experiment Run Attacks Attacks Sent Snort True Pos. Alerts Snort False Pos. Alerts
▶ Snort: 2847 (avg) false positive alerts triggered (62%
triggered by 3 rules)
Felix Erlacher: How to Test an IDS? GENESIDS 11
Evaluation results: False negatives
20 40 60 80 100 100 200 500 1000 2000 5000 10000 Experiment Run Attacks Attacks Sent Snort True Pos. Alerts Snort False Pos. Alerts Snort False Negatives
▶ Snort: 223 (avg) false negatives (generated attacks that did
not trigger the corresponding alert)
▶ Total of 363 rules generated attack not triggering at least
- nce (out of 100)
Felix Erlacher: How to Test an IDS? GENESIDS 12
Conclusion
GENESIDS: Generating attack traffjc for NIDS testing
▶ Accepting Snort syntax → thousands of up-to-date attack
defjnitions
▶ 97% of generated attacks triggered corresponding alert ▶ Less than 3% failed to trigger corresponding alert
Felix Erlacher: How to Test an IDS? GENESIDS 13
Software, confjguration fjles, attack network traces: www.ccs-labs.org/~erlacher/resources/
Reminder: GENESIDS Demo → Wednesday 14:10
Thank you for your attention
Felix Erlacher: How to Test an IDS? GENESIDS 14
Software, confjguration fjles, attack network traces: www.ccs-labs.org/~erlacher/resources/
Reminder: GENESIDS Demo → Wednesday 14:10
Thank you for your attention
Felix Erlacher: How to Test an IDS? GENESIDS 14
Mixed traffjc with GENESIDS and TRex
Felix Erlacher: How to Test an IDS? GENESIDS 15
False negatives: Closer look
363 difgerent rules not triggering corresponding event over 100 runs
- 1. Rules never triggering alert (179)
▶ Some require non-compliant HTTP (e.g. multiple \r\n\r\n) ▶ Restricting strings with ^ and $ ▶ …
- 2. Rules failing to trigger at least once (in 100 runs) (184)
▶ all of the rules contain a PCRE with random generation (.)
random generation produced unsupported character
▶ … Felix Erlacher: How to Test an IDS? GENESIDS 16
TLS interception proxy
End-to-end cryptograpic service: Interception Proxy:
01001 001100
libpcap format
Felix Erlacher: How to Test an IDS? GENESIDS 17
Typical monitoring scenario
01001 001100
Internet
Felix Erlacher: How to Test an IDS? GENESIDS 18
GENESIDS
Signatures
GENESIDS TCP Connection
HTTP Request HTTP Response Signatures
HTTP Server
Rules
Loop through rules:
- 1. parse rule
- 2. generate patterns for HTTP request
- 3. init TCP connection
- 4. send HTTP request
- 5. wait for response
- 6. end TCP connection
repeat
Felix Erlacher: How to Test an IDS? GENESIDS 19