mitre-attack / attack-arsenal

A collection of red team and adversary emulation resources developed and released by MITRE.
Apache License 2.0
485 stars 79 forks source link

APT 29 Installation steps for CALDERA DIY #28

Closed leonardogavaudan closed 9 months ago

leonardogavaudan commented 3 years ago

Hi,

I was trying to follow the installation steps given to reproduce the APT 29 attack. I'm currently on a MacOS BigSur version 11.2.1 and running a zsh shell, although that shouldn't be a problem given that the script interpreters use /bin/bash Go version: go version go1.16.2 darwin/amd64 Python version: Python 3.7.7

Once I've moved to the caldera folder, and run sudo ./install.sh

SCRIPT=$(readlink -f "$0") fails and gives out this error:

readlink: illegal option -- f usage: readlink [-n] [file ...]

CALDERA_DIR=$(dirname "$SCRIPT")

Therefore the CALDERA_DIR is wrongly configured, causing a chain of errors later on.

For now, I'm hardcoding changing the correct directory path in install.sh, as well as changing the python interpreter path for the doc building.

The full script output is:

bash-3.2$ sudo ./install.sh readlink: illegal option -- f usage: readlink [-n] [file ...] [-] Installing on OS X... [-] Checking for Homebrew /usr/local/bin/brew [+] Homebrew already installed [-] Checking for GO /usr/local/bin/go [+] GO already installed [-] Checking for MinGW /usr/local/bin/x86_64-w64-mingw32-gcc [+] MinGW already installed [-] Checking for Python /Users/.../.pyenv/shims/python3 [+] Python already installed [-] Generating Random Values cat: /proc/sys/kernel/random/uuid: No such file or directory cat: /proc/sys/kernel/random/uuid: No such file or directory [x] caldera random api_key FAILED to install cat: /proc/sys/kernel/random/uuid: No such file or directory cat: /proc/sys/kernel/random/uuid: No such file or directory [x] caldera random cryps_salt FAILED to install [+] Random Values added to default.yml [-] Installing on GO dependencies [+] GO github installed [+] GO oath2 installed [-] Setting up Python venv WARNING: You are using pip version 19.2.3, however version 21.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. [+] Python virtualenv installed [+] Caldera python venv installed ERROR: Could not open requirements file: [Errno 2] No such file or directory: './requirements.txt' [x] Caldera python requirements FAILED to install 1 [-] Building documentation zsh:1: no such file or directory: ./calderaenv/bin/sphinx-build [x] sphinx documentation FAILED to install [x] Caldera installer FAILED to install critical components [x] See install_log.txt for details

And the logs in install_log.txt are as such:

CALDERA install log [+] Homebrew already installed [+] GO already installed [+] MinGW already installed [+] Python already installed [x] caldera random api_key FAILED to install

Hope this helps! Thanks in advance for your help and time. Please let me know if you need anything else.

Leonardo