160 likes | 318 Views
Taint 2.0 (taint analysis on steroids). Dr. Yinnon Haviv IBM, Watchfire yinnonh@il.ibm.com. 10.9.2009. BB. WB. Web Application Security Scanners. Taint Analysis. Many injection issues: SQLi, XSS, LogForging, PathTraversal, Remote code execution … Information leakage issues.
E N D
Taint 2.0(taint analysis on steroids) Dr. Yinnon Haviv IBM, Watchfire yinnonh@il.ibm.com 10.9.2009
BB WB Web Application Security Scanners
Taint Analysis Many injection issues: SQLi, XSS, LogForging, PathTraversal, Remote code execution … Information leakage issues Sources: Sanitizers: Sinks:
What users want Run tool Get accurateresults
String Analysis solves thisby “understanding” whatsanitizers do, withoutconfiguration What users often get… Top complaints from users of static analysis tools: #1: Lots of false positives #2: Configuration of sanitizers is time consuming Run tool Get accurateresults Get lots offalse positives Defineuser-definedsanitizers
input .* output [^;’]* String Analysis Technology • The next generation of static analyzer technology • Detects range of possible values a string can get at point of use
String Analysis can do MORE ! Validation methods Inline validation Inline Sanitization
Summary of Customer Value • User defined sanitizers? • Validation methods? • Inline sanitization / validation? • The bottom line • Greater accuracy out-of-the-box • Less configuration • More reliable results • Easier to use Automatically detected / validated Automatically detected Detected in place No need for refactoring
What if your custom sanitizer is incomplete? • You wrote your own XSS sanitizer, but you forgot to handle certain characters • You THINK it works correctly, so you tell your analyzer that this is your sanitizer • Your analyzer trusts you and does not report an issue • But in fact, you do have a serious vulnerability! • With String Analysis, the analyzer doesn’t “trust you”;it is smart enough to understand on its own whether or not the sanitizer is doing everything it should be doing Do you trust this code ???
ch == ‘<‘ ch == ‘>‘ ch == ‘”‘ ch != ‘<‘ && ch != ‘>‘ && ch != ‘”‘ – Public knowledge Under the Hood • Tracking conditions • Describing invariants on variables values • RegExp (JSA) • CFG (Minamide)
The Challenges - An example from WebGoat A well designed sanitizer : Do you trust this code ???
userName = <%00script>alert(1)</%00script> clean = <script>alert(1)</script> The Future - Exploit generation • Generating an exploit “proves” vulnerability exists …%43&alert(1)%23… …%43&alert(1)%23… Incorrect Sanitizer <script>alert(1)</script>
Summary - Advantages of String Analysis • World’s smartest static analyzer • No need to define what the sanitizers are • Understands inline sanitization • Understands validators • Can verify your sanitizers really do what they’re supposed to • What this means for you • Greater accuracy out-of-the-box • Less configuration • More reliable results • Easier to use IBM Tokyo Research Lab
Q&A ? !