monkey/monkey/infection_monkey
Mike Salvatore a53ff7d0d9 Agent: Fix broken logic in get_target_monkey() download optimization 2022-02-28 07:56:31 -05:00
..
credential_collectors Agent: Use Enum for credential_type instead of string (Enum.value) 2022-02-23 08:15:27 -05:00
exploit Agent: Fix broken logic in get_target_monkey() download optimization 2022-02-28 07:56:31 -05:00
i_puppet Agent: Modify IPuppet interface to take VictimHost instead of object 2022-02-23 09:26:04 -05:00
master Agent: Extract network_scanning package from network package 2022-02-23 09:23:42 -05:00
model Agent: Remove architecture setting from web_rce.py 2022-02-24 13:20:20 +05:30
network Agent: Extract network_scanning package from network package 2022-02-23 09:23:42 -05:00
network_scanning Agent: Extract network_scanning package from network package 2022-02-23 09:23:42 -05:00
payload Agent: Use filecmp instead of sha256 hash in ransomware payload 2022-02-20 14:03:42 -05:00
post_breach Agent: Modify process list collection PBA to return dict of processes instead of string 2022-02-16 17:06:17 +05:30
puppet Agent: Add ExploiterWrapper 2022-02-23 16:37:23 -05:00
pyinstaller_hooks Agent: Add pyinstaller hooks for pypsrp 2021-08-25 14:44:31 -04:00
system_info Agent: Add process list collection PBA 2022-02-16 17:02:06 +05:30
telemetry Merge pull request #1727 from guardicore/1605-modify-ssh-exploit 2022-02-23 09:16:11 -05:00
transport Agent: Remove do_POST in HTTPConnectProxyHandler 2022-02-01 16:39:57 +01:00
utils Agent: Remove Windows 32-bit to 64-bit upgrade feature 2022-02-24 10:50:13 -05:00
Pipfile Agent: update pypykatz version to 0.5.2 2022-02-18 10:10:25 +02:00
Pipfile.lock Agent: update pypykatz version to 0.5.2 2022-02-18 10:10:25 +02:00
__init__.py Remove "__author__" lines from the source code 2021-07-28 12:43:28 -04:00
build_linux.sh Added version argument to monkey build scripts 2020-02-09 15:20:34 +02:00
build_windows.bat Added version argument to monkey build scripts 2020-02-09 15:20:34 +02:00
config.py Agent: Remove dropper_target_path_win_32 from config 2022-02-24 18:43:16 +01:00
control.py Agent: Remove started_on_island logic 2021-12-08 21:48:13 +05:30
dropper.py Agent, UT: Remove --vulnerable-port CLI argument 2021-12-07 13:10:04 -05:00
example.conf Agent: Remove dropper_target_path_win_32 from config 2022-02-24 18:43:16 +01:00
i_control_channel.py Agent: Implement should retry task in automated master 2021-12-15 16:57:39 +01:00
i_master.py Agent: Add block parameter to IMaster.terminate() 2021-12-15 10:12:10 -05:00
main.py Agent: use the refactored startup instead of legacy methods (monkey.start() instead of monkey.legacy_start(), etc.) 2021-12-01 17:04:45 +02:00
monkey.ico Move everything under monkey 2018-05-23 16:05:41 +03:00
monkey.py Agent: Remove Windows 32-bit to 64-bit upgrade feature 2022-02-24 10:50:13 -05:00
monkey.spec Agent: Remove references to 32-bit agents in monkey.spec 2022-02-24 09:42:40 -05:00
monkeyfs.py Remove "__author__" lines from the source code 2021-07-28 12:43:28 -04:00
readme.md Agent: Update README to remove mentions of 32-bit binaries 2022-02-25 02:28:53 -05:00
system_singleton.py Agent: Remove option for custom singleton mutex name and add it as a constant 2021-11-16 11:33:42 +05:30
tunnel.py Agent, UT: Implement VictimHostFactory 2021-12-16 14:39:54 -05:00

readme.md

Monkey island dev. env. setup guide

To easily setup development environment for Monkey Island and the Monkey look into deployment scripts folder. If you want to setup dev. env. for the Monkey manually, refer to the instructions below.

The monkey is a PyInstaller compressed python archives.

Windows

  1. Install python 3.7.4 and choose ADD to PATH option when installing.

    Download and install from: https://www.python.org/ftp/python/3.7.4/

    In case you still need to add python directories to path:

    • Run the following command on a cmd console (Replace C:\Python37 with your python directory if it's different) setx /M PATH "%PATH%;C:\Python37;C:\Python37\Scripts
    • Close the console, make sure you execute all commands in a new cmd console from now on.
  2. Install further dependencies

  3. Download the dependent python packages using pip install -r requirements.txt

  4. Download and extract UPX binary to monkey\infection_monkey\bin\upx.exe: https://github.com/upx/upx/releases/download/v3.94/upx394w.zip

  5. To build the final exe:

    • cd monkey\infection_monkey
    • build_windows.bat

    Output is placed under dist\monkey64.exe.

Linux

Tested on Ubuntu 16.04.

  1. On older distributions of Ubuntu (16.04) you'll need to download python3.7 via ppa:

    • sudo add-apt-repository ppa:deadsnakes/ppa
    • sudo apt-get update
    • sudo apt install python3.7
  2. Install dependencies by running:

    • sudo apt install python3-pip
    • python3.7 -m pip install pip
    • sudo apt-get install python3.7-dev libffi-dev upx libssl-dev libc++1
  3. Install the python packages listed in requirements.txt using pip

    • cd [code location]/infection_monkey
    • python3.7 -m pipenv lock -r --dev > requirements.txt
    • python3.7 -m pip install -r requirements.txt
  4. To build, run in terminal:

    • cd [code location]/infection_monkey
    • chmod +x build_linux.sh
    • pipenv run ./build_linux.sh

    Output is placed under dist/monkey64.

Troubleshooting

Some of the possible errors that may come up while trying to build the infection monkey:

Linux

When committing your changes for the first time, you may encounter some errors thrown by the pre-commit hooks. This is most likely because some python dependencies are missing from your system. To resolve this, use pipenv to create a requirements.txt for both the infection_monkey/ and monkey_island/ requirements and install it with pip.

  • cd [code location]/infection_monkey
  • python3.7 -m pipenv lock -r --dev > requirements.txt
  • python3.7 -m pip install -r requirements.txt

and

  • cd [code location]/monkey_island
  • python3.7 -m pipenv lock -r --dev > requirements.txt
  • python3.7 -m pip install -r requirements.txt