SlideShare a Scribd company logo
Talking TUF: Securing
Software Distribution
Justin Cappos, Trishank Kuppusamy, Vladimir Diaz,
Santiago Torres, Sebastien Awwad, Lukas Puehringer
New York University
What do these companies have in common?
What do these companies have in common?
They all had a publicly disclosed software update hack!
Repository compromise impact
● SourceForge mirror distributed malware.
● Attackers impersonate Microsoft Windows Update
to spread Flame malware.
● RubyGems compromised with RCE.
● Opera users automatically installed malware
signed by compromised key.
● Node Packaged Modules compromised.
● Attacks on software updaters have massive impact
○ E.g. South Korea faced 765 million dollars in damages.
Commonly used (bad) techniques
● Why not sign all the software on a community repository?
● This way, we know whether or not attackers have tampered with software after a
repository compromise.
● Couldn’t we already use previous systems --- GPG or TLS --- to do this?
The Problem with TLS
● Good
○ easy to set up
○ has nice lock icon users are trained to trust
● Bad
○ Lots of design / impl issues
○ Compromise repository -> game over
The Problem with GPG
● Good
○ Provides signature of software packages with offline
keys (private keys kept off repository) so that
attackers cannot tamper with packages after a
repository compromise.
● Bad
○ have to manually verify public keys
○ trust for anything usually implies trust for everything
○ Furthermore, only 4% of software projects provide
GPG signatures on PyPI, and 0.07% of users
downloaded GPG signatures between March and
April 2014.
● TUF is a secure software update framework.
● Built on ideas discussed with some folks from Tor.
● Plug-and-play (like TLS), but compromise resilient.
● Goal: support a wide array of different configurations
○ Support, don’t judge!
“Survivable Key Compromise in Software Update
Systems” (CCS 2010).
2010-Present: The Update Framework (TUF)
Design Principles
9
Responsibility
Separation
Multi-signature
Trust
Explicit and
Implicit
Revocation
Minimize
Individual Key
and Role Risk
Design Principles
10
Responsibility
Separation
Delegate roles
to divide
responsibilities
Responsibility Separation
11
Content Timeliness
Design Principles
12
Minimize
Individual Key
and Role Risk
Compromise Risk
=
Probability
x
Impact
Minimize Role & Key Risk
13
Root
High-impact role? => Highly-secure keys
Timeliness
Online keys? => Low-impact role
Design Principles
14
Multi-signature
Trust
(t, n)
signature threshold
required for trust
Multi-signature Trust
15
A
B
A
No risk to clients.
Signature threshold:
Two signatures
Design Principles
16
Explicit and
Implicit
Revocation
Explicit and Implicit Revocation
17
A
C
B
Signature threshold:
Two signatures
A
B
B
A
18
Design
19
Root
Targets
(projects) TimestampSnapshot
Malware attack
django-1.7.1.tar.gz
bcrypt-1.1.1.tar.gz
flask-0.10.tar.gz
django
bcrypt
flask
django-1.8.tar.gz
repository (compromised)
user
malware!
Versions of metadata
django-1.7.1.tar.gzdjango
metadata
version
developers packages
● packages
○ django-1.7.1.tar.gz
■ hash: X
● version: 1
Just as there as different
versions of packages...
Versions of metadata
django-1.7.1.tar.gz
django django-1.8.tar.gz
metadata
version
developers packages
● packages
○ django-1.8.tar.gz
■ hash: Y
○ django-1.7.1.tar.gz
■ hash: X
● version: 2
...there are different
versions of metadata
corresponding to
different versions of
packages.
The version number
of a metadata file (e.g.
2) does not
correspond with the
version number of
packages (e.g. 1.7.1).
Replay attack
version
package
django bcrypt flask
4
5
2
version
package
django bcrypt flask
3
2
1
replay!
old & vulnerable!
TUF: eager verification
django-1.7.1.tar.gz
bcrypt-1.1.1.tar.gz
flask-0.10.tar.gz
django
bcrypt
flask
django-1.8.tar.gz
repository
user
developer
metadata
snapshot
administrator
metadata
hash
hash
hash
version
version
version
1
2
3
5
4
User downloads
all package
metadata to
verify snapshot
metadata.
Why? To prevent
replay attacks,
and not blindly
trust
administrators.
TUF: snapshot
● Adds a “snapshot” of all metadata/packages.
version
package
django bcrypt flask
4
5
2
packages not installed,
but metadata downloaded version
package
django bcrypt flask
4
2
1
packages installed,
but with obsolete metadata
replay!
Secure lazy verification
django-1.7.1.tar.gz
bcrypt-1.1.1.tar.gz
flask-0.10.tar.gz
django
bcrypt
flask
django-1.8.tar.gz
repository
user
developer
metadata
snapshot
administrator
metadata
version
version
version
version
version
version
1
2
3
User downloads
only snapshot +
desired package
metadata!
Trust
administrators to
specify accurate
snapshot
metadata.
Version checking
● Compact “snapshot” of all metadata/packages.
version
package
django bcrypt flask
4
5
2
packages not installed,
but version downloaded version
package
django bcrypt flask
4
2
1
packages installed,
but with obsolete metadata
replay!
Is this as secure as hash checking?
● So what security attacks have we given up?
○ Not malware attacks, because package metadata
still signed with offline developer keys.
○ Not replay attacks, because snapshot metadata
cannot specify older version numbers.
Fast-forward attack
version
package
django bcrypt flask
4
5000
2000
packages not installed,
but version downloaded version
package
django bcrypt flask
4
5
2
packages not installed,
due to version mismatch
denied!
Only a mild,
denial-of-service
attack.
Okay, but is it as secure as hash
checking?
Yes!
● FF DoS (~= dropping requests)
○ Address by resetting version numbers after key
revocation.
Example setup for TUF
1. Responsibility separation (roles)
2. Multitrust signatures (a.k.a. two-man rule).
a. some roles like root may need multiple signatures from keys
3. Explicit and implicit revocation of keys.
a. individual roles / keys timeout
4. Minimizing risk (with offline keys).
5. Further selective delegation from targets role.
a. Gives trust without sharing keys, etc.
ε
timestamp
metadata packages
online
keys
offline
keys
signs metadata for
target
package
signs root keys for
delegates packages to
root
snapshot targets
A1
BC
A.pkg
C.gz
signs for packages
A.*B.*,C.*
*.pkg
A2
B.tar
Multi-trust signatures
● Can require multiple signatures for a role
○ Some keys can be lost / compromised and things work
>>> repository = create_new_repository("repository/")
>>> public_root_key = import_rsa_publickey_from_file("keystore/root_key.pub")
>>> repository.root.add_verification_key(public_root_key)
>>> public_root_key2 = import_rsa_publickey_from_file("keystore/root_key2.pub")
>>> repository.root.add_verification_key(public_root_key2)
# Threshold of each role defaults to 1.
>>> repository.root.threshold
1
# Set threshold then need to write / sign the new root file.
>>> repository.root.threshold = 2
>>> repository.root.load_signing_key(private_root_key)
>>> repository.root.load_signing_key(private_root_key2)
>>> repository.writeall()
Target (Project) Delegation in PyPI (PEP 480)
● Lots of good suggestions for changes to TUF
● Formal TUF Augmentation Proposal (TAP) process
○ Discuss ideas, when ‘close’ send TAP
○ We review closely
○ Test implementation
○ Approve
○ (Read TAPs 1 and 2 for details)
https://github.com/theupdateframework/taps/blob/master/tap1.md
Standardization process (TAPs)
● TAP 3 -- multi-role signatures (Evan / Jake)
○ Alice AND Bob must both sign package A
○ Lets one have ‘unequal’ quorums
● TAP 4 -- pinning repository keys (Evan / Jake)
○ The user can control the root of trust for parts of the
namespace
■ Root role compromise !-> game over!
● TAP 5 -- specify URLs in root files
○ Makes it easy to change the repo location
● TAP 6 -- version numbers in root metadata (David)
● TAP ? -- hash chaining of timestamp metadata (???)
○ Coming soon?
https://github.com/theupdateframework/taps/blob/master/tap1.md
Standardization process (TAPs cont...)
Integrations of TUF (some on-going)
Related effort: Uptane (securing
automotive software updates)
Uptane: Securely updating automobiles
Work closely with vendors, OEMs, etc.
● Security reps from 79% of US cars
● Many top suppliers / vendors
Account for deployment concerns
● Solutions are only useful if deployed
● Accommodate existing infrastructure,
business relationships, etc.
Standardize and harden
● Working toward SAE certification
● Professional security audit
● Free / open source, detailed tests /
Uptane: Securely updating automobiles
Current design
Latest downloaded
metadata
Latest downloaded
encrypted image
Boot-
loader
Previous
metadata
ECU
keys
Uptane Timeline
40
● Current tasks:
○ High level spec (complete!)
○ Multi-group security analysis (complete!)
○ Detailed impl specification (RFC-style) (?complete??)
○ Reference implementation (in progress)
○ Compliance test cases (in progress)
○ Deployment recommendations document (in progress)
● Upcoming:
○ Technology demonstration (Oct 18)
○ Public security review
○ SAE Standardization
Future work: healthcare, infrastructure too
Healthcare systems:
● Often antiquated OSes / systems
● Only certified in a specific configurations
● Increasingly targeted
Infrastructure:
● Often antiquated OSes / systems
● Reliability is the focus, not security
○ Remote access needed
Security issues can have catastrophic impact!
Related effort: Toto (securing the
software supply chain)
43
Toto
Toto: Overview
Project owner Functionaries End User
What needs to be done Perform steps, provide
evidence
Verify
Layout
Link
Link
Link
Link
Link
Final
Product
Toto: Overview
Project owner
Defines the steps that are required in this project’s software
supply chain
Layout
● Only Alice and Bob can commit to
this VCS
● The build will be made using the
company’s Gradle buildserver
● The project will be added to a
docker recipe by Carl
● ...
Toto: OverviewFunctionaries
Perform steps and provide evidence as link metadata
Link
Link
Link
● Alice: I committed to the VCS
● Gradle buildserver: I compiled
alice’s commit
● Carl: I pulled and made a docker
image of all of this
Toto: Overview
End user
Verifies the metadata
Link
Link
Link
Link
Link
Final
Product
Layout
Timeline
49
● Currently:
○ High level spec (release coming ~1 week)
○ Reference implementation (“complete” ~1-2 weeks)
● Upcoming:
○ Internal use (~2-3 weeks)
○ Compliance test cases (~3 weeks)
○ External beta testing (~1-2 mo)
○ Broad public release (???)
Wrapping up
Conclusion
51
● Securing software distribution, etc. is hard
● Notary provides strong guarantees for Docker containers
● Use TAPs to get changes into TUF (let’s discuss first)
● Let’s work together!
○ https://github.com/theupdateframework/
○ https://github.com/uptane
○ https://github.com/toto-framework
Thanks!
Questions?
https://theupdateframework.com
https://isis.poly.edu/~jcappos/
jcappos@nyu.edu
My background... (2003-2008)
● Built the first package manager designed specifically for OSVMs (Stork)
○ Deployed on the research infrastructure “PlanetLab”
■ Practical experience: thousands of VM instances over 8 years of use
○ Packages are cached in a special VM and shared
■ Disk, memory, and bandwidth savings
■ Additional security risks [USENIX ATC 2005], [LISA 2007]
2008: Attacks on Linux package managers
● By changing unsigned metadata, we can compromise users.
● No protection against:
○ Arbitrary package attacks
○ Extraneous dependencies
○ Replay attacks
○ Mix-and-match attacks
“A Look in the Mirror: Attacks on Package Managers”
(CCS 2008).
Fixing Linux package managers
● Disclosed these security attacks via CERT (VU#230187).
● Major vendors have adopted our security architecture.
2009: Mission accomplished!
...or is it???
2009: Tor
● Tor: “We heard about your work. Can you help us fix our software
updater?”
● Security is simple, right?
● How hard can this be anyway?
Thandy (Tor)
● The Thandy software updater for
Tor
○ A quorum of keys for root of trust.
○ Signing by different
compartmentalized key types.
○ Use online keys only to prevent freeze
attacks and
bound trust window.
Thandy (Tor)
● The Thandy software updater for
Tor
○ A quorum of keys for root of trust.
○ Signing by different
compartmentalized key types.
○ Use online keys only to prevent freeze
attacks and
bound trust window.
○ ...still not enough.
● Still found 8 security problems.
● Building your own secure software
updater is not trivial.

More Related Content

PDF
Making a Headless Android Device
PDF
Series of Unfortunate Netflix Container Events - QConNYC17
PDF
Introduction to Docker
PDF
SpringOne Tour: Spring Boot 3 and Beyond
PDF
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
PDF
GitOps with Gitkube
PPT
Android™組込み開発基礎コース BeagleBoard編
ODP
An Introduction To Jenkins
Making a Headless Android Device
Series of Unfortunate Netflix Container Events - QConNYC17
Introduction to Docker
SpringOne Tour: Spring Boot 3 and Beyond
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
GitOps with Gitkube
Android™組込み開発基礎コース BeagleBoard編
An Introduction To Jenkins

What's hot (20)

PDF
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)
PPTX
DevOpsって何?
PDF
Argocd up and running
PDF
PDF
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
ODP
Q4.11: Porting Android to new Platforms
PPTX
Docker introduction (1)
PDF
Kubernetes and Prometheus
PPTX
Jenkins CI presentation
PDF
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
PPTX
本当は恐ろしい分散システムの話
PDF
運用が楽になる分散データベース Riak
PPTX
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
PDF
Python과 Git으로 만드는 모바일 게임 패치 시스템
PDF
Linux Systems: Getting started with setting up an Embedded platform
PPTX
Docker introduction
PPTX
golang과 websocket을 활용한 서버프로그래밍 - 장애없는 서버 런칭 도전기
PDF
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
PDF
Docker architecture-04-1
PDF
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtc
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)
DevOpsって何?
Argocd up and running
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Q4.11: Porting Android to new Platforms
Docker introduction (1)
Kubernetes and Prometheus
Jenkins CI presentation
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
本当は恐ろしい分散システムの話
運用が楽になる分散データベース Riak
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Python과 Git으로 만드는 모바일 게임 패치 시스템
Linux Systems: Getting started with setting up an Embedded platform
Docker introduction
golang과 websocket을 활용한 서버프로그래밍 - 장애없는 서버 런칭 도전기
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
Docker architecture-04-1
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtc
Ad

