diff --git a/docker/cyberchef/Dockerfile b/docker/cyberchef/Dockerfile new file mode 100644 index 00000000..22f794d4 --- /dev/null +++ b/docker/cyberchef/Dockerfile @@ -0,0 +1,36 @@ +FROM alpine + +# Get and install dependencies & packages +RUN apk -U --no-cache add \ + curl \ + git \ + npm \ + nodejs && \ + npm install -g grunt-cli && \ + npm install -g http-server && \ + npm install npm@latest -g && \ + +# Install CyberChef + cd /root && \ + git clone https://github.com/gchq/cyberchef -b v7.11.1 --depth=1 && \ + chown -R nobody:nobody cyberchef && \ + cd cyberchef && \ + npm install && \ + grunt prod && \ + mkdir -p /opt/cyberchef && \ + mv build/prod/* /opt/cyberchef && \ + cd / && \ + +# Clean up + apk del --purge git \ + npm && \ + rm -rf /root/* && \ + rm -rf /var/cache/apk/* + +# Healthcheck +HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:8000' + +# Set user, workdir and start spiderfoot +USER nobody:nobody +WORKDIR /opt/cyberchef +CMD ["http-server", "-p", "8000"] diff --git a/docker/cyberchef/docker-compose.yml b/docker/cyberchef/docker-compose.yml new file mode 100644 index 00000000..f131e389 --- /dev/null +++ b/docker/cyberchef/docker-compose.yml @@ -0,0 +1,18 @@ +version: '2.3' + +networks: + cyberchef_local: + +services: + +# Cyberchef service + cyberchef: + build: . + container_name: cyberchef + restart: always + networks: + - cyberchef_local + ports: + - "127.0.0.1:64299:8000" + image: "dtagdevsec/cyberchef:1804" + read_only: true diff --git a/docker/nginx/dist/conf/tpotweb.conf b/docker/nginx/dist/conf/tpotweb.conf index b9f3cc68..380a4a46 100644 --- a/docker/nginx/dist/conf/tpotweb.conf +++ b/docker/nginx/dist/conf/tpotweb.conf @@ -106,6 +106,12 @@ server { rewrite /myhead/(.*)$ /$1 break; } + ### CyberChef + location /cyberchef { + proxy_pass http://127.0.0.1:64299; + rewrite ^/cyberchef(.*)$ /$1 break; + } + ### spiderfoot location /spiderfoot { proxy_pass http://127.0.0.1:64303; diff --git a/docker/nginx/dist/html/navbar.html b/docker/nginx/dist/html/navbar.html index 0069a138..6064415b 100644 --- a/docker/nginx/dist/html/navbar.html +++ b/docker/nginx/dist/html/navbar.html @@ -13,6 +13,7 @@ + CyberChef ES Head Kibana Spiderfoot