mirror of https://github.com/MISP/misp-packer
127 lines
4.6 KiB
JSON
127 lines
4.6 KiB
JSON
{
|
|
"variables": {
|
|
"ssh_name": "misp",
|
|
"ssh_pass": "Password1234",
|
|
"hostname": "misp",
|
|
"vm_version": "2.4",
|
|
"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.",
|
|
"vm_name": "MISP_demo",
|
|
"disk_size": "25000"
|
|
},
|
|
|
|
"builders": [{
|
|
"type": "virtualbox-iso",
|
|
"headless": "true",
|
|
"guest_os_type": "Ubuntu_64",
|
|
"format": "ova",
|
|
"vm_name": "{{user `vm_name`}}",
|
|
|
|
"export_opts":
|
|
[
|
|
"--manifest",
|
|
"--vsys", "0",
|
|
"--eulafile", "/tmp/LICENSE",
|
|
"--description", "{{user `vm_description`}}",
|
|
"--version", "{{user `vm_version`}}"
|
|
],
|
|
|
|
"vboxmanage": [
|
|
["modifyvm", "{{.Name}}", "--memory", "2048"],
|
|
["modifyvm", "{{.Name}}", "--natpf1", "ssh,tcp,,2222,0.0.0.0,22" ],
|
|
["modifyvm", "{{.Name}}", "--natpf1", "http,tcp,,8080,,80" ],
|
|
["modifyvm", "{{.Name}}", "--natpf1", "dashboard,tcp,,8001,0.0.0.0,8001" ],
|
|
["modifyvm", "{{.Name}}", "--vram", "32"]
|
|
],
|
|
|
|
"disk_size": "{{user `disk_size`}}",
|
|
|
|
"iso_url": "http://releases.ubuntu.com/17.10/ubuntu-17.10.1-server-amd64.iso",
|
|
"iso_checksum": "8ff73f1b622276758475c3bd5190b382774626de5a82c50930519381f6c3a3f8",
|
|
"iso_checksum_type": "sha256",
|
|
|
|
"http_directory" : "preseeds",
|
|
"http_port_min" : 9001,
|
|
"http_port_max" : 9011,
|
|
|
|
"ssh_username": "{{user `ssh_name`}}",
|
|
"ssh_password": "{{user `ssh_pass`}}",
|
|
"ssh_wait_timeout": "20m",
|
|
"ssh_pty" : "true",
|
|
|
|
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
|
|
|
|
"boot_command" : [
|
|
"<esc><esc><enter><wait>",
|
|
"/install/vmlinuz noapic ",
|
|
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
|
|
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
|
|
"hostname={{user `hostname`}} ",
|
|
"fb=false debconf/frontend=noninteractive ",
|
|
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
|
|
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
|
"initrd=/install/initrd.gz -- <enter>"
|
|
]
|
|
},
|
|
{
|
|
"type": "vmware-iso",
|
|
"headless": "true",
|
|
"guest_os_type": "ubuntu-64",
|
|
"vm_name": "{{user `vm_name`}}",
|
|
|
|
"disk_size": "{{user `disk_size`}}",
|
|
|
|
"iso_url": "http://releases.ubuntu.com/17.10/ubuntu-17.10.1-server-amd64.iso",
|
|
"iso_checksum": "8ff73f1b622276758475c3bd5190b382774626de5a82c50930519381f6c3a3f8",
|
|
"iso_checksum_type": "sha256",
|
|
|
|
"http_directory" : "preseeds",
|
|
"http_port_min" : 9001,
|
|
"http_port_max" : 9011,
|
|
|
|
"ssh_username": "{{user `ssh_name`}}",
|
|
"ssh_password": "{{user `ssh_pass`}}",
|
|
"ssh_wait_timeout": "20m",
|
|
"ssh_pty" : "true",
|
|
|
|
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
|
|
|
|
"vmx_data": {
|
|
"memsize": "2048"
|
|
},
|
|
|
|
"boot_command" : [
|
|
"<esc><esc><enter><wait>",
|
|
"/install/vmlinuz noapic ",
|
|
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
|
|
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
|
|
"hostname={{user `hostname`}} ",
|
|
"fb=false debconf/frontend=noninteractive ",
|
|
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
|
|
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
|
"initrd=/install/initrd.gz -- <enter>"
|
|
],
|
|
|
|
"skip_compaction": false
|
|
}
|
|
],
|
|
|
|
"provisioners": [{
|
|
"type": "shell",
|
|
"execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
|
"inline": [
|
|
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
|
"script": "scripts/bootstrap.sh",
|
|
"pause_before": "10s"
|
|
}],
|
|
|
|
"post-processors":[{
|
|
"type": "checksum",
|
|
"checksum_types": ["sha1", "sha256", "sha384", "sha512"]
|
|
}]
|
|
}
|