2017-08-23 11:55:44 +02:00
{
2018-07-20 18:04:41 +02:00
"_comment" : "MISP VM Autogen packer build system" ,
2017-08-23 11:55:44 +02:00
"variables" : {
2018-07-20 18:04:41 +02:00
"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>" ,
2018-11-14 03:17:54 +01:00
"cpus" : "1" ,
"desktop" : "false" ,
"disk_size" : "25000" ,
"headless" : "true" ,
2018-11-14 03:48:17 +01:00
"hostname" : "misp" ,
2018-11-14 03:17:54 +01:00
"http_proxy" : "{{env `http_proxy`}}" ,
"https_proxy" : "{{env `https_proxy`}}" ,
2018-10-04 06:29:59 +02:00
"iso_checksum" : "87bedd68607f059ca973f86346bbdf1caa6e1077" ,
2018-07-20 18:28:07 +02:00
"iso_checksum_type" : "sha1" ,
2018-10-04 06:29:59 +02:00
"iso_name" : "ubuntu-18.04.1-server-amd64.iso" ,
2018-07-20 18:28:07 +02:00
"iso_path" : "iso" ,
2018-10-04 06:29:59 +02:00
"iso_url" : "http://cdimage.ubuntu.com/ubuntu/releases/bionic/release/ubuntu-18.04.1-server-amd64.iso" ,
2018-11-14 03:17:54 +01:00
"memory" : "2048" ,
2018-07-20 18:04:41 +02:00
"no_proxy" : "{{env `no_proxy`}}" ,
2018-11-14 03:17:54 +01:00
"ovftool_path" : "ovftool" ,
"preseed" : "preseed.cfg" ,
"ssh_fullname" : "misp" ,
"ssh_name" : "misp" ,
"ssh_pass" : "Password1234" ,
"update" : "true" ,
2018-03-28 16:10:57 +02:00
"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." ,
2018-11-14 03:48:17 +01:00
"vm_name" : "MISP_demo" ,
"vm_version" : "2.4"
2017-08-23 11:55:44 +02:00
} ,
"builders" : [ {
2018-11-14 03:17:54 +01:00
"disk_size" : "{{user `disk_size`}}" ,
2018-11-14 03:48:17 +01:00
"format" : "ova" ,
2018-11-14 03:17:54 +01:00
"guest_additions_path" : "VBoxGuestAdditions_{{.Version}}.iso" ,
2017-08-23 11:55:44 +02:00
"guest_os_type" : "Ubuntu_64" ,
2018-11-14 03:17:54 +01:00
"hard_drive_interface" : "sata" ,
"headless" : "{{user `headless`}}" ,
"http_directory" : "preseeds" ,
"http_port_min" : 9001 ,
"http_port_max" : 9011 ,
"iso_checksum" : "{{ user `iso_checksum` }}" ,
"iso_checksum_type" : "{{ user `iso_checksum_type` }}" ,
"iso_urls" : [
"{{ user `iso_path` }}/{{ user `iso_name` }}" ,
"{{ user `iso_url` }}"
] ,
"shutdown_command" : "echo {{user `ssh_pass`}} | sudo -S shutdown -P now" ,
"ssh_username" : "{{user `ssh_name`}}" ,
"ssh_password" : "{{user `ssh_pass`}}" ,
"ssh_wait_timeout" : "20m" ,
"ssh_pty" : "true" ,
2018-11-14 03:48:17 +01:00
"type" : "virtualbox-iso" ,
"vm_name" : "{{user `vm_name`}}" ,
2018-07-20 18:54:03 +02:00
2018-11-14 03:17:54 +01:00
"export_opts" :
[
"--manifest" ,
"--vsys" , "0" ,
2018-11-19 04:26:26 +01:00
"--eulafile" , "/tmp/LICENSE-misp" ,
2018-11-14 03:17:54 +01:00
"--description" , "{{user `vm_description`}}" ,
"--version" , "{{user `vm_version`}}"
] ,
2018-03-28 16:10:57 +02:00
2017-08-23 11:55:44 +02:00
"vboxmanage" : [
2018-07-20 18:04:41 +02:00
[ "modifyvm" , "{{.Name}}" , "--memory" , "{{user `memory`}}" ] ,
2018-04-09 17:21:56 +02:00
[ "modifyvm" , "{{.Name}}" , "--natpf1" , "ssh,tcp,,2222,0.0.0.0,22" ] ,
2018-03-28 16:10:57 +02:00
[ "modifyvm" , "{{.Name}}" , "--natpf1" , "http,tcp,,8080,,80" ] ,
2018-06-14 16:28:34 +02:00
[ "modifyvm" , "{{.Name}}" , "--natpf1" , "https,tcp,,8443,,443" ] ,
2018-04-05 15:00:46 +02:00
[ "modifyvm" , "{{.Name}}" , "--natpf1" , "dashboard,tcp,,8001,0.0.0.0,8001" ] ,
2018-06-14 16:28:34 +02:00
[ "modifyvm" , "{{.Name}}" , "--natpf1" , "viper,tcp,,8888,0.0.0.0,8888" ] ,
2018-10-05 08:30:00 +02:00
[ "modifyvm" , "{{.Name}}" , "--natpf1" , "jupyter-notebook,tcp,,8889,0.0.0.0,8889" ] ,
2018-05-24 05:27:12 +02:00
[ "modifyvm" , "{{.Name}}" , "--natpf1" , "misp-modules,tcp,,1666,0.0.0.0,6666" ] ,
2018-07-20 18:31:08 +02:00
[ "modifyvm" , "{{.Name}}" , "--audio" , "none" ] ,
[ "modifyvm" , "{{.Name}}" , "--usb" , "off" ] ,
[ "modifyvm" , "{{.Name}}" , "--vrde" , "off" ] ,
2018-07-20 18:37:19 +02:00
[ "modifyvm" , "{{.Name}}" , "--cpus" , "{{user `cpus`}}" ] ,
2017-08-23 11:55:44 +02:00
[ "modifyvm" , "{{.Name}}" , "--vram" , "32" ]
] ,
2018-07-20 18:28:07 +02:00
"boot_command" : [
"{{ user `boot_command_prefix` }}" ,
2017-08-23 11:55:44 +02:00
"/install/vmlinuz noapic " ,
2018-07-20 18:28:07 +02:00
"initrd=/install/initrd.gz " ,
2017-08-23 11:55:44 +02:00
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg " ,
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us " ,
2018-07-20 18:28:07 +02:00
"hostname={{ user `hostname` }} " ,
"grub-installer/bootdev=/dev/sda<wait> " ,
2017-08-23 11:55:44 +02:00
"fb=false debconf/frontend=noninteractive " ,
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA " ,
"keyboard-configuration/variant=USA console-setup/ask_detect=false " ,
2018-07-20 18:28:07 +02:00
"passwd/user-fullname={{ user `ssh_fullname` }} " ,
"passwd/user-password={{ user `ssh_password` }} " ,
"passwd/user-password-again={{ user `ssh_password` }} " ,
"passwd/username={{ user `ssh_username` }} " ,
"-- <enter>"
2017-08-23 11:55:44 +02:00
]
2017-08-24 08:35:46 +02:00
} ,
{
"disk_size" : "{{user `disk_size`}}" ,
2018-11-14 03:17:54 +01:00
"guest_os_type" : "ubuntu-64" ,
"headless" : "{{user `headless`}}" ,
"http_directory" : "preseeds" ,
"http_port_min" : 9001 ,
"http_port_max" : 9011 ,
2018-07-20 18:28:07 +02:00
"iso_checksum" : "{{ user `iso_checksum` }}" ,
"iso_checksum_type" : "{{ user `iso_checksum_type` }}" ,
"iso_urls" : [
"{{ user `iso_path` }}/{{ user `iso_name` }}" ,
"{{ user `iso_url` }}"
] ,
2018-11-14 03:17:54 +01:00
"shutdown_command" : "echo {{user `ssh_pass`}} | sudo -S shutdown -P now" ,
2018-11-14 03:48:17 +01:00
"skip_compaction" : false ,
2017-08-24 08:35:46 +02:00
"ssh_username" : "{{user `ssh_name`}}" ,
"ssh_password" : "{{user `ssh_pass`}}" ,
"ssh_pty" : "true" ,
2018-11-14 03:48:17 +01:00
"ssh_wait_timeout" : "20m" ,
2018-11-14 03:17:54 +01:00
"type" : "vmware-iso" ,
"vm_name" : "{{user `vm_name`}}" ,
2018-03-28 16:10:57 +02:00
"vmx_data" : {
2018-07-20 18:04:41 +02:00
"memsize" : "{{user `memory`}}"
2018-03-28 16:10:57 +02:00
} ,
2017-08-24 08:35:46 +02:00
"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>"
2018-11-14 03:17:54 +01:00
]
2017-08-23 11:55:44 +02:00
}
] ,
"provisioners" : [ {
2018-07-20 18:04:41 +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`}}"
] ,
2017-08-23 11:55:44 +02:00
"type" : "shell" ,
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'" ,
"inline" : [
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
]
} ,
2018-11-19 01:14:10 +01:00
{
"type" : "shell" ,
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'" ,
"script" : "scripts/users.sh"
} ,
{
"type" : "shell" ,
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'" ,
"script" : "scripts/interfaces.sh"
} ,
2017-08-23 11:55:44 +02:00
{
"type" : "shell" ,
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'" ,
"script" : "scripts/bootstrap.sh" ,
"pause_before" : "10s"
2018-11-19 01:14:10 +01:00
} ,
{
"type" : "file" ,
"source" : "conffiles/issue" ,
"destination" : "/tmp/issue"
} ,
{
"type" : "shell" ,
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'" ,
"script" : "scripts/clean.sh"
}
] ,
2017-08-29 09:28:19 +02:00
"post-processors" : [ {
2018-07-20 18:04:41 +02:00
"keep_input_artifact" : "false" ,
2018-07-20 18:37:19 +02:00
"keep_input_artifact" : false ,
2017-08-29 09:28:19 +02:00
"type" : "checksum" ,
2017-10-04 13:35:35 +02:00
"checksum_types" : [ "sha1" , "sha256" , "sha384" , "sha512" ]
2017-08-23 11:55:44 +02:00
} ]
}