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
|
||||
|
||||
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/>
|
||||
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`
|
||||
2. Close the console, make sure you execute all commands in a new cmd console from now on.
|
||||
3. Install further dependencies
|
||||
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
|
||||
pip install -r requirements_windows.txt
|
||||
5. Download and extract UPX binary to [source-path]\monkey\infection_monkey\bin\upx.exe:
|
||||
- Close the console, make sure you execute all commands in a new cmd console from now on.
|
||||
2. Install further dependencies
|
||||
- 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>
|
||||
3. Download the dependent python packages using
|
||||
`pip install -r requirements_windows.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>
|
||||
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.
|
||||
- Place the binaries under [code location]\infection_monkey\bin
|
||||
7. To build the final exe:
|
||||
- `cd [code location]/infection_monkey`
|
||||
- Place the binaries under monkey\infection_monkey\bin
|
||||
6. To build the final exe:
|
||||
- `cd monkey\infection_monkey`
|
||||
- `build_windows.bat`
|
||||
- `output is placed under dist\monkey.exe`
|
||||
|
||||
|
@ -45,8 +47,7 @@ Tested on Ubuntu 16.04.
|
|||
1. Install dependencies by running:
|
||||
- `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`
|
||||
- `sudo apt-get install python3.7-dev libffi-dev upx libssl-dev libc++1`
|
||||
|
||||
2. Install the python packages listed in requirements.txt using pip
|
||||
- `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'
|
||||
|
||||
5. To build, run in terminal:
|
||||
`cd [code location]/infection_monkey`
|
||||
`chmod +x build_linux.sh`
|
||||
`./build_linux.sh`
|
||||
`output is placed under dist/monkey`
|
||||
- `cd [code location]/infection_monkey`
|
||||
- `chmod +x build_linux.sh`
|
||||
- `./build_linux.sh`
|
||||
|
||||
output is placed under dist/monkey
|
||||
|
||||
### Sambacry
|
||||
|
||||
|
|
|
@ -11,16 +11,12 @@
|
|||
2. Create folder "bin" under monkey_island
|
||||
3. Place portable version of 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"
|
||||
- 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.
|
||||
4. Install Island's requirements
|
||||
- `python -m pip install -r monkey_island\requirements.txt`
|
||||
4. Setup mongodb (Use one of the following two options):
|
||||
- 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.
|
||||
2. Extract contents of bin folder to monkey_island\bin\mongodb.
|
||||
3. Create monkey_island\db folder.
|
||||
|
||||
OR
|
||||
|
@ -29,12 +25,12 @@
|
|||
|
||||
5. Place portable version of 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
|
||||
- Extract contents to monkey_island\bin\openssl
|
||||
6. Download and install Microsoft Visual C++ redistributable for Visual Studio 2017
|
||||
- Download and install from: <https://go.microsoft.com/fwlink/?LinkId=746572>
|
||||
7. Generate SSL Certificate
|
||||
- run 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)
|
||||
- run `./windows/create_certificate.bat` when your current working directory is monkey_island
|
||||
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-32 - monkey binary for linux 32bit
|
||||
monkey-windows-32.exe - monkey binary for windows 32bit
|
||||
|
@ -48,7 +44,7 @@
|
|||
|
||||
#### 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
|
||||
|
||||
|
@ -73,7 +69,10 @@
|
|||
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 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):
|
||||
- Download MongoDB and extract it to /var/monkey_island/bin/mongodb:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
REM - Runs Monkey Island Server using python -
|
||||
@title C^&C Server
|
||||
@pushd ..
|
||||
@monkey_island\bin\Python27\Scripts\python monkey_island.py
|
||||
@popd
|
||||
@python monkey_island.py
|
||||
@popd
|
||||
|
|
Loading…
Reference in New Issue