monkey/chaos_monkey/readme.txt

56 lines
2.3 KiB
Plaintext
Raw Normal View History

2017-10-08 21:13:42 +08:00
How to build a monkey binary from scratch.
2017-10-17 22:14:28 +08:00
The monkey is composed of three separate parts.
2017-10-08 21:13:42 +08:00
* The Infection Monkey itself - PyInstaller compressed python archives
* Sambacry binaries - Two linux binaries, 32/64 bit.
* Mimikatz binaries - Two windows binaries, 32/64 bit.
--- Windows ---
2015-10-11 19:01:27 +08:00
1. Install python 2.7. Preferably you should use ActiveState Python which includes pywin32 built in.
2017-10-08 21:13:42 +08:00
You must use an up to date version, at least version 2.7.10
2017-10-17 22:14:28 +08:00
https://www.python.org/download/releases/2.7/
2017-10-08 21:13:42 +08:00
If not using ActiveState, install pywin32, minimum build 219
http://sourceforge.net/projects/pywin32/files/pywin32
3. a. install VCForPython27.msi
2017-10-08 21:13:42 +08:00
https://aka.ms/vcpython27
b. if not installed, install Microsoft Visual C++ 2010 SP1 Redistributable Package
32bit: http://www.microsoft.com/en-us/download/details.aspx?id=8328
64bit: http://www.microsoft.com/en-us/download/details.aspx?id=13523
2017-10-08 21:13:42 +08:00
4. Download the dependent python packages using
pip install -r requirements.txt
5. Download and extract UPX binary to [source-path]\monkey\chaos_monkey\bin\upx.exe:
https://github.com/upx/upx/releases/download/v3.94/upx394w.zip
6. To build the final exe:
2017-10-17 22:14:28 +08:00
cd [code location]/chaos_monkey
2017-10-08 21:13:42 +08:00
build_windows.bat
2017-10-17 22:14:28 +08:00
output is placed under dist\monkey.exe
2017-10-08 21:13:42 +08:00
--- Linux ---
Tested on Ubuntu 16.04 and 17.04.
2015-10-11 19:01:27 +08:00
1. Run:
2017-10-08 21:13:42 +08:00
sudo apt-get update
sudo apt-get install python-pip python-dev libffi-dev upx libssl-dev libc++1
2017-10-17 22:14:28 +08:00
Install the python packages listed in requirements.txt using pip
pip install -r requirements.txt
2. Place the source code in code/monkey/chaos_monkey
2015-10-12 15:49:36 +08:00
3. To build, run in terminal:
2017-10-08 21:13:42 +08:00
cd [code location]/chaos_monkey
chmod +x build_linux.sh
./build_linux.sh
2017-10-17 22:14:28 +08:00
output is placed under dist/monkey
2017-10-08 21:13:42 +08:00
-- Sambacry --
Sambacry requires two standalone binaries to execute remotely.
2017-10-17 22:14:28 +08:00
Compiling them requires gcc.
2017-10-08 21:13:42 +08:00
cd [code location]/chaos_monkey/monkey_utils/sambacry_monkey_runner
./build.sh
-- Mimikatz --
Mimikatz is required for the Monkey to be able to steal credentials on Windows. It's possible to either compile from sources (requires Visual Studio 2013 and up) or download the binaries from
https://github.com/guardicore/mimikatz/releases/tag/1.0.0
2017-10-17 22:14:28 +08:00
Download both 32 and 64 bit DLLs and place them under [code location]\chaos_monkey\bin