2017-07-31 22:48:27 +02:00
|
|
|
{
|
|
|
|
"builders": [
|
|
|
|
{
|
|
|
|
"type": "vmware-iso",
|
|
|
|
"iso_url": "{{user `iso_url`}}",
|
|
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
|
|
"headless": false,
|
|
|
|
"http_directory" : "{{template_dir}}/../http",
|
|
|
|
"http_port_min" : 9001,
|
|
|
|
"http_port_max" : 9001,
|
|
|
|
"boot_command": [
|
|
|
|
"<esc><wait>",
|
|
|
|
"<esc><wait>",
|
|
|
|
"<enter><wait>",
|
|
|
|
"/install/vmlinuz",
|
|
|
|
" auto=true",
|
|
|
|
" priority=critical",
|
|
|
|
" initrd=/install/initrd.gz",
|
|
|
|
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
|
|
|
|
" -- ",
|
|
|
|
"<enter>"
|
|
|
|
],
|
|
|
|
"boot_wait": "20s",
|
|
|
|
"communicator": "ssh",
|
|
|
|
"ssh_username": "vagrant",
|
|
|
|
"ssh_password": "vagrant",
|
|
|
|
"ssh_wait_timeout": "2h",
|
|
|
|
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
|
2018-05-09 23:19:52 +02:00
|
|
|
"guest_os_type": "ubuntu-64",
|
2017-07-31 22:48:27 +02:00
|
|
|
"tools_upload_flavor": "linux",
|
|
|
|
"disk_size": 40000,
|
|
|
|
"vm_name": "metasploitable3-ub1404",
|
|
|
|
"vmx_data": {
|
|
|
|
"cpuid.coresPerSocket": "2",
|
|
|
|
"memsize": "4096",
|
|
|
|
"numvcpus": "2",
|
|
|
|
"scsi0.virtualDev": "lsisas1068"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "virtualbox-iso",
|
|
|
|
"iso_url": "{{user `iso_url`}}",
|
|
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
|
|
"headless": false,
|
|
|
|
"http_directory" : "{{template_dir}}/../http",
|
|
|
|
"http_port_min" : 9001,
|
|
|
|
"http_port_max" : 9001,
|
|
|
|
"boot_command": [
|
|
|
|
"<esc><wait>",
|
|
|
|
"<esc><wait>",
|
|
|
|
"<enter><wait>",
|
|
|
|
"/install/vmlinuz",
|
|
|
|
" auto=true",
|
|
|
|
" priority=critical",
|
|
|
|
" initrd=/install/initrd.gz",
|
|
|
|
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
|
|
|
|
" -- ",
|
|
|
|
"<enter>"
|
|
|
|
],
|
|
|
|
"boot_wait": "20s",
|
|
|
|
"communicator": "ssh",
|
|
|
|
"ssh_username": "vagrant",
|
|
|
|
"ssh_password": "vagrant",
|
|
|
|
"ssh_wait_timeout": "2h",
|
|
|
|
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
|
|
|
|
"guest_os_type": "Ubuntu_64",
|
|
|
|
"disk_size": 40000,
|
|
|
|
"vm_name": "metasploitable3-ub1404",
|
|
|
|
"vboxmanage": [
|
|
|
|
[
|
|
|
|
"modifyvm",
|
|
|
|
"{{.Name}}",
|
|
|
|
"--memory",
|
|
|
|
"4096"
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"modifyvm",
|
|
|
|
"{{.Name}}",
|
|
|
|
"--cpus",
|
|
|
|
"2"
|
|
|
|
]
|
|
|
|
]
|
2018-06-19 13:42:28 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "qemu",
|
|
|
|
"iso_url": "{{user `iso_url`}}",
|
|
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
|
|
"headless": false,
|
|
|
|
"http_directory" : "{{template_dir}}/../http",
|
|
|
|
"http_port_min" : 9001,
|
|
|
|
"http_port_max" : 9001,
|
|
|
|
"boot_command": [
|
|
|
|
"<esc><wait>",
|
|
|
|
"<esc><wait>",
|
|
|
|
"<enter><wait>",
|
|
|
|
"/install/vmlinuz",
|
|
|
|
" auto=true",
|
|
|
|
" priority=critical",
|
|
|
|
" initrd=/install/initrd.gz",
|
|
|
|
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
|
|
|
|
" -- ",
|
|
|
|
"<enter>"
|
|
|
|
],
|
|
|
|
"boot_wait": "20s",
|
|
|
|
"communicator": "ssh",
|
|
|
|
"accelerator": "kvm",
|
|
|
|
"ssh_username": "vagrant",
|
|
|
|
"ssh_password": "vagrant",
|
|
|
|
"ssh_wait_timeout": "2h",
|
|
|
|
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
|
|
|
|
"disk_size": 40000,
|
|
|
|
"vm_name": "metasploitable3-ub1404",
|
|
|
|
"qemuargs": [
|
|
|
|
["-m", "4096"],
|
|
|
|
["-smp", "2"]
|
|
|
|
]
|
2017-07-31 22:48:27 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners": [
|
|
|
|
{
|
|
|
|
"type": "chef-solo",
|
2018-04-07 07:55:43 +02:00
|
|
|
"version": "13.8.5",
|
2017-07-31 22:48:27 +02:00
|
|
|
"cookbook_paths": [
|
|
|
|
"{{template_dir}}/../../chef/cookbooks"
|
|
|
|
],
|
|
|
|
"run_list": [
|
|
|
|
"metasploitable::vm_tools",
|
2017-08-04 18:18:57 +02:00
|
|
|
"metasploitable::users",
|
2017-07-31 22:48:27 +02:00
|
|
|
"metasploitable::mysql",
|
|
|
|
"metasploitable::apache_continuum",
|
|
|
|
"metasploitable::apache",
|
|
|
|
"metasploitable::php_545",
|
|
|
|
"metasploitable::phpmyadmin",
|
|
|
|
"metasploitable::proftpd",
|
|
|
|
"metasploitable::docker",
|
|
|
|
"metasploitable::samba",
|
|
|
|
"metasploitable::sinatra",
|
|
|
|
"metasploitable::unrealircd",
|
|
|
|
"metasploitable::chatbot",
|
|
|
|
"metasploitable::payroll_app",
|
|
|
|
"metasploitable::readme_app",
|
|
|
|
"metasploitable::cups",
|
|
|
|
"metasploitable::drupal",
|
|
|
|
"metasploitable::knockd",
|
|
|
|
"metasploitable::iptables",
|
|
|
|
"metasploitable::flags"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"post-processors": [
|
|
|
|
{
|
|
|
|
"type": "vagrant",
|
2017-08-08 18:55:49 +02:00
|
|
|
"keep_input_artifact": false,
|
2017-07-31 23:18:50 +02:00
|
|
|
"output": "{{template_dir}}/../builds/ubuntu_1404_{{.Provider}}_{{user `box_version`}}.box"
|
2017-07-31 22:48:27 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"variables": {
|
|
|
|
"iso_url": "http://old-releases.ubuntu.com/releases/14.04.1/ubuntu-14.04.1-server-amd64.iso",
|
|
|
|
"iso_checksum_type": "md5",
|
|
|
|
"iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9",
|
2017-11-07 22:13:46 +01:00
|
|
|
"box_version": "0.1.12"
|
2017-07-31 22:48:27 +02:00
|
|
|
}
|
|
|
|
}
|