Viewers also liked (20)

PDF
Docker Online Meetup: Infrakit update and Q&A
PPTX
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
PDF
containerd and CRI
PPTX
Prometheus design and philosophy
PPTX
Orchestrating Least Privilege by Diogo Monica
PDF
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
PPTX
Docker Roadshow 2016
PDF
Online Meetup: What's new in docker 1.13.0
PPTX
Docker 101 - Nov 2016
PPTX
Docker Networking: Control plane and Data plane
PDF
Driving containerd operations with gRPC
PDF
'The History of Metrics According to me' by Stephen Day
PDF
Infinit: Modern Storage Platform for Container Environments
PPTX
Containerd - core container runtime component
PPTX
Docker Online Meetup: Announcing Docker CE + EE
PDF
Persistent storage tailored for containers
PDF
containerd summit - Deep Dive into containerd
PDF
Unikernels: the rise of the library hypervisor in MirageOS
PDF
Heart of the SwarmKit: Store, Topology & Object Model
PDF
Cilium - BPF & XDP for containers
Docker Online Meetup: Infrakit update and Q&A
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
containerd and CRI
Prometheus design and philosophy
Orchestrating Least Privilege by Diogo Monica
Using Docker Swarm Mode to Deploy Service Without Loss by Dongluo Chen & Nish...
Docker Roadshow 2016
Online Meetup: What's new in docker 1.13.0
Docker 101 - Nov 2016
Docker Networking: Control plane and Data plane
Driving containerd operations with gRPC
'The History of Metrics According to me' by Stephen Day
Infinit: Modern Storage Platform for Container Environments
Containerd - core container runtime component
Docker Online Meetup: Announcing Docker CE + EE
Persistent storage tailored for containers
containerd summit - Deep Dive into containerd
Unikernels: the rise of the library hypervisor in MirageOS
Heart of the SwarmKit: Store, Topology & Object Model
Cilium - BPF & XDP for containers
Ad

