Style fixes

This commit is contained in:
VakarisZ 2019-11-18 14:14:29 +02:00
parent 85ee605088
commit 38f7a6d7f6
2 changed files with 83 additions and 84 deletions

View File

@ -21,14 +21,14 @@ The monkey is composed of three separate parts.
1. if not installed, install Microsoft Visual C++ 2017 SP1 Redistributable Package
32bit: https://aka.ms/vs/16/release/vc_redist.x86.exe
64bit: https://go.microsoft.com/fwlink/?LinkId=746572
4. Download the dependent python packages using
4. Download the dependent python packages using
pip install -r requirements_windows.txt
5. Download and extract UPX binary to [source-path]\monkey\infection_monkey\bin\upx.exe:
5. Download and extract UPX binary to [source-path]\monkey\infection_monkey\bin\upx.exe:
https://github.com/upx/upx/releases/download/v3.94/upx394w.zip
6. Build/Download Sambacry and Mimikatz binaries
a. Build/Download according to sections at the end of this readme.
b. Place the binaries under [code location]\infection_monkey\bin
7. To build the final exe:
6. Build/Download Sambacry and Mimikatz binaries
- Build/Download according to sections at the end of this readme.
- Place the binaries under [code location]\infection_monkey\bin
7. To build the final exe:
cd [code location]/infection_monkey
build_windows.bat
output is placed under dist\monkey.exe
@ -37,24 +37,24 @@ The monkey is composed of three separate parts.
Tested on Ubuntu 16.04.
0. On older distributions of Ubuntu (16.04) you'll need to download python3.7 via ppa:
1. `sudo add-apt-repository ppa:deadsnakes/ppa`
2. `sudo apt-get update`
3. `sudo apt install python3.7`
- `sudo add-apt-repository ppa:deadsnakes/ppa`
- `sudo apt-get update`
- `sudo apt install python3.7`
1. Install dependencies by running:
1. `sudo apt install python3-pip`
2. `python3.7 -m pip install pip`
3. `sudo apt-get install python3.7-dev`
4. `sudo apt-get install libffi-dev upx libssl-dev libc++1`
- `sudo apt install python3-pip`
- `python3.7 -m pip install pip`
- `sudo apt-get install python3.7-dev`
- `sudo apt-get install libffi-dev upx libssl-dev libc++1`
Install the python packages listed in requirements.txt using pip
`cd [code location]/infection_monkey`
`python3.7 -m pip install -r requirements_linux.txt`
2. Build Sambacry binaries
a. Build/Download according to sections at the end of this readme.
b. Place the binaries under [code location]\infection_monkey\bin, under the names 'sc_monkey_runner32.so', 'sc_monkey_runner64.so'
- Build/Download according to sections at the end of this readme.
- Place the binaries under [code location]\infection_monkey\bin, under the names 'sc_monkey_runner32.so', 'sc_monkey_runner64.so'
3. Build Traceroute binaries
a. Build/Download according to sections at the end of this readme.
b. Place the binaries under [code location]\infection_monkey\bin, under the names 'traceroute32', 'traceroute64'
- Build/Download according to sections at the end of this readme.
- Place the binaries under [code location]\infection_monkey\bin, under the names 'traceroute32', 'traceroute64'
4. To build, run in terminal:
cd [code location]/infection_monkey
chmod +x build_linux.sh
@ -64,34 +64,33 @@ Tested on Ubuntu 16.04.
### Sambacry
Sambacry requires two standalone binaries to execute remotely.
a. Build sambacry binaries yourself
a.1. Install gcc-multilib if it's not installed
sudo apt-get install gcc-multilib
a.2. Build the binaries
cd [code location]/infection_monkey/exploit/sambacry_monkey_runner
./build.sh
1. Build sambacry binaries yourself
- Install gcc-multilib if it's not installed `sudo apt-get install gcc-multilib`
- Build the binaries
1. `cd [code location]/infection_monkey/exploit/sambacry_monkey_runner`
2. `./build.sh`
b. Download our pre-built sambacry binaries
b.1. Available here:
32bit: https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner32.so
64bit: https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner64.so
2. Download our pre-built sambacry binaries
- Available here:
- 32bit: https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner32.so
- 64bit: https://github.com/guardicore/monkey/releases/download/1.6/sc_monkey_runner64.so
### Mimikatz
Mimikatz is required for the Monkey to be able to steal credentials on Windows. It's possible to either compile binaries from source (requires Visual Studio 2013 and up) or download them from our repository.
a. Build Mimikatz yourself
a.0. Building mimikatz requires Visual Studio 2013 and up
a.1. Clone our version of mimikatz from https://github.com/guardicore/mimikatz/tree/1.1.0
a.2. Build using Visual Studio.
a.3. Put each version in a zip file
a.3.1. The zip should contain only the Mimikatz DLL named tmpzipfile123456.dll
a.3.2. It should be protected using the password 'VTQpsJPXgZuXhX6x3V84G'.
a.3.3. The zip file should be named mk32.zip/mk64.zip accordingly.
a.3.4. Zipping with 7zip has been tested. Other zipping software may not work.
1. Build Mimikatz yourself
- Building mimikatz requires Visual Studio 2013 and up
- Clone our version of mimikatz from https://github.com/guardicore/mimikatz/tree/1.1.0
- Build using Visual Studio.
- Put each version in a zip file
1. The zip should contain only the Mimikatz DLL named tmpzipfile123456.dll
2. It should be protected using the password 'VTQpsJPXgZuXhX6x3V84G'.
3. The zip file should be named mk32.zip/mk64.zip accordingly.
4. Zipping with 7zip has been tested. Other zipping software may not work.
b. Download our pre-built mimikatz binaries
b.1. Download both 32 and 64 bit zipped DLLs from https://github.com/guardicore/mimikatz/releases/tag/1.1.0
b.2. Place them under [code location]\infection_monkey\bin
2. Download our pre-built mimikatz binaries
- Download both 32 and 64 bit zipped DLLs from https://github.com/guardicore/mimikatz/releases/tag/1.1.0
- Place them under [code location]\infection_monkey\bin
### Traceroute
@ -99,9 +98,9 @@ Traceroute requires two standalone binaries to execute remotely.
The monkey carries the standalone binaries since traceroute isn't built in all Linux distributions.
You can either build them yourself or download pre-built binaries.
a. Build traceroute yourself
a.1. The sources of traceroute are available here with building instructions: http://traceroute.sourceforge.net
b. Download our pre-built traceroute binaries
b.1. Available here:
32bit: https://github.com/guardicore/monkey/releases/download/1.6/traceroute32
64bit: https://github.com/guardicore/monkey/releases/download/1.6/traceroute64
1. Build traceroute yourself
- The sources of traceroute are available here with building instructions: http://traceroute.sourceforge.net
1. Download our pre-built traceroute binaries
- Available here:
- 32bit: https://github.com/guardicore/monkey/releases/download/1.6/traceroute32
- 64bit: https://github.com/guardicore/monkey/releases/download/1.6/traceroute64

