From 8426c6eda35d5b7aa36cd17a75cf8cce791b5088 Mon Sep 17 00:00:00 2001 From: Wes Lambert Date: Tue, 28 Jul 2020 03:17:35 +0000 Subject: [PATCH] Update .env, config generate action, and pull MSI --- .env | 4 +++- Dockerfile | 1 + docker-compose.yaml | 2 ++ entrypoint | 6 +++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 501b70d..fdb1c78 100644 --- a/.env +++ b/.env @@ -1,3 +1,5 @@ VELOX_USER=admin -VELOX_PASSWORD=admin +VELOX_PASSWORD=testpass VELOX_ROLE=administrator +VELOX_SERVER_URL=https://VelociraptorServer:8000/ +VELOX_FRONTEND_HOSTNAME=VelociraptorServer diff --git a/Dockerfile b/Dockerfile index c06243a..c6ffdf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN chmod +x entrypoint && \ wget -O /opt/velociraptor/linux/velociraptor https://github.com/Velocidex/velociraptor/releases/download/v$VERSION/velociraptor-v$VERSION-linux-amd64 && \ wget -O /opt/velociraptor/mac/velociraptor_client https://github.com/Velocidex/velociraptor/releases/download/v$VERSION/velociraptor-v$VERSION-darwin-amd64 && \ wget -O /opt/velociraptor/windows/velociraptor_client.exe https://github.com/Velocidex/velociraptor/releases/download/v$VERSION/velociraptor-v$VERSION-windows-amd64.exe && \ + wget -O /opt/velociraptor/windows/velociraptor_client.msi https://github.com/Velocidex/velociraptor/releases/download/v$VERSION/velociraptor-v$VERSION-windows-amd64.msi && \ # Clean up apt-get remove -y --purge wget && \ apt-get clean diff --git a/docker-compose.yaml b/docker-compose.yaml index 05bd1fc..a1e2d5c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,6 +12,8 @@ services: - VELOX_USER=${VELOX_USER} - VELOX_PASSWORD=${VELOX_PASSWORD} - VELOX_ROLE=${VELOX_ROLE} + - VELOX_SERVER_URL=${VELOX_SERVER_URL} + - VELOX_FRONTEND_HOSTNAME=${VELOX_FRONTEND_HOSTNAME} ports: - "8000:8000" - "8001:8001" diff --git a/entrypoint b/entrypoint index e24af07..1fd089f 100755 --- a/entrypoint +++ b/entrypoint @@ -13,12 +13,12 @@ CLIENT_DIR="/velociraptor/clients" cp /opt/velociraptor/linux/velociraptor . && chmod +x velociraptor mkdir -p $CLIENT_DIR/linux && cp /opt/velociraptor/linux/velociraptor /velociraptor/clients/linux/velociraptor_client mkdir -p $CLIENT_DIR/mac && mv /opt/velociraptor/mac/velociraptor_client /velociraptor/clients/mac/velociraptor_client -mkdir -p $CLIENT_DIR/windows && mv /opt/velociraptor/windows/velociraptor_client.exe /velociraptor/clients/windows/velociraptor_client.exe +mkdir -p $CLIENT_DIR/windows && mv /opt/velociraptor/windows/velociraptor_client* /velociraptor/clients/windows/ # If no existing server config, set it up if [ ! -f server.config.yaml ]; then - ./velociraptor config generate > server.config.yaml --merge '{"Frontend":{"public_path":"'$PUBLIC_PATH'"},"API":{"bind_address":"'$BIND_ADDRESS'"},"GUI":{"bind_address":"'$BIND_ADDRESS'"},"Monitoring":{"bind_address":"'$BIND_ADDRESS'"},"Logging":{"output_directory":"'$LOG_DIR'","separate_logs_per_component":true},"Client":{"server_urls":["'$SERVER_URL'"],"use_self_signed_ssl":true}, "Datastore":{"location":"'$DATASTORE_LOCATION'", "filestore_directory":"'$FILESTORE_DIRECTORY'"}}' - sed -i "s#https://localhost:8000/#$SERVER_URL#" server.config.yaml + ./velociraptor config generate > server.config.yaml --merge '{"Frontend":{"public_path":"'$PUBLIC_PATH'", "hostname":"'$VELOX_FRONTEND_HOSTNAME'"},"API":{"bind_address":"'$BIND_ADDRESS'"},"GUI":{"bind_address":"'$BIND_ADDRESS'"},"Monitoring":{"bind_address":"'$BIND_ADDRESS'"},"Logging":{"output_directory":"'$LOG_DIR'","separate_logs_per_component":true},"Client":{"server_urls":["'$VELOX_SERVER_URL'"],"use_self_signed_ssl":true}, "Datastore":{"location":"'$DATASTORE_LOCATION'", "filestore_directory":"'$FILESTORE_DIRECTORY'"}}' + #sed -i "s#https://localhost:8000/#$VELOX_CLIENT_URL#" server.config.yaml sed -i 's#/tmp/velociraptor#.#'g server.config.yaml ./velociraptor --config server.config.yaml user add $VELOX_USER $VELOX_PASSWORD --role $VELOX_ROLE fi