Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Real World Security: Software Supply Chain

Twistlock
October 25, 2017

Real World Security: Software Supply Chain

Twistlock and Docker's presentation from Dockercon EU 2017

Twistlock

October 25, 2017
Tweet

More Decks by Twistlock

Other Decks in Technology

Transcript

  1. Agenda •What is: § a supply chain? § the threat

    model? § the real world problem? •Best Practices
  2. Attacks on the Software Supply Chain 2011 2015 2016 2017

    WinNTi League of Legends infected with PlugX ShadowPad PetyaWrap Juniper Networks finds unauthorized code in their products Operation WilySupply Kingslayer Handbrake contains Proton RAT Transmission infected again with OSX/Keydnap Transmission infected with KeRanger CCleaner contains trojan 2009 ExpressLane
  3. Entrypoints - Upstream code - Stackoverflow - ??? - Build-time

    dependencies - Base Images - API - API - Docker
  4. Attacks on the Software Supply Chain 2011 2015 2016 2017

    WinNTi League of Legends infected with PlugX ShadowPad PetyaWrap Juniper Networks finds unauthorized code in their products Operation WilySupply Kingslayer Handbrake contains Proton RAT Transmission infected again with OSX/Keydnap Transmission infected with KeRanger CCleaner contains trojan 2009 ExpressLane
  5. Targets WinNTi League of Legends infected with PlugX ShadowPad PetyaWrap

    Juniper Networks finds unauthorized code in their products Operation WilySupply Kingslayer Handbrake contains Proton RAT Transmission infected again with OSX/Keydnap Transmission infected with KeRanger CCleaner contains trojan Developers Distribution Center
  6. Memories from the past - 3 years to patch -

    28,000 instances hacked AFTER patch released!!! Redis MongoDB
  7. Memories from the past - 390,000 routers hacked - Time

    to patch: Mirai Botnet Redis MongoDB
  8. Research Motivation •Most people didn’t change default settings •Popularity and

    adoption rate is huge § Easily execute apps (e.g. docker run registry)
  9. Research Motivation •Trojanizing docker images – Daniel Garcia & Roberto

    Munoz @RootedCon How can it be utilized? What else can be gained?
  10. The Possibilities •Downloading all of your hosted docker images •Uploading

    malicious images •Modifying existing images •Uploading arbitrary files
  11. Research Methodology •Identify how docker services are responding •Use Shodan.io

    •Utilize registry API to confirm auth status: •Profit Docker-Distribution-Api-Version: HTTP GET request to /v2/: if HTTP status == 200: print “R/W access”
  12. Research Methodology •Identify how docker services are responding •Use Shodan.io

    •Utilize registry API to confirm auth status: •Profit More profit: scan with zmap for common registry ports, repeat the API procedures on the results Docker-Distribution-Api-Version: HTTP GET request to /v2/: if HTTP status == 200: print “R/W access”
  13. Research Findings •Over 1000 exposed registries found § R/W access

    to 60% of the found registries § Read access to a further 30% § Only 10% securely configured § 45% of those found owned by big companies we didn’t even scan the whole internet!
  14. HazAuth – a tool to aid HazAuth is a tool

    that was developed in order to find authentication problems in a containerized environments (and more) •Modular Pluggable design •Written in Python •Can be deployed as a container •Will come with 3 plugins: mongoDB, Redis, and Docker Registry
  15. Changing the defaults •Official Registry Image: § HTTP Basic Auth

    by default •OSS Registry Code: § Auto-generate htpasswd file with strong random password
  16. TLS

  17. Docker Content Trust $> docker trust –help Usage: docker trust

    COMMAND Manage trust on Docker images (experimental) Options: --help Print usage Commands: revoke Remove trust for an image sign Sign an image view Display detailed information about keys and signatures Run 'docker trust COMMAND --help' for more information on a command.
  18. Traditional Package Signing TUF Arbitrary Installation Endless Data Extraneous Dependencies

    Fast Forward Indefinite Freeze Malicious Mirror Mix-and-Match Rollback Slow Retrieval Key Compromise Wrong Installation