no more whack a mole
play

No More Whack-a-Mole: How to Find and Prevent Entire Classes of - PowerPoint PPT Presentation

No More Whack-a-Mole: How to Find and Prevent Entire Classes of Security Vulnerabilities Sam Lanning @samlanning @samlanning A story of many bugs (CVE-2017-8046) 7 September 2017 22 September 2017 27 September 2017 Mo


  1. No More Whack-a-Mole: How to Find and Prevent Entire Classes of Security Vulnerabilities Sam Lanning @samlanning @samlanning

  2. A story of many bugs (CVE-2017-8046) 7 September 2017 22 September 2017 27 September 2017 Mo privately discloses vulnerability Mo checks patch, sees it’s incomplete Mo checks patch, sees it’s still incomplete and exploit in Spring Framework sends updated exploit to Pivotal sends updated exploit to Pivotal 21 September 2017 26 September 2017 25 October 2017 Pivotal publish a patch, and make an Pivotal sends Mo details of Pivotal publishes a complete refactor announcement. second attempt at fix of relevant code to hopefully prevent further occurrences. https://lgtm.com/blog/spring_data_rest_CVE-2017-8046_ql Securing software, together

  3. A story of many bugs 2 27 April 2016 20 June 2016 22 September 2017 S2-032 / CVE-2016-3081 S2-037 / CVE-2016-4438 S2-046 / CVE-2017-5638 RCE in Apache Struts 2 via OGNL RCE in Apache Struts 2 via OGNL RCE in Apache Struts 2 via OGNL Nike Zheng Chao Jack, Shinsaku Nomura Chris Frohoff, Nike Zheng, Alvaro Munoz 12 May 2016 19 March 2017 24 September 2018 S2-033 / CVE-2016-3087 S2-045 / CVE-2017-5638 S2-057 / CVE-2018-11776 RCE in Apache Struts 2 via OGNL RCE in Apache Struts 2 via OGNL RCE in Apache Struts 2 via OGNL Alvaro Munoz Nike Zheng Man Yue Mo See Also: CVE-2012-0394, CVE-2013-1966, CVE-2012-0391, CVE-2013-2115, CVE-2012-0393 Securing software, together

  4. https://www.reddit.com/r/gifs/comments/2nyeb1/arcade_game_for_cats/ Securing software, together

  5. Solution: When a new mistake is discovered, try and find similar mistakes across your code base Securing software, together

  6. Variant Analysis? “After doing this [root cause analysis], our next step is variant analysis : finding and investigating any variants of the vulnerability. It’s important that we find all such variants and patch them simultaneously, otherwise we bear the risk of these being exploited in the wild.” - Steven Hunter, MSRC Vulnerabilities & Mitigations team https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  7. Securing software, together

  8. Code Navigation / IDE Securing software, together

  9. Securing software, together

  10. Automating Variant Analysis Could we describe a mistake in a way that lets us automatically find other instances? Securing software, together

  11. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  12. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  13. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  14. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  15. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  16. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  17. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  18. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  19. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  20. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  21. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  22. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  23. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  24. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  25. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  26. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  27. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  28. An Example: Chakra https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  29. An Example: Chakra *slightly modified query from: https://blogs.technet.microsoft.com/srd/2018/08/16/vulnerability-hunting-with-semmle-ql-part-1/ Securing software, together

  30. Beyond your own code ➔ Make your (general-purpose) mistake descriptions open source! ➔ Use external mistake descriptions! Securing software, together

  31. ZipSlip https://snyk.io/research/zip-slip-vulnerability Securing software, together

  32. ZipSlip ../../../.bashrc ../../../../../../../../../etc/crontab https://snyk.io/research/zip-slip-vulnerability Securing software, together

  33. ZipSlip https://snyk.io/research/zip-slip-vulnerability Securing software, together

  34. ZipSlip https://snyk.io/research/zip-slip-vulnerability Securing software, together

  35. Fituing in to your workflow publish / make use external open-source knowledge Diagnose Monitor Security bug Describe mistake root-cause continuously improve description - Bug Bounty program Discover - Pen testing Discover variants unreleased - Code review variants - Audit deploy Fix - Error logs Fix in code Fix original bug Fix variants review deploy Fix Securing software, together

  36. No vulnerability response process? Securing software, together

  37. What variant analysis is NOT ➔ A replacement for good security architecture, a way to avoid large refactors ➔ A replacement for exploit mitigation ➔ A replacement for other security processes ➔ Something that automatically fixes bugs / vulnerabilities. Securing software, together

  38. Recap ➔ You should do variant analysis ➔ Better yet, you should do automated variant analysis ➔ Use and contribute to the shared knowledge / checks ➔ Checks should be run continuously, not once-off! ➔ VA compliments (not replaces) other security practices Securing software, together

  39. Thank You Sam Lanning semmle.com @samlanning @Semmle @samlanning

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