Similar to Talking TUF: Securing Software Distribution (20)

PDF
Securing the Software Supply Chain with TUF and Docker - Justin Cappos and Sa...
PDF
Security in open source projects
PDF
Agile Secure Development
PDF
TEE - kernel support is now upstream. What this means for open source security
PDF
Continuous Security for GitOps
PDF
MobSecCon 2015 - Burning Marshmallows
PPTX
Not my problem - Delegating responsibility to infrastructure
PDF
How to Manage the Risk of your Polyglot Environments
PDF
Remote security with Red Hat Enterprise Linux
PDF
Voxxed Days Villnius 2015 - Burning Marshmallows
PDF
CodeMotion tel aviv 2015 - burning marshmallows
PDF
What to Expect When You're Expecting (to Own Production)
PDF
Deep dive nella supply chain della nostra infrastruttura cloud
PPTX
Total E(A)gression defcon
PDF
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
PPTX
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
PDF
Secure Developer Access at Decisiv
PDF
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
PDF
Continuous Delivery for Python Developers – PyCon Otto
PDF
Api gitlab: configurazione dei progetti as a service
Securing the Software Supply Chain with TUF and Docker - Justin Cappos and Sa...
Security in open source projects
Agile Secure Development
TEE - kernel support is now upstream. What this means for open source security
Continuous Security for GitOps
MobSecCon 2015 - Burning Marshmallows
Not my problem - Delegating responsibility to infrastructure
How to Manage the Risk of your Polyglot Environments
Remote security with Red Hat Enterprise Linux
Voxxed Days Villnius 2015 - Burning Marshmallows
CodeMotion tel aviv 2015 - burning marshmallows
What to Expect When You're Expecting (to Own Production)
Deep dive nella supply chain della nostra infrastruttura cloud
Total E(A)gression defcon
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
Secure Developer Access at Decisiv
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Continuous Delivery for Python Developers – PyCon Otto
Api gitlab: configurazione dei progetti as a service

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
PDF
How to Improve Your Image Builds Using Advance Docker Build
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Securing Your Containerized Applications with NGINX
PDF
How To Build and Run Node Apps with Docker and Compose
PDF
Hands-on Helm
PDF
Distributed Deep Learning with Docker at Salesforce
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
PDF
Monitoring in a Microservices World
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
PDF
Predicting Space Weather with Docker
PDF
Become a Docker Power User With Microsoft Visual Studio Code
PDF
How to Use Mirroring and Caching to Optimize your Container Registry
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
PDF
Kubernetes at Datadog Scale
PDF
Labels, Labels, Labels
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
PDF
Developing with Docker for the Arm Architecture
Containerize Your Game Server for the Best Multiplayer Experience
How to Improve Your Image Builds Using Advance Docker Build
Build & Deploy Multi-Container Applications to AWS
Securing Your Containerized Applications with NGINX
How To Build and Run Node Apps with Docker and Compose
Hands-on Helm
Distributed Deep Learning with Docker at Salesforce
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Monitoring in a Microservices World
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Predicting Space Weather with Docker
Become a Docker Power User With Microsoft Visual Studio Code
How to Use Mirroring and Caching to Optimize your Container Registry
Monolithic to Microservices + Docker = SDLC on Steroids!
Kubernetes at Datadog Scale
Labels, Labels, Labels
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Build & Deploy Multi-Container Applications to AWS
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Developing with Docker for the Arm Architecture

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
cuic standard and advanced reporting.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
A Presentation on Artificial Intelligence
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25 Week I
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Monthly Chronicles - July 2025
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
cuic standard and advanced reporting.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars

