# Socket.IO Pickle Deserialization Vulnerability Demo # Docker Compose configuration for complete testing environment services: # Redis server (message broker - NOT vulnerable) redis: image: redis:7-alpine container_name: redis ports: - "6379:6379" command: redis-server --save 60 1 --loglevel warning healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 networks: - socketio-demo # Vulnerable Socket.IO server socketio_server: build: context: . dockerfile: Dockerfile.socketio_server container_name: socketio_server ports: - "5000:5000" environment: - REDIS_HOST=redis - REDIS_PORT=6379 - SOCKETIO_PORT=5000 - PYTHONUNBUFFERED=1 depends_on: redis: condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5000/health"] interval: 10s timeout: 5s retries: 3 volumes: # Mount evidence directory to see exploitation results - ./evidence:/tmp/evidence networks: - socketio-demo # Attacker container (for exploitation) edge_server: build: context: . dockerfile: Dockerfile.edge_server container_name: edge_server environment: - REDIS_HOST=redis - REDIS_PORT=6379 ports: - "6000:6000" depends_on: socketio_server: condition: service_healthy networks: - socketio-demo attacker: image: python:3.11-slim container_name: attacker depends_on: edge_server: condition: service_started working_dir: /opt/ volumes: - ./poc.py:/opt/poc.py networks: - socketio-demo # install requests package entrypoint: ["sh", "-c", "pip install requests && python poc.py"] # start the attacher shell command: ["tail", "-f", "/dev/null"] networks: socketio-demo: driver: bridge volumes: evidence: driver: local