2021-06-07 23:07:04 +08:00
|
|
|
---
|
|
|
|
title: "Linux"
|
|
|
|
date: 2020-05-26T20:57:28+03:00
|
|
|
|
draft: false
|
|
|
|
pre: '<i class="fab fa-linux"></i> '
|
|
|
|
weight: 4
|
|
|
|
tags: ["setup", "AppImage", "linux"]
|
|
|
|
---
|
|
|
|
|
|
|
|
## Supported operating systems
|
|
|
|
|
2021-06-11 22:54:36 +08:00
|
|
|
An [AppImage](https://appimage.org/) is a distribution-agnostic, self-running
|
|
|
|
package that contains an application and everything that it may need to run.
|
2021-06-11 22:34:24 +08:00
|
|
|
|
|
|
|
The Infection Monkey AppImage package should run on most modern Linux distros that have FUSE
|
|
|
|
installed, but the ones that we've tested are:
|
2021-07-29 20:37:43 +08:00
|
|
|
- BlackArch 2020.12.01
|
|
|
|
- Kali 2021.2
|
|
|
|
- Parrot 4.11
|
|
|
|
- Rocky 8
|
2021-08-11 20:00:46 +08:00
|
|
|
- openSUSE Leap 15.3
|
|
|
|
- Ubuntu Bionic 18.04
|
|
|
|
- Ubuntu Focal 20.04
|
|
|
|
- Ubuntu Hirsute 21.04
|
2021-06-11 17:11:08 +08:00
|
|
|
|
2022-01-25 21:20:33 +08:00
|
|
|
On Windows, AppImage can be run in WSL 2.
|
2021-10-22 15:03:58 +08:00
|
|
|
|
|
|
|
|
2021-06-07 23:07:04 +08:00
|
|
|
## Deployment
|
|
|
|
|
2021-06-07 23:08:10 +08:00
|
|
|
1. Make the AppImage package executable:
|
|
|
|
```bash
|
2022-01-21 03:38:14 +08:00
|
|
|
chmod u+x InfectionMonkey-v1.13.0.AppImage
|
2021-06-07 23:08:10 +08:00
|
|
|
```
|
|
|
|
1. Start Monkey Island by running the Infection Monkey AppImage package:
|
|
|
|
```bash
|
2022-01-21 03:38:14 +08:00
|
|
|
./InfectionMonkey-v1.13.0.AppImage
|
2021-06-07 23:08:10 +08:00
|
|
|
```
|
|
|
|
1. Access the Monkey Island web UI by pointing your browser at
|
|
|
|
`https://localhost:5000`.
|
|
|
|
|
2021-10-21 20:52:37 +08:00
|
|
|
{{% notice info %}}
|
|
|
|
If you're prompted to delete your data directory and you're not sure what to
|
|
|
|
do, see the [FAQ]({{< ref
|
|
|
|
"/faq/#i-updated-to-a-new-version-of-the-infection-monkey-and-im-being-asked-to-delete-my-existing-data-directory-why"
|
|
|
|
>}}) for more information.
|
|
|
|
{{% /notice %}}
|
|
|
|
|
2022-05-10 20:51:49 +08:00
|
|
|
## Running the Infection Monkey as a service on boot
|
|
|
|
|
2022-05-11 16:02:35 +08:00
|
|
|
The Infection Monkey can be installed as a service and run on boot by running the AppImage package
|
|
|
|
with the following parameters. This requires root permissions, so run `sudo -v` and enter your
|
|
|
|
password before running the script, if required.
|
2022-05-10 20:51:49 +08:00
|
|
|
```bash
|
|
|
|
./InfectionMonkey-v1.13.0.AppImage service --install --user <USERNAME>
|
|
|
|
```
|
|
|
|
|
|
|
|
To uninstall it, run:
|
|
|
|
```bash
|
|
|
|
./InfectionMonkey-v1.13.0.AppImage service --uninstall
|
|
|
|
```
|
|
|
|
|
2021-11-30 21:44:46 +08:00
|
|
|
## Configuring the server
|
|
|
|
|
|
|
|
You can configure the server by creating
|
|
|
|
a [server configuration file](../../reference/server_configuration) and
|
|
|
|
providing a path to it via command line parameters:
|
|
|
|
|
2022-01-26 02:35:49 +08:00
|
|
|
`./InfectionMonkey-v1.13.0.AppImage --server-config="/path/to/server_config.json"`
|
2021-11-30 21:44:46 +08:00
|
|
|
|
2021-06-07 23:08:10 +08:00
|
|
|
### Start Monkey Island with user-provided certificate
|
|
|
|
|
|
|
|
By default, Infection Monkey comes with a [self-signed SSL
|
|
|
|
certificate](https://aboutssl.org/what-is-self-sign-certificate/). In
|
|
|
|
enterprise or other security-sensitive environments, it is recommended that the
|
|
|
|
user provide Infection Monkey with a certificate that has been signed by a
|
|
|
|
private certificate authority.
|
|
|
|
|
2021-11-30 21:44:46 +08:00
|
|
|
1. Terminate the Island process if it's already running.
|
2021-06-07 23:08:10 +08:00
|
|
|
|
|
|
|
1. (Optional but recommended) Move your `.crt` and `.key` files to
|
|
|
|
`$HOME/.monkey_island`.
|
|
|
|
|
2021-06-10 19:13:47 +08:00
|
|
|
1. Make sure that your `.crt` and `.key` files are readable only by you.
|
2021-06-07 23:08:10 +08:00
|
|
|
|
|
|
|
```bash
|
2021-06-10 19:13:47 +08:00
|
|
|
chmod 600 <PATH_TO_KEY_FILE>
|
|
|
|
chmod 600 <PATH_TO_CRT_FILE>
|
2021-06-07 23:08:10 +08:00
|
|
|
```
|
|
|
|
|
2021-11-26 22:55:43 +08:00
|
|
|
1. Create a [server configuration file and provide the path to the certificate](../../reference/server_configuration).
|
2021-12-01 01:56:52 +08:00
|
|
|
The server configuration file should look something like:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"ssl_certificate": {
|
|
|
|
"ssl_certificate_file": "$HOME/.monkey_island/my_cert.crt",
|
|
|
|
"ssl_certificate_key_file": "$HOME/.monkey_island/my_key.key"
|
|
|
|
}
|
2021-11-30 21:44:46 +08:00
|
|
|
}
|
2021-12-01 01:56:52 +08:00
|
|
|
```
|
2021-11-30 21:44:46 +08:00
|
|
|
|
|
|
|
1. Start Monkey Island by running the Infection Monkey AppImage package:
|
|
|
|
```bash
|
2022-01-26 02:35:49 +08:00
|
|
|
./InfectionMonkey-v1.13.0.AppImage --server-config="/path/to/server_config.json"
|
2021-11-30 21:44:46 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
1. Access the Monkey Island web UI by pointing your browser at
|
|
|
|
`https://localhost:5000`.
|
|
|
|
|
|
|
|
### Change logging level
|
|
|
|
|
|
|
|
1. Terminate the Island process if it's already running.
|
|
|
|
|
|
|
|
1. Create a [server configuration file](../../reference/server_configuration).
|
2021-12-01 01:56:52 +08:00
|
|
|
The server configuration file should look something like:
|
2021-11-30 21:44:46 +08:00
|
|
|
|
2021-12-01 01:56:52 +08:00
|
|
|
```json
|
|
|
|
{
|
|
|
|
"log_level": "INFO"
|
|
|
|
}
|
|
|
|
```
|
2021-06-07 23:08:10 +08:00
|
|
|
|
|
|
|
1. Start Monkey Island by running the Infection Monkey AppImage package:
|
|
|
|
```bash
|
2022-01-26 02:35:49 +08:00
|
|
|
./InfectionMonkey-v1.13.0.AppImage --server-config="/path/to/server_config.json"
|
2021-06-07 23:08:10 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
1. Access the Monkey Island web UI by pointing your browser at
|
|
|
|
`https://localhost:5000`.
|
|
|
|
|
2021-06-07 23:07:04 +08:00
|
|
|
## Upgrading
|
2021-06-11 17:12:20 +08:00
|
|
|
|
|
|
|
Currently, there's no "upgrade-in-place" option when a new version is released.
|
|
|
|
To get an updated version, download the updated AppImage package and follow the deployment
|
|
|
|
instructions again.
|
|
|
|
|
|
|
|
If you'd like to keep your existing configuration, you can export it to a file
|
|
|
|
using the *Export config* button and then import it to the new Monkey Island.
|
|
|
|
|
|
|
|
![Export configuration](../../images/setup/export-configuration.png "Export configuration")
|