Skip to content

Commit ab01917

Browse files
authored
Merge pull request #769 from guardicore/release/1.9.0
Release/1.9.0
2 parents 3726a14 + 815c708 commit ab01917

File tree

2,207 files changed

+58697
-5874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,207 files changed

+58697
-5874
lines changed

.github/ISSUE_TEMPLATE/Bug_report.md

+32-29
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
---
2-
name: 🐛 Bug report
3-
about: Create a report to help us fix things!
4-
5-
---
6-
7-
<!--
8-
Thank you for reporting a bug to make Infection Monkey better.
9-
10-
Please fill in as much of the template below as you're able.
11-
-->
12-
13-
## Describe the bug
14-
A clear and concise description of what the bug is.
15-
16-
## To Reproduce
17-
Steps to reproduce the behavior:
18-
1. Configure the Monkey with X settings
19-
2. Run the monkey on specific machine
20-
3. See error
21-
22-
## Expected behavior
23-
A description of what you expected to happen.
24-
25-
## Screenshots
26-
If applicable, add screenshots to help explain your problem.
27-
28-
## Machine version (please complete the following information):
29-
- OS: Windows or Linux
1+
---
2+
name: "\U0001F41B Bug report"
3+
about: Create a report to help us fix things!
4+
title: ''
5+
labels: Bug
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Thank you for reporting a bug to make Infection Monkey better.
12+
13+
Please fill in as much of the template below as you're able.
14+
-->
15+
16+
## Describe the bug
17+
A clear and concise description of what the bug is.
18+
19+
## To Reproduce
20+
Steps to reproduce the behavior:
21+
1. Configure the Monkey with X settings
22+
2. Run the monkey on specific machine
23+
3. See error
24+
25+
## Expected behavior
26+
A description of what you expected to happen.
27+
28+
## Screenshots
29+
If applicable, add screenshots to help explain your problem.
30+
31+
## Machine version (please complete the following information):
32+
- OS: Windows or Linux
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: "\U0001F4C3 Documentation request"
3+
about: Suggest additions or fixes to our documentation hub!
4+
title: ''
5+
labels: Documentation
6+
assignees: ''
7+
8+
---
9+
10+
## Documentation request
11+
12+
<!-- Choose: adding a new page, or edit existing content. -->
13+
14+
### Add a new page 🆕
15+
16+
**What documentation you'd like us to add?**
17+
Put suggestion here.
18+
19+
**Where in the documentation tree?**
20+
Put section here.
21+
22+
### Edit existing content 📝
23+
24+
**Which page(s) do you want us to edit?**
25+
Put link here.
26+
27+
**What do you think should be changed?**
28+
Put requested changes here.

.github/ISSUE_TEMPLATE/Feature_request.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: "\U0001F680 Feature request"
33
about: Suggest an idea for this project
4+
title: ''
5+
labels: Feature
6+
assignees: ''
47

58
---
69

@@ -17,4 +20,4 @@ Please describe the problem you are trying to solve.
1720
Please describe the desired behavior.
1821

1922
**Describe alternatives you've considered**
20-
Please describe alternative solutions or features you have considered.
23+
Please describe alternative solutions or features you have considered.

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,9 @@ profiler_logs/
9090

9191
# vim swap files
9292
*.swp
93+
94+
# Server config might contain credentials. Don't commit by default.
95+
/monkey/monkey_island/cc/server_config.json
96+
97+
# Virtualenv
98+
venv/

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
[submodule "monkey/monkey_island/cc/services/attack/attack_data"]
33
path = monkey/monkey_island/cc/services/attack/attack_data
44
url = https://github.com/guardicore/cti
5+
[submodule "docs/themes/learn"]
6+
path = docs/themes/learn
7+
url = https://github.com/ShayNehmad/hugo-theme-learn.git

.travis.yml

+24-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ os: linux
1818

1919
install:
2020
# Python
21+
- pip freeze
2122
- pip install -r monkey/monkey_island/requirements.txt # for unit tests
22-
- pip install flake8 pytest dlint # for next stages
23+
- pip install flake8 pytest dlint isort # for next stages
2324
- pip install coverage # for code coverage
2425
- pip install -r monkey/infection_monkey/requirements.txt # for unit tests
26+
- pip install pipdeptree
27+
# Fail builds on possible conflicting dependencies.
28+
- pipdeptree --warn fail
2529

2630
# node + npm + eslint
2731
- node --version
@@ -33,6 +37,17 @@ install:
3337
- node --version
3438
- npm --version
3539

40+
# linuxbrew (for hugo)
41+
- git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew
42+
- mkdir ~/.linuxbrew/bin
43+
- ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin
44+
- eval $(~/.linuxbrew/bin/brew shellenv)
45+
46+
# hugo (for documentation)
47+
- brew install hugo
48+
# print hugo version (useful for debugging documentation build errors)
49+
- hugo version
50+
3651
before_script:
3752
# Set the server config to `testing`. This is required for for the UTs to pass.
3853
- python monkey/monkey_island/cc/set_server_config.py testing
@@ -54,6 +69,9 @@ script:
5469
- PYTHON_WARNINGS_AMOUNT_UPPER_LIMIT=120
5570
- if [ $(tail -n 1 flake8_warnings.txt) -gt $PYTHON_WARNINGS_AMOUNT_UPPER_LIMIT ]; then echo "Too many python linter warnings! Failing this build. Lower the amount of linter errors in this and try again. " && exit 1; fi
5671

