Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes ephemeral container to extract secret cached by subprocess #1236

Open
bendehaan opened this issue Feb 7, 2024 · 1 comment
Open
Assignees
Labels
New Challenge Adding a new Challenge

Comments

@bendehaan
Copy link
Collaborator

Context

  • What should the challenge scenario be like?
    We're interfacing with a secrets mgmt system to keep our secret safe, but we don't want to make a network call every time we use the secret. We've built an abstraction to handle interfacing with the system, and for performance reasons, we're caching the secret in memory using a spawned subprocess (or in memory). Using an appropriate container with debugging tools (jmap?), we can extract the secret from the subprocess/the heap!

  • What should the participant learn from completing the challenge?
    Being able to exec in prod can harm even relatively safe secrets. Also, be careful with debug modes 🤡

  • For what category would the challenge be? (e.g. Docker, K8s, binary)
    K8s

Did you encounter this in real life? Could you tell us more about the scenario?

I had to attach a debug ephemeral container to a running one, which had multiple debugging tools installed.

If the challenge request is approved, would you be willing to submit a PR?

Yes

@bendehaan bendehaan added the New Challenge Adding a new Challenge label Feb 7, 2024
@commjoen commjoen added this to To do in Kanban board via automation Feb 7, 2024
@commjoen
Copy link
Collaborator

commjoen commented Feb 7, 2024

As agreed: we can start off with a gdb debugable process that generates a random secret and reads it upon next read, whcih you can capture with a debug container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Challenge Adding a new Challenge
Projects
Development

No branches or pull requests

2 participants