Agent: Remove traceroute binaries
The traceroute binaries are no longer used. They inflate the size of the agent binaries and add unnecessary dependencies.
This commit is contained in:
parent
1f519ad1ee
commit
db8ea45197
|
@ -10,6 +10,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Internet access check on agent start. #1402
|
- Internet access check on agent start. #1402
|
||||||
- The "internal.monkey.internet_services" configuration option that enabled
|
- The "internal.monkey.internet_services" configuration option that enabled
|
||||||
internet access checks. #1402
|
internet access checks. #1402
|
||||||
|
- Disused traceroute binaries. #1397
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Misaligned buttons and input fields on exploiter and network configuration
|
- Misaligned buttons and input fields on exploiter and network configuration
|
||||||
|
|
|
@ -37,10 +37,6 @@ 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_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 WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-windows-64.exe"
|
||||||
|
|
||||||
# Other binaries for monkey
|
|
||||||
export TRACEROUTE_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/traceroute64"
|
|
||||||
export TRACEROUTE_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/traceroute32"
|
|
||||||
|
|
||||||
export SAMBACRY_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner64.so"
|
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"
|
export SAMBACRY_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner32.so"
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@ $SAMBA_32_BINARY_URL = $MONKEY_DOWNLOAD_URL + "sc_monkey_runner32.so"
|
||||||
$SAMBA_32_BINARY_NAME = "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_URL = $MONKEY_DOWNLOAD_URL + "sc_monkey_runner64.so"
|
||||||
$SAMBA_64_BINARY_NAME = "sc_monkey_runner64.so"
|
$SAMBA_64_BINARY_NAME = "sc_monkey_runner64.so"
|
||||||
$TRACEROUTE_64_BINARY_URL = $MONKEY_DOWNLOAD_URL + "traceroute64"
|
|
||||||
$TRACEROUTE_32_BINARY_URL = $MONKEY_DOWNLOAD_URL + "traceroute32"
|
|
||||||
|
|
||||||
# Other directories and paths ( most likely you dont need to configure)
|
# Other directories and paths ( most likely you dont need to configure)
|
||||||
$MONKEY_ISLAND_DIR = Join-Path "\monkey" -ChildPath "monkey_island"
|
$MONKEY_ISLAND_DIR = Join-Path "\monkey" -ChildPath "monkey_island"
|
||||||
|
|
|
@ -227,16 +227,6 @@ else
|
||||||
curl -o ${MONKEY_BIN_DIR}/sc_monkey_runner64.so ${SAMBACRY_64_BINARY_URL}
|
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}
|
curl -o ${MONKEY_BIN_DIR}/sc_monkey_runner32.so ${SAMBACRY_32_BINARY_URL}
|
||||||
fi
|
fi
|
||||||
# Download traceroute binaries
|
|
||||||
log_message "Downloading traceroute binaries"
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
if exists wget; then
|
|
||||||
wget -c -N -P "${MONKEY_BIN_DIR}" ${TRACEROUTE_64_BINARY_URL}
|
|
||||||
wget -c -N -P "${MONKEY_BIN_DIR}" ${TRACEROUTE_32_BINARY_URL}
|
|
||||||
else
|
|
||||||
curl -o ${MONKEY_BIN_DIR}/traceroute64 ${TRACEROUTE_64_BINARY_URL}
|
|
||||||
curl -o ${MONKEY_BIN_DIR}/traceroute32 ${TRACEROUTE_32_BINARY_URL}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download Swimm
|
# Download Swimm
|
||||||
log_message "Downloading swimm"
|
log_message "Downloading swimm"
|
||||||
|
|
|
@ -67,15 +67,7 @@ def process_datas(orig_datas):
|
||||||
|
|
||||||
|
|
||||||
def get_binaries():
|
def get_binaries():
|
||||||
binaries = [] if is_windows() else get_linux_only_binaries()
|
return get_sc_binaries()
|
||||||
binaries += get_sc_binaries()
|
|
||||||
return binaries
|
|
||||||
|
|
||||||
|
|
||||||
def get_linux_only_binaries():
|
|
||||||
binaries = []
|
|
||||||
binaries += get_traceroute_binaries()
|
|
||||||
return binaries
|
|
||||||
|
|
||||||
|
|
||||||
def get_hidden_imports():
|
def get_hidden_imports():
|
||||||
|
@ -89,11 +81,6 @@ def get_sc_binaries():
|
||||||
return [(x, get_bin_file_path(x), 'BINARY') for x in ['sc_monkey_runner32.so', 'sc_monkey_runner64.so']]
|
return [(x, get_bin_file_path(x), 'BINARY') for x in ['sc_monkey_runner32.so', 'sc_monkey_runner64.so']]
|
||||||
|
|
||||||
|
|
||||||
def get_traceroute_binaries():
|
|
||||||
traceroute_name = 'traceroute32' if is_32_bit() else 'traceroute64'
|
|
||||||
return [(traceroute_name, get_bin_file_path(traceroute_name), 'BINARY')]
|
|
||||||
|
|
||||||
|
|
||||||
def get_monkey_filename():
|
def get_monkey_filename():
|
||||||
name = 'monkey-'
|
name = 'monkey-'
|
||||||
if is_windows():
|
if is_windows():
|
||||||
|
|
|
@ -7,7 +7,6 @@ The monkey is composed of three separate parts.
|
||||||
|
|
||||||
- The Infection Monkey itself - PyInstaller compressed python archives
|
- The Infection Monkey itself - PyInstaller compressed python archives
|
||||||
- Sambacry binaries - Two linux binaries, 32/64 bit.
|
- Sambacry binaries - Two linux binaries, 32/64 bit.
|
||||||
- Traceroute binaries - Two linux binaries, 32/64bit.
|
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
|
@ -57,11 +56,7 @@ Tested on Ubuntu 16.04.
|
||||||
- Build/Download according to sections at the end of this readme.
|
- Build/Download according to sections at the end of this readme.
|
||||||
- Place the binaries under [code location]/infection_monkey/bin, under the names 'sc_monkey_runner32.so', 'sc_monkey_runner64.so'
|
- Place the binaries under [code location]/infection_monkey/bin, under the names 'sc_monkey_runner32.so', 'sc_monkey_runner64.so'
|
||||||
|
|
||||||
4. Build Traceroute binaries
|
4. To build, run in terminal:
|
||||||
- Build/Download according to sections at the end of this readme.
|
|
||||||
- Place the binaries under [code location]/infection_monkey/bin, under the names 'traceroute32', 'traceroute64'
|
|
||||||
|
|
||||||
5. To build, run in terminal:
|
|
||||||
- `cd [code location]/infection_monkey`
|
- `cd [code location]/infection_monkey`
|
||||||
- `chmod +x build_linux.sh`
|
- `chmod +x build_linux.sh`
|
||||||
- `pipenv run ./build_linux.sh`
|
- `pipenv run ./build_linux.sh`
|
||||||
|
@ -83,21 +78,6 @@ Sambacry requires two standalone binaries to execute remotely.
|
||||||
- 32bit: <https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner32.so>
|
- 32bit: <https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner32.so>
|
||||||
- 64bit: <https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner64.so>
|
- 64bit: <https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner64.so>
|
||||||
|
|
||||||
### Traceroute
|
|
||||||
|
|
||||||
Traceroute requires two standalone binaries to execute remotely.
|
|
||||||
The monkey carries the standalone binaries since traceroute isn't built in all Linux distributions.
|
|
||||||
You can either build them yourself or download pre-built binaries.
|
|
||||||
|
|
||||||
1. Build traceroute yourself
|
|
||||||
- The sources of traceroute are available here with building instructions: <http://traceroute.sourceforge.net>
|
|
||||||
1. Download our pre-built traceroute binaries
|
|
||||||
- Available here:
|
|
||||||
- 32bit: <https://github.com/guardicore/monkey/releases/download/1.6/traceroute32>
|
|
||||||
- 64bit: <https://github.com/guardicore/monkey/releases/download/1.6/traceroute64>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
Some of the possible errors that may come up while trying to build the infection monkey:
|
Some of the possible errors that may come up while trying to build the infection monkey:
|
||||||
|
|
Loading…
Reference in New Issue