View File

@ -8,62 +8,62 @@
0. Exclude the folder you are planning to install the Monkey in from your AV software, as it might block or delete files from the installation.
1. Create folder "bin" under monkey_island
2. Place portable version of Python 3.7.4
1. Download and install from: https://www.python.org/ftp/python/3.7.4/
2. Install virtualenv using "python -m pip install virtualenv"
3. Create a virtualenv using "python -m virtualenv --always-copy <PATH TO BIN>\Python37" Where <PATH TO BIN> is the path to the bin folder created on step 1.
4. Run "python -m virtualenv --relocatable <PATH TO BIN>\Python37"
5. Install the required python libraries using "<PATH TO BIN>\Python37\Scripts\python -m pip install -r monkey_island\requirements.txt"
6. Copy DLLs from installation path (Usually C:\Python27\DLLs) to <PATH TO BIN>\Python37\DLLs
7. (Optional) You may uninstall Python3.7 if you like.
- Download and install from: https://www.python.org/ftp/python/3.7.4/
- Install virtualenv using "python -m pip install virtualenv"
- Create a virtualenv using "python -m virtualenv --always-copy <PATH TO BIN>\Python37" Where <PATH TO BIN> is the path to the bin folder created on step 1.
- Run "python -m virtualenv --relocatable <PATH TO BIN>\Python37"
- Install the required python libraries using "<PATH TO BIN>\Python37\Scripts\python -m pip install -r monkey_island\requirements.txt"
- Copy DLLs from installation path (Usually C:\Python27\DLLs) to <PATH TO BIN>\Python37\DLLs
- (Optional) You may uninstall Python3.7 if you like.
3. Setup mongodb (Use one of the following two options):
1. Place portable version of mongodb
- Place portable version of mongodb
1. Download from: https://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-latest.zip
2. Extract contents from bin folder to monkey_island\bin\mongodb.
3. Create monkey_island\db folder.
OR
3. Use already running instance of mongodb
- Use already running instance of mongodb
1. Run 'set MONKEY_MONGO_URL="mongodb://<SERVER ADDR>:27017/monkeyisland"'. Replace '<SERVER ADDR>' with address of mongo server
4. Place portable version of OpenSSL
1. Download from: https://indy.fulgan.com/SSL/Archive/openssl-1.0.2l-i386-win32.zip
2. Extract content from bin folder to monkey_island\bin\openssl
- Download from: https://indy.fulgan.com/SSL/Archive/openssl-1.0.2l-i386-win32.zip
- Extract content from bin folder to monkey_island\bin\openssl
5. Download and install Microsoft Visual C++ redistributable for Visual Studio 2017
1. Download and install from: https://go.microsoft.com/fwlink/?LinkId=746572
- Download and install from: https://go.microsoft.com/fwlink/?LinkId=746572
6. Generate SSL Certificate
1. run create_certificate.bat when your current working directory is monkey_island
- run create_certificate.bat when your current working directory is monkey_island
7. Create the monkey_island\cc\binaries folder and put Infection Monkey binaries inside (binaries can be found in releases on github)
monkey-linux-64 - monkey binary for linux 64bit
monkey-linux-32 - monkey binary for linux 32bit
monkey-windows-32.exe - monkey binary for windows 32bit
monkey-windows-64.exe - monkey binary for windows 64bit
8. Install npm
1. Download and install from: https://www.npmjs.com/get-npm
- Download and install from: https://www.npmjs.com/get-npm
9. Build Monkey Island frontend
1. cd to 'monkey_island\cc\ui'
2. run 'npm update'
3. run 'npm run dist'
- cd to 'monkey_island\cc\ui'
- run 'npm update'
- run 'npm run dist'
#### How to run:
1. When your current working directory is monkey_island, run monkey_island\windows\run_server.bat
### On Linux:
0. Get python 3.7 and pip if your linux distribution doesn't have it built in (following steps are for Ubuntu 16):
1. `sudo add-apt-repository ppa:deadsnakes/ppa`
2. `sudo apt-get update`
3. `sudo apt install python3.7`
4. `sudo apt install python3-pip`
5. `python3.7 -m pip install pip`
6. `sudo apt-get install python3.7-dev`
- `sudo add-apt-repository ppa:deadsnakes/ppa`
- `sudo apt-get update`
- `sudo apt install python3.7`
- `sudo apt install python3-pip`
- `python3.7 -m pip install pip`
- `sudo apt-get install python3.7-dev`
1. Install required packages:
1. `sudo apt-get install libffi-dev upx libssl-dev libc++1 openssl`
- `sudo apt-get install libffi-dev upx libssl-dev libc++1 openssl`
2. Create the following directories in monkey island folder (execute from ./monkey):
1. `mkdir -p ./monkey_island/bin/mongodb`
2. `mkdir -p ./monkey_island/db`
3. `mkdir -p ./monkey_island/cc/binaries`
- `mkdir -p ./monkey_island/bin/mongodb`
- `mkdir -p ./monkey_island/db`
- `mkdir -p ./monkey_island/cc/binaries`
2. Install the packages from monkey_island/requirements.txt:
1. `sudo python3.7 -m pip install -r ./monkey_island/requirements.txt`
- `sudo python3.7 -m pip install -r ./monkey_island/requirements.txt`
3. Put monkey binaries in /monkey_island/cc/binaries (binaries can be found in releases on github)
monkey-linux-64 - monkey binary for linux 64bit
@ -72,27 +72,27 @@
monkey-windows-64.exe - monkey binary for windows 64bi
4. Setup MongoDB (Use one of the two following options):
1. Download MongoDB and extract it to /var/monkey_island/bin/mongodb:
- Download MongoDB and extract it to /var/monkey_island/bin/mongodb:
1. Run `./monkey_island/linux/install_mongo.sh ./monkey_island/bin/mongodb`. This will download and extract the relevant mongoDB for your OS.
OR
1. Use already running instance of mongodb
- Use already running instance of mongodb
1. Run `set MONKEY_MONGO_URL="mongodb://<SERVER ADDR>:27017/monkeyisland"`. Replace '<SERVER ADDR>' with address of mongo server
6. Generate SSL Certificate:
1. `cd ./monkey_island`
2. `./linux/create_certificate.sh`
- `cd ./monkey_island`
- `./linux/create_certificate.sh`
8. Install npm and node by running:
1. `sudo apt-get install curl`
2. `curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -`
3. `sudo apt-get install -y nodejs`
- `sudo apt-get install curl`
- `curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -`
- `sudo apt-get install -y nodejs`
9. Build Monkey Island frontend
1. cd to 'monkey_island/cc/ui'
4. `npm install sass-loader node-sass webpack --save-dev`
5. `npm update`
3. `npm run dist`
- cd to 'monkey_island/cc/ui'
- `npm install sass-loader node-sass webpack --save-dev`
- `npm update`
- `npm run dist`
#### How to run:
1. When your current working directory is monkey, run ./monkey_island/linux/run.sh (located under /linux)