misp-packer/misp.json

266 lines
8.5 KiB
JSON
Raw Normal View History

2017-08-23 11:55:44 +02:00
{
2020-04-30 04:18:03 +02:00
"_comment": "MISP VM Autogen packer build system",
"builders": [
{
2020-04-30 04:18:03 +02:00
"boot_command": [
"{{ user `boot_command_prefix` }}<wait>",
"/install/vmlinuz noapic <wait>",
"initrd=/install/initrd.gz <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait>",
"hostname={{ user `hostname` }} <wait>",
"grub-installer/bootdev=/dev/sda<wait> <wait>",
"fb=false debconf/frontend=noninteractive <wait>",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA <wait>",
"keyboard-configuration/variant=USA console-setup/ask_detect=false <wait>",
"passwd/user-fullname={{ user `ssh_fullname` }} <wait>",
"passwd/user-password={{ user `ssh_password` }} <wait>",
"passwd/user-password-again={{ user `ssh_password` }} <wait>",
"passwd/username={{ user `ssh_username` }} <wait>",
"debconf/frontend=noninteractive <wait>",
"-- <enter>"
2020-04-30 04:18:03 +02:00
],
"disk_size": "{{user `disk_size`}}",
"export_opts": [
"--manifest",
2023-05-22 08:45:53 +02:00
"--vsys",
"0",
"--eulafile",
"/tmp/LICENSE-misp",
"--description",
"{{user `vm_description`}}",
"--version",
"{{user `vm_version`}}"
],
2020-04-30 04:18:03 +02:00
"format": "ova",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"guest_os_type": "Ubuntu_64",
"hard_drive_interface": "sata",
"headless": "{{user `headless`}}",
"http_directory": "preseeds",
"http_port_max": 9011,
"http_port_min": 9001,
2023-05-22 08:45:53 +02:00
"iso_checksum": "{{ user `iso_checksum_type` }}:{{ user `iso_checksum` }}",
2020-04-30 04:18:03 +02:00
"iso_urls": [
"{{ user `iso_path` }}/{{ user `iso_name` }}",
"{{ user `iso_url` }}"
2020-04-30 04:18:03 +02:00
],
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"ssh_password": "{{user `ssh_pass`}}",
"ssh_pty": "true",
2020-04-30 04:18:03 +02:00
"ssh_timeout": "20m",
"ssh_username": "{{user `ssh_name`}}",
"type": "virtualbox-iso",
"vboxmanage": [
2023-05-22 08:45:53 +02:00
[
"modifyvm",
"{{.Name}}",
"--memory",
"{{user `memory`}}"
],
[
"modifyvm",
"{{.Name}}",
"--natpf1",
"ssh,tcp,,2222,0.0.0.0,22"
],
[
"modifyvm",
"{{.Name}}",
"--natpf1",
"http,tcp,,8080,,80"
],
[
"modifyvm",
"{{.Name}}",
"--natpf1",
"https,tcp,,8443,,443"
],
[
"modifyvm",
"{{.Name}}",
"--natpf1",
"dashboard,tcp,,8001,0.0.0.0,8001"
],
[
"modifyvm",
"{{.Name}}",
"--natpf1",
"viper,tcp,,8888,0.0.0.0,8888"
],
[
"modifyvm",
"{{.Name}}",
"--natpf1",
"jupyter-notebook,tcp,,8889,0.0.0.0,8889"
],
[
"modifyvm",
"{{.Name}}",
"--natpf1",
"misp-modules,tcp,,1666,0.0.0.0,6666"
],
[
"modifyvm",
"{{.Name}}",
"--audio",
"none"
],
[
"modifyvm",
"{{.Name}}",
"--graphicscontroller",
"vmsvga"
],
[
"modifyvm",
"{{.Name}}",
"--usb",
"off"
],
[
"modifyvm",
"{{.Name}}",
"--vrde",
"off"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"{{user `cpus`}}"
],
[
"modifyvm",
"{{.Name}}",
"--vram",
"32"
]
2020-04-30 04:18:03 +02:00
],
"vm_name": "{{user `vm_name`}}"
},
{
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait>",
"hostname={{user `hostname`}} <wait>",
"fb=false debconf/frontend=noninteractive <wait>",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA <wait>",
"keyboard-configuration/variant=USA console-setup/ask_detect=false <wait>",
"initrd=/install/initrd.gz -- <enter>"
2020-04-30 04:18:03 +02:00
],
"disk_size": "{{user `disk_size`}}",
"guest_os_type": "ubuntu-64",
"headless": "{{user `headless`}}",
"http_directory": "preseeds",
"http_port_max": 9011,
"http_port_min": 9001,
2023-05-22 08:45:53 +02:00
"iso_checksum": "{{ user `iso_checksum_type` }}:{{ user `iso_checksum` }}",
2020-04-30 04:18:03 +02:00
"iso_urls": [
"{{ user `iso_path` }}/{{ user `iso_name` }}",
"{{ user `iso_url` }}"
2020-04-30 04:18:03 +02:00
],
"memory": "{{user `memory`}}",
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"skip_compaction": false,
"ssh_password": "{{user `ssh_pass`}}",
"ssh_pty": "true",
2020-04-30 04:18:03 +02:00
"ssh_timeout": "20m",
"ssh_username": "{{user `ssh_name`}}",
"type": "vmware-iso",
"vm_name": "{{user `vm_name`}}"
}
2020-04-30 04:18:03 +02:00
],
"provisioners": [
{
2020-04-30 04:18:03 +02:00
"environment_vars": [
"DESKTOP={{user `desktop`}}",
"UPDATE={{user `update`}}",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
"no_proxy={{user `no_proxy`}}"
2020-04-30 04:18:03 +02:00
],
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
"inline": [
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
2020-04-30 04:18:03 +02:00
],
"type": "shell"
},
{
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
2020-04-30 04:18:03 +02:00
"script": "scripts/users.sh",
"type": "shell"
},
{
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
2020-04-30 04:18:03 +02:00
"script": "scripts/interfaces.sh",
"type": "shell"
},
{
2020-04-30 04:18:03 +02:00
"destination": "/tmp/INSTALL.sh",
"source": "scripts/INSTALL.sh",
2020-04-30 04:18:03 +02:00
"type": "file"
},
{
2020-04-30 04:18:03 +02:00
"environment_vars": [
"PACKER=1",
"DEBIAN_FRONTEND=noninteractive"
2020-04-30 04:18:03 +02:00
],
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -u {{user `ssh_name`}} -E -S bash '{{ .Path }}'",
"inline": [
"chmod u+x /tmp/INSTALL.sh",
"/tmp/INSTALL.sh -A -u"
],
"pause_before": "10s",
"type": "shell"
},
{
2020-04-30 04:18:03 +02:00
"destination": "/tmp/crontab",
"source": "conffiles/crontab",
2020-04-30 04:18:03 +02:00
"type": "file"
},
{
2020-04-30 04:18:03 +02:00
"destination": "/tmp/issue",
"source": "conffiles/issue",
2020-04-30 04:18:03 +02:00
"type": "file"
},
{
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
2020-04-30 04:18:03 +02:00
"expect_disconnect": "true",
"pause_after": "30s",
"pause_before": "10s",
"script": "scripts/clean.sh",
2020-04-30 04:18:03 +02:00
"type": "shell"
}
2020-04-30 04:18:03 +02:00
],
"variables": {
"boot_command_prefix": "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"cpus": "1",
"desktop": "false",
"disk_size": "25000",
"headless": "true",
"hostname": "misp",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
2022-04-02 21:57:09 +02:00
"iso_checksum": "7514fceffc9ddc636f97c69e330976ffc88652842e700ba20f9a41b4ede34f56990777da883b845f769d22c444660c7982bc08be8007a68251e7013d97c16185",
"iso_checksum_type": "sha512",
2023-05-17 15:10:16 +02:00
"iso_name": "ubuntu-20.04.6-server-amd64.iso",
"iso_path": "iso",
2023-05-30 08:44:38 +02:00
"iso_url": "http://cdimage.ubuntu.com/ubuntu/releases/focal/release/ubuntu-20.04.6-server-amd64.iso",
"memory": "3072",
"no_proxy": "{{env `no_proxy`}}",
"ovftool_path": "ovftool",
"preseed": "preseed.cfg",
"ssh_fullname": "misp",
"ssh_name": "misp",
"ssh_pass": "Password1234",
"update": "true",
"vm_description": "MISP, is an open source software solution for collecting, storing, distributing and sharing cyber security indicators and threat about cyber security incidents analysis and malware analysis. MISP is designed by and for incident analysts, security and ICT professionals or malware reverser to support their day-to-day operations to share structured informations efficiently.",
2023-05-25 13:12:11 +02:00
"vm_name": "1",
"vm_version": "2.4"
2020-04-30 04:18:03 +02:00
}
2017-08-23 11:55:44 +02:00
}