Talking TUF: Securing Software Distribution

  • 1. Talking TUF: Securing Software Distribution Justin Cappos, Trishank Kuppusamy, Vladimir Diaz, Santiago Torres, Sebastien Awwad, Lukas Puehringer New York University
  • 2. What do these companies have in common?
  • 3. What do these companies have in common? They all had a publicly disclosed software update hack!
  • 4. Repository compromise impact ● SourceForge mirror distributed malware. ● Attackers impersonate Microsoft Windows Update to spread Flame malware. ● RubyGems compromised with RCE. ● Opera users automatically installed malware signed by compromised key. ● Node Packaged Modules compromised. ● Attacks on software updaters have massive impact ○ E.g. South Korea faced 765 million dollars in damages.
  • 5. Commonly used (bad) techniques ● Why not sign all the software on a community repository? ● This way, we know whether or not attackers have tampered with software after a repository compromise. ● Couldn’t we already use previous systems --- GPG or TLS --- to do this?
  • 6. The Problem with TLS ● Good ○ easy to set up ○ has nice lock icon users are trained to trust ● Bad ○ Lots of design / impl issues ○ Compromise repository -> game over
  • 7. The Problem with GPG ● Good ○ Provides signature of software packages with offline keys (private keys kept off repository) so that attackers cannot tamper with packages after a repository compromise. ● Bad ○ have to manually verify public keys ○ trust for anything usually implies trust for everything ○ Furthermore, only 4% of software projects provide GPG signatures on PyPI, and 0.07% of users downloaded GPG signatures between March and April 2014.
  • 8. ● TUF is a secure software update framework. ● Built on ideas discussed with some folks from Tor. ● Plug-and-play (like TLS), but compromise resilient. ● Goal: support a wide array of different configurations ○ Support, don’t judge! “Survivable Key Compromise in Software Update Systems” (CCS 2010). 2010-Present: The Update Framework (TUF)
  • 12. Design Principles 12 Minimize Individual Key and Role Risk Compromise Risk = Probability x Impact
  • 13. Minimize Role & Key Risk 13 Root High-impact role? => Highly-secure keys Timeliness Online keys? => Low-impact role
  • 15. Multi-signature Trust 15 A B A No risk to clients. Signature threshold: Two signatures
  • 17. Explicit and Implicit Revocation 17 A C B Signature threshold: Two signatures A B B A
  • 21. Versions of metadata django-1.7.1.tar.gzdjango metadata version developers packages ● packages ○ django-1.7.1.tar.gz ■ hash: X ● version: 1 Just as there as different versions of packages...
  • 22. Versions of metadata django-1.7.1.tar.gz django django-1.8.tar.gz metadata version developers packages ● packages ○ django-1.8.tar.gz ■ hash: Y ○ django-1.7.1.tar.gz ■ hash: X ● version: 2 ...there are different versions of metadata corresponding to different versions of packages. The version number of a metadata file (e.g. 2) does not correspond with the version number of packages (e.g. 1.7.1).
  • 23. Replay attack version package django bcrypt flask 4 5 2 version package django bcrypt flask 3 2 1 replay! old & vulnerable!
  • 25. TUF: snapshot ● Adds a “snapshot” of all metadata/packages. version package django bcrypt flask 4 5 2 packages not installed, but metadata downloaded version package django bcrypt flask 4 2 1 packages installed, but with obsolete metadata replay!
  • 27. Version checking ● Compact “snapshot” of all metadata/packages. version package django bcrypt flask 4 5 2 packages not installed, but version downloaded version package django bcrypt flask 4 2 1 packages installed, but with obsolete metadata replay!
  • 28. Is this as secure as hash checking? ● So what security attacks have we given up? ○ Not malware attacks, because package metadata still signed with offline developer keys. ○ Not replay attacks, because snapshot metadata cannot specify older version numbers.
  • 29. Fast-forward attack version package django bcrypt flask 4 5000 2000 packages not installed, but version downloaded version package django bcrypt flask 4 5 2 packages not installed, due to version mismatch denied! Only a mild, denial-of-service attack.
  • 30. Okay, but is it as secure as hash checking? Yes! ● FF DoS (~= dropping requests) ○ Address by resetting version numbers after key revocation.
  • 31. Example setup for TUF 1. Responsibility separation (roles) 2. Multitrust signatures (a.k.a. two-man rule). a. some roles like root may need multiple signatures from keys 3. Explicit and implicit revocation of keys. a. individual roles / keys timeout 4. Minimizing risk (with offline keys). 5. Further selective delegation from targets role. a. Gives trust without sharing keys, etc. ε timestamp metadata packages online keys offline keys signs metadata for target package signs root keys for delegates packages to root snapshot targets A1 BC A.pkg C.gz signs for packages A.*B.*,C.* *.pkg A2 B.tar
  • 32. Multi-trust signatures ● Can require multiple signatures for a role ○ Some keys can be lost / compromised and things work >>> repository = create_new_repository("repository/") >>> public_root_key = import_rsa_publickey_from_file("keystore/root_key.pub") >>> repository.root.add_verification_key(public_root_key) >>> public_root_key2 = import_rsa_publickey_from_file("keystore/root_key2.pub") >>> repository.root.add_verification_key(public_root_key2) # Threshold of each role defaults to 1. >>> repository.root.threshold 1 # Set threshold then need to write / sign the new root file. >>> repository.root.threshold = 2 >>> repository.root.load_signing_key(private_root_key) >>> repository.root.load_signing_key(private_root_key2) >>> repository.writeall()
  • 33. Target (Project) Delegation in PyPI (PEP 480)
  • 34. ● Lots of good suggestions for changes to TUF ● Formal TUF Augmentation Proposal (TAP) process ○ Discuss ideas, when ‘close’ send TAP ○ We review closely ○ Test implementation ○ Approve ○ (Read TAPs 1 and 2 for details) https://github.com/theupdateframework/taps/blob/master/tap1.md Standardization process (TAPs)
  • 35. ● TAP 3 -- multi-role signatures (Evan / Jake) ○ Alice AND Bob must both sign package A ○ Lets one have ‘unequal’ quorums ● TAP 4 -- pinning repository keys (Evan / Jake) ○ The user can control the root of trust for parts of the namespace ■ Root role compromise !-> game over! ● TAP 5 -- specify URLs in root files ○ Makes it easy to change the repo location ● TAP 6 -- version numbers in root metadata (David) ● TAP ? -- hash chaining of timestamp metadata (???) ○ Coming soon? https://github.com/theupdateframework/taps/blob/master/tap1.md Standardization process (TAPs cont...)
  • 36. Integrations of TUF (some on-going)
  • 37. Related effort: Uptane (securing automotive software updates)
  • 38. Uptane: Securely updating automobiles Work closely with vendors, OEMs, etc. ● Security reps from 79% of US cars ● Many top suppliers / vendors Account for deployment concerns ● Solutions are only useful if deployed ● Accommodate existing infrastructure, business relationships, etc. Standardize and harden ● Working toward SAE certification ● Professional security audit ● Free / open source, detailed tests /
  • 39. Uptane: Securely updating automobiles Current design Latest downloaded metadata Latest downloaded encrypted image Boot- loader Previous metadata ECU keys
  • 40. Uptane Timeline 40 ● Current tasks: ○ High level spec (complete!) ○ Multi-group security analysis (complete!) ○ Detailed impl specification (RFC-style) (?complete??) ○ Reference implementation (in progress) ○ Compliance test cases (in progress) ○ Deployment recommendations document (in progress) ● Upcoming: ○ Technology demonstration (Oct 18) ○ Public security review ○ SAE Standardization
  • 41. Future work: healthcare, infrastructure too Healthcare systems: ● Often antiquated OSes / systems ● Only certified in a specific configurations ● Increasingly targeted Infrastructure: ● Often antiquated OSes / systems ● Reliability is the focus, not security ○ Remote access needed Security issues can have catastrophic impact!
  • 42. Related effort: Toto (securing the software supply chain)
  • 43. 43
  • 44. Toto
  • 45. Toto: Overview Project owner Functionaries End User What needs to be done Perform steps, provide evidence Verify Layout Link Link Link Link Link Final Product
  • 46. Toto: Overview Project owner Defines the steps that are required in this project’s software supply chain Layout ● Only Alice and Bob can commit to this VCS ● The build will be made using the company’s Gradle buildserver ● The project will be added to a docker recipe by Carl ● ...
  • 47. Toto: OverviewFunctionaries Perform steps and provide evidence as link metadata Link Link Link ● Alice: I committed to the VCS ● Gradle buildserver: I compiled alice’s commit ● Carl: I pulled and made a docker image of all of this
  • 48. Toto: Overview End user Verifies the metadata Link Link Link Link Link Final Product Layout
  • 49. Timeline 49 ● Currently: ○ High level spec (release coming ~1 week) ○ Reference implementation (“complete” ~1-2 weeks) ● Upcoming: ○ Internal use (~2-3 weeks) ○ Compliance test cases (~3 weeks) ○ External beta testing (~1-2 mo) ○ Broad public release (???)
  • 51. Conclusion 51 ● Securing software distribution, etc. is hard ● Notary provides strong guarantees for Docker containers ● Use TAPs to get changes into TUF (let’s discuss first) ● Let’s work together! ○ https://github.com/theupdateframework/ ○ https://github.com/uptane ○ https://github.com/toto-framework
  • 53. My background... (2003-2008) ● Built the first package manager designed specifically for OSVMs (Stork) ○ Deployed on the research infrastructure “PlanetLab” ■ Practical experience: thousands of VM instances over 8 years of use ○ Packages are cached in a special VM and shared ■ Disk, memory, and bandwidth savings ■ Additional security risks [USENIX ATC 2005], [LISA 2007]
  • 54. 2008: Attacks on Linux package managers ● By changing unsigned metadata, we can compromise users. ● No protection against: ○ Arbitrary package attacks ○ Extraneous dependencies ○ Replay attacks ○ Mix-and-match attacks “A Look in the Mirror: Attacks on Package Managers” (CCS 2008).
  • 55. Fixing Linux package managers ● Disclosed these security attacks via CERT (VU#230187). ● Major vendors have adopted our security architecture.
  • 57. 2009: Tor ● Tor: “We heard about your work. Can you help us fix our software updater?” ● Security is simple, right? ● How hard can this be anyway?
  • 58. Thandy (Tor) ● The Thandy software updater for Tor ○ A quorum of keys for root of trust. ○ Signing by different compartmentalized key types. ○ Use online keys only to prevent freeze attacks and bound trust window.
  • 59. Thandy (Tor) ● The Thandy software updater for Tor ○ A quorum of keys for root of trust. ○ Signing by different compartmentalized key types. ○ Use online keys only to prevent freeze attacks and bound trust window. ○ ...still not enough. ● Still found 8 security problems. ● Building your own secure software updater is not trivial.