monkey/monkey/infection_monkey
Mike Salvatore 720768e25d Agent: Add debug logging to decorators in WmiTools 2022-03-09 14:45:49 -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: Add debug logging to decorators in WmiTools 2022-03-09 14:45:49 -05:00
i_puppet Agent: Pass depth to exploiters 2022-03-07 10:25:53 -05:00
master Agent: Add human-readable thread names to AutomatedMaster 2022-03-09 16:38:52 +02:00
model Agent: Increase detail of HADOOP_LINUX_COMMAND comment 2022-03-07 12:35:52 -05:00
network Agent: Extract network_scanning package from network package 2022-02-23 09:23:42 -05:00
network_scanning Agent: Format HTTPFingerprinter with Black 2022-03-04 17:05:35 -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: Pass depth to exploiters 2022-03-07 10:25:53 -05:00
pyinstaller_hooks Agent, Island: remove/rename system info collection infrastructure 2022-03-01 14:54:20 +02:00
telemetry Merge pull request #1757 from guardicore/1736-add-log4shell-to-puppet 2022-03-07 05:52:21 -05:00
transport Use IAgentRepository in Hadoop/WebRCE exploiter 2022-03-01 13:58:03 -05:00
utils Agent: Make thread name mandatory for creating daemon threads 2022-03-09 16:55:22 +02: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: Reduce smb_download_timeout to 30 seconds 2022-03-09 10:00:20 -05:00
control.py Agent: Add logic to MonkeyTunnel to wait for exploited victims 2022-03-02 10:53:43 -05:00
dropper.py Agent: Remove SystemInfoCollector references from dropper.py 2022-03-03 11:31:11 -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: Log thread name instead of thread ID 2022-03-09 16:38:52 +02:00
monkey.ico Move everything under monkey 2018-05-23 16:05:41 +03:00
monkey.py Agent: Load ZerologonExploiter into the puppet 2022-03-09 10:21:51 -05:00
monkey.spec Agent: Remove references to 32-bit agents in monkey.spec 2022-02-24 09:42:40 -05: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: Add human-readable thread name to MonkeyTunnel 2022-03-09 16:38:52 +02: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