Created
August 16, 2017 16:21
-
-
Save jbarnett-r7/befb4ad73d20af0b774b70b1aef41fab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"type": "vmware-iso", | |
"iso_url": "{{user `iso_url`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"headless": false, | |
"boot_wait": "10m", | |
"communicator": "ssh", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"ssh_wait_timeout": "2h", | |
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | |
"guest_os_type": "winServer2008Standard-64", | |
"tools_upload_flavor": "windows", | |
"disk_size": 30000, | |
"floppy_files": [ | |
"{{user `autounattend`}}", | |
"./scripts/configs/microsoft-updates.bat", | |
"./scripts/configs/win-updates.ps1", | |
"./scripts/installs/openssh.ps1", | |
"./scripts/installs/install_dotnet45.ps1", | |
"./scripts/installs/install_wmf.ps1", | |
"./resources/certs/oracle-cert.cer", | |
"./resources/certs/gdig2.crt", | |
"./resources/certs/comodorsadomainvalidationsecureserverca.crt", | |
"./resources/certs/comodorsacertificationauthority.crt", | |
"./resources/certs/addtrust_external_ca.cer", | |
"./resources/certs/baltimore_ca.cer", | |
"./resources/certs/digicert.cer", | |
"./resources/certs/equifax.cer", | |
"./resources/certs/globalsign.cer", | |
"./resources/certs/gte_cybertrust.cer", | |
"./resources/certs/microsoft_root_2011.cer", | |
"./resources/certs/thawte_primary_root.cer", | |
"./resources/certs/utn-userfirst.cer" | |
], | |
"vm_name": "metasploitable3-win2k8", | |
"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, | |
"boot_wait": "5m", | |
"communicator": "ssh", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"ssh_wait_timeout": "2h", | |
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | |
"guest_os_type": "Windows2008_64", | |
"disk_size": 30000, | |
"vm_name": "metasploitable3-win2k8", | |
"floppy_files": [ | |
"{{user `autounattend`}}", | |
"./scripts/configs/microsoft-updates.bat", | |
"./scripts/configs/win-updates.ps1", | |
"./scripts/installs/openssh.ps1", | |
"./scripts/installs/install_dotnet45.ps1", | |
"./scripts/installs/install_wmf.ps1", | |
"./resources/certs/oracle-cert.cer", | |
"./resources/certs/gdig2.crt", | |
"./resources/certs/comodorsadomainvalidationsecureserverca.crt", | |
"./resources/certs/comodorsacertificationauthority.crt", | |
"./resources/certs/addtrust_external_ca.cer", | |
"./resources/certs/baltimore_ca.cer", | |
"./resources/certs/digicert.cer", | |
"./resources/certs/equifax.cer", | |
"./resources/certs/globalsign.cer", | |
"./resources/certs/gte_cybertrust.cer", | |
"./resources/certs/microsoft_root_2011.cer", | |
"./resources/certs/thawte_primary_root.cer", | |
"./resources/certs/utn-userfirst.cer" | |
], | |
"vboxmanage": [ | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--memory", | |
"4096" | |
], | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--cpus", | |
"2" | |
] | |
] | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "file", | |
"source": "scripts", | |
"destination": "C:/vagrant" | |
}, | |
{ | |
"type": "file", | |
"source": "resources", | |
"destination": "C:/vagrant" | |
}, | |
{ | |
"type": "shell", | |
"remote_path": "/tmp/script.bat", | |
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", | |
"scripts": [ | |
"./scripts/installs/vm-guest-tools.bat" | |
] | |
}, | |
{ | |
"type": "windows-restart" | |
}, | |
{ | |
"type":"powershell", | |
"inline": [ | |
"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" | |
], | |
"pause_before": "60s" | |
}, | |
{ | |
"type": "windows-restart" | |
}, | |
{ | |
"type": "chef-solo", | |
"guest_os_type": "windows", | |
"cookbook_paths": ["chef/cookbooks"], | |
"run_list": [ | |
"recipe[metasploitable::custom_build]" | |
], | |
"pause_before": "60s" | |
} | |
], | |
"post-processors": [ | |
{ | |
"type": "vagrant", | |
"keep_input_artifact": false, | |
"output": "windows_2008_r2_{{.Provider}}.box", | |
"vagrantfile_template": "vagrantfile-windows_2008_r2.template" | |
} | |
], | |
"variables": { | |
"iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", | |
"iso_checksum_type": "md5", | |
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", | |
"autounattend": "./answer_files/2008_r2/Autounattend.xml" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<your tool will generate this file> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"type": "vmware-iso", | |
"iso_url": "{{user `iso_url`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"headless": false, | |
"boot_wait": "10m", | |
"communicator": "ssh", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"ssh_wait_timeout": "2h", | |
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | |
"guest_os_type": "winServer2008Standard-64", | |
"tools_upload_flavor": "windows", | |
"disk_size": 30000, | |
"floppy_files": [ | |
"{{user `autounattend`}}", | |
"./scripts/configs/microsoft-updates.bat", | |
"./scripts/configs/win-updates.ps1", | |
"./scripts/installs/openssh.ps1", | |
"./scripts/installs/install_dotnet45.ps1", | |
"./scripts/installs/install_wmf.ps1", | |
"./resources/certs/oracle-cert.cer", | |
"./resources/certs/gdig2.crt", | |
"./resources/certs/comodorsadomainvalidationsecureserverca.crt", | |
"./resources/certs/comodorsacertificationauthority.crt", | |
"./resources/certs/addtrust_external_ca.cer", | |
"./resources/certs/baltimore_ca.cer", | |
"./resources/certs/digicert.cer", | |
"./resources/certs/equifax.cer", | |
"./resources/certs/globalsign.cer", | |
"./resources/certs/gte_cybertrust.cer", | |
"./resources/certs/microsoft_root_2011.cer", | |
"./resources/certs/thawte_primary_root.cer", | |
"./resources/certs/utn-userfirst.cer" | |
], | |
"vm_name": "metasploitable3-win2k8", | |
"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, | |
"boot_wait": "5m", | |
"communicator": "ssh", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"ssh_wait_timeout": "2h", | |
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | |
"guest_os_type": "Windows2008_64", | |
"disk_size": 30000, | |
"vm_name": "metasploitable3-win2k8", | |
"floppy_files": [ | |
"{{user `autounattend`}}", | |
"./scripts/configs/microsoft-updates.bat", | |
"./scripts/configs/win-updates.ps1", | |
"./scripts/installs/openssh.ps1", | |
"./scripts/installs/install_dotnet45.ps1", | |
"./scripts/installs/install_wmf.ps1", | |
"./resources/certs/oracle-cert.cer", | |
"./resources/certs/gdig2.crt", | |
"./resources/certs/comodorsadomainvalidationsecureserverca.crt", | |
"./resources/certs/comodorsacertificationauthority.crt", | |
"./resources/certs/addtrust_external_ca.cer", | |
"./resources/certs/baltimore_ca.cer", | |
"./resources/certs/digicert.cer", | |
"./resources/certs/equifax.cer", | |
"./resources/certs/globalsign.cer", | |
"./resources/certs/gte_cybertrust.cer", | |
"./resources/certs/microsoft_root_2011.cer", | |
"./resources/certs/thawte_primary_root.cer", | |
"./resources/certs/utn-userfirst.cer" | |
], | |
"vboxmanage": [ | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--memory", | |
"4096" | |
], | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--cpus", | |
"2" | |
] | |
] | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "file", | |
"source": "scripts", | |
"destination": "C:/vagrant" | |
}, | |
{ | |
"type": "file", | |
"source": "resources", | |
"destination": "C:/vagrant" | |
}, | |
{ | |
"type": "shell", | |
"remote_path": "/tmp/script.bat", | |
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", | |
"scripts": [ | |
"./scripts/installs/vm-guest-tools.bat" | |
] | |
}, | |
{ | |
"type": "windows-restart" | |
}, | |
{ | |
"type":"powershell", | |
"inline": [ | |
"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" | |
], | |
"pause_before": "60s" | |
}, | |
{ | |
"type": "windows-restart" | |
}, | |
{ | |
"type": "chef-solo", | |
"guest_os_type": "windows", | |
"cookbook_paths": ["chef/cookbooks"], | |
"run_list": [ | |
"recipe[metasploitable::default]" | |
], | |
"pause_before": "60s" | |
} | |
], | |
"post-processors": [ | |
{ | |
"type": "vagrant", | |
"keep_input_artifact": false, | |
"output": "windows_2008_r2_{{.Provider}}.box", | |
"vagrantfile_template": "vagrantfile-windows_2008_r2.template" | |
} | |
], | |
"variables": { | |
"iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", | |
"iso_checksum_type": "md5", | |
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", | |
"autounattend": "./answer_files/2008_r2/Autounattend.xml" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include_recipe "metasploitable::apache" | |
include_recipe "metasploitable::glassfish" | |
include_recipe "metasploitable::7zip" | |
include_recipe "metasploitable::flags" | |
include_recipe "metasploitable::iis" | |
include_recipe "metasploitable::jenkins" | |
include_recipe "metasploitable::java" | |
include_recipe "metasploitable::jmx" | |
include_recipe "metasploitable::mysql" | |
include_recipe "metasploitable::wamp" | |
include_recipe "metasploitable::webdav" | |
include_recipe "metasploitable::ftp" | |
include_recipe "metasploitable::ruby" | |
. | |
. | |
. | |
<all recipes listed as above> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment