2017-08-23 11:55:44 +02:00
|
|
|
# Build Automated Machine Images for MISP
|
|
|
|
|
2018-07-20 19:31:10 +02:00
|
|
|
Build a virtual machine for MISP based on Ubuntu 18.04 server
|
2018-01-28 17:16:08 +01:00
|
|
|
(for VirtualBox or VMWare).
|
|
|
|
|
2017-08-23 11:55:44 +02:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
* [VirtualBox](https://www.virtualbox.org)
|
2017-08-30 08:57:06 +02:00
|
|
|
* [Packer](https://www.packer.io) from the Packer website
|
2018-01-19 12:39:07 +01:00
|
|
|
* *tree* -> sudo apt install tree (on deployment side)
|
2017-08-23 11:55:44 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2017-08-23 12:03:02 +02:00
|
|
|
In the file *scripts/bootstrap.sh*, set the value of ``MISP_BASEURL`` according
|
|
|
|
to the IP address you will associate to your VM
|
|
|
|
(for example: http://172.16.100.100).
|
|
|
|
|
2017-08-28 08:40:06 +02:00
|
|
|
Launch the generation with the VirtualBox builder:
|
2017-08-23 12:03:02 +02:00
|
|
|
|
2017-08-24 08:35:46 +02:00
|
|
|
$ packer build -only=virtualbox-iso misp.json
|
2017-08-23 11:55:44 +02:00
|
|
|
|
|
|
|
A VirtualBox image will be generated and stored in the folder
|
2017-08-29 09:47:13 +02:00
|
|
|
*output-virtualbox-iso*.
|
|
|
|
|
|
|
|
Default credentials are displayed (Web interface, SSH and MariaDB) at the end
|
|
|
|
of the process. You can directly import the image in VirtualBox.
|
|
|
|
|
|
|
|
The sha1 and sha512 checksums of the generated VM will be stored in the files
|
|
|
|
*packer_virtualbox-iso_virtualbox-iso_sha1.checksum* and
|
|
|
|
*packer_virtualbox-iso_virtualbox-iso_sha512.checksum* respectively.
|
2017-08-23 23:52:00 +02:00
|
|
|
|
2017-08-29 10:41:37 +02:00
|
|
|
In case you encounter a problem with the ``MISP_BASEURL``, you can still change
|
|
|
|
it when the VM is running. For example the IP address of your VM is
|
2017-08-29 11:45:39 +02:00
|
|
|
``172.16.100.123`` you can set ``MISP_BASEURL`` from your host with the command:
|
2017-08-29 10:41:37 +02:00
|
|
|
|
2017-08-29 11:45:39 +02:00
|
|
|
$ ssh misp@172.16.100.123 sudo -u www-data /var/www/MISP/app/Console/cake Baseurl http://172.16.100.123
|
2017-08-29 10:41:37 +02:00
|
|
|
|
2017-08-24 08:39:35 +02:00
|
|
|
If you want to build an image for VMWare you will need to install it and to
|
|
|
|
use the VMWare builder with the command:
|
|
|
|
|
|
|
|
$ packer build -only=vmware-iso misp.json
|
|
|
|
|
|
|
|
You can also launch all builders in parallel.
|
2017-08-23 23:52:00 +02:00
|
|
|
|
2017-08-28 08:40:06 +02:00
|
|
|
### Modules activated by default in the VM
|
|
|
|
|
|
|
|
* [MISP galaxy](https://github.com/MISP/misp-galaxy)
|
|
|
|
* [MISP modules](https://github.com/MISP/misp-modules)
|
|
|
|
* [MISP taxonomies](https://github.com/MISP/misp-taxonomies)
|
2018-07-15 23:42:09 +02:00
|
|
|
* [MISP noticelists](https://github.com/MISP/misp-noticelist)
|
|
|
|
* [MISP warninglists](https://github.com/MISP/misp-warninglists)
|
|
|
|
* [MISP ZMQ](https://github.com/MISP/misp-book/tree/master/misp-zmq)
|
|
|
|
* [MISP dashboard](https://github.com/MISP/misp-dashboard)
|
2017-08-28 08:40:06 +02:00
|
|
|
|
|
|
|
## Automatic export to GitHub
|
2017-08-23 23:52:00 +02:00
|
|
|
|
2017-08-25 14:56:01 +02:00
|
|
|
$ GITHUB_AUTH_TOKEN=<your-github-auth-token>
|
2017-08-28 10:18:35 +02:00
|
|
|
$ TAG=$(curl https://api.github.com/repos/MISP/MISP/releases/latest | jq -r '.tag_name')
|
2017-08-25 14:56:01 +02:00
|
|
|
$ ./upload.sh github_api_token=$GITHUB_AUTH_TOKEN owner=MISP repo=MISP tag=$TAG filename=./output-virtualbox-iso/MISP_demo.ova
|
2017-08-29 09:28:19 +02:00
|
|
|
|
2017-12-06 15:28:00 +01:00
|
|
|
## Upload latest release
|
|
|
|
|
|
|
|
curl -s https://api.github.com/repos/MISP/MISP/tags |jq -r '.[0] | .name'
|
|
|
|
|
|
|
|
|
2017-08-29 09:28:19 +02:00
|
|
|
You can add these lines in the *post-processors* section of the file
|
|
|
|
*misp.json* if you want to automate the process.
|