From d6e397871f1125c00c2b66c7192731c93ccb501c Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 10 Nov 2021 12:06:45 +0200 Subject: [PATCH] Deploy: remove sambacry binary download step from linux and windows deployment scripts --- deployment_scripts/config | 3 --- deployment_scripts/config.ps1 | 5 ----- deployment_scripts/deploy_linux.sh | 11 ----------- deployment_scripts/deploy_windows.ps1 | 15 --------------- 4 files changed, 34 deletions(-) diff --git a/deployment_scripts/config b/deployment_scripts/config index 74c13145e..9ef065ce9 100644 --- a/deployment_scripts/config +++ b/deployment_scripts/config @@ -37,8 +37,5 @@ export WINDOWS_32_BINARY_URL="https://github.com/guardicore/monkey/releases/down export WINDOWS_64_BINARY_NAME="monkey-windows-64.exe" export WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-windows-64.exe" -export SAMBACRY_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner64.so" -export SAMBACRY_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner32.so" - # Swimm export SWIMM_URL=https://github.com/swimmio/SwimmReleases/releases/download/v0.4.4-0/Swimm_0.4.4-0_Setup.deb diff --git a/deployment_scripts/config.ps1 b/deployment_scripts/config.ps1 index 66de5fb7e..1808d922f 100644 --- a/deployment_scripts/config.ps1 +++ b/deployment_scripts/config.ps1 @@ -20,16 +20,11 @@ $WINDOWS_32_BINARY_URL = $MONKEY_DOWNLOAD_URL + "monkey-windows-32.exe" $WINDOWS_32_BINARY_PATH = "monkey-windows-32.exe" $WINDOWS_64_BINARY_URL = $MONKEY_DOWNLOAD_URL + "monkey-windows-64.exe" $WINDOWS_64_BINARY_PATH = "monkey-windows-64.exe" -$SAMBA_32_BINARY_URL = $MONKEY_DOWNLOAD_URL + "sc_monkey_runner32.so" -$SAMBA_32_BINARY_NAME = "sc_monkey_runner32.so" -$SAMBA_64_BINARY_URL = $MONKEY_DOWNLOAD_URL + "sc_monkey_runner64.so" -$SAMBA_64_BINARY_NAME = "sc_monkey_runner64.so" # Other directories and paths ( most likely you dont need to configure) $MONKEY_ISLAND_DIR = Join-Path "\monkey" -ChildPath "monkey_island" $MONKEY_DIR = Join-Path "\monkey" -ChildPath "infection_monkey" $SCOUTSUITE_DIR = Join-Path "\monkey" "common" "cloud" "scoutsuite" -$SAMBA_BINARIES_DIR = Join-Path -Path $MONKEY_DIR -ChildPath "\bin" $TEMP_PYTHON_INSTALLER = ".\python.exe" $TEMP_MONGODB_ZIP = ".\mongodb.zip" $TEMP_OPEN_SSL_ZIP = ".\openssl.zip" diff --git a/deployment_scripts/deploy_linux.sh b/deployment_scripts/deploy_linux.sh index 39dab4432..1826c4ffc 100755 --- a/deployment_scripts/deploy_linux.sh +++ b/deployment_scripts/deploy_linux.sh @@ -217,17 +217,6 @@ popd || handle_error # Making dir for binaries mkdir "${MONKEY_BIN_DIR}" -# Download sambacry binaries -log_message "Downloading sambacry binaries" -# shellcheck disable=SC2086 -if exists wget; then - wget -c -N -P "${MONKEY_BIN_DIR}" ${SAMBACRY_64_BINARY_URL} - wget -c -N -P "${MONKEY_BIN_DIR}" ${SAMBACRY_32_BINARY_URL} -else - curl -o ${MONKEY_BIN_DIR}/sc_monkey_runner64.so ${SAMBACRY_64_BINARY_URL} - curl -o ${MONKEY_BIN_DIR}/sc_monkey_runner32.so ${SAMBACRY_32_BINARY_URL} -fi - # Download Swimm log_message "Downloading swimm" if exists wget; then diff --git a/deployment_scripts/deploy_windows.ps1 b/deployment_scripts/deploy_windows.ps1 index 9ce8480cb..876e4724b 100644 --- a/deployment_scripts/deploy_windows.ps1 +++ b/deployment_scripts/deploy_windows.ps1 @@ -263,21 +263,6 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName, Remove-Item $TEMP_UPX_ZIP } - # Download sambacry binaries - $samba_path = Join-Path -Path $monkey_home -ChildPath $SAMBA_BINARIES_DIR - $samba32_path = Join-Path -Path $samba_path -ChildPath $SAMBA_32_BINARY_NAME - if (!(Test-Path -Path $samba32_path)) - { - "Downloading sambacry 32 binary" - $webClient.DownloadFile($SAMBA_32_BINARY_URL, $samba32_path) - } - $samba64_path = Join-Path -Path $samba_path -ChildPath $SAMBA_64_BINARY_NAME - if (!(Test-Path -Path $samba64_path)) - { - "Downloading sambacry 64 binary" - $webClient.DownloadFile($SAMBA_64_BINARY_URL, $samba64_path) - } - # Get Swimm "Downloading Swimm..." $swimm_filename = Join-Path -Path $HOME -ChildPath "swimm.exe"