diff --git a/.swm/VW4rf3AxRslfT7lwaug7.swm b/.swm/VW4rf3AxRslfT7lwaug7.swm
index 65090e905..743079918 100644
--- a/.swm/VW4rf3AxRslfT7lwaug7.swm
+++ b/.swm/VW4rf3AxRslfT7lwaug7.swm
@@ -1,31 +1,48 @@
{
"id": "VW4rf3AxRslfT7lwaug7",
"name": "Implement a new PBA — `ScheduleJobs`",
- "dod": "WW91JTIwc2hvdWxkJTIwaW1wbGVtZW50JTIwYSUyMG5ldyUyMFBCQSUyMGluJTIwTW9ua2V5JTIwd2hpY2glMjBzY2hlZHVsZXMlMjBqb2JzJTIwb24lMjB0aGUlMjBtYWNoaW5lLg==",
- "description": "WW91JTIwbmVlZCUyMHRvJTIwaW1wbGVtZW50JTIwdGhlJTIwJTYwU2NoZWR1bGVKb2JzJTYwJTIwUEJBJTIwd2hpY2glMjBjcmVhdGVzJTIwc2NoZWR1bGVkJTIwam9icyUyMG9uJTIwdGhlJTIwbWFjaGluZS4lMjAlM0NiciUzRSUzQ2JyJTNFJTBBJTNDaW1nJTIwc3JjJTNEJTIyaHR0cHMlM0ElMkYlMkZtZWRpYS5naXBoeS5jb20lMkZtZWRpYSUyRmwwSzRtVkU1YjVXWjFzY3RXJTJGZ2lwaHkuZ2lmJTIyJTIwaGVpZ2h0JTNEMTc1JTNFJTNDYnIlM0UlM0NiciUzRSUwQVRoZSUyMGNvbW1hbmRzJTIwdGhhdCUyMGFkZCUyMHNjaGVkdWxlZCUyMGpvYnMlMjBmb3IlMjBXaW5kb3dzJTIwYW5kJTIwTGludXglMjBjYW4lMjBiZSUyMHJldHJpZXZlZCUyMGZyb20lMjAlNjBnZXRfY29tbWFuZHNfdG9fc2NoZWR1bGVfam9icyU2MCUyMCVFMiU4MCU5NCUyMG1ha2UlMjBzdXJlJTIweW91JTIwdW5kZXJzdGFuZCUyMGhvdyUyMHRvJTIwdXNlJTIwdGhpcyUyMGZ1bmN0aW9uJTIwY29ycmVjdGx5LiUwQSUwQSUyMyUyMyUy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EVSRSElMEE=",
+ "dod": "You should implement a new PBA in Monkey which schedules jobs on the machine.",
+ "description": "You need to implement the `ScheduleJobs` PBA which creates scheduled jobs on the machine.
\n
\nThe commands that add scheduled jobs for Windows and Linux can be retrieved from `get_commands_to_schedule_jobs` — make sure you understand how to use this function correctly.\n\n## Manual test \nOnce you think you're done...\n- Run the Monkey Island\n- Make sure the \"Job scheduling\" PBA is enabled in the \"Monkey\" tab in the configuration — for this test, disable network scanning, exploiting, and all other PBAs\n- Run the Monkey\n- Make sure you see the PBA with its results in the Security report as well as in the ATT&CK report under the relevant MITRE technique\n\n\n
\n",
+ "summary": "Many other PBAs are as simple as this one, using shell commands or scripts — see `Timestomping` and `AccountDiscovery`.
\n\nHowever, for less straightforward ones, you can override functions and implement new classes depending on what is required — see `SignedScriptProxyExecution` and `ModifyShellStartupFiles`.
\n\nThis PBA, along with all the other PBAs, will run on a system after it has been breached. The purpose of this code is to test whether target systems allow attackers to schedule jobs, which they could use to run malicious code at some specified date and time.",
+ "diff": "diff --git a/monkey/infection_monkey/post_breach/actions/schedule_jobs.py b/monkey/infection_monkey/post_breach/actions/schedule_jobs.py\nindex d6cdd276..79a7724d 100644\n--- a/monkey/infection_monkey/post_breach/actions/schedule_jobs.py\n+++ b/monkey/infection_monkey/post_breach/actions/schedule_jobs.py\n@@ -10,11 +10,5 @@\n \"\"\"\n \n def __init__(self):\n- linux_cmds, windows_cmds = get_commands_to_schedule_jobs()\n+ pass\n-\n+ # Swimmer: IMPLEMENT HERE!\n- super(ScheduleJobs, self).__init__(name=POST_BREACH_JOB_SCHEDULING,\n- linux_cmd=' '.join(linux_cmds),\n- windows_cmd=windows_cmds)\n- \n- def run(self):\n- super(ScheduleJobs, self).run()\n",
"tests": [],
"hints": [
"Check out the `Timestomping` PBA to get an idea about the implementation.",
"Don't forget to add code to remove the scheduled jobs!"
],
- "files": {
+ "app_version": "0.2.8",
+ "file_version": "1.0.4",
+ "swimmPatch": {
"monkey/infection_monkey/post_breach/actions/schedule_jobs.py": {
- "index": [
- "d6cdd276..79a7724d",
- "100644"
- ],
- "fileA": "monkey/infection_monkey/post_breach/actions/schedule_jobs.py",
- "fileB": "monkey/infection_monkey/post_breach/actions/schedule_jobs.py",
- "status": "MODIFIED",
- "numLineDeletions": 7,
- "numLineAdditions": 2,
- "hunkContainers": [
- "JTdCJTIyaHVuayUyMiUzQSU3QiUyMmhlYWRlciUyMiUzQSUyMiU0MCU0MCUyMC0xMCUyQzEwJTIwJTJCMTAlMkM1JTIwJTQwJTQwJTIwY2xhc3MlMjBTY2hlZHVsZUpvYnMoUEJBKSUzQSUyMiUyQyUyMmNoYW5nZXMlMjIlM0ElNUIlN0IlMjJ0eXBlJTIyJTNBJTIyY29udGV4dCUyMiUyQyUyMmRhdGElMjIlM0ElMjIlMjAlMjAlMjAlMjAlMjAlNUMlMjIlNUMlMjIlNUMlMjIlMjIlMkMlMjJsaW5lTnVtYmVycyUyMiUzQSU3QiUyMmElMjIlM0ExMCUyQyUyMmIlMjIlM0ExMCU3RCU3RCUyQyU3QiUyMnR5cGUlMjIlM0ElMjJjb250ZXh0JTIyJTJDJTIyZGF0YSUyMiUzQSUyMiUyMCUyMiUyQyUyMmxpbmVOdW1iZXJzJTIyJTNBJTdCJTIyYSUyMiUzQTExJTJDJTIyYiUyMiUzQTExJTdEJTdEJTJDJTdCJTIydHlwZSUyMiUzQSUyMmNvbnRleHQlMjIlMkMlMjJkYXRhJTIyJTNBJTIyJTIwJTIwJTIwJTIwJTIwZGVmJTIwX19pbml0X18oc2VsZiklM0ElMjIlMkMlMjJsaW5lTnVtYmVycyUyMiUzQSU3QiUyMmElMjIlM0ExMiUyQyUyMmIlMjIlM0ExMiU3RCU3RCUyQyU3QiUyMnR5cGUlMjIlM0ElMjJkZWwlMjIlMkMlMjJtYXJrJTIyJTNBJTIyLSUyMiUyQyUyMmRhdGElMjIlM0ElMjIlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsaW51eF9jbWRzJTJDJTIwd2luZ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M0ElN0IlMjJiJTIyJTNBMTQlN0QlN0QlNUQlMkMlMjJsaW5lTnVtYmVycyUyMiUzQSU3QiUyMmElMjIlM0ElN0IlMjJzdGFydExpbmUlMjIlM0ExMCUyQyUyMmxpbmVzQ291bnQlMjIlM0ExMCU3RCUyQyUyMmIlMjIlM0ElN0IlMjJzdGFydExpbmUlMjIlM0ExMCUyQyUyMmxpbmVzQ291bnQlMjIlM0E1JTdEJTdEJTdEJTdE"
+ "diffType": "MODIFIED",
+ "fileDiffHeader": "diff --git a/monkey/infection_monkey/post_breach/actions/schedule_jobs.py b/monkey/infection_monkey/post_breach/actions/schedule_jobs.py\nindex d6cdd276..79a7724d 100644\n--- a/monkey/infection_monkey/post_breach/actions/schedule_jobs.py\n+++ b/monkey/infection_monkey/post_breach/actions/schedule_jobs.py",
+ "hunks": [
+ {
+ "swimmHunkMetadata": {
+ "hunkComments": []
+ },
+ "hunkDiffLines": [
+ "@@ -10,11 +10,5 @@",
+ " \"\"\"",
+ " ",
+ " def __init__(self):",
+ "- linux_cmds, windows_cmds = get_commands_to_schedule_jobs()",
+ "+ pass",
+ "-",
+ "+ # Swimmer: IMPLEMENT HERE!",
+ "- super(ScheduleJobs, self).__init__(name=POST_BREACH_JOB_SCHEDULING,",
+ "- linux_cmd=' '.join(linux_cmds),",
+ "- windows_cmd=windows_cmds)",
+ "- ",
+ "- def run(self):",
+ "- super(ScheduleJobs, self).run()"
+ ]
+ }
]
}
},
- "app_version": "0.1.90",
- "file_version": "1.0.2"
+ "hunksOrder": [
+ "monkey/infection_monkey/post_breach/actions/schedule_jobs.py_0"
+ ],
+ "last_commit_sha_for_swimm_patch": "44fd1ab69cfbab33cec638dcbbaa8831992a9a9f"
}
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 887b7cc67..504263456 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -98,10 +98,11 @@ script:
# verify swimm
- cd $TRAVIS_BUILD_DIR
-- wget https://firebasestorage.googleapis.com/v0/b/swimmio.appspot.com/o/Release%2Fv018%2Fswimm-0.1.8-linux-executable\?alt\=media\&token\=e59c0a18-577f-4b77-bb3b-91b22c3d8b2a -O swimm
+- wget "https://firebasestorage.googleapis.com/v0/b/swimmio.appspot.com/o/Release%2Fv029%2FSwimm_0.2.9_Setup.deb?alt=media&token=774ebd98-cb4e-4615-900c-aada224c1608" -O swimm
+- sudo dpkg -i swimm || (sudo apt-get update && sudo apt-get -f install)
- chmod +x ./swimm
-- ./swimm --version
-- ./swimm verify
+- swimm --version
+- swimm verify
after_success:
# Upload code coverage results to codecov.io, see https://github.com/codecov/codecov-bash for more information
diff --git a/deployment_scripts/README.md b/deployment_scripts/README.md
index 16b150852..4ee91b5b4 100644
--- a/deployment_scripts/README.md
+++ b/deployment_scripts/README.md
@@ -39,6 +39,7 @@ Your user must have root permissions; however, don't run the script as root!
```sh
wget https://raw.githubusercontent.com/guardicore/monkey/develop/deployment_scripts/deploy_linux.sh
+chmod u+x ./deploy_linux.sh
```
This will download our deploy script. It's a good idea to read it quickly before executing it!
@@ -52,4 +53,13 @@ After downloading that script, execute it in a shell. The first argument should
- `./deploy_linux.sh "" "master"` (deploys master branch in script directory)
- `./deploy_linux.sh "/home/user/new" "master"` (if directory "new" is not found creates it and clones master branch into it)
-You may also pass in an optional third `false` parameter to disable downloading the latest agent binaries.
\ No newline at end of file
+You may also pass in an optional third `false` parameter to disable downloading the latest agent binaries.
+
+### Run on Linux
+
+After the `deploy_linux.sh` script completes, you can start the monkey island.
+
+```sh
+cd infection_monkey/monkey
+./monkey_island/linux/run.sh
+```
diff --git a/deployment_scripts/config b/deployment_scripts/config
index bda54e390..cad04a01c 100644
--- a/deployment_scripts/config
+++ b/deployment_scripts/config
@@ -4,41 +4,42 @@ export MONKEY_FOLDER_NAME="infection_monkey"
# Url of public git repository that contains monkey's source code
export MONKEY_GIT_URL="https://github.com/guardicore/monkey"
-get_latest_release() {
- curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub API
- grep '"tag_name":' | # Get tag line
- sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
+exists() {
+ command -v "$1" >/dev/null 2>&1
}
-MONKEY_LATEST_RELEASE=$(get_latest_release "monkey/guardicore")
+get_latest_release() {
+ RELEASE_URL="https://api.github.com/repos/$1/releases/latest"
+
+ if exists wget; then
+ RELEASE_INFO=$(wget --quiet -O - "$RELEASE_URL") # Get latest release from GitHub API
+ else
+ RELEASE_INFO=$(curl --silent "$RELEASE_URL") # Get latest release from GitHub API
+ fi
+
+ echo "$RELEASE_INFO" |
+ grep '"tag_name":' | # Get tag line
+ sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
+}
+
+MONKEY_LATEST_RELEASE=$(get_latest_release "guardicore/monkey")
# Monkey binaries
-LINUX_32_BINARY_NAME="monkey-linux-32"
-LINUX_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-linux-32"
-export LINUX_32_BINARY_URL
-export LINUX_32_BINARY_NAME
+export LINUX_32_BINARY_NAME="monkey-linux-32"
+export LINUX_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-linux-32"
-LINUX_64_BINARY_NAME="monkey-linux-64"
-LINUX_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-linux-64"
-export LINUX_64_BINARY_URL
-export LINUX_64_BINARY_NAME
+export LINUX_64_BINARY_NAME="monkey-linux-64"
+export LINUX_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-linux-64"
-WINDOWS_32_BINARY_NAME="monkey-windows-32.exe"
-WINDOWS_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-windows-32.exe"
-export WINDOWS_32_BINARY_URL
-export WINDOWS_32_BINARY_NAME
+export WINDOWS_32_BINARY_NAME="monkey-windows-32.exe"
+export WINDOWS_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-windows-32.exe"
-WINDOWS_64_BINARY_NAME="monkey-windows-64.exe"
-WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/monkey-windows-64.exe"
-export WINDOWS_64_BINARY_URL
-export WINDOWS_64_BINARY_NAME
+export WINDOWS_64_BINARY_NAME="monkey-windows-64.exe"
+export WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-windows-64.exe"
# Other binaries for monkey
-TRACEROUTE_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/traceroute64"
-export TRACEROUTE_64_BINARY_URL
-TRACEROUTE_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/traceroute32"
-export TRACEROUTE_32_BINARY_URL
-SAMBACRY_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/sc_monkey_runner64.so"
-export SAMBACRY_64_BINARY_URL
-SAMBACRY_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$($MONKEY_LATEST_RELEASE)/sc_monkey_runner32.so"
-export SAMBACRY_32_BINARY_URL
+export TRACEROUTE_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/traceroute64"
+export TRACEROUTE_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/traceroute32"
+
+export SAMBACRY_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner64.so"
+export SAMBACRY_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner32.so"
diff --git a/deployment_scripts/deploy_linux.sh b/deployment_scripts/deploy_linux.sh
index d13478018..728e2f52d 100755
--- a/deployment_scripts/deploy_linux.sh
+++ b/deployment_scripts/deploy_linux.sh
@@ -10,7 +10,7 @@ is_root() {
has_sudo() {
# 0 true, 1 false
- timeout 1 sudo id && return 0 || return 1
+ return $(sudo -nv > /dev/null 2>&1)
}
handle_error() {
@@ -23,6 +23,11 @@ log_message() {
echo -e "DEPLOYMENT SCRIPT: $1"
}
+if is_root; then
+ log_message "Please don't run this script as root"
+ exit 1
+fi
+
config_branch=${2:-"develop"}
config_url="https://raw.githubusercontent.com/guardicore/monkey/${config_branch}/deployment_scripts/config"
@@ -62,14 +67,9 @@ ISLAND_BINARIES_PATH="$ISLAND_PATH/cc/binaries"
INFECTION_MONKEY_DIR="$monkey_home/monkey/infection_monkey"
MONKEY_BIN_DIR="$INFECTION_MONKEY_DIR/bin"
-if is_root; then
- log_message "Please don't run this script as root"
- exit 1
-fi
-
-HAS_SUDO=$(has_sudo)
-if [[ ! $HAS_SUDO ]]; then
- log_message "You need root permissions for some of this script operations. Quiting."
+if ! has_sudo; then
+ log_message "You need root permissions for some of this script operations. \
+Run \`sudo -v\`, enter your password, and then re-run this script."
exit 1
fi
@@ -110,13 +110,16 @@ if [[ ${python_cmd} == "" ]]; then
log_message "Python 3.7 command not found. Installing python 3.7."
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
- sudo apt install python3.7 python3.7-dev
+ sudo apt-get install -y python3.7 python3.7-dev
log_message "Python 3.7 is now available with command 'python3.7'."
python_cmd="python3.7"
fi
log_message "Installing build-essential"
-sudo apt install build-essential
+sudo apt-get install -y build-essential
+
+log_message "Installing python3-distutils"
+sudo apt-get install -y python3-distutils
log_message "Installing or updating pip"
# shellcheck disable=SC2086
@@ -134,7 +137,7 @@ requirements_island="$ISLAND_PATH/requirements.txt"
${python_cmd} -m pip install -r "${requirements_island}" --user --upgrade || handle_error
log_message "Installing monkey requirements"
-sudo apt-get install libffi-dev upx libssl-dev libc++1
+sudo apt-get install -y libffi-dev upx libssl-dev libc++1
requirements_monkey="$INFECTION_MONKEY_DIR/requirements.txt"
${python_cmd} -m pip install -r "${requirements_monkey}" --user --upgrade || handle_error
@@ -162,15 +165,19 @@ chmod a+x "$ISLAND_BINARIES_PATH/$LINUX_64_BINARY_NAME"
# If a user haven't installed mongo manually check if we can install it with our script
if ! exists mongod; then
+ log_message "Installing libcurl4"
+ sudo apt-get install -y libcurl4
+
log_message "Installing MongoDB"
"${ISLAND_PATH}"/linux/install_mongo.sh ${MONGO_PATH} || handle_error
fi
log_message "Installing openssl"
-sudo apt-get install openssl
+sudo apt-get install -y openssl
# Generate SSL certificate
log_message "Generating certificate"
+chmod u+x "${ISLAND_PATH}"/linux/create_certificate.sh
"${ISLAND_PATH}"/linux/create_certificate.sh ${ISLAND_PATH}/cc
# Update node
diff --git a/docs/content/development/_index.md b/docs/content/development/_index.md
index deab32e6c..f4b2acc85 100644
--- a/docs/content/development/_index.md
+++ b/docs/content/development/_index.md
@@ -15,7 +15,7 @@ Want to help secure networks? That's great!
Here's a few short links to help you get started.
-* [Getting up and running](../setup-development-environment) - To help you get a working development setup.
+* [Getting up and running](./setup-development-environment) - To help you get a working development setup.
* [Contributing guidelines](https://github.com/guardicore/monkey/blob/master/CONTRIBUTING.md) - Some guidelines to help you submit.
## What are we looking for?
diff --git a/docs/content/usage/configuration/_index.md b/docs/content/usage/configuration/_index.md
index f10d81ce1..0a3558805 100644
--- a/docs/content/usage/configuration/_index.md
+++ b/docs/content/usage/configuration/_index.md
@@ -17,4 +17,4 @@ This section of the documentation is incomplete and under active construction.
See these documentation pages for information on each configuration value:
-{{% children description=true %}}
+{{% children description=true style="p"%}}
diff --git a/docs/content/usage/getting-started.md b/docs/content/usage/getting-started.md
index 63d2bbaec..958318552 100644
--- a/docs/content/usage/getting-started.md
+++ b/docs/content/usage/getting-started.md
@@ -15,7 +15,7 @@ After deploying the Monkey Island in your environment, navigate to `https:// "
The Monkey likes working together. See these documentation pages for information on each integration the Monkey currently offers:
-{{% children description=true %}}
+{{% children description=true style="p"%}}
diff --git a/docs/content/usage/integrations/aws-run-on-ec2-machine.md b/docs/content/usage/integrations/aws-run-on-ec2-machine.md
index 0183dc241..e30a8b554 100644
--- a/docs/content/usage/integrations/aws-run-on-ec2-machine.md
+++ b/docs/content/usage/integrations/aws-run-on-ec2-machine.md
@@ -54,16 +54,15 @@ See [Amazon's documentation about working with SSM agents](https://docs.aws.amaz
### Running the monkey
-When you run the monkey island on an AWS instance, the island detects it's running on AWS and present the following option in the _"Run Monkey"_ page, like so:
+When you run the Monkey Island on an AWS instance, the island detects it's running on AWS and present the following option in the _"Run Monkey"_ page, like so:
![Running a Monkey on EC2 Instance](/images/usage/integrations/monkey-island-aws-screenshot-1.png "Running a Monkey on EC2 Instance")
-And then you can choose one of the available instances as "patient zero" like so:
+After you click on "AWS run" you can choose one of the available instances as "patient zero" like so:
-1. Click on "Run on AWS"
-2. Choose the relevant Network Interface
-3. Select the machines you'd like to run the Monkey on
-4. Click "Run on Selected Machines", and watch the monkey go! 🐒
+1. Choose the relevant Network Interface
+2. Select the machines you'd like to run the Monkey on
+3. Click "Run on Selected Machines", and watch the monkey go! 🐒
![Running a Monkey on EC2 Instance](/images/usage/integrations/monkey-island-aws-screenshot-2.png "Running a Monkey on EC2 Instance")
diff --git a/docs/content/usage/integrations/aws-security-hub.md b/docs/content/usage/integrations/aws-security-hub.md
index c03b12ec1..f708165fe 100644
--- a/docs/content/usage/integrations/aws-security-hub.md
+++ b/docs/content/usage/integrations/aws-security-hub.md
@@ -23,6 +23,13 @@ If the correct permissions have been set on the AWS IAM role of the Monkey Islan
Note that the integration is specifically between your Monkey Island and the security hub. The Infection Monkey is an free project and there is no centralised infrastructure.
+### Enabling finding reception
+
+Before starting the scan, make sure that AWS Security Hub is accepting findings by enabling Infection Monkey
+ integration. Find **GuardiCore: AWS Infection Monkey** integration on the list and click on **Accept findings**.
+
+![Enabled integration](/images/usage/integrations/security-hub-enable-accepting-findings.png "Enabled integration")
+
## Integration details
The Infection Monkey reports the following types of issues to the AWS security hub: `Software and Configuration Checks/Vulnerabilities/CVE`.
diff --git a/docs/content/usage/use-cases/_index.md b/docs/content/usage/use-cases/_index.md
index 389d5328a..836646100 100644
--- a/docs/content/usage/use-cases/_index.md
+++ b/docs/content/usage/use-cases/_index.md
@@ -18,4 +18,4 @@ No worries! The Monkey uses safe exploiters and does not cause any permanent sys
## Section contents
-{{% children description=True %}}
+{{% children description=True style="p"%}}
diff --git a/docs/content/usage/use-cases/attack.md b/docs/content/usage/use-cases/attack.md
new file mode 100644
index 000000000..ee2e002c7
--- /dev/null
+++ b/docs/content/usage/use-cases/attack.md
@@ -0,0 +1,38 @@
+---
+title: "MITRE ATT&CK assessment"
+date: 2020-10-22T16:58:22+03:00
+draft: false
+description: "Assess your network security detection and prevention capabilities."
+weight: 2
+---
+
+## Overview
+
+Infection Monkey can simulate various [ATT&CK](https://attack.mitre.org/matrices/enterprise/) techniques on the network.
+Use it to assess your security solutions’ detection and prevention capabilities. Infection Monkey will help you find
+which ATT&CK techniques go unnoticed and will provide recommendations about preventing them.
+
+
+## Configuration
+
+- **ATT&CK matrix** You can use ATT&CK configuration section to select which techniques you want the Monkey to simulate.
+Leave default settings for the full simulation.
+- **Exploits -> Credentials** This configuration value will be used for brute-forcing. We use most popular passwords
+and usernames, but feel free to adjust it according to the default passwords used in your network. Keep in mind that
+long lists means longer scanning times.
+- **Network -> Scope** Disable “Local network scan” and instead provide specific network ranges in
+the “Scan target list”.
+
+![ATT&CK matrix](/images/usage/scenarios/attack-matrix.png "ATT&CK matrix")
+
+## Suggested run mode
+
+Run the Infection Monkey on as many machines in your environment as you can to get a better assessment. This can be easily
+achieved by selecting the “Manual” run option and executing the command shown on different machines in your environment
+manually or with your deployment tool.
+
+## Assessing results
+
+The **ATT&CK Report** shows the status of ATT&CK techniques simulations. Click on any technique to see more details
+about it and potential mitigations. Keep in mind that each technique display contains a question mark symbol that
+will take you to the official documentation of ATT&CK technique, where you can learn more about it.
diff --git a/docs/content/usage/use-cases/credential-leak.md b/docs/content/usage/use-cases/credential-leak.md
index 498e1ff54..923335e34 100644
--- a/docs/content/usage/use-cases/credential-leak.md
+++ b/docs/content/usage/use-cases/credential-leak.md
@@ -1,9 +1,9 @@
---
-title: "Credential Leak"
+title: "Credentials Leak"
date: 2020-08-12T13:04:25+03:00
draft: false
-description: "Assess the impact of successful phishing attack, insider threat, or other form of credentials leak."
-weight: 4
+description: "Assess the impact of a successful phishing attack, insider threat, or other form of credentials leak."
+weight: 5
---
## Overview
@@ -16,8 +16,6 @@ where these credentials can be reused.
## Configuration
-#### Important configuration values:
-
- **Exploits -> Credentials** After setting up the Island add the users’ **real** credentials
(usernames and passwords) to the Monkey’s configuration (Don’t worry, this sensitive data is not accessible and is not
distributed or used in any way other than being sent to the monkeys, and can be easily eliminated by resetting the Monkey Island’s configuration).
@@ -26,15 +24,14 @@ For this to work, Monkey Island or initial Monkey needs to have access to SSH ke
To make sure SSH keys were gathered successfully, refresh the page and check this configuration value after you run the Monkey
(content of keys will not be displayed, it will appear as `