with dynamic information flow analysis
play

with Dynamic Information Flow Analysis Mona Attariyan Jason Flinn - PowerPoint PPT Presentation

Automating Configuration Troubleshooting with Dynamic Information Flow Analysis Mona Attariyan Jason Flinn University of Michigan Configuration Troubleshooting Is Difficult Software systems Users make mistakes difficult to configure Mona


  1. Automating Configuration Troubleshooting with Dynamic Information Flow Analysis Mona Attariyan Jason Flinn University of Michigan

  2. Configuration Troubleshooting Is Difficult Software systems Users make mistakes difficult to configure Mona Attariyan - University of Michigan 2

  3. Configuration Troubleshooting Is Difficult Software systems Users make mistakes difficult to configure Misconfigurations happen Mona Attariyan - University of Michigan 3

  4. Configuration Troubleshooting Is Difficult Mona Attariyan - University of Michigan 4

  5. What To Do With Misconfiguration? Ask colleagues config file …… Search manual, FAQ, …… &$%#! online forums ….. ….. Look at the code if available Mona Attariyan - University of Michigan 5

  6. What To Do With Misconfiguration? A tool that automatically finds the root cause of the misconfiguration in applications? Mona Attariyan - University of Michigan 6

  7. ConfAid Insight Application code has enough information to lead us to the root cause How? Dynamic information flow analysis on application binaries Mona Attariyan - University of Michigan 7

  8. How to Use ConfAid? config file Application …… …… …… error Mona Attariyan - University of Michigan 8

  9. How to Use ConfAid? ConfAid config file Application …… …… …… error Mona Attariyan - University of Michigan 9

  10. How to Use ConfAid? ConfAid config file Application …… …… …… error Mona Attariyan - University of Michigan 10

  11. How to Use ConfAid? ConfAid config file Application …… …… …… likely root causes 1)… 2)… error 3)… …… Mona Attariyan - University of Michigan 11

  12. Outline • Motivation • How ConfAid runs • Information flow analysis algorithms • Embracing imprecise analysis • Evaluation • Conclusion Mona Attariyan - University of Michigan 12

  13. How Developers Find Root Cause Application Config file file = open(config file) ExecCGI token = read_token(file) if (token equals “ ExecCGI ”) execute_cgi = 1 … if (execute_cgi == 1) ERROR() Mona Attariyan - University of Michigan 13

  14. How Developers Find Root Cause Application Config file file = open(config file) ExecCGI token = read_token(file) if (token equals “ ExecCGI ”) execute_cgi = 1 … if (execute_cgi == 1) ERROR() Mona Attariyan - University of Michigan 14

  15. How ConfAid Finds Root Cause • ConfAid uses taint tracking Config file file = open(config file) ExecCGI token = read_token(file) if (token equals “ ExecCGI ”) execute_cgi = 1 … if (execute_cgi == 1) ERROR() Mona Attariyan - University of Michigan 15

  16. How ConfAid Finds Root Cause • ConfAid uses taint tracking Config file file = open(config file) ExecCGI token = read_token(file) if (token equals “ ExecCGI ”) execute_cgi = 1 … if (execute_cgi == 1) ERROR() Mona Attariyan - University of Michigan 16

  17. How to Avoid Error? if (a) if (b) if (c) 17

  18. How to Avoid Error? if (a) if (b) if (c) 18

  19. How to Avoid Error? if (a) This path ends before the error happens if (b) if (c) 19

  20. How to Avoid Error? if (a) This path ends before the error happens if (b) This path leads to some other error if (c) 20

  21. How to Avoid Error? if (a) This path ends before the error happens if (b) This path leads to some other error if (c) This path successfully avoids the error 21

  22. How to Avoid Error? if (a) This path ends before the error happens if (b) This path leads to some other error likely root if (c) cause This path successfully avoids the error 22

  23. How to Avoid Error? if (a) This path ends before the error happens if (b) This path leads to some other error likely root if (c) cause This path successfully avoids the error 23

  24. Outline • Motivation • How ConfAid runs • Information flow analysis algorithms • Embracing imprecise analysis • Evaluation • Conclusion Mona Attariyan - University of Michigan 24

  25. Data Flow Analysis value of x might change, T x = { , } if tokens or change Taint propagates via data flow and control flow x = y + z , T y = { , } T x = { , , } T z = { , } T y  T z Mona Attariyan - University of Michigan 25

  26. Control Flow Analysis T c = { } T a = { } /* c = 0 */ T x = { } /* x is read from file*/ if (c == 0) { , ,( T x = { ) } Ʌ x = a } What could cause Data flow Control flow x to be different ? Mona Attariyan - University of Michigan 26

  27. Alternate Path Exploration /* c = 1*/ /* y is read from file*/ if(c) if (c) { /*taken path*/ … } else { y = a } y depends on c Mona Attariyan - University of Michigan 27

  28. Alternate Path Exploration /* c = 1*/ /* y is read from file*/ if(c) if (c) { /*taken path*/ … } else { y = a } y depends on c Mona Attariyan - University of Michigan 28

  29. Alternate Path Exploration /* c = 1*/ /* y is read from file*/ ckpt if(c) if(!c) if (c) { /*taken path*/ … } else { y = a } y depends on c Mona Attariyan - University of Michigan 29

  30. Alternate Path Exploration /* c = 1*/ /* y is read from file*/ ckpt if(c) if(!c) if (c) { /*taken path*/ y = a … } else { y = a } y depends on c Mona Attariyan - University of Michigan 30

  31. Alternate Path Exploration /* c = 1*/ /* y is read from file*/ ckpt if(c) if(!c) if (c) { /*taken path*/ … } else { y = a } y depends on c Mona Attariyan - University of Michigan 31

  32. Alternate Path Exploration /* c = 1*/ /* y is read from file*/ if(c) if (c) { /*taken path*/ … } else { y = a } y depends on c Mona Attariyan - University of Michigan 32

  33. Alternate Path Exploration /* c = 1*/ /* y is read from file*/ if(c) if (c) { /*taken path*/ … } else { y = a } y depends on c Mona Attariyan - University of Michigan 33

  34. Effect of Alternate Path Exploration /* c = 1*/ T c = { } T a = { } /* y is from file*/ T y = { } if (c) { … , ,( T y = { ) } Ʌ } else { y = a Alternate path Alternate path } + Data flow exploration What could cause y to be different? Mona Attariyan - University of Michigan 34

  35. Outline • Motivation • How ConfAid runs • Information flow analysis algorithms • Embracing imprecise analysis • Evaluation • Conclusion Mona Attariyan - University of Michigan 35

  36. Embracing Imprecise Analysis • Complete and sound analysis leads to: – poor performance – high false positive rate Bounded horizon heuristic • To improve performance Single mistake heuristic • To reduce false positives Weighting heuristic Mona Attariyan - University of Michigan 36

  37. Bounded Horizon Heuristic • Bounded horizon prevents path explosion • Alternate path runs a fixed # of instructions if (b) likely root max reached, if (c) causes abort exploration 37

  38. Single Mistake Heuristic • Configuration file contains a single mistake • Reduces amount of taint and # of explored paths /* x=1, c=0*/ T x = { } T x = { , , ( Ʌ )} T c = { } if (c == 0) { x = a T a = { } } Mona Attariyan - University of Michigan 38

  39. Single Mistake Heuristic • Configuration file contains a single mistake • Reduces amount of taint and # of explored paths /* x=1, c=0*/ T x = { } T x = { , , ( Ʌ )} T c = { } if (c == 0) { x = a T a = { } } Mona Attariyan - University of Michigan 39

  40. Weighting Heuristic • Insufficient to treat all taint propagations equally – Data flow introduces stronger dependency than ctrl flow – Branches closer to error stronger than farther branches • Assign weights to taints to represent strength level – Data flow taint gets a higher weight than ctrl flow taint – Branches closer to error get higher weight than farther Mona Attariyan - University of Michigan 40

  41. Example of Weighting Heuristic if (x) { … if (y) { … likely root if (z) { causes ERROR() } } } Mona Attariyan - University of Michigan 41

  42. Heuristics: Pros and Cons Bounded Single mistake Weighting horizon Simplify control  flow analysis Improve   performance Reduce FP   Increase FP Increase FN FP = False Positive, FN = False Negative 42

  43. ConfAid and Multi-process Apps • ConfAid propagates taints between processes – Intercepts IPC system calls – Sends taint along with the data • ConfAid currently supports communication via: – Unix sockets, pipes, TCP and UDP sockets – Regular files Mona Attariyan - University of Michigan 43

  44. Outline • Motivation • How ConfAid runs • Information flow analysis algorithms • Embracing imprecise analys is • Evaluation • Conclusion Mona Attariyan - University of Michigan 44

  45. Evaluation • ConfAid debugs misconfiguration in: – OpenSSH 5.1 (2 processes) – Apache HTTP server 2.2.14 (1 process) – Postfix mail transfer agent 2.7 (up to 6 processes) • Manually inject errors to configuration files • Evaluation metrics: – The ranking of the correct root cause – The time to execute the application with ConfAid Mona Attariyan - University of Michigan 45

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend