diy patch management
play

DIY Patch Management F L O R I A N J U N G E ( @ S H A N T YC O D - PowerPoint PPT Presentation

DIY Patch Management F L O R I A N J U N G E ( @ S H A N T YC O D E ) I N G O B E N T E ( @ I N G O B E N T E ) B S I D E S M U N I C H 2 0 1 8 Patching Isnt that solved? Nope, its not. R E M E M B E R T H O S E R A N S O M


  1. DIY Patch Management F L O R I A N J U N G E ( @ S H A N T YC O D E ) I N G O B E N T E ( @ I N G O B E N T E ) B S I D E S M U N I C H 2 0 1 8

  2. Patching 
 Isn’t that solved?

  3. Nope, it’s not. R E M E M B E R T H O S E R A N S O M WA R E N E W S I N 2 0 1 7 ?

  4. https://en.wikipedia.org/wiki/WannaCry_ransomware_attack 4 SINNERSCHRADER BSides Munich | DIY Patch Management | 2018

  5. Example WannaCry • WannaCry hit the world on May 12 2017 • It spread via a vulnerability called EternalBlue • EternalBlue was fixed by Microsoft on March 14 2017 SINNERSCHRADER

  6. Example WannaCry • WannaCry hit the world on May 12 2017 • It spread via a vulnerability called EternalBlue • EternalBlue was fixed by Microsoft on March 14 2017 SINNERSCHRADER

  7. 2 months between patch and outbreak I . E . YO U CA N WO R RY L E S S A B O U T 0 DAYS : )

  8. Patching is hard AT L E AST I N M A N Y R E A L WO R L D S C E N A R I O S.

  9. But why? I M E A N I T WO R KS O N O U R FA M I LY M E M B E R S C O M P U T E R S, TO O.

  10. Constraints L E GAC Y : E N D O F L I F E O S T H AT I S N OT PATC H A B L E .

  11. Constraints AVA I L A B I L I T Y : H OW TO R E B O OT T H AT H Y P E RV I S O R C L U ST E R ?

  12. Constraints M O N E Y : I T WO R KS W I T H O U T T H E PATC H , D O E S N ’ T I T ?

  13. So what now? L E T ’ S TA K E A G L I M P S E I N TO O U R WO R L D.

  14. SinnerSchrader Ecosystem

  15. In a world where … • N tenants • M tech stacks • N x M requirements SINNERSCHRADER

  16. In a world where … • Heterogenous infrastructure • OS-wise mostly Debian and Ubuntu • Packed into VMs and Containers • Yes, there is also some serverless stuff :) SINNERSCHRADER

  17. In a world where … Inconsistent patch management N E V E R , S O M E T I M E S, R E G U L A R LY.

  18. In a world where … Commercial scanners? N O B U D G E T. W E A R E N OT T H AT E N T E R P R I SY.

  19. Lessons learned … so far • Installation is easy • Patching is hard • Knowing when to patch is even harder SINNERSCHRADER

  20. Not cool S O W E WA N T E D TO C H A N G E T H AT.

  21. Solution - the easy part • Manually scan for all the CVEs • Automate CVE scans (i.e. daily) • Gather all the logs SINNERSCHRADER

  22. Solution - the tricky part • Dashboard everything • Get metrics that CXOs can understand • Take action (i.e. patch) and check the metrics • Lean back … for now SINNERSCHRADER

  23. Building blocks

  24. • CVE scanner to audit VMs • Integration to config management • Central logging and dashboarding SINNERSCHRADER

  25. Spot the vuln - the audit • Vulnerability databases • Vulnerability scanner • Vulnerability subscriptions • Freemium pricing model • Nice people :) SINNERSCHRADER

  26. Spot the vuln - the audit • nmap plugin • Burp plugin • getsploit • API SINNERSCHRADER

  27. Spot the vuln - CVE scanner • Get installed packages • Audit each for CVEs • Get CVSS scores SINNERSCHRADER

  28. Demo V U L N E R S. C O M A P I

  29. Orchestration via config management • Do it! • Our solution: SaltStack • Codify your update strategy https://docs.saltstack.com/en/getstarted/overview.html SINNERSCHRADER

  30. Orchestration • Define systems with formula • Minion matching • Template engine https://docs.saltstack.com/en/getstarted/overview.html SINNERSCHRADER

  31. Three patch management flavours • Unattended upgrades • Orchestrated updates • Patch Day https://en.wikipedia.org/wiki/Neapolitan_ice_cream SINNERSCHRADER

  32. Centralized Logging • E lasticsearch • L ogstash • K ibana figure based on https://www.elastic.co/guide/en/logstash/current/introduction.html SINNERSCHRADER

  33. SINNERSCHRADER

  34. Demo K I B A N A . S Z O P S. D E

  35. The big picture 35 SINNERSCHRADER BSides Munich | DIY Patch Management | 2018

  36. The big picture 36 SINNERSCHRADER BSides Munich | DIY Patch Management | 2018

  37. The big picture 37 SINNERSCHRADER BSides Munich | DIY Patch Management | 2018

  38. Limitations

  39. There are some limitations A K A ST U F F T H AT C O M P L I A N C E FO L KS L I K E LY WO N ’ T F I N D, B U T T H AT YO U K N OW I S T H E R E …

  40. Tales from the kernel • Notice version encoded in package name • This confuses vulners (no CVEs) • As well as unattended upgrades (yep, no upgrades) SINNERSCHRADER

  41. Tales from the kernel - the fix • Install the meta package linux-image-generic SINNERSCHRADER

  42. Reboot hassle • Running old kernel although newer one is installed 42 SINNERSCHRADER BSides Munich | DIY Patch Management | 2018

  43. Reboot hassle - the fix • Monitor uptime of your servers ;-) • The two metrics that matter for host security by Diogo Monica 43 SINNERSCHRADER BSides Munich | DIY Patch Management | 2018

  44. Next steps

  45. Next steps • Fix some quirks ;-) • Container checks with Claire • AWS integration • nsp check SINNERSCHRADER

  46. Alternatives • OpenVAS / vuls • https://github.com/0x4D31/salt-scanner • Your-typical-Enterprise-Distribution-Mgmt-here • Reverse uptime & Golden image freshness SINNERSCHRADER

  47. Kudos • Kirill Ermakov from Vulners.com(@isox_xx) • Christoph Trautwein (@trautw) & the S2 ops crew SINNERSCHRADER

  48. Thanks!

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