72+
## Check import order
73+
- python -m isort . -c -p common -p infection_monkey -p monkey_island
74+
5775
## Run unit tests
5876
- cd monkey # This is our source dir
5977
- python -m pytest # Have to use `python -m pytest` instead of `pytest` to add "{$builddir}/monkey/monkey" to sys.path.
@@ -65,9 +83,13 @@ script:
6583
- cd monkey_island/cc/ui
6684
- npm ci # See https://docs.npmjs.com/cli/ci.html
6785
- eslint ./src --quiet # Test for errors
68-
- JS_WARNINGS_AMOUNT_UPPER_LIMIT=490
86+
- JS_WARNINGS_AMOUNT_UPPER_LIMIT=28
6987
- eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT # Test for max warnings
7088

89+
# Build documentation
90+
- cd $TRAVIS_BUILD_DIR/docs
91+
- hugo --verbose --environment staging
92+
7193
after_success:
7294
# Upload code coverage results to codecov.io, see https://github.com/codecov/codecov-bash for more information
7395
- bash <(curl -s https://codecov.io/bash)

README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,16 @@ The Infection Monkey uses the following techniques and exploits to propagate to
5151
* SambaCry
5252
* Elastic Search (CVE-2015-1427)
5353
* Weblogic server
54-
* and more
54+
* and more, see our [Documentation hub](https://www.guardicore.com/infectionmonkey/docs/reference/exploiters/) for more information about our RCE exploiters.
5555

5656
## Setup
57-
Check out the [Setup](https://github.com/guardicore/monkey/wiki/setup) page in the Wiki or a quick getting [started guide](https://www.guardicore.com/infectionmonkey/wt/).
57+
Check out the [Setup](https://www.guardicore.com/infectionmonkey/docs/setup/) page in the Wiki or a quick getting [started guide](https://www.guardicore.com/infectionmonkey/docs/usage/getting-started/).
5858

59-
The Infection Monkey supports a variety of platforms, documented [in the wiki](https://github.com/guardicore/monkey/wiki/OS-compatibility).
59+
The Infection Monkey supports a variety of platforms, documented [in our documentation hub](https://www.guardicore.com/infectionmonkey/docs/reference/operating_systems_support/).
6060

6161
## Building the Monkey from source
62-
To deploy development version of monkey you should refer to readme in the [deployment scripts](deployment_scripts) folder.
63-
If you only want to build the monkey from source, see [Setup](https://github.com/guardicore/monkey/wiki/Setup#compile-it-yourself)
64-
and follow the instructions at the readme files under [infection_monkey](monkey/infection_monkey) and [monkey_island](monkey/monkey_island).
62+
To deploy development version of monkey you should refer to readme in the [deployment scripts](deployment_scripts)
63+
folder or follow documentation in [documentation hub](https://www.guardicore.com/infectionmonkey/docs/development/setup-development-environment/).
6564

6665
### Build status
6766
| Branch | Status |

deployment_scripts/config

+33-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,44 @@
11
#!/usr/bin/env bash
22
# Absolute monkey's path
3-
MONKEY_FOLDER_NAME="infection_monkey"
3+
export MONKEY_FOLDER_NAME="infection_monkey"
44
# Url of public git repository that contains monkey's source code
5-
MONKEY_GIT_URL="https://github.com/guardicore/monkey"
5+
export MONKEY_GIT_URL="https://github.com/guardicore/monkey"
6+
7+
get_latest_release() {
8+
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub API
9+
grep '"tag_name":' | # Get tag line
10+
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
11+
}
12+
13+
MONKEY_LATEST_RELEASE=$(get_latest_release "monkey/guardicore")
614

715
# Monkey binaries
8-
LINUX_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/monkey-linux-32"
916
LINUX_32_BINARY_NAME="monkey-linux-32"
10-
LINUX_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/monkey-linux-64"
17+
LINUX_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-linux-32"
18+
export LINUX_32_BINARY_URL
19+
export LINUX_32_BINARY_NAME
20+
1121
LINUX_64_BINARY_NAME="monkey-linux-64"
12-
WINDOWS_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/monkey-windows-32.exe"
22+
LINUX_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-linux-64"
23+
export LINUX_64_BINARY_URL
24+
export LINUX_64_BINARY_NAME
25+
1326
WINDOWS_32_BINARY_NAME="monkey-windows-32.exe"
14-
WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/monkey-windows-64.exe"
27+
WINDOWS_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-windows-32.exe"
28+
export WINDOWS_32_BINARY_URL
29+
export WINDOWS_32_BINARY_NAME
30+
1531
WINDOWS_64_BINARY_NAME="monkey-windows-64.exe"
32+
WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-windows-64.exe"
33+
export WINDOWS_64_BINARY_URL
34+
export WINDOWS_64_BINARY_NAME
1635

1736
# Other binaries for monkey
18-
TRACEROUTE_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/traceroute64"
19-
TRACEROUTE_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/traceroute32"
20-
SAMBACRY_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/sc_monkey_runner64.so"
21-
SAMBACRY_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/v1.7.0/sc_monkey_runner32.so"
37+
TRACEROUTE_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/traceroute64"
38+
export TRACEROUTE_64_BINARY_URL
39+
TRACEROUTE_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/traceroute32"
40+
export TRACEROUTE_32_BINARY_URL
41+
SAMBACRY_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/sc_monkey_runner64.so"
42+
export SAMBACRY_64_BINARY_URL
43+
SAMBACRY_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/sc_monkey_runner32.so"
44+
export SAMBACRY_32_BINARY_URL

deployment_scripts/config.ps1

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Absolute monkey's path
22
$MONKEY_FOLDER_NAME = "infection_monkey"
33
# Url of public git repository that contains monkey's source code
4+
$MONKEY_REPO = "guardicore/monkey"
45
$MONKEY_GIT_URL = "https://github.com/guardicore/monkey"
56
$MONKEY_RELEASES_URL = $MONKEY_GIT_URL + "/releases"
6-
$MONKEY_LATEST_VERSION = "v1.7.0"
7+
$MONKEY_API_RELEASES_URL = "https://api.github.com/repos/$MONKEY_REPO/releases"
8+
$MONKEY_LATEST_VERSION = (Invoke-WebRequest $MONKEY_API_RELEASES_URL | ConvertFrom-Json)[0].tag_name
79
$MONKEY_DOWNLOAD_URL = $MONKEY_RELEASES_URL + "/download/" + $MONKEY_LATEST_VERSION + "/"
810
# Link to the latest python download or install it manually
9-
$PYTHON_URL = "https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe"
11+
$PYTHON_URL = "https://www.python.org/ftp/python/3.7.7/python-3.7.7-amd64.exe"
1012

1113

1214
# Monkey binaries
@@ -29,8 +31,6 @@ $TRACEROUTE_32_BINARY_URL = $MONKEY_DOWNLOAD_URL + "traceroute32"
2931
$MONKEY_ISLAND_DIR = Join-Path "\monkey" -ChildPath "monkey_island"
3032
$MONKEY_DIR = Join-Path "\monkey" -ChildPath "infection_monkey"
3133
$SAMBA_BINARIES_DIR = Join-Path -Path $MONKEY_DIR -ChildPath "\bin"
32-
$MK32_DLL = "mk32.zip"
33-
$MK64_DLL = "mk64.zip"
3434
$TEMP_PYTHON_INSTALLER = ".\python.exe"
3535
$TEMP_MONGODB_ZIP = ".\mongodb.zip"
3636
$TEMP_OPEN_SSL_ZIP = ".\openssl.zip"
@@ -44,6 +44,4 @@ $MONGODB_URL = "https://downloads.mongodb.org/win32/mongodb-win32-x86_64-2012plu
4444
$OPEN_SSL_URL = "https://indy.fulgan.com/SSL/openssl-1.0.2u-x64_86-win64.zip"
4545
$CPP_URL = "https://go.microsoft.com/fwlink/?LinkId=746572"
4646
$NPM_URL = "https://nodejs.org/dist/v12.14.1/node-v12.14.1-x64.msi"
47-
$MK32_DLL_URL = "https://github.com/guardicore/mimikatz/releases/download/1.1.0/mk32.zip"
48-
$MK64_DLL_URL = "https://github.com/guardicore/mimikatz/releases/download/1.1.0/mk64.zip"
4947
$UPX_URL = "https://github.com/upx/upx/releases/download/v3.96/upx-3.96-win64.zip"

deployment_scripts/deploy_windows.ps1

-14
Original file line numberDiff line numberDiff line change
@@ -226,20 +226,6 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName,
226226
Remove-Item $TEMP_UPX_ZIP
227227
}
228228

229-
# Download mimikatz binaries
230-
$mk32_path = Join-Path -Path $binDir -ChildPath $MK32_DLL
231-
if (!(Test-Path -Path $mk32_path))
232-
{
233-
"Downloading mimikatz 32 binary"
234-
$webClient.DownloadFile($MK32_DLL_URL, $mk32_path)
235-
}
236-
$mk64_path = Join-Path -Path $binDir -ChildPath $MK64_DLL
237-
if (!(Test-Path -Path $mk64_path))
238-
{
239-
"Downloading mimikatz 64 binary"
240-
$webClient.DownloadFile($MK64_DLL_URL, $mk64_path)
241-
}
242-
243229
# Download sambacry binaries
244230
$samba_path = Join-Path -Path $monkey_home -ChildPath $SAMBA_BINARIES_DIR
245231
$samba32_path = Join-Path -Path $samba_path -ChildPath $SAMBA_32_BINARY_NAME

docs/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/public/
2+
/resources/_gen/

docs/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Monkey documentation
2+
3+
This folder contains the Monkey Documentation site.
4+
5+
For more information see `content/development/contribute-documentation.md`.

docs/archetypes/default.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: true
5+
---
6+

0 commit comments

Comments
 (0)