monkey/monkey/infection_monkey
Shreya Malviya ac62281c84 Agent: Add pypubsub as a dependency 2022-08-05 18:45:34 +05:30
..
credential_collectors Agent: Capture secrets if missing username in SSHCredentialCollector 2022-07-18 08:53:36 -04:00
credential_store Agent: Use new Credentials objects in AggregatingCredentialsStore 2022-07-18 10:22:14 -04:00
exploit Agent: Fix credentials object in Zerologon 2022-07-28 09:14:58 +02:00
i_puppet Agent: Add __init__.py files to all source code directories for proper code coverage results 2022-07-14 16:55:47 +05:30
master Merge pull request #2134 from guardicore/2092-bb-tests 2022-08-01 12:09:52 +03:00
model Agent: Use == to compare OperatingSystems enum 2022-06-24 10:18:51 +02:00
network Agent: Add TODO about using Python's ipaddress library 2022-07-27 10:41:05 -04:00
network_scanning Agent: Add TODO about using Python's ipaddress library 2022-07-27 10:38:17 -04:00
payload Agent: Add __init__.py files to all source code directories for proper code coverage results 2022-07-14 16:55:47 +05:30
post_breach Agent: Add __init__.py files to all source code directories for proper code coverage results 2022-07-14 16:55:47 +05:30
puppet Common: Add common.credentials package 2022-07-05 13:28:17 -04:00
pyinstaller_hooks Agent, Island: remove/rename system info collection infrastructure 2022-03-01 14:54:20 +02:00
ransomware Agent: Add __init__.py files to all source code directories for proper code coverage results 2022-07-14 16:55:47 +05:30
telemetry Agent: Use Credentials.to_json() for CredentialsTelem serialization 2022-07-07 09:15:01 -04:00
transport Agent: Use OperatingSystems.value for urllib.parse.quote 2022-06-24 10:51:58 +02:00
utils Agent: Add __init__.py files to all source code directories for proper code coverage results 2022-07-14 16:55:47 +05:30
Pipfile Agent: Add pypubsub as a dependency 2022-08-05 18:45:34 +05:30
Pipfile.lock Agent: Add pypubsub as a dependency 2022-08-05 18:45:34 +05:30
__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: Add TODO about GUID 2022-06-27 09:15:26 -04:00
control.py Agent: Remove WormConfiguration and cleanup related infrastructure 2022-06-17 16:40:40 +03:00
custom_types.py Agent: Rename typing to custom_types 2022-03-29 14:28:16 -04:00
dropper.py Agent: Set default depth cmd parameter to 0 2022-06-22 14:33:47 +03:00
i_control_channel.py Common: Rename configuration package to agent_configuration 2022-07-26 09:38:58 -04:00
i_master.py Agent: Add block parameter to IMaster.terminate() 2021-12-15 10:12:10 -05:00
main.py Agent: Remove WormConfiguration and cleanup related infrastructure 2022-06-17 16:40:40 +03:00
monkey.ico Move everything under monkey 2018-05-23 16:05:41 +03:00
monkey.py Agent: Rename should_propagate -> maximum_depth_reached 2022-06-23 16:36:01 -04:00
monkey.spec Agent: Remove T1216_random_executable.exe from agent binary on Linux 2022-04-11 06:35:56 -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: Move Timer to common/ 2022-05-09 13:26:42 -04: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