forked from p15670423/monkey
run_cc.bat bugfix and more readme style improvements
This commit is contained in:
parent
9a53337319
commit
a6a8ae9783
|
@ -12,25 +12,27 @@ The monkey is composed of three separate parts.
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
1. Install python 3.7.4
|
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/>
|
Download and install from: <https://www.python.org/ftp/python/3.7.4/>
|
||||||
2. Add python directories to PATH environment variable
|
|
||||||
1. Run the following command on a cmd console (Replace C:\Python37 with your python directory if it's different)
|
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`
|
`setx /M PATH "%PATH%;C:\Python37;C:\Python37\Scripts`
|
||||||
2. Close the console, make sure you execute all commands in a new cmd console from now on.
|
- Close the console, make sure you execute all commands in a new cmd console from now on.
|
||||||
3. Install further dependencies
|
2. Install further dependencies
|
||||||
1. if not installed, install Microsoft Visual C++ 2017 SP1 Redistributable Package
|
- if not installed, install Microsoft Visual C++ 2017 SP1 Redistributable Package
|
||||||
32bit: <https://aka.ms/vs/16/release/vc_redist.x86.exe>
|
- 32bit: <https://aka.ms/vs/16/release/vc_redist.x86.exe>
|
||||||
64bit: <https://go.microsoft.com/fwlink/?LinkId=746572>
|
- 64bit: <https://go.microsoft.com/fwlink/?LinkId=746572>
|
||||||
4. Download the dependent python packages using
|
3. Download the dependent python packages using
|
||||||
pip install -r requirements_windows.txt
|
`pip install -r requirements_windows.txt`
|
||||||
5. Download and extract UPX binary to [source-path]\monkey\infection_monkey\bin\upx.exe:
|
4. Download and extract UPX binary to monkey\infection_monkey\bin\upx.exe:
|
||||||
<https://github.com/upx/upx/releases/download/v3.94/upx394w.zip>
|
<https://github.com/upx/upx/releases/download/v3.94/upx394w.zip>
|
||||||
6. Build/Download Sambacry and Mimikatz binaries
|
5. Build/Download Sambacry and Mimikatz binaries
|
||||||
- Build/Download according to sections at the end of this readme.
|
- Build/Download according to sections at the end of this readme.
|
||||||
- Place the binaries under [code location]\infection_monkey\bin
|
- Place the binaries under monkey\infection_monkey\bin
|
||||||
7. To build the final exe:
|
6. To build the final exe:
|
||||||
- `cd [code location]/infection_monkey`
|
- `cd monkey\infection_monkey`
|
||||||
- `build_windows.bat`
|
- `build_windows.bat`
|
||||||
- `output is placed under dist\monkey.exe`
|
- `output is placed under dist\monkey.exe`
|
||||||
|
|
||||||
|
@ -45,8 +47,7 @@ Tested on Ubuntu 16.04.
|
||||||
1. Install dependencies by running:
|
1. Install dependencies by running:
|
||||||
- `sudo apt install python3-pip`
|
- `sudo apt install python3-pip`
|
||||||
- `python3.7 -m pip install pip`
|
- `python3.7 -m pip install pip`
|
||||||
- `sudo apt-get install python3.7-dev`
|
- `sudo apt-get install python3.7-dev libffi-dev upx libssl-dev libc++1`
|
||||||
- `sudo apt-get install libffi-dev upx libssl-dev libc++1`
|
|
||||||
|
|
||||||
2. Install the python packages listed in requirements.txt using pip
|
2. Install the python packages listed in requirements.txt using pip
|
||||||
- `cd [code location]/infection_monkey`
|
- `cd [code location]/infection_monkey`
|
||||||
|
@ -61,10 +62,11 @@ Tested on Ubuntu 16.04.
|
||||||
- Place the binaries under [code location]\infection_monkey\bin, under the names 'traceroute32', 'traceroute64'
|
- Place the binaries under [code location]\infection_monkey\bin, under the names 'traceroute32', 'traceroute64'
|
||||||
|
|
||||||
5. To build, run in terminal:
|
5. To build, run in terminal:
|
||||||
`cd [code location]/infection_monkey`
|
- `cd [code location]/infection_monkey`
|
||||||
`chmod +x build_linux.sh`
|
- `chmod +x build_linux.sh`
|
||||||
`./build_linux.sh`
|
- `./build_linux.sh`
|
||||||
`output is placed under dist/monkey`
|
|
||||||
|
output is placed under dist/monkey
|
||||||
|
|
||||||
### Sambacry
|
### Sambacry
|
||||||
|
|
||||||
|
|
|
@ -11,16 +11,12 @@
|
||||||
2. Create folder "bin" under monkey_island
|
2. Create folder "bin" under monkey_island
|
||||||
3. Place portable version of Python 3.7.4
|
3. Place portable version of Python 3.7.4
|
||||||
- Download and install from: <https://www.python.org/ftp/python/3.7.4/>
|
- Download and install from: <https://www.python.org/ftp/python/3.7.4/>
|
||||||
- Install virtualenv using "python -m pip install virtualenv"
|
4. Install Island's requirements
|
||||||
- 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.
|
- `python -m pip install -r monkey_island\requirements.txt`
|
||||||
- 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.
|
|
||||||
4. Setup mongodb (Use one of the following two options):
|
4. Setup mongodb (Use one of the following two options):
|
||||||
- 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>
|
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.
|
2. Extract contents of bin folder to monkey_island\bin\mongodb.
|
||||||
3. Create monkey_island\db folder.
|
3. Create monkey_island\db folder.
|
||||||
|
|
||||||
OR
|
OR
|
||||||
|
@ -29,12 +25,12 @@
|
||||||
|
|
||||||
5. Place portable version of OpenSSL
|
5. Place portable version of OpenSSL
|
||||||
- Download from: <https://indy.fulgan.com/SSL/Archive/openssl-1.0.2l-i386-win32.zip>
|
- 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
|
- Extract contents to monkey_island\bin\openssl
|
||||||
6. Download and install Microsoft Visual C++ redistributable for Visual Studio 2017
|
6. Download and install Microsoft Visual C++ redistributable for Visual Studio 2017
|
||||||
- Download and install from: <https://go.microsoft.com/fwlink/?LinkId=746572>
|
- Download and install from: <https://go.microsoft.com/fwlink/?LinkId=746572>
|
||||||
7. Generate SSL Certificate
|
7. Generate SSL Certificate
|
||||||
- run create_certificate.bat when your current working directory is monkey_island
|
- run `./windows/create_certificate.bat` when your current working directory is monkey_island
|
||||||
8. Create the monkey_island\cc\binaries folder and put Infection Monkey binaries inside (binaries can be found in releases on github)
|
8. Put Infection Monkey binaries inside monkey_island/cc/binaries (binaries can be found in releases on github or build from source)
|
||||||
monkey-linux-64 - monkey binary for linux 64bit
|
monkey-linux-64 - monkey binary for linux 64bit
|
||||||
monkey-linux-32 - monkey binary for linux 32bit
|
monkey-linux-32 - monkey binary for linux 32bit
|
||||||
monkey-windows-32.exe - monkey binary for windows 32bit
|
monkey-windows-32.exe - monkey binary for windows 32bit
|
||||||
|
@ -48,7 +44,7 @@
|
||||||
|
|
||||||
#### How to run
|
#### How to run
|
||||||
|
|
||||||
1. When your current working directory is monkey_island, run monkey_island\windows\run_server.bat
|
1. When your current working directory is monkey_island, run monkey_island\windows\run_server_py.bat
|
||||||
|
|
||||||
### On Linux
|
### On Linux
|
||||||
|
|
||||||
|
@ -73,7 +69,10 @@
|
||||||
monkey-linux-64 - monkey binary for linux 64bit
|
monkey-linux-64 - monkey binary for linux 64bit
|
||||||
monkey-linux-32 - monkey binary for linux 32bit
|
monkey-linux-32 - monkey binary for linux 32bit
|
||||||
monkey-windows-32.exe - monkey binary for windows 32bit
|
monkey-windows-32.exe - monkey binary for windows 32bit
|
||||||
monkey-windows-64.exe - monkey binary for windows 64bi
|
monkey-windows-64.exe - monkey binary for windows 64bit
|
||||||
|
Also, if you're going to run monkeys on local machine execute:
|
||||||
|
- `chmod 755 ./monkey_island/cc/binaries/monkey-linux-64`
|
||||||
|
- `chmod 755 ./monkey_island/cc/binaries/monkey-linux-32`
|
||||||
|
|
||||||
6. Setup MongoDB (Use one of the two following options):
|
6. Setup MongoDB (Use one of the two following options):
|
||||||
- Download MongoDB and extract it to /var/monkey_island/bin/mongodb:
|
- Download MongoDB and extract it to /var/monkey_island/bin/mongodb:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
REM - Runs Monkey Island Server using python -
|
REM - Runs Monkey Island Server using python -
|
||||||
@title C^&C Server
|
@title C^&C Server
|
||||||
@pushd ..
|
@pushd ..
|
||||||
@monkey_island\bin\Python27\Scripts\python monkey_island.py
|
@python monkey_island.py
|
||||||
@popd
|
@popd
|
Loading…
Reference in New Issue