monkey/monkey/infection_monkey
Shreya Malviya 1b037c4b3a Agent: Add IslandAPIRequestError for errors that are the client's mistake 2022-09-19 19:08:15 +05:30
..
credential_collectors Agent: Fix imports common.events -> common.agent_events 2022-09-16 08:58:02 -04:00
credential_repository Agent: Fix imports common.events -> common.agent_events 2022-09-16 08:58:02 -04:00
exploit Agent: Fix imports common.events -> common.agent_events 2022-09-16 08:58:02 -04: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
island_api_client Agent: Add IslandAPIRequestError for errors that are the client's mistake 2022-09-19 19:08:15 +05:30
master Common: Rename "get_local_interfaces" to "get_network_interfaces" 2022-09-16 15:45:07 +03:00
model Agent: Get rid of default_tunnel 2022-09-09 08:19:56 -04:00
network Island, Agent: Move local IP and interface retrieval to common 2022-09-16 15:45:07 +03:00
network_scanning Agent: Fix type hints 2022-08-30 13:44:32 +00:00
payload Agent: Fix batching telemetry thread shutdown 2022-08-24 19:51:19 +00:00
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 Agent: Pass servers when running exploits in Puppet 2022-09-09 08:07:24 -04:00
pyinstaller_hooks Agent, Island: remove/rename system info collection infrastructure 2022-03-01 14:54:20 +02:00
telemetry Agent: Remove CredentialsTelem 2022-09-15 12:29:18 +05:30
transport Agent: Move IslandAPIClient to island_api_client package 2022-09-19 08:00:00 -04:00
utils Agent: Use private module variable for ID caching 2022-09-14 12:59:44 -04:00
Pipfile Agent: Add a comment about locking bcrypt and cryptography 2022-09-16 09:36:26 -04:00
Pipfile.lock Agent: Relock Pipfile on windows 2022-09-16 14:35:40 +02:00
__init__.py Remove "__author__" lines from the source code 2021-07-28 12:43:28 -04:00
agent_event_forwarder.py Agent: Rename EVENTS_API_URL to AGENT_EVENTS_API_URL 2022-09-16 16:20:58 +03: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 IGUID from config 2022-08-16 11:58:53 +02:00
control.py Common: Rename "get_local_ip_addresses" to "get_my_ip_addresses" 2022-09-16 15:45:07 +03:00
custom_types.py Agent: Rename typing to custom_types 2022-03-29 14:28:16 -04:00
dropper.py Agent: Add list of servers to dropper 2022-09-09 08:07:24 -04:00
i_control_channel.py Agent: Register agent on startup 2022-08-24 08:54:41 -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 Merge branch '2293-rename-event-serializers' into develop 2022-09-16 09:41:37 -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

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