rapid7 / metasploitable3

Metasploitable3 is a VM that is built from the ground up with a large amount of security vulnerabilities.
Other
4.76k stars 1.15k forks source link

Build 'virtualbox-iso' errored: Error executing Chef: Non-zero exit status: 1 #343

Open sandstorm2002in opened 6 years ago

sandstorm2002in commented 6 years ago

building ubuntu 1404 Compatible version of VirtualBox found. Virtualbox images will be built. Compatible version of packer was found. Correct version of vagrant was found. Compatible version of vagrant-reload plugin was found. Requirements found. Proceeding... Building the Vagrant box for virtualbox... virtualbox-iso output will be in this color.

==> virtualbox-iso: Retrieving Guest additions virtualbox-iso: Using file in-place: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso ==> virtualbox-iso: Retrieving ISO virtualbox-iso: Found already downloaded, initial checksum matched, no download needed: http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso ==> virtualbox-iso: Starting HTTP server on port 9001 ==> virtualbox-iso: Creating virtual machine... ==> virtualbox-iso: Creating hard drive... ==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3420) ==> virtualbox-iso: Executing custom VBoxManage commands... virtualbox-iso: Executing: modifyvm metasploitable3-ub1404 --memory 4096 virtualbox-iso: Executing: modifyvm metasploitable3-ub1404 --cpus 2 ==> virtualbox-iso: Starting the virtual machine... ==> virtualbox-iso: Waiting 20s for boot... ==> virtualbox-iso: Typing the boot command... ==> virtualbox-iso: Using ssh communicator to connect: 127.0.0.1 ==> virtualbox-iso: Waiting for SSH to become available... ==> virtualbox-iso: Connected to SSH! ==> virtualbox-iso: Uploading VirtualBox version info (5.1.10) ==> virtualbox-iso: Uploading VirtualBox guest additions ISO... ==> virtualbox-iso: Provisioning with chef-solo virtualbox-iso: Installing Chef... virtualbox-iso: % Total % Received % Xferd Average Speed Time Time Time Current virtualbox-iso: Dload Upload Total Spent Left Speed virtualbox-iso: 100 23075 100 23075 0 0 12076 0 0:00:01 0:00:01 --:--:-- 12074 virtualbox-iso: ubuntu 14.04 x86_64 virtualbox-iso: Getting information for chef stable 13.8.5 for ubuntu... virtualbox-iso: downloading https://omnitruck.chef.io/stable/chef/metadata?v=13.8.5&p=ubuntu&pv=14.04&m=x86_64 virtualbox-iso: to file /tmp/install.sh.991/metadata.txt virtualbox-iso: trying wget... virtualbox-iso: sha1 1ecb70effcf557dbac0d0de528bbef6937f9c581 virtualbox-iso: sha256 ce0ff3baf39c8c13ed474104928e7e4568a4997a1d5797cae2b2ba3ee001e3a8 virtualbox-iso: url https://packages.chef.io/files/stable/chef/13.8.5/ubuntu/14.04/chef_13.8.5-1_amd64.deb virtualbox-iso: version 13.8.5 virtualbox-iso: downloaded metadata file looks valid... virtualbox-iso: downloading https://packages.chef.io/files/stable/chef/13.8.5/ubuntu/14.04/chef_13.8.5-1_amd64.deb virtualbox-iso: to file /tmp/install.sh.991/chef_13.8.5-1_amd64.deb virtualbox-iso: trying wget... virtualbox-iso: Comparing checksum with sha256sum... virtualbox-iso: Installing chef 13.8.5 virtualbox-iso: installing with dpkg... virtualbox-iso: Selecting previously unselected package chef. virtualbox-iso: (Reading database ... 61880 files and directories currently installed.) virtualbox-iso: Preparing to unpack .../chef_13.8.5-1_amd64.deb ... virtualbox-iso: Unpacking chef (13.8.5-1) ... virtualbox-iso: Setting up chef (13.8.5-1) ... virtualbox-iso: Thank you for installing Chef! virtualbox-iso: Creating directory: /tmp/packer-chef-solo virtualbox-iso: Creating directory: /tmp/packer-chef-solo/cookbooks-0 virtualbox-iso: Creating configuration file 'solo.rb' virtualbox-iso: Creating JSON attribute file virtualbox-iso: Executing Chef: sudo chef-solo --no-color -c /tmp/packer-chef-solo/solo.rb -j /tmp/packer-chef-solo/node.json virtualbox-iso: Starting Chef Client, version 13.8.5 virtualbox-iso: resolving cookbooks for run list: ["metasploitable::users", "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"] virtualbox-iso: Synchronizing Cookbooks: virtualbox-iso: - metasploitable (0.1.0) virtualbox-iso: - docker (2.15.2) virtualbox-iso: - mysql (8.2.0) virtualbox-iso: Installing Cookbook Gems: virtualbox-iso: Compiling Cookbooks... virtualbox-iso: Converging 173 resources virtualbox-iso: Recipe: metasploitable::users virtualbox-iso: linux_user[leia_organa] action create virtualbox-iso: - create user leia_organa virtualbox-iso: linux_user[luke_skywalker] action create virtualbox-iso: - create user luke_skywalker virtualbox-iso: linux_user[han_solo] action create virtualbox-iso: - create user han_solo virtualbox-iso: linux_user[artoo_detoo] action create virtualbox-iso: - create user artoo_detoo virtualbox-iso: linux_user[c_three_pio] action create virtualbox-iso: - create user c_three_pio virtualbox-iso: linux_user[ben_kenobi] action create virtualbox-iso: - create user ben_kenobi virtualbox-iso: linux_user[darth_vader] action create virtualbox-iso: - create user darth_vader virtualbox-iso: linux_user[anakin_skywalker] action create virtualbox-iso: - create user anakin_skywalker virtualbox-iso: linux_user[jarjar_binks] action create virtualbox-iso: - create user jarjar_binks virtualbox-iso: linux_user[lando_calrissian] action create virtualbox-iso: - create user lando_calrissian virtualbox-iso: linux_user[boba_fett] action create virtualbox-iso: - create user boba_fett virtualbox-iso: linux_user[jabba_hutt] action create virtualbox-iso: - create user jabba_hutt virtualbox-iso: linux_user[greedo] action create virtualbox-iso: - create user greedo virtualbox-iso: linux_user[chewbacca] action create virtualbox-iso: - create user chewbacca virtualbox-iso: linux_user[kylo_ren] action create virtualbox-iso: - create user kylo_ren virtualbox-iso: group[sudo] action modify virtualbox-iso: - modify group sudo virtualbox-iso: - add missing member(s): leia_organa, luke_skywalker, han_solo virtualbox-iso: Recipe: metasploitable::mysql virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: mysql_service[default] action create virtualbox-iso: mysql_server_installation_package[default] action install virtualbox-iso: apt_package[mysql-server-5.5] action install virtualbox-iso: - install version 5.5.61-0ubuntu0.14.04.1 of package mysql-server-5.5 virtualbox-iso: apt_package[perl-Sys-Hostname-Long] action nothing (skipped due to action :nothing) virtualbox-iso: execute[Initial DB setup script] action nothing (skipped due to action :nothing) virtualbox-iso: virtualbox-iso: mysql_service_manager_upstart[default] action create virtualbox-iso: group[mysql] action create (up to date) virtualbox-iso: linux_user[mysql] action create (up to date) virtualbox-iso: service[mysql] action stop virtualbox-iso: - stop service service[mysql] virtualbox-iso: service[mysql] action disable virtualbox-iso: - disable service service[mysql] virtualbox-iso: file[/etc/mysql/my.cnf] action delete virtualbox-iso: - delete file /etc/mysql/my.cnf virtualbox-iso: file[/etc/my.cnf] action delete (up to date) virtualbox-iso: link[/usr/share/my-default.cnf] action create virtualbox-iso: - create symlink at /usr/share/my-default.cnf to /etc/mysql-default/my.cnf virtualbox-iso: directory[/etc/mysql-default] action create virtualbox-iso: - create new directory /etc/mysql-default virtualbox-iso: - change mode from '' to '0750' virtualbox-iso: - change owner from '' to 'mysql' virtualbox-iso: - change group from '' to 'mysql' virtualbox-iso: directory[/etc/mysql-default/conf.d] action create virtualbox-iso: - create new directory /etc/mysql-default/conf.d virtualbox-iso: - change mode from '' to '0750' virtualbox-iso: - change owner from '' to 'mysql' virtualbox-iso: - change group from '' to 'mysql' virtualbox-iso: directory[/run/mysql-default] action create virtualbox-iso: - create new directory /run/mysql-default virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: - change owner from '' to 'mysql' virtualbox-iso: - change group from '' to 'mysql' virtualbox-iso: directory[/var/log/mysql-default] action create virtualbox-iso: - create new directory /var/log/mysql-default virtualbox-iso: - change mode from '' to '0750' virtualbox-iso: - change owner from '' to 'mysql' virtualbox-iso: - change group from '' to 'mysql' virtualbox-iso: directory[/var/lib/mysql-default] action create virtualbox-iso: - create new directory /var/lib/mysql-default virtualbox-iso: - change mode from '' to '0750' virtualbox-iso: - change owner from '' to 'mysql' virtualbox-iso: - change group from '' to 'mysql' virtualbox-iso: template[/etc/mysql-default/my.cnf] action create virtualbox-iso: - create new file /etc/mysql-default/my.cnf virtualbox-iso: - update content in file /etc/mysql-default/my.cnf from none to b96424 virtualbox-iso: --- /etc/mysql-default/my.cnf 2018-10-10 16:15:57.456725000 +0000 virtualbox-iso: +++ /etc/mysql-default/.chef-my20181010-1097-1hxxdwf.cnf 2018-10-10 16:15:57.456725000 +0000 virtualbox-iso: @@ -1 +1,23 @@ virtualbox-iso: +# Chef generated my.cnf for instance mysql-default virtualbox-iso: + virtualbox-iso: +[client] virtualbox-iso: +default-character-set = utf8 virtualbox-iso: +port = 3306 virtualbox-iso: +socket = /run/mysql-default/mysqld.sock virtualbox-iso: + virtualbox-iso: +[mysql] virtualbox-iso: +default-character-set = utf8 virtualbox-iso: + virtualbox-iso: +[mysqld] virtualbox-iso: +user = mysql virtualbox-iso: +pid-file = /run/mysql-default/mysqld.pid virtualbox-iso: +socket = /run/mysql-default/mysqld.sock virtualbox-iso: +bind-address = 0.0.0.0 virtualbox-iso: +port = 3306 virtualbox-iso: +datadir = /var/lib/mysql-default virtualbox-iso: +log-error = /var/log/mysql-default/error.log virtualbox-iso: +!includedir /etc/mysql-default/conf.d virtualbox-iso: + virtualbox-iso: +[mysqld_safe] virtualbox-iso: +socket = /run/mysql-default/mysqld.sock virtualbox-iso: - change mode from '' to '0600' virtualbox-iso: - change owner from '' to 'mysql' virtualbox-iso: - change group from '' to 'mysql' virtualbox-iso: apt_package[apparmor] action install (up to date) virtualbox-iso: directory[/etc/apparmor.d/local/mysql] action create virtualbox-iso: - create new directory /etc/apparmor.d/local/mysql virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: template[/etc/apparmor.d/local/usr.sbin.mysqld] action create virtualbox-iso: - update content in file /etc/apparmor.d/local/usr.sbin.mysqld from 196444 to 06cb51 virtualbox-iso: --- /etc/apparmor.d/local/usr.sbin.mysqld 2018-10-10 16:15:55.637635000 +0000 virtualbox-iso: +++ /etc/apparmor.d/local/.chef-usr20181010-1097-1ge0jet.sbin.mysqld 2018-10-10 16:15:57.516694999 +0000 virtualbox-iso: @@ -1,3 +1,2 @@ virtualbox-iso: -# Site-specific additions and overrides for usr.sbin.mysqld. virtualbox-iso: -# For more details, please see /etc/apparmor.d/local/README. virtualbox-iso: +#include <local/mysql> virtualbox-iso: service[default apparmor] action restart virtualbox-iso: - restart service service[default apparmor] virtualbox-iso: template[/etc/apparmor.d/usr.sbin.mysqld] action create virtualbox-iso: - update content in file /etc/apparmor.d/usr.sbin.mysqld from 47be5e to edc1e7 virtualbox-iso: --- /etc/apparmor.d/usr.sbin.mysqld 2018-07-30 14:43:14.000000000 +0000 virtualbox-iso: +++ /etc/apparmor.d/.chef-usr20181010-1097-qwvtz8.sbin.mysqld 2018-10-10 16:15:58.820043000 +0000 virtualbox-iso: @@ -31,14 +31,14 @@ virtualbox-iso: /var/log/mysql.err rw, virtualbox-iso: /var/lib/mysql/ r, virtualbox-iso: /var/lib/mysql/ rwk, virtualbox-iso: - /var/lib/mysql-files/ r, virtualbox-iso: - /var/lib/mysql-files/ rwk, virtualbox-iso: /var/log/mysql/ r, virtualbox-iso: /var/log/mysql/ rw, virtualbox-iso: /var/run/mysqld/mysqld.pid rw, virtualbox-iso: /var/run/mysqld/mysqld.sock w, virtualbox-iso: + /var/run/mysqld/mysqld.sock.lock rw, virtualbox-iso: /run/mysqld/mysqld.pid rw, virtualbox-iso: /run/mysqld/mysqld.sock w, virtualbox-iso: + /run/mysqld/mysqld.sock.lock rw, virtualbox-iso: virtualbox-iso: /sys/devices/system/cpu/ r, virtualbox-iso: virtualbox-iso: service[default apparmor] action restart virtualbox-iso: - restart service service[default apparmor] virtualbox-iso: template[/etc/apparmor.d/local/mysql/default] action create virtualbox-iso: - create new file /etc/apparmor.d/local/mysql/default virtualbox-iso: - update content in file /etc/apparmor.d/local/mysql/default from none to b924e9 virtualbox-iso: --- /etc/apparmor.d/local/mysql/default 2018-10-10 16:16:00.103401000 +0000 virtualbox-iso: +++ /etc/apparmor.d/local/mysql/.chef-default20181010-1097-qeyzom 2018-10-10 16:16:00.103401000 +0000 virtualbox-iso: @@ -1 +1,15 @@ virtualbox-iso: +/etc/mysql-default/.pem r, virtualbox-iso: +/etc/mysql-default/conf.d/ r, virtualbox-iso: +/etc/mysql-default/conf.d/ r, virtualbox-iso: +/etc/mysql-default/my.cnf r, virtualbox-iso: +/var/log/mysql-default/ r, virtualbox-iso: +/var/log/mysql-default/ rw, virtualbox-iso: +/var/lib/mysql-default/ r, virtualbox-iso: +/var/lib/mysql-default/ rwk, virtualbox-iso: +/run/mysql-default/ rw, virtualbox-iso: +/run/mysql-default/mysqld.pid rw, virtualbox-iso: +/run/mysql-default/mysqld.sock rw, virtualbox-iso: +/tmp/mysql-default/ r, virtualbox-iso: +/tmp/mysql-default/my.sql r, virtualbox-iso: +/ rw, virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: service[default apparmor] action restart virtualbox-iso: - restart service service[default apparmor] virtualbox-iso: service[default apparmor] action nothing (skipped due to action :nothing) virtualbox-iso: bash[default initial records] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-11wm3f2" virtualbox-iso: virtualbox-iso: virtualbox-iso: mysql_service[default] action start virtualbox-iso: mysql_service_manager_upstart[default] action start virtualbox-iso: template[/usr/sbin/mysql-default-wait-ready] action create virtualbox-iso: - create new file /usr/sbin/mysql-default-wait-ready virtualbox-iso: - update content in file /usr/sbin/mysql-default-wait-ready from none to a11716 virtualbox-iso: --- /usr/sbin/mysql-default-wait-ready 2018-10-10 16:16:04.593154999 +0000 virtualbox-iso: +++ /usr/sbin/.chef-mysql-default-wait-ready20181010-1097-xfyeb8 2018-10-10 16:16:04.593154999 +0000 virtualbox-iso: @@ -1 +1,23 @@ virtualbox-iso: +#!/bin/sh virtualbox-iso: + virtualbox-iso: +# Wait for the server to come up virtualbox-iso: +ret=0 virtualbox-iso: +while /bin/true; do virtualbox-iso: + RESPONSE=/usr/bin/mysqladmin --no-defaults --socket="/run/mysql-default/mysqld.sock" --user=UNKNOWN_MYSQL_USER ping 2>&1 virtualbox-iso: + mret=$? virtualbox-iso: + if [ $mret -eq 0 ]; then virtualbox-iso: + break virtualbox-iso: + fi virtualbox-iso: + # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected, virtualbox-iso: + # anything else suggests a configuration error virtualbox-iso: + if [ $mret -ne 1 -a $mret -ne 11 ]; then virtualbox-iso: + ret=1 virtualbox-iso: + break virtualbox-iso: + fi virtualbox-iso: + # "Access denied" also means the server is alive virtualbox-iso: + echo "$RESPONSE" | grep -q "Access denied for user" && break virtualbox-iso: + sleep 1 virtualbox-iso: +done virtualbox-iso: + virtualbox-iso: +exit $ret virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: template[/etc/init/mysql-default.conf] action create virtualbox-iso: - create new file /etc/init/mysql-default.conf virtualbox-iso: - update content in file /etc/init/mysql-default.conf from none to b6b61d virtualbox-iso: --- /etc/init/mysql-default.conf 2018-10-10 16:16:04.613145000 +0000 virtualbox-iso: +++ /etc/init/.chef-mysql-default20181010-1097-sye8xi.conf 2018-10-10 16:16:04.609147000 +0000 virtualbox-iso: @@ -1 +1,27 @@ virtualbox-iso: +# mysql-default Service virtualbox-iso: + virtualbox-iso: +description "MySQL service mysql-default" virtualbox-iso: +author "chef-client" virtualbox-iso: + virtualbox-iso: +start on runlevel [2345] virtualbox-iso: +stop on starting rc RUNLEVEL=[016] virtualbox-iso: + virtualbox-iso: +respawn virtualbox-iso: +respawn limit 2 5 virtualbox-iso: + virtualbox-iso: +env HOME=/etc/mysql-default virtualbox-iso: +umask 007 virtualbox-iso: + virtualbox-iso: +kill timeout 300 virtualbox-iso: + virtualbox-iso: +pre-start script virtualbox-iso: +[ -d /run/mysql-default ] || install -m 755 -o mysql -g mysql -d /run/mysql-default virtualbox-iso: +[ -d /run/mysql-default ] || install -m 755 -o mysql -g mysql -d /run/mysql-default virtualbox-iso: +end script virtualbox-iso: + virtualbox-iso: +exec /usr/sbin/mysqld --defaults-file=/etc/mysql-default/my.cnf virtualbox-iso: + virtualbox-iso: +post-start script virtualbox-iso: +/usr/sbin/mysql-default-wait-ready virtualbox-iso: +end script virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: service[mysql-default] action start virtualbox-iso: - start service service[mysql-default] virtualbox-iso: virtualbox-iso: virtualbox-iso: Recipe: metasploitable::apache_continuum virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: apt_package[openjdk-6-jre] action install virtualbox-iso: - install version 6b41-1.13.13-0ubuntu0.14.04.1 of package openjdk-6-jre virtualbox-iso: apt_package[openjdk-6-jdk] action install virtualbox-iso: - install version 6b41-1.13.13-0ubuntu0.14.04.1 of package openjdk-6-jdk virtualbox-iso: directory[/opt/apache_continuum] action create virtualbox-iso: - create new directory /opt/apache_continuum virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: remote_file[/tmp/packer-chef-solo/local-mode-cache/cache/apache-continuum-1.4.2-bin.tar.gz] action create virtualbox-iso: - create new file /tmp/packer-chef-solo/local-mode-cache/cache/apache-continuum-1.4.2-bin.tar.gz virtualbox-iso: - update content in file /tmp/packer-chef-solo/local-mode-cache/cache/apache-continuum-1.4.2-bin.tar.gz from none to ef12bb virtualbox-iso: (file sizes exceed 10000000 bytes, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: execute[extract apache continum] action run virtualbox-iso: - execute tar -xvzf apache-continuum-1.4.2-bin.tar.gz -C /opt/apache_continuum virtualbox-iso: bash[Download and extract Apache Continuum 1.4.2] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-1e72wwm" virtualbox-iso: link[/etc/init.d/continuum] action create virtualbox-iso: - create symlink at /etc/init.d/continuum to /opt/apache_continuum/apache-continuum-1.4.2/bin/continuum virtualbox-iso: execute[set port for apache continuum] action run virtualbox-iso: - execute update-rc.d continuum defaults 80 virtualbox-iso: service[continuum] action enable (up to date) virtualbox-iso: service[continuum] action start virtualbox-iso: - start service service[continuum] virtualbox-iso: Recipe: metasploitable::apache virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: apt_package[apache2] action install virtualbox-iso: - install version 2.4.7-1ubuntu4.20 of package apache2 virtualbox-iso: directory[/var/www/cgi-bin] action create virtualbox-iso: - create new directory /var/www/cgi-bin virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: directory[/var/www/uploads] action create virtualbox-iso: - create new directory /var/www/uploads virtualbox-iso: - change mode from '' to '0777' virtualbox-iso: cookbook_file[/var/www/cgi-bin/hello_world.sh] action create virtualbox-iso: - create new file /var/www/cgi-bin/hello_world.sh virtualbox-iso: - update content in file /var/www/cgi-bin/hello_world.sh from none to 22bed4 virtualbox-iso: --- /var/www/cgi-bin/hello_world.sh 2018-10-10 16:20:08.327227000 +0000 virtualbox-iso: +++ /var/www/cgi-bin/.chef-hello_world20181010-1097-lteidx.sh 2018-10-10 16:20:08.327227000 +0000 virtualbox-iso: @@ -1 +1,4 @@ virtualbox-iso: +#!/bin/bash virtualbox-iso: +printf "Content-type: text/html\n\n" virtualbox-iso: +printf "Hello World!\n" virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: cookbook_file[/etc/apache2/conf-available/cgi-bin.conf] action create virtualbox-iso: - create new file /etc/apache2/conf-available/cgi-bin.conf virtualbox-iso: - update content in file /etc/apache2/conf-available/cgi-bin.conf from none to d10ae0 virtualbox-iso: --- /etc/apache2/conf-available/cgi-bin.conf 2018-10-10 16:20:08.339220999 +0000 virtualbox-iso: +++ /etc/apache2/conf-available/.chef-cgi-bin20181010-1097-1oj23tv.conf 2018-10-10 16:20:08.339220999 +0000 virtualbox-iso: @@ -1 +1,20 @@ virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + Define ENABLE_CGI_BIN virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + Define ENABLE_CGI_BIN virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + ScriptAlias /cgi-bin/ /var/www/cgi-bin/ virtualbox-iso: + <Directory "/var/www/cgi-bin"> virtualbox-iso: + AllowOverride None virtualbox-iso: + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch virtualbox-iso: + Order allow,deny virtualbox-iso: + Allow from all virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: cookbook_file[/etc/apache2/conf-available/dav.conf] action create virtualbox-iso: - create new file /etc/apache2/conf-available/dav.conf virtualbox-iso: - update content in file /etc/apache2/conf-available/dav.conf from none to 77bb33 virtualbox-iso: --- /etc/apache2/conf-available/dav.conf 2018-10-10 16:20:08.351214999 +0000 virtualbox-iso: +++ /etc/apache2/conf-available/.chef-dav20181010-1097-nnvhn7.conf 2018-10-10 16:20:08.351214999 +0000 virtualbox-iso: @@ -1 +1,40 @@ virtualbox-iso: +# virtualbox-iso: +# Distributed authoring and versioning (WebDAV) virtualbox-iso: +# virtualbox-iso: +# Required modules: mod_dav, mod_dav_fs, mod_setenvif, mod_alias virtualbox-iso: +# mod_auth_digest, mod_authn_file virtualbox-iso: +# virtualbox-iso: + virtualbox-iso: +# The following example gives DAV write access to a directory called virtualbox-iso: +# "uploads" under the ServerRoot directory. virtualbox-iso: +# virtualbox-iso: +# The User/Group specified in httpd.conf needs to have write permissions virtualbox-iso: +# on the directory where the DavLockDB is placed and on any directory where virtualbox-iso: +# "Dav On" is specified. virtualbox-iso: + virtualbox-iso: +Alias /uploads "/var/www/uploads" virtualbox-iso: + virtualbox-iso: +<Directory "/var/www/uploads"> virtualbox-iso: + AllowOverride All virtualbox-iso: + Dav On virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + Order Allow,Deny virtualbox-iso: + Allow from all virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: +# virtualbox-iso: +# The following directives disable redirects on non-GET requests for virtualbox-iso: +# a directory that does not include the trailing slash. This fixes a virtualbox-iso: +# problem with several clients that do not appropriately handle virtualbox-iso: +# redirects for folders with DAV methods. virtualbox-iso: +# virtualbox-iso: +BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully virtualbox-iso: +BrowserMatch "MS FrontPage" redirect-carefully virtualbox-iso: +BrowserMatch "^WebDrive" redirect-carefully virtualbox-iso: +BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully virtualbox-iso: +BrowserMatch "^gnome-vfs/1.0" redirect-carefully virtualbox-iso: +BrowserMatch "^XML Spy" redirect-carefully virtualbox-iso: +BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: bash[configure cgi] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-gpufs4" virtualbox-iso: bash[configure webDAV] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-l2cu1z" virtualbox-iso: execute[make /var/www/html writeable] action run virtualbox-iso: - execute chmod o+w /var/www/html virtualbox-iso: execute[rm /var/www/html/index.html] action run virtualbox-iso: - execute rm /var/www/html/index.html virtualbox-iso: service[apache2] action enable (up to date) virtualbox-iso: service[apache2] action start (up to date) virtualbox-iso: Recipe: metasploitable::php_545 virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: execute[install prereqs] action run virtualbox-iso: - execute apt-get install -y gcc make build-essential libxml2-dev libcurl4-openssl-dev libpcre3-dev libbz2-dev libjpeg-dev libpng12-dev libfreetype6-dev libt1-dev libmcrypt-dev libmhash-dev freetds-dev libmysqlclient-dev unixodbc-dev libxslt1-dev apache2-dev virtualbox-iso: execute[fix freetype bug] action run virtualbox-iso: - execute mkdir -pv /usr/include/freetype2/freetype && ln -sf /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h virtualbox-iso: remote_file[/tmp/packer-chef-solo/local-mode-cache/cache/php-5.4.5.tar.gz] action create virtualbox-iso: - create new file /tmp/packer-chef-solo/local-mode-cache/cache/php-5.4.5.tar.gz virtualbox-iso: - update content in file /tmp/packer-chef-solo/local-mode-cache/cache/php-5.4.5.tar.gz from none to 46be2d virtualbox-iso: (file sizes exceed 10000000 bytes, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: remote_file[/tmp/packer-chef-solo/local-mode-cache/cache/libxml29_compat.patch] action create virtualbox-iso: - create new file /tmp/packer-chef-solo/local-mode-cache/cache/libxml29_compat.patch virtualbox-iso: - update content in file /tmp/packer-chef-solo/local-mode-cache/cache/libxml29_compat.patch from none to c83424 virtualbox-iso: --- /tmp/packer-chef-solo/local-mode-cache/cache/libxml29_compat.patch 2018-10-10 16:23:46.118367971 +0000 virtualbox-iso: +++ /tmp/packer-chef-solo/local-mode-cache/cache/.chef-libxml29_compat20181010-1097-1fv2tyb.patch2018-10-10 16:23:46.118367971 +0000 virtualbox-iso: @@ -1 +1,52 @@ virtualbox-iso: +--- ext/dom/node.c 2012-08-06 17:49:48.826716692 +0800 virtualbox-iso: ++++ ext/dom/node.c 2012-08-06 17:52:47.633484660 +0800 virtualbox-iso: +@@ -1895,9 +1895,17 @@ static void dom_canonicalization(INTERNA virtualbox-iso: + RETVAL_FALSE; virtualbox-iso: + } else { virtualbox-iso: + if (mode == 0) { virtualbox-iso: ++#ifdef LIBXML2_NEW_BUFFER virtualbox-iso: ++ ret = xmlOutputBufferGetSize(buf); virtualbox-iso: ++#else virtualbox-iso: + ret = buf->buffer->use; virtualbox-iso: ++#endif virtualbox-iso: + if (ret > 0) { virtualbox-iso: ++#ifdef LIBXML2_NEW_BUFFER virtualbox-iso: ++ RETVAL_STRINGL((char ) xmlOutputBufferGetContent(buf), ret, 1); virtualbox-iso: ++#else virtualbox-iso: + RETVAL_STRINGL((char ) buf->buffer->content, ret, 1); virtualbox-iso: ++#endif virtualbox-iso: + } else { virtualbox-iso: + RETVAL_EMPTY_STRING(); virtualbox-iso: + } virtualbox-iso: +--- ext/dom/documenttype.c 2012-08-06 18:02:16.019640870 +0800 virtualbox-iso: ++++ ext/dom/documenttype.c 2012-08-06 18:06:16.612228905 +0800 virtualbox-iso: +@@ -205,7 +205,13 @@ int dom_documenttype_internal_subset_rea virtualbox-iso: + if (buff != NULL) { virtualbox-iso: + xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL); virtualbox-iso: + xmlOutputBufferFlush(buff); virtualbox-iso: ++ virtualbox-iso: ++#ifdef LIBXML2_NEW_BUFFER virtualbox-iso: ++ ZVAL_STRINGL(retval, xmlOutputBufferGetContent(buff), virtualbox-iso: ++ xmlOutputBufferGetSize(buff), 1); virtualbox-iso: ++#else virtualbox-iso: + ZVAL_STRINGL(retval, buff->buffer->content, buff->buffer->use, 1); virtualbox-iso: ++#endif virtualbox-iso: + (void)xmlOutputBufferClose(buff); virtualbox-iso: + return SUCCESS; virtualbox-iso: + } virtualbox-iso: +--- ext/simplexml/simplexml.c 2012-08-06 18:10:44.621017026 +0800 virtualbox-iso: ++++ ext/simplexml/simplexml.c 2012-08-06 18:12:48.016270419 +0800 virtualbox-iso: +@@ -1417,7 +1417,12 @@ SXE_METHOD(asXML) virtualbox-iso: + virtualbox-iso: + xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, ((xmlDocPtr) sxe->document->ptr)->encoding); virtualbox-iso: + xmlOutputBufferFlush(outbuf); virtualbox-iso: ++#ifdef LIBXML2_NEW_BUFFER virtualbox-iso: ++ RETVAL_STRINGL((char )xmlOutputBufferGetContent(outbuf), virtualbox-iso: ++ xmlOutputBufferGetSize(outbuf), 1); virtualbox-iso: ++#else virtualbox-iso: + RETVAL_STRINGL((char )outbuf->buffer->content, outbuf->buffer->use, 1); virtualbox-iso: ++#endif virtualbox-iso: + xmlOutputBufferClose(outbuf); virtualbox-iso: + } virtualbox-iso: + } else { virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: execute[extract php] action run virtualbox-iso: - execute tar xvzf /tmp/packer-chef-solo/local-mode-cache/cache/php-5.4.5.tar.gz -C /tmp/packer-chef-solo/local-mode-cache/cache virtualbox-iso: execute[patch php] action run virtualbox-iso: - execute patch -p0 -b < ../libxml29_compat.patch virtualbox-iso: bash[compile and install php] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-15umk4m" virtualbox-iso: cookbook_file[etc/apache2/mods-available/php5.conf] action create virtualbox-iso: - create new file etc/apache2/mods-available/php5.conf virtualbox-iso: - update content in file etc/apache2/mods-available/php5.conf from none to 2e0b6e virtualbox-iso: --- etc/apache2/mods-available/php5.conf 2018-10-10 16:28:28.314367971 +0000 virtualbox-iso: +++ etc/apache2/mods-available/.chef-php520181010-1097-4881ar.conf 2018-10-10 16:28:28.310367971 +0000 virtualbox-iso: @@ -1 +1,18 @@ virtualbox-iso: +<FilesMatch ".+.ph(p[345]?|t|tml)$"> virtualbox-iso: + SetHandler application/x-httpd-php virtualbox-iso: + virtualbox-iso: +<FilesMatch ".+.phps$"> virtualbox-iso: + SetHandler application/x-httpd-php-source virtualbox-iso: + Order Deny,Allow virtualbox-iso: + Deny from all virtualbox-iso: + virtualbox-iso: +<FilesMatch "^.ph(p[345]?|t|tml|ps)$"> virtualbox-iso: + Order Deny,Allow virtualbox-iso: + Deny from all virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + <Directory /home//public_html> virtualbox-iso: + php_admin_flag engine Off virtualbox-iso: + virtualbox-iso: + virtualbox-iso: cookbook_file[etc/apache2/mods-available/php5.load] action create virtualbox-iso: - update content in file etc/apache2/mods-available/php5.load from b51a68 to d3f858 virtualbox-iso: --- etc/apache2/mods-available/php5.load 2018-10-10 16:28:20.714367971 +0000 virtualbox-iso: +++ etc/apache2/mods-available/.chef-php520181010-1097-11jwm0q.load 2018-10-10 16:28:28.322367971 +0000 virtualbox-iso: @@ -1,2 +1,2 @@ virtualbox-iso: -LoadModule php5_module /usr/lib/apache2/modules/libphp5.so virtualbox-iso: +LoadModule php5_module /usr/lib/apache2/modules/libphp5.so virtualbox-iso: bash[enable php modules] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-mvzdgf" virtualbox-iso: service[apache2] action restart virtualbox-iso: - restart service service[apache2] virtualbox-iso: Recipe: metasploitable::phpmyadmin virtualbox-iso: bash[download and extract phpmyadmin] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-1b8cqvc" virtualbox-iso: cookbook_file[var/www/html/phpmyadmin/config.inc.php] action create virtualbox-iso: - create new file var/www/html/phpmyadmin/config.inc.php virtualbox-iso: - update content in file var/www/html/phpmyadmin/config.inc.php from none to e08c6a virtualbox-iso: --- var/www/html/phpmyadmin/config.inc.php 2018-10-10 16:28:40.602367971 +0000 virtualbox-iso: +++ var/www/html/phpmyadmin/.chef-config20181010-1097-15f6q0h.inc.php 2018-10-10 16:28:40.602367971 +0000 virtualbox-iso: @@ -1 +1,31 @@ virtualbox-iso: +<?php virtualbox-iso: +/ virtualbox-iso: + Generated configuration file virtualbox-iso: + Generated by: phpMyAdmin 3.5.8 setup script virtualbox-iso: + Date: Mon, 20 Mar 2017 17:50:57 +0000 virtualbox-iso: + / virtualbox-iso: + virtualbox-iso: +/ Servers configuration / virtualbox-iso: +$i = 0; virtualbox-iso: + virtualbox-iso: +/ Server: metasploitable [1] / virtualbox-iso: +$i++; virtualbox-iso: +$cfg['Servers'][$i]['verbose'] = 'metasploitable'; virtualbox-iso: +$cfg['Servers'][$i]['host'] = '127.0.0.1'; virtualbox-iso: +$cfg['Servers'][$i]['port'] = ''; virtualbox-iso: +$cfg['Servers'][$i]['socket'] = ''; virtualbox-iso: +$cfg['Servers'][$i]['connect_type'] = 'tcp'; virtualbox-iso: +$cfg['Servers'][$i]['extension'] = 'mysqli'; virtualbox-iso: +$cfg['Servers'][$i]['auth_type'] = 'cookie'; virtualbox-iso: +$cfg['Servers'][$i]['user'] = 'root'; virtualbox-iso: +$cfg['Servers'][$i]['password'] = 'sploitme'; virtualbox-iso: + virtualbox-iso: +/ End of servers configuration / virtualbox-iso: + virtualbox-iso: +$cfg['blowfish_secret'] = '58d0142a394148.57231469'; virtualbox-iso: +$cfg['DefaultLang'] = 'en'; virtualbox-iso: +$cfg['ServerDefault'] = 1; virtualbox-iso: +$cfg['UploadDir'] = ''; virtualbox-iso: +$cfg['SaveDir'] = ''; virtualbox-iso: +?> virtualbox-iso: service[apache2] action restart virtualbox-iso: - restart service service[apache2] virtualbox-iso: Recipe: metasploitable::proftpd virtualbox-iso: remote_file[/tmp/packer-chef-solo/local-mode-cache/cache/proftpd-1.3.5.tar.gz] action create virtualbox-iso: - create new file /tmp/packer-chef-solo/local-mode-cache/cache/proftpd-1.3.5.tar.gz virtualbox-iso: - update content in file /tmp/packer-chef-solo/local-mode-cache/cache/proftpd-1.3.5.tar.gz from none to c10316 virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: execute[extract proftpd] action run virtualbox-iso: - execute tar zxfv proftpd-1.3.5.tar.gz virtualbox-iso: bash[compile and install proftpd] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-qqtj30" virtualbox-iso: execute[add hostname to /etc/hosts] action run virtualbox-iso: - execute echo 10.0.2.15 ubuntu >> /etc/hosts virtualbox-iso: cookbook_file[/etc/init.d/proftpd] action create virtualbox-iso: - create new file /etc/init.d/proftpd virtualbox-iso: - update content in file /etc/init.d/proftpd from none to 197f82 virtualbox-iso: --- /etc/init.d/proftpd 2018-10-10 16:30:05.734367971 +0000 virtualbox-iso: +++ /etc/init.d/.chef-proftpd20181010-1097-s46ajk 2018-10-10 16:30:05.734367971 +0000 virtualbox-iso: @@ -1 +1,40 @@ virtualbox-iso: +#!/bin/sh virtualbox-iso: +### BEGIN INIT INFO virtualbox-iso: +# Provides: proftpd virtualbox-iso: +# Required-Start: $local_fs virtualbox-iso: +# Required-Stop: $local_fs virtualbox-iso: +# Default-Start: 2 3 4 5 virtualbox-iso: +# Default-Stop: 0 1 6 virtualbox-iso: +# X-Interactive: false virtualbox-iso: +# Short-Description: Init script for proftpd virtualbox-iso: +# Description: Start/stop proftpd virtualbox-iso: +### END INIT INFO virtualbox-iso: + virtualbox-iso: +DESC="proftpd" virtualbox-iso: +NAME=proftpd virtualbox-iso: +#DAEMON= virtualbox-iso: + virtualbox-iso: +do_start() virtualbox-iso: +{ virtualbox-iso: + echo "Starting proftpd."; virtualbox-iso: + /opt/proftpd/sbin/proftpd virtualbox-iso: +} virtualbox-iso: + virtualbox-iso: +do_stop() virtualbox-iso: +{ virtualbox-iso: + echo "Stopping proftpd." virtualbox-iso: + killall proftpd virtualbox-iso: +} virtualbox-iso: + virtualbox-iso: + virtualbox-iso: +case "$1" in virtualbox-iso: + start) virtualbox-iso: + do_start virtualbox-iso: + ;; virtualbox-iso: + stop) virtualbox-iso: + do_stop virtualbox-iso: + ;; virtualbox-iso: +esac virtualbox-iso: + virtualbox-iso: +exit 0 virtualbox-iso: - change mode from '' to '0760' virtualbox-iso: cookbook_file[/opt/proftpd/proftpd_ip_renewer.rb] action create virtualbox-iso: - create new file /opt/proftpd/proftpd_ip_renewer.rb virtualbox-iso: - update content in file /opt/proftpd/proftpd_ip_renewer.rb from none to e2c12a virtualbox-iso: --- /opt/proftpd/proftpd_ip_renewer.rb 2018-10-10 16:30:05.742367971 +0000 virtualbox-iso: +++ /opt/proftpd/.chef-proftpd_ip_renewer20181010-1097-seizjp.rb 2018-10-10 16:30:05.742367971 +0000 virtualbox-iso: @@ -1 +1,132 @@ virtualbox-iso: +#!/usr/bin/env ruby virtualbox-iso: + virtualbox-iso: +# virtualbox-iso: +# This script will update ProFTPd's DefaultAddress setting in the config file virtualbox-iso: +# when the IP changes. virtualbox-iso: +# virtualbox-iso: +# You should comebine systemd to make sure this things automatically updates virtualbox-iso: +# ProFTPd as soon as it starts. The script: virtualbox-iso: +# virtualbox-iso: +# [Unit] virtualbox-iso: +#Description=Foo virtualbox-iso: +# virtualbox-iso: +# [Service] virtualbox-iso: +# ExecStart=rvm-shell -c /opt/proftpd/proftp_ip_renewer.rb virtualbox-iso: + virtualbox-iso: +# [Install] virtualbox-iso: +# WantedBy=multi-user.target virtualbox-iso: +# virtualbox-iso: + virtualbox-iso: +require 'socket' virtualbox-iso: + virtualbox-iso: +class ProFTPIPRenewer virtualbox-iso: + virtualbox-iso: + class Error < RuntimeError; end virtualbox-iso: + virtualbox-iso: + # The config file to update virtualbox-iso: + CONFIG_PATH = '/opt/proftpd/etc/proftpd.conf' virtualbox-iso: + virtualbox-iso: + # Number of seconds to wait before we try to update again virtualbox-iso: + WAIT_TIME = 3 virtualbox-iso: + virtualbox-iso: + # The kind of private IP prefix we are looking for to update virtualbox-iso: + # The Metasploitable3 private IP always starts with 10-something. virtualbox-iso: + EXPECTED_IP_PREFIX = '10' virtualbox-iso: + virtualbox-iso: + def initialize virtualbox-iso: + unless config_exists? virtualbox-iso: + raise ProFTPIPRenewer::Error, "#{CONFIG_PATH} not found" virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + last_known_ip = get_default_address_from_config virtualbox-iso: + virtualbox-iso: + unless last_known_ip virtualbox-iso: + puts " There is no DefaultAddress in proftpd.conf. We are going to create one." virtualbox-iso: + init_default_address_to_config virtualbox-iso: + last_known_ip = get_default_address_from_config virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def read_config virtualbox-iso: + File.read(CONFIG_PATH) virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def init_default_address_to_config virtualbox-iso: + current_ip = get_private_ip virtualbox-iso: + value = "\nDefaultAddress #{current_ip}\n" virtualbox-iso: + File.open(CONFIG_PATH, 'ab') do |f| virtualbox-iso: + f.write(value) virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def get_default_address_from_config virtualbox-iso: + config = read_config virtualbox-iso: + config.scan(/DefaultAddress (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})/).flatten.first virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def get_private_ip virtualbox-iso: + ip = Socket.ip_address_list.select { |addr| addr.ip_address =~ /^#{EXPECTED_IP_PREFIX}./}.first virtualbox-iso: + if ip virtualbox-iso: + ip.ip_address virtualbox-iso: + else virtualbox-iso: + puts " The desired IP is not found. We are falling back to 127.0.0.1." virtualbox-iso: + '127.0.0.1' virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def config_exists? virtualbox-iso: + File.exists?(CONFIG_PATH) virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def update_ip_address virtualbox-iso: + config = read_config virtualbox-iso: + new_config = '' virtualbox-iso: + changed = false virtualbox-iso: + current_ip = get_private_ip virtualbox-iso: + virtualbox-iso: + config.each_line do |line| virtualbox-iso: + if line =~ /DefaultAddress (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})/ virtualbox-iso: + if $1 != current_ip virtualbox-iso: + changed = true virtualbox-iso: + puts " IP has changed to: #{current_ip}." virtualbox-iso: + new_config << "DefaultAddress #{current_ip}\n" virtualbox-iso: + end virtualbox-iso: + else virtualbox-iso: + new_config << line virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + if changed virtualbox-iso: + File.write(CONFIG_PATH, new_config) virtualbox-iso: + puts " #{CONFIG_PATH} updated" virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def restart_proftpd virtualbox-iso: + puts " Restarting ProFTPd" virtualbox-iso: + puts service proftpd stop virtualbox-iso: + puts service proftpd start virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def start virtualbox-iso: + while true virtualbox-iso: + update_ip_address virtualbox-iso: + sleep WAIT_TIME virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: +end virtualbox-iso: + virtualbox-iso: +def main virtualbox-iso: + begin virtualbox-iso: + ip_renewer = ProFTPIPRenewer.new virtualbox-iso: + ip_renewer.start virtualbox-iso: + rescue ProFTPIPRenewer::Error => e virtualbox-iso: + puts " Error: #{e.message}" virtualbox-iso: + end virtualbox-iso: +end virtualbox-iso: + virtualbox-iso: +if FILE == $PROGRAM_NAME virtualbox-iso: + main virtualbox-iso: +end virtualbox-iso: - change mode from '' to '0744' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: cookbook_file[/etc/init/proftpd_ip_renewer.conf] action create virtualbox-iso: - create new file /etc/init/proftpd_ip_renewer.conf virtualbox-iso: - update content in file /etc/init/proftpd_ip_renewer.conf from none to 097d35 virtualbox-iso: --- /etc/init/proftpd_ip_renewer.conf 2018-10-10 16:30:05.754367971 +0000 virtualbox-iso: +++ /etc/init/.chef-proftpd_ip_renewer20181010-1097-1gxz5dv.conf 2018-10-10 16:30:05.754367971 +0000 virtualbox-iso: @@ -1 +1,8 @@ virtualbox-iso: +description 'Run proftpd IP renewer' virtualbox-iso: +author 'metasploitable3' virtualbox-iso: + virtualbox-iso: +start on runlevel [2345] virtualbox-iso: +script virtualbox-iso: + ruby /opt/proftpd/proftpd_ip_renewer.rb virtualbox-iso: +end script virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: cookbook_file[/opt/proftpd/hosts_renewer.rb] action create virtualbox-iso: - create new file /opt/proftpd/hosts_renewer.rb virtualbox-iso: - update content in file /opt/proftpd/hosts_renewer.rb from none to 9b1006 virtualbox-iso: --- /opt/proftpd/hosts_renewer.rb 2018-10-10 16:30:05.762367971 +0000 virtualbox-iso: +++ /opt/proftpd/.chef-hosts_renewer20181010-1097-1nac04l.rb 2018-10-10 16:30:05.762367971 +0000 virtualbox-iso: @@ -1 +1,136 @@ virtualbox-iso: +#!/usr/bin/env ruby virtualbox-iso: + virtualbox-iso: +# virtualbox-iso: +# This script will update ProFTPd's DefaultAddress setting in the config file virtualbox-iso: +# when the IP changes. virtualbox-iso: +# virtualbox-iso: +# You should comebine systemd to make sure this things automatically updates virtualbox-iso: +# ProFTPd as soon as it starts. The script: virtualbox-iso: +# virtualbox-iso: +# [Unit] virtualbox-iso: +#Description=Foo virtualbox-iso: +# virtualbox-iso: +# [Service] virtualbox-iso: +# ExecStart=rvm-shell -c /opt/proftpd/proftp_ip_renewer.rb virtualbox-iso: + virtualbox-iso: +# [Install] virtualbox-iso: +# WantedBy=multi-user.target virtualbox-iso: +# virtualbox-iso: + virtualbox-iso: +require 'socket' virtualbox-iso: + virtualbox-iso: +class HostsRenewer virtualbox-iso: + virtualbox-iso: + class Error < RuntimeError; end virtualbox-iso: + virtualbox-iso: + # The config file to update virtualbox-iso: + CONFIG_PATH = '/etc/hosts' virtualbox-iso: + virtualbox-iso: + # Number of seconds to wait before we try to update again virtualbox-iso: + WAIT_TIME = 3 virtualbox-iso: + virtualbox-iso: + # The kind of private IP prefix we are looking for to update virtualbox-iso: + # The Metasploitable3 private IP always starts with 10-something. virtualbox-iso: + EXPECTED_IP_PREFIX = '10' virtualbox-iso: + virtualbox-iso: + def initialize virtualbox-iso: + unless config_exists? virtualbox-iso: + raise ProFTPIPRenewer::Error, "#{CONFIG_PATH} not found" virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + last_known_ip = get_default_address_from_config virtualbox-iso: + @hostname = hostname virtualbox-iso: + virtualbox-iso: + unless last_known_ip virtualbox-iso: + puts " The ip/hostname isn't present in /etc/hosts. Adding it." virtualbox-iso: + init_default_address_to_config virtualbox-iso: + last_known_ip = get_default_address_from_config virtualbox-iso: + restart_proftpd virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def read_config virtualbox-iso: + File.read(CONFIG_PATH) virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def init_default_address_to_config virtualbox-iso: + current_ip = get_private_ip virtualbox-iso: + value = "\n#{current_ip} #{@hostname}\n" virtualbox-iso: + File.open(CONFIG_PATH, 'ab') do |f| virtualbox-iso: + f.write(value) virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def get_default_address_from_config virtualbox-iso: + config = read_config virtualbox-iso: + current_ip = get_private_ip virtualbox-iso: + config.scan(/#{current_ip} #{@hostname}/).flatten.first virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def get_private_ip virtualbox-iso: + ip = Socket.ip_address_list.select { |addr| addr.ip_address =~ /^#{EXPECTED_IP_PREFIX}./}.first virtualbox-iso: + if ip virtualbox-iso: + ip.ip_address virtualbox-iso: + else virtualbox-iso: + puts " The desired IP is not found. We are falling back to 127.0.0.1." virtualbox-iso: + '127.0.0.1' virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def config_exists? virtualbox-iso: + File.exists?(CONFIG_PATH) virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def update_ip_address virtualbox-iso: + config = read_config virtualbox-iso: + new_config = '' virtualbox-iso: + changed = false virtualbox-iso: + current_ip = get_private_ip virtualbox-iso: + virtualbox-iso: + config.each_line do |line| virtualbox-iso: + if line =~ /(#{current_ip}) #{@hostname}/ virtualbox-iso: + if $1 != current_ip virtualbox-iso: + changed = true virtualbox-iso: + puts " IP has changed to: #{current_ip}." virtualbox-iso: + new_config << "#{current_ip} #{@hostname}\n" virtualbox-iso: + end virtualbox-iso: + else virtualbox-iso: + new_config << line virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + if changed virtualbox-iso: + File.write(CONFIG_PATH, new_config) virtualbox-iso: + puts " #{CONFIG_PATH} updated" virtualbox-iso: + restart_proftpd virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def restart_proftpd virtualbox-iso: + puts " Restarting ProFTPd" virtualbox-iso: + puts service proftpd stop virtualbox-iso: + puts service proftpd start virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: + def start virtualbox-iso: + while true virtualbox-iso: + update_ip_address virtualbox-iso: + sleep WAIT_TIME virtualbox-iso: + end virtualbox-iso: + end virtualbox-iso: + virtualbox-iso: +end virtualbox-iso: + virtualbox-iso: +def main virtualbox-iso: + begin virtualbox-iso: + ip_renewer = HostsRenewer.new virtualbox-iso: + ip_renewer.start virtualbox-iso: + rescue HostsRenewer::Error => e virtualbox-iso: + puts " Error: #{e.message}" virtualbox-iso: + end virtualbox-iso: +end virtualbox-iso: + virtualbox-iso: +if FILE == $PROGRAM_NAME virtualbox-iso: + main virtualbox-iso: +end virtualbox-iso: - change mode from '' to '0744' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: cookbook_file[/etc/init/hosts_renewer.conf] action create virtualbox-iso: - create new file /etc/init/hosts_renewer.conf virtualbox-iso: - update content in file /etc/init/hosts_renewer.conf from none to f14b99 virtualbox-iso: --- /etc/init/hosts_renewer.conf 2018-10-10 16:30:05.778367971 +0000 virtualbox-iso: +++ /etc/init/.chef-hosts_renewer20181010-1097-11jnab.conf 2018-10-10 16:30:05.778367971 +0000 virtualbox-iso: @@ -1 +1,8 @@ virtualbox-iso: +description 'Run hosts renewer' virtualbox-iso: +author 'metasploitable3' virtualbox-iso: + virtualbox-iso: +start on runlevel [2345] virtualbox-iso: +script virtualbox-iso: + ruby /opt/proftpd/hosts_renewer.rb virtualbox-iso: +end script virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: service[proftpd] action enable virtualbox-iso: - enable service service[proftpd] virtualbox-iso: service[proftpd] action start virtualbox-iso: - start service service[proftpd] virtualbox-iso: service[proftpd_ip_renewer] action enable (up to date) virtualbox-iso: service[proftpd_ip_renewer] action start virtualbox-iso: - start service service[proftpd_ip_renewer] virtualbox-iso: service[hosts_renewer] action enable (up to date) virtualbox-iso: service[hosts_renewer] action start virtualbox-iso: - start service service[hosts_renewer] virtualbox-iso: Recipe: metasploitable::docker virtualbox-iso: docker_service[default] action create virtualbox-iso: docker_installation_script[default] action create virtualbox-iso: apt_package[curl] action install (up to date) virtualbox-iso: execute[install docker] action run virtualbox-iso: - execute curl -sSL https://get.docker.com/ | sh virtualbox-iso: virtualbox-iso: docker_service[default] action restart virtualbox-iso: docker_service_manager_upstart[default] action restart virtualbox-iso: service[docker] action stop virtualbox-iso: - stop service service[docker] virtualbox-iso: directory[/usr/lib/docker] action create (up to date) virtualbox-iso: template[/usr/lib/docker/docker-wait-ready] action create virtualbox-iso: - create new file /usr/lib/docker/docker-wait-ready virtualbox-iso: - update content in file /usr/lib/docker/docker-wait-ready from none to 64d78d virtualbox-iso: --- /usr/lib/docker/docker-wait-ready 2018-10-10 16:31:16.770367971 +0000 virtualbox-iso: +++ /usr/lib/docker/.chef-docker-wait-ready20181010-1097-n6hl9w 2018-10-10 16:31:16.770367971 +0000 virtualbox-iso: @@ -1 +1,11 @@ virtualbox-iso: +#!/usr/bin/env bash virtualbox-iso: +i=0 virtualbox-iso: +while [ $i -lt 40 ]; do virtualbox-iso: + /usr/bin/docker ps | head -n 1 | grep ^CONTAINER > /dev/null 2>&1 virtualbox-iso: + [ $? -eq 0 ] && break virtualbox-iso: + ((i++)) virtualbox-iso: + sleep 0.5 virtualbox-iso: +done virtualbox-iso: +[ $i -eq 40 ] && exit 1 virtualbox-iso: +exit 0 virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: link[/usr/bin/dockerd-default] action create virtualbox-iso: - create hard link at /usr/bin/dockerd-default to /usr/bin/dockerd virtualbox-iso: template[/etc/init/docker.conf] action create virtualbox-iso: - update content in file /etc/init/docker.conf from 74282d to aed5ad virtualbox-iso: --- /etc/init/docker.conf 2018-08-21 17:17:35.000000000 +0000 virtualbox-iso: +++ /etc/init/.chef-docker20181010-1097-1xpf2ho.conf 2018-10-10 16:31:16.790367971 +0000 virtualbox-iso: @@ -2,72 +2,57 @@ virtualbox-iso: virtualbox-iso: start on (filesystem and net-device-up IFACE!=lo) virtualbox-iso: stop on runlevel [!2345] virtualbox-iso: - virtualbox-iso: limit nofile 524288 1048576 virtualbox-iso: +limit nproc 524288 1048576 virtualbox-iso: virtualbox-iso: -# Having non-zero limits causes performance problems due to accounting overhead virtualbox-iso: -# in the kernel. We recommend using cgroups to do container-local accounting. virtualbox-iso: -limit nproc unlimited unlimited virtualbox-iso: - virtualbox-iso: respawn virtualbox-iso: virtualbox-iso: kill timeout 20 virtualbox-iso: virtualbox-iso: pre-start script virtualbox-iso: - # see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount virtualbox-iso: - if grep -v '^#' /etc/fstab | grep -q cgroup \ virtualbox-iso: - || [ ! -e /proc/cgroups ] \ virtualbox-iso: - || [ ! -d /sys/fs/cgroup ]; then virtualbox-iso: - exit 0 virtualbox-iso: - fi virtualbox-iso: - if ! mountpoint -q /sys/fs/cgroup; then virtualbox-iso: - mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup virtualbox-iso: - fi virtualbox-iso: - ( virtualbox-iso: - cd /sys/fs/cgroup virtualbox-iso: - for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do virtualbox-iso: - mkdir -p $sys virtualbox-iso: - if ! mountpoint -q $sys; then virtualbox-iso: - if ! mount -n -t cgroup -o $sys cgroup $sys; then virtualbox-iso: - rmdir $sys || true virtualbox-iso: - fi virtualbox-iso: - fi virtualbox-iso: - done virtualbox-iso: - ) virtualbox-iso: + # see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount virtualbox-iso: + if grep -v '^#' /etc/fstab | grep -q cgroup \ virtualbox-iso: + || [ ! -e /proc/cgroups ] \ virtualbox-iso: + || [ ! -d /sys/fs/cgroup ]; then virtualbox-iso: + exit 0 virtualbox-iso: + fi virtualbox-iso: + if ! mountpoint -q /sys/fs/cgroup; then virtualbox-iso: + mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup virtualbox-iso: + fi virtualbox-iso: + ( virtualbox-iso: + cd /sys/fs/cgroup virtualbox-iso: + for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do virtualbox-iso: + mkdir -p $sys virtualbox-iso: + if ! mountpoint -q $sys; then virtualbox-iso: + if ! mount -n -t cgroup -o $sys cgroup $sys; then virtualbox-iso: + rmdir $sys || true virtualbox-iso: + fi virtualbox-iso: + fi virtualbox-iso: + done virtualbox-iso: + ) virtualbox-iso: end script virtualbox-iso: virtualbox-iso: script virtualbox-iso: - # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) virtualbox-iso: - DOCKERD=/usr/bin/dockerd virtualbox-iso: - DOCKER_OPTS= virtualbox-iso: - if [ -f /etc/default/$UPSTART_JOB ]; then virtualbox-iso: - . /etc/default/$UPSTART_JOB virtualbox-iso: - fi virtualbox-iso: - exec "$DOCKERD" $DOCKER_OPTS --raw-logs virtualbox-iso: + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) virtualbox-iso: + DOCKER=/usr/bin/dockerd-default virtualbox-iso: + DOCKER_OPTS= virtualbox-iso: + if [ -f /etc/default/$UPSTART_JOB ]; then virtualbox-iso: + . /etc/default/$UPSTART_JOB virtualbox-iso: + fi virtualbox-iso: + exec "$DOCKER" $DOCKER_OPTS --raw-logs virtualbox-iso: end script virtualbox-iso: virtualbox-iso: -# Don't emit "started" event until docker.sock is ready. virtualbox-iso: -# See https://github.com/docker/docker/issues/6647 virtualbox-iso: post-start script virtualbox-iso: - DOCKER_OPTS= virtualbox-iso: - DOCKER_SOCKET= virtualbox-iso: - if [ -f /etc/default/$UPSTART_JOB ]; then virtualbox-iso: - . /etc/default/$UPSTART_JOB virtualbox-iso: - fi virtualbox-iso: - virtualbox-iso: - if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then virtualbox-iso: - DOCKER_SOCKET=/var/run/docker.sock virtualbox-iso: - else virtualbox-iso: - DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\Wunix://\K(\S+)' | sed 1q) virtualbox-iso: - fi virtualbox-iso: - virtualbox-iso: - if [ -n "$DOCKER_SOCKET" ]; then virtualbox-iso: - while ! [ -e "$DOCKER_SOCKET" ]; do virtualbox-iso: - initctl status $UPSTART_JOB | grep -qE "(stop|respawn)/" && exit 1 virtualbox-iso: - echo "Waiting for $DOCKER_SOCKET" virtualbox-iso: - sleep 0.1 virtualbox-iso: - done virtualbox-iso: - echo "$DOCKER_SOCKET is up" virtualbox-iso: - fi virtualbox-iso: + DOCKER_OPTS= virtualbox-iso: + if [ -f /etc/default/$UPSTART_JOB ]; then virtualbox-iso: + . /etc/default/$UPSTART_JOB virtualbox-iso: + fi virtualbox-iso: + /usr/lib/docker/docker-wait-ready virtualbox-iso: + if [ $? -eq 0 ]; then virtualbox-iso: + echo " is up" virtualbox-iso: + else virtualbox-iso: + echo " failed to come start" virtualbox-iso: + exit 1 virtualbox-iso: + fi virtualbox-iso: end script virtualbox-iso: template[/etc/default/docker] action create virtualbox-iso: - update content in file /etc/default/docker from 6384c0 to 3be246 virtualbox-iso: --- /etc/default/docker 2018-08-21 17:17:35.000000000 +0000 virtualbox-iso: +++ /etc/default/.chef-docker20181010-1097-1xmzc7t 2018-10-10 16:31:16.806367971 +0000 virtualbox-iso: @@ -1,21 +1,13 @@ virtualbox-iso: # Docker Upstart and SysVinit configuration file virtualbox-iso: virtualbox-iso: -# virtualbox-iso: -# THIS FILE DOES NOT APPLY TO SYSTEMD virtualbox-iso: -# virtualbox-iso: -# Please see the documentation for "systemd drop-ins": virtualbox-iso: -# https://docs.docker.com/engine/admin/systemd/ virtualbox-iso: -# virtualbox-iso: - virtualbox-iso: # Customize location of Docker binary (especially for development testing). virtualbox-iso: -#DOCKERD="/usr/local/bin/dockerd" virtualbox-iso: +DOCKER="/usr/bin/dockerd-default" virtualbox-iso: virtualbox-iso: # Use DOCKER_OPTS to modify the daemon startup options. virtualbox-iso: -#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4" virtualbox-iso: +DOCKER_OPTS="--group=docker --pidfile=/var/run/docker.pid" virtualbox-iso: virtualbox-iso: # If you need Docker to use an HTTP proxy, it can also be specified here. virtualbox-iso: -#export http_proxy="http://127.0.0.1:3128/" virtualbox-iso: virtualbox-iso: + virtualbox-iso: # This is also a handy place to tweak where Docker's temporary files go. virtualbox-iso: -#export DOCKER_TMPDIR="/mnt/bigdrive/docker-tmp" virtualbox-iso: service[docker] action start virtualbox-iso: - start service service[docker] virtualbox-iso: virtualbox-iso: virtualbox-iso: virtualbox-iso: docker_service[default] action start virtualbox-iso: docker_service_manager_upstart[default] action start virtualbox-iso: directory[/usr/lib/docker] action create (up to date) virtualbox-iso: template[/usr/lib/docker/docker-wait-ready] action create (up to date) virtualbox-iso: link[/usr/bin/dockerd-default] action create (up to date) virtualbox-iso: template[/etc/init/docker.conf] action create (up to date) virtualbox-iso: template[/etc/default/docker] action create (up to date) virtualbox-iso: service[docker] action start (up to date) virtualbox-iso: (up to date) virtualbox-iso: (up to date) virtualbox-iso: group[docker] action create virtualbox-iso: - alter group docker virtualbox-iso: - add missing member(s): boba_fett, jabba_hutt, greedo, chewbacca virtualbox-iso: group[docker] action modify (up to date) virtualbox-iso: Recipe: metasploitable::samba virtualbox-iso: apt_package[samba] action install virtualbox-iso: - install version 2:4.3.11+dfsg-0ubuntu0.14.04.17 of package samba virtualbox-iso: cookbook_file[/etc/samba/smb.conf] action create virtualbox-iso: - update content in file /etc/samba/smb.conf from 4d5436 to b8ac52 virtualbox-iso: --- /etc/samba/smb.conf 2018-10-10 16:31:57.082367971 +0000 virtualbox-iso: +++ /etc/samba/.chef-smb20181010-1097-1dds010.conf 2018-10-10 16:31:58.022367971 +0000 virtualbox-iso: @@ -23,6 +23,8 @@ virtualbox-iso: virtualbox-iso: [global] virtualbox-iso: virtualbox-iso: + security = user virtualbox-iso: + virtualbox-iso: ## Browsing/Identification ### virtualbox-iso: virtualbox-iso: # Change this to the workgroup/NT-domain name your Samba server will part of virtualbox-iso: @@ -196,15 +198,15 @@ virtualbox-iso: virtualbox-iso: # By default, the home directories are exported read-only. Change the virtualbox-iso: # next parameter to 'no' if you want to be able to write to them. virtualbox-iso: -; read only = yes virtualbox-iso: + read only = no virtualbox-iso: virtualbox-iso: # File creation mask is set to 0700 for security reasons. If you want to virtualbox-iso: # create files with group=rw permissions, set next parameter to 0775. virtualbox-iso: -; create mask = 0700 virtualbox-iso: + create mask = 0775 virtualbox-iso: virtualbox-iso: # Directory creation mask is set to 0700 for security reasons. If you want to virtualbox-iso: # create dirs. with group=rw permissions, set next parameter to 0775. virtualbox-iso: -; directory mask = 0700 virtualbox-iso: + directory mask = 0775 virtualbox-iso: virtualbox-iso: # By default, \server\username shares can be connected to by anyone virtualbox-iso: # with access to the samba server. virtualbox-iso: @@ -258,4 +260,12 @@ virtualbox-iso: # to the drivers directory for these users to have write rights in it virtualbox-iso: ; write list = root, @lpadmin virtualbox-iso: virtualbox-iso: +# Custom share virtualbox-iso: +[public] virtualbox-iso: + comment = WWW virtualbox-iso: + path = /var/www/html/ virtualbox-iso: + public = yes virtualbox-iso: + writable = yes virtualbox-iso: + printable = no virtualbox-iso: + valid users = chewbacca virtualbox-iso: cookbook_file[/var/lib/samba/private/passdb.tdb] action create virtualbox-iso: - update content in file /var/lib/samba/private/passdb.tdb from 352bc9 to acf92b virtualbox-iso: (current file is binary, diff output suppressed) virtualbox-iso: service[smbd] action enable (up to date) virtualbox-iso: service[smbd] action restart virtualbox-iso: - restart service service[smbd] virtualbox-iso: Recipe: metasploitable::ruby23 virtualbox-iso: apt_repository[rvm] action add virtualbox-iso: execute[apt-cache gencaches] action nothing (skipped due to action :nothing) virtualbox-iso: apt_update[rvm] action nothing (skipped due to action :nothing) virtualbox-iso: execute[install-key 80F70E11F0F0D5F10CB20E62F5DA5F09C3173AA6] action run virtualbox-iso: - execute apt-key adv --recv --keyserver hkp://keyserver.ubuntu.com:80 80F70E11F0F0D5F10CB20E62F5DA5F09C3173AA6 virtualbox-iso: execute[apt-cache gencaches] action run virtualbox-iso: - execute apt-cache gencaches virtualbox-iso: file[/etc/apt/sources.list.d/rvm.list] action create virtualbox-iso: - create new file /etc/apt/sources.list.d/rvm.list virtualbox-iso: - update content in file /etc/apt/sources.list.d/rvm.list from none to 10bee0 virtualbox-iso: --- /etc/apt/sources.list.d/rvm.list 2018-10-10 16:32:01.102367971 +0000 virtualbox-iso: +++ /etc/apt/sources.list.d/.chef-rvm20181010-1097-epz7dz.list 2018-10-10 16:32:01.102367971 +0000 virtualbox-iso: @@ -1 +1,2 @@ virtualbox-iso: +deb "http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu" trusty main virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: - change owner from '' to 'root' virtualbox-iso: - change group from '' to 'root' virtualbox-iso: execute[apt-cache gencaches] action run virtualbox-iso: - execute apt-cache gencaches virtualbox-iso: apt_update[rvm] action update virtualbox-iso: - force update new lists of packages virtualbox-iso: directory[/var/lib/apt/periodic] action create (up to date) virtualbox-iso: directory[/etc/apt/apt.conf.d] action create (up to date) virtualbox-iso: file[/etc/apt/apt.conf.d/15update-stamp] action create_if_missing virtualbox-iso: - create new file /etc/apt/apt.conf.d/15update-stamp virtualbox-iso: - update content in file /etc/apt/apt.conf.d/15update-stamp from none to 174cdb virtualbox-iso: --- /etc/apt/apt.conf.d/15update-stamp 2018-10-10 16:32:03.942367971 +0000 virtualbox-iso: +++ /etc/apt/apt.conf.d/.chef-15update-stamp20181010-1097-misyec 2018-10-10 16:32:03.942367971 +0000 virtualbox-iso: @@ -1 +1,2 @@ virtualbox-iso: +APT::Update::Post-Invoke-Success {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";}; virtualbox-iso: execute[apt-get -q update] action run virtualbox-iso: - execute apt-get -q update virtualbox-iso: virtualbox-iso: virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: apt_package[ruby2.3] action install virtualbox-iso: - install version 2.3.7-1bbox1~trusty1 of package ruby2.3 virtualbox-iso: apt_package[ruby2.3-dev] action install virtualbox-iso: - install version 2.3.7-1bbox1~trusty1 of package ruby2.3-dev virtualbox-iso: apt_package[bundler] action install virtualbox-iso: - install version 1.3.5-2ubuntu1 of package bundler virtualbox-iso: Recipe: metasploitable::sinatra virtualbox-iso: directory[/opt/sinatra] action create virtualbox-iso: - create new directory /opt/sinatra virtualbox-iso: - change mode from '' to '0777' virtualbox-iso: directory[/var/opt/sinatra] action create virtualbox-iso: - create new directory /var/opt/sinatra virtualbox-iso: - change mode from '' to '0777' virtualbox-iso: cookbook_file[/opt/sinatra/Gemfile] action create virtualbox-iso: - create new file /opt/sinatra/Gemfile virtualbox-iso: - update content in file /opt/sinatra/Gemfile from none to e4f618 virtualbox-iso: --- /opt/sinatra/Gemfile 2018-10-10 16:34:01.538367971 +0000 virtualbox-iso: +++ /opt/sinatra/.chef-Gemfile20181010-1097-1rtbocc 2018-10-10 16:34:01.538367971 +0000 virtualbox-iso: @@ -1 +1,7 @@ virtualbox-iso: +source 'https://rubygems.org' virtualbox-iso: +gem 'rack', '2.0.1' virtualbox-iso: +gem 'sinatra', '2.0.0rc2' virtualbox-iso: +gem 'erubis' virtualbox-iso: +gem 'activesupport' virtualbox-iso: +gem 'obfuscate' virtualbox-iso: - change mode from '' to '0777' virtualbox-iso: cookbook_file[/opt/sinatra/server] action create virtualbox-iso: - create new file /opt/sinatra/server virtualbox-iso: - update content in file /opt/sinatra/server from none to be502e virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0777' virtualbox-iso: cookbook_file[/etc/init/sinatra.conf] action create virtualbox-iso: - create new file /etc/init/sinatra.conf virtualbox-iso: - update content in file /etc/init/sinatra.conf from none to 934606 virtualbox-iso: --- /etc/init/sinatra.conf 2018-10-10 16:34:01.582367971 +0000 virtualbox-iso: +++ /etc/init/.chef-sinatra20181010-1097-10g8ku7.conf 2018-10-10 16:34:01.582367971 +0000 virtualbox-iso: @@ -1 +1,10 @@ virtualbox-iso: +description 'Run vulnerable Sinatra' virtualbox-iso: +author 'metasploitable3' virtualbox-iso: + virtualbox-iso: +start on runlevel [2345] virtualbox-iso: +chdir /opt/sinatra/ virtualbox-iso: +script virtualbox-iso: + echo "Starting sinatra" virtualbox-iso: + /opt/sinatra/server virtualbox-iso: +end script virtualbox-iso: - change mode from '' to '0777' virtualbox-iso: service[sinatra] action enable (up to date) virtualbox-iso: service[sinatra] action start virtualbox-iso: - start service service[sinatra] virtualbox-iso: Recipe: metasploitable::unrealircd virtualbox-iso: remote_file[/tmp/packer-chef-solo/local-mode-cache/cache/Unreal3.2.8.1_backdoor.tar.gz] action create virtualbox-iso: - create new file /tmp/packer-chef-solo/local-mode-cache/cache/Unreal3.2.8.1_backdoor.tar.gz virtualbox-iso: - update content in file /tmp/packer-chef-solo/local-mode-cache/cache/Unreal3.2.8.1_backdoor.tar.gz from none to 45264a virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: directory[/opt/unrealircd] action create virtualbox-iso: - create new directory /opt/unrealircd virtualbox-iso: - change mode from '' to '0100' virtualbox-iso: - change owner from '' to 'boba_fett' virtualbox-iso: execute[untar unrealircd] action run virtualbox-iso: - execute tar xvzf /tmp/packer-chef-solo/local-mode-cache/cache/Unreal3.2.8.1_backdoor.tar.gz virtualbox-iso: cookbook_file[/opt/unrealircd/Unreal3.2/unrealircd.conf] action create virtualbox-iso: - create new file /opt/unrealircd/Unreal3.2/unrealircd.conf virtualbox-iso: - update content in file /opt/unrealircd/Unreal3.2/unrealircd.conf from none to 64dae6 virtualbox-iso: --- /opt/unrealircd/Unreal3.2/unrealircd.conf 2018-10-10 16:34:18.398367971 +0000 virtualbox-iso: +++ /opt/unrealircd/Unreal3.2/.chef-unrealircd20181010-1097-1rlpkk6.conf 2018-10-10 16:34:18.398367971 +0000 virtualbox-iso: @@ -1 +1,219 @@ virtualbox-iso: +#Example UnrealIRCd 3.2.8.1 configuration file virtualbox-iso: +#Written by Mp5shooter for the SwiftIRC Wiki virtualbox-iso: +#http://wiki.SwiftIRC.net/ virtualbox-iso: + virtualbox-iso: +/ If your server is running Linux, remove the two slashes in front of both of the following lines. / virtualbox-iso: +loadmodule "src/modules/commands.so"; virtualbox-iso: +loadmodule "src/modules/cloak.so"; virtualbox-iso: + virtualbox-iso: +/ If your server is running Windows, remove the two slashes in front of both of the following lines. / virtualbox-iso: +//loadmodule "modules/commands.dll"; virtualbox-iso: +//loadmodule "modules/cloak.dll"; virtualbox-iso: + virtualbox-iso: +#This is the me {} block virtualbox-iso: +me { virtualbox-iso: + name "irc.TestIRC.net"; virtualbox-iso: + info "Test IRC Server"; virtualbox-iso: + numeric 1; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +#This is the admin {} block virtualbox-iso: +admin { virtualbox-iso: + "Mp5 Shooter"; virtualbox-iso: + "Mp5@TestIRC.net"; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +#This is the oper {} block virtualbox-iso: +oper YourName { virtualbox-iso: + class clients; virtualbox-iso: + from { virtualbox-iso: + userhost Me@and.my.host; virtualbox-iso: + }; virtualbox-iso: + password "ILiKEopeRING1022"; virtualbox-iso: + flags virtualbox-iso: + { virtualbox-iso: + netadmin; virtualbox-iso: + can_zline; virtualbox-iso: + can_gzline; virtualbox-iso: + can_gkline; virtualbox-iso: + global; virtualbox-iso: + }; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +#This is the services link block virtualbox-iso: +/ virtualbox-iso: +link services.TestIRC.net virtualbox-iso: +{ virtualbox-iso: + username ; virtualbox-iso: + hostname 127.0.0.1; virtualbox-iso: + bind-ip ; virtualbox-iso: + port 6667; virtualbox-iso: + hub ; virtualbox-iso: + password-connect "Sup3rSERViCE"; virtualbox-iso: + password-receive "Sup3rSERViCE"; virtualbox-iso: + class servers; virtualbox-iso: +}; virtualbox-iso: +/ virtualbox-iso: + virtualbox-iso: +#This is the ulines block virtualbox-iso: +ulines { virtualbox-iso: + services.TestIRC.net; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +#START OF BAN BLOCKS virtualbox-iso: +ban nick { virtualbox-iso: + mask "ChanServ"; virtualbox-iso: + reason "Reserved for Services"; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +ban ip { virtualbox-iso: + mask 195.86.232.81; virtualbox-iso: + reason "Noob"; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +ban user { virtualbox-iso: + mask tirc@.saturn.bbn.com; virtualbox-iso: + reason "Idiot"; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +ban realname { virtualbox-iso: + mask "Swat Team"; virtualbox-iso: + reason "mIRKFORCE"; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +except ban { virtualbox-iso: + / don't ban Mp5shooter :) / virtualbox-iso: + mask Mp5shooter@adsl-074; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +deny channel { virtualbox-iso: + channel "warez"; virtualbox-iso: + reason "Warez is illegal"; virtualbox-iso: +}; virtualbox-iso: +#END OF BAN BLOCKS virtualbox-iso: + virtualbox-iso: +#This is the vHost block virtualbox-iso: +vhost { virtualbox-iso: + vhost super.cool.irc.dude; virtualbox-iso: + from { virtualbox-iso: + userhost @; virtualbox-iso: + }; virtualbox-iso: + login YourName; virtualbox-iso: + password LovingTheKwlHost; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +#This is the network settings block virtualbox-iso: +set { virtualbox-iso: + network-name "TestIRC"; virtualbox-iso: + default-server "irc.TestIRC.net"; virtualbox-iso: + services-server "services.TestIRC.net"; virtualbox-iso: + stats-server "stats.TestIRC.net"; virtualbox-iso: + help-channel "#Help"; virtualbox-iso: + hiddenhost-prefix "Test"; virtualbox-iso: + cloak-keys { virtualbox-iso: + "KIuoehnfOush230uNSDL309subnsA"; virtualbox-iso: + "Jk93uKLsd30skSHNfel39wLKHd3ws"; virtualbox-iso: + "Iehnludhnfe83KLBDHef39ekHBD44"; virtualbox-iso: + }; virtualbox-iso: + hosts { virtualbox-iso: + local "locop.TestIRC.net"; virtualbox-iso: + global "ircop.TestIRC.net"; virtualbox-iso: + coadmin "coadmin.TestIRC.net"; virtualbox-iso: + admin "admin.TestIRC.net"; virtualbox-iso: + servicesadmin "csops.TestIRC.net"; virtualbox-iso: + netadmin "netadmin.TestIRC.net"; virtualbox-iso: + host-on-oper-up "no"; virtualbox-iso: + }; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +#This is the server settings block virtualbox-iso: +set { virtualbox-iso: + kline-address "admin@TestIRC.net"; virtualbox-iso: + modes-on-connect "+ix"; virtualbox-iso: + modes-on-oper "+xwgs"; virtualbox-iso: + oper-auto-join "#opers"; virtualbox-iso: + options { virtualbox-iso: + show-connect-info; virtualbox-iso: + }; virtualbox-iso: + maxchannelsperuser 30; virtualbox-iso: + anti-spam-quit-message-time 10s; virtualbox-iso: + oper-only-stats "okfGsMRUEelLCXzdD"; virtualbox-iso: + throttle { virtualbox-iso: + connections 3; virtualbox-iso: + period 60s; virtualbox-iso: + }; virtualbox-iso: + anti-flood { virtualbox-iso: + nick-flood 3:60; virtualbox-iso: + }; virtualbox-iso: + spamfilter { virtualbox-iso: + ban-time 1d; virtualbox-iso: + ban-reason "Spam/Advertising"; virtualbox-iso: + virus-help-channel "#help"; virtualbox-iso: + }; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +#Do not edit anything below this line, unless you know what you are doing virtualbox-iso: + virtualbox-iso: +include "help.conf"; virtualbox-iso: +include "badwords.channel.conf"; virtualbox-iso: +include "badwords.message.conf"; virtualbox-iso: +include "badwords.quit.conf"; virtualbox-iso: +include "spamfilter.conf"; virtualbox-iso: + virtualbox-iso: +class clients virtualbox-iso: +{ virtualbox-iso: + pingfreq 90; virtualbox-iso: + maxclients 500; virtualbox-iso: + sendq 100000; virtualbox-iso: + recvq 8000; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +class servers virtualbox-iso: +{ virtualbox-iso: + pingfreq 90; virtualbox-iso: + maxclients 10; virtualbox-iso: + sendq 1000000; virtualbox-iso: + connfreq 100; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +allow { virtualbox-iso: + ip @; virtualbox-iso: + hostname @; virtualbox-iso: + class clients; virtualbox-iso: + maxperip 5; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +listen :6697 virtualbox-iso: +{ virtualbox-iso: + options virtualbox-iso: + { virtualbox-iso: + ssl; virtualbox-iso: + clientsonly; virtualbox-iso: + }; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +listen :8067; virtualbox-iso: +listen :6667; virtualbox-iso: + virtualbox-iso: +log "ircd.log" { virtualbox-iso: + maxsize 2097152; virtualbox-iso: + flags { virtualbox-iso: + oper; virtualbox-iso: + kline; virtualbox-iso: + connects; virtualbox-iso: + server-connects; virtualbox-iso: + kills; virtualbox-iso: + errors; virtualbox-iso: + sadmin-commands; virtualbox-iso: + chg-commands; virtualbox-iso: + oper-override; virtualbox-iso: + spamfilter; virtualbox-iso: + }; virtualbox-iso: +}; virtualbox-iso: + virtualbox-iso: +alias NickServ { type services; }; virtualbox-iso: +alias ChanServ { type services; }; virtualbox-iso: +alias OperServ { type services; }; virtualbox-iso: +alias HelpServ { type services; }; virtualbox-iso: +include "aliases/anope.conf"; virtualbox-iso: - change mode from '' to '0400' virtualbox-iso: - change owner from '' to 'boba_fett' virtualbox-iso: cookbook_file[/opt/unrealircd/Unreal3.2/ircd.motd] action create virtualbox-iso: - create new file /opt/unrealircd/Unreal3.2/ircd.motd virtualbox-iso: - update content in file /opt/unrealircd/Unreal3.2/ircd.motd from none to 29908b virtualbox-iso: --- /opt/unrealircd/Unreal3.2/ircd.motd 2018-10-10 16:34:18.470367971 +0000 virtualbox-iso: +++ /opt/unrealircd/Unreal3.2/.chef-ircd20181010-1097-19q7f3u.motd 2018-10-10 16:34:18.466367971 +0000 virtualbox-iso: @@ -1 +1,2 @@ virtualbox-iso: +iVBORw0KGgoAAAANSUhEUgAAAZoAAAI+CAQAAAAvagSNAAAon0lEQVR42u2dd5ycVdm/n+09W7LZJEsNBCkBBIKIKD96EymKCKKICkrxh4i8ivAiggqIDRSVohiKvCBF4DUgNYEAoaWQ3pPNbjbZvrNTd9pe7x9z8mR2Mrs7mXkmZGe/1/35mAQJMztzruecc59z7mNZO8AslrIyIeYrFKMoEtvvataxillY2eBxPqAVD80JsUmhGEWR2H7nsZR1rOZtZjgrzlssookegkBfQkQVilEUie13Gatppo0tbGQli50RZz0b2EgrbXTSQy9C5BIB+mhjA6tYwUpWsZTmzMSZx1o20EQLm+mgm1769CmLnMPFRlaxkrU08SrdwMZ0xVlGM8vophcP/USHeMGIQjGKYnsGCBIgZP60hnd4nSWsT0ebOaxlPSv0GBI5TZBwQiewktksopvVO6bNbLpoZw1NdMf5GCFEvz5lkVNEbVn62MRaAubPbzOTJkhVnFU00Y47wUAhxgph3LTTxCqWs4CUlFlHC514k47/hMh9InjppIV1rGIBAyNp00ITLbTRi1/SiDErjZ9e2mihieUECAyvzXt00DlCvkyIXJ/n9OOhl046aGcNW4aTpodn8ODFT5AwA/r0xJhkgDBB/HjxEOUtXsEzlDbQwgtms8GAlBFjWpsBYwIs4nlWkDSPBu0spHm7vyzE2NIlcX4DzbxBazJt4D3mJPFNiLHWx8TjAuA/zKQrUZo1NLGKNn1mQgyiFxduXLSxlo9ISDW3sp4O9SxCJPQ0bjz00cH6wQcH3qGHblrp0i4AIQbhwYcfL11sZBnzt2mzAi9eunER1KckRBwBgoTox0UrK1mEvT1zA258ePBJGiEGESbKABG8tLOOZZgc2nzW0IabACENz4RISj9dNLGK52PSLOQj1tBFUClmIYbscXppYS1LsSxrOfN5j8Vssc+uCSESidJHK+tYxDtY69hEn3Y0C5ESq1ktaYSQNEJIGiEkjRCSRghJI4SQNEI4Js0itjAARFQIUAhJI4SkEULSCCFphJA0QghJI4SkEULSCCFphJA0QkgaSSOEpBFC0gghaYSQNEJIGiGEpBFC0gghaYSQNEJIGiEkjaQRQtIIIWmEkDRCSBohJI0QQtIIIWmEkDRCSBohJI0QkkbSCCFphJA0QkgaISSNEJJGCCFphJA0QkgaISSNEJJGCEkjaYSQNEJIGiEkjRCSRghJI4SQNEJIGiEkjRCSRghJI4SkkTRCSBohJI0QkkYISSOEpBFCSBohJI0QkkYISSOEpBFC0kgaISSNEJJGCEkjhKQRQtIIISSNEJJGCEkjhKQRQtIIIWkkjRCSRghJI4SkEULSCCFphBCSRghJI4SkEULSCCFphJA0kkYISSOEpBFC0gghaYSQNEIISSOEpBFC0gghaYSQNEJIGkkjhKQRQtIIIWmEkDRCSBohhKQRQtIIIWmEkDRCSBohJI2kEULSCCFphJA0QkgaISSNEELSCCFphJA0QkgaISSNEJJG0gghaYSQNEJIGiEkjRCSRgghaYSQNEJIGiEkjRCSRghJI2mEkDRCSBohJI0QkkYISSOEkDRCSBohJI0QkkYISSOEpJE0QkgaISSNEJJGCEkjhKQRQkgaISSNEJJGCEkjdgl6ceHGRz8hIgzgp58QA/pgJI1IjShttNNBJ9300EuvPhJJI4YmiBe3PgZJI0YigB8fXjz04cKlD0TSiJHnNH34CMUN0KJECBMiRJCgPiBJI0ZCKQBJI1JMAHjoZBNNLGAJq2nFFdf7CEkjBhGhi5W8yTM8yJ+5iG/yPW7gTu7lEZ7QxyNpnGcBq+gkav+5ha5BM4FQQgyehLsThkaRrL/fEL2047P/tI5Z/JovsR9lWEniDK7gPt6ngwB++vDjU0uQNJnOAcL4cdOLiz485p+G6aaJFSzmtYRot/8dcLGZfgL4CRDeae84ZKTuYS6P8RVO5kBqKKCQKuq3k6aQeo7gYu7iTdoH9U9qD5ImA218dNNJj52FauJF/siNXM0VHJYQP+WP/Jvl9BJhgChB/LhxE9ip79nHep7ico4aJEgdeybtbSws9uAbzOA9+sx/IUgbXn35kiYd1rBp0CDrJR7kB5zIFGoZR812jW8i+3ESV/ZYyfR6BvAWLIPmzdNIHOHDwv9p1GZW8KJ6Uk0hlLtanYdQTc662x6qJ+mXF+sJeW00VzYkLK58ugJ0cyJwaOB0m7SmparqbuYGFjpJiHkIYpDYyhsBupPJXE4t9yuhu/r78PE9XvaLfS5n/3jW53Ro+HlCJ4KhO/RsLJwkoaQhYk0/PjPPiQabpxP3PtjrvY986fivau59mZAFpQYIYPRovb8ZRHnP9MUlDBk66UcF+Fs0VJ4ov1e0CvkfUEsBAjQDFAAAAAgA4QP8Ssh6Pk+nIgIAwCMCABIAAAAAAAAAAQAAAKSBAAAAAGtpbmdfb2Zfc3BhZGVzLnBuZ1BLBQYAAAAAAQABAEAAAADXIgIAAAA= virtualbox-iso: - change mode from '' to '0400' virtualbox-iso: - change owner from '' to 'boba_fett' virtualbox-iso: bash[configure and compile] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-y6rpvt" virtualbox-iso: execute[set owner and permissions] action run virtualbox-iso: - execute chown -R boba_fett /opt/unrealircd virtualbox-iso: cookbook_file[/etc/init.d/unrealircd] action create virtualbox-iso: - create new file /etc/init.d/unrealircd virtualbox-iso: - update content in file /etc/init.d/unrealircd from none to ed0220 virtualbox-iso: --- /etc/init.d/unrealircd 2018-10-10 16:35:42.986367971 +0000 virtualbox-iso: +++ /etc/init.d/.chef-unrealircd20181010-1097-1e09v73 2018-10-10 16:35:42.986367971 +0000 virtualbox-iso: @@ -1 +1,38 @@ virtualbox-iso: +#!/bin/sh virtualbox-iso: +### BEGIN INIT INFO virtualbox-iso: +# Provides: unrealircd virtualbox-iso: +# Required-Start: $local_fs virtualbox-iso: +# Required-Stop: $local_fs virtualbox-iso: +# Default-Start: 2 3 4 5 virtualbox-iso: +# Default-Stop: 0 1 6 virtualbox-iso: +# X-Interactive: false virtualbox-iso: +# Short-Description: Init script for unrealircd virtualbox-iso: +# Description: Start/stop unrealircd virtualbox-iso: +### END INIT INFO virtualbox-iso: + virtualbox-iso: +DESC="unrealircd" virtualbox-iso: +NAME=unrealircd virtualbox-iso: +#DAEMON= virtualbox-iso: + virtualbox-iso: +do_start() virtualbox-iso: +{ virtualbox-iso: + sudo -u boba_fett /opt/unrealircd/Unreal3.2/unreal start virtualbox-iso: +} virtualbox-iso: + virtualbox-iso: +do_stop() virtualbox-iso: +{ virtualbox-iso: + /opt/unrealircd/Unreal3.2/unreal stop virtualbox-iso: +} virtualbox-iso: + virtualbox-iso: + virtualbox-iso: +case "$1" in virtualbox-iso: + start) virtualbox-iso: + do_start virtualbox-iso: + ;; virtualbox-iso: + stop) virtualbox-iso: + do_stop virtualbox-iso: + ;; virtualbox-iso: +esac virtualbox-iso: + virtualbox-iso: +exit 0 virtualbox-iso: - change mode from '' to '0760' virtualbox-iso: execute[start unrealircd service] action run virtualbox-iso: - execute /etc/init.d/unrealircd start virtualbox-iso: service[unrealircd] action enable virtualbox-iso: - enable service service[unrealircd] virtualbox-iso: Recipe: metasploitable::nodejs virtualbox-iso: execute[add nodejs 4 repository] action run virtualbox-iso: - execute curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: apt_package[nodejs] action install virtualbox-iso: - install version 4.9.1-1nodesource1 of package nodejs virtualbox-iso: Recipe: metasploitable::chatbot virtualbox-iso: apt_package[unzip] action install virtualbox-iso: - install version 6.0-9ubuntu1.5 of package unzip virtualbox-iso: bash[Install dependencies] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-1geyc8w" virtualbox-iso: cookbook_file[/tmp/chatbot.zip] action create virtualbox-iso: - create new file /tmp/chatbot.zip virtualbox-iso: - update content in file /tmp/chatbot.zip from none to e1db6d virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0700' virtualbox-iso: execute[unzip chatbot] action run virtualbox-iso: - execute unzip /tmp/chatbot.zip -d /opt virtualbox-iso: execute[chown chatbot] action run virtualbox-iso: - execute chown -R root:root /opt/chatbot virtualbox-iso: execute[chmod chatbot] action run virtualbox-iso: - execute chmod -R 700 /opt/chatbot virtualbox-iso: execute[install chatbot] action run virtualbox-iso: - execute /opt/chatbot/install.sh virtualbox-iso: service[chatbot] action enable (up to date) virtualbox-iso: service[chatbot] action start virtualbox-iso: - start service service[chatbot] virtualbox-iso: Recipe: metasploitable::payroll_app virtualbox-iso: cookbook_file[/var/www/html/payroll_app.php] action create virtualbox-iso: - create new file /var/www/html/payroll_app.php virtualbox-iso: - update content in file /var/www/html/payroll_app.php from none to 5365ba virtualbox-iso: --- /var/www/html/payroll_app.php 2018-10-10 16:37:36.050367971 +0000 virtualbox-iso: +++ /var/www/html/.chef-payroll_app20181010-1097-8d9v65.php 2018-10-10 16:37:36.050367971 +0000 virtualbox-iso: @@ -1 +1,65 @@ virtualbox-iso: +<?php virtualbox-iso: + virtualbox-iso: +$conn = new mysqli('127.0.0.1', 'root', 'sploitme', 'payroll'); virtualbox-iso: +if ($conn->connect_error) { virtualbox-iso: + die("Connection failed: " . $conn->connect_error); virtualbox-iso: +} virtualbox-iso: +?> virtualbox-iso: + virtualbox-iso: +<?php virtualbox-iso: +if (!isset($_POST['s'])) { virtualbox-iso: +?> virtualbox-iso: +

virtualbox-iso: +
virtualbox-iso: +

Payroll Login

virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: + virtualbox-iso: +
User
Password
virtualbox-iso: +
virtualbox-iso: +
virtualbox-iso: +
virtualbox-iso: +<?php virtualbox-iso: +} virtualbox-iso: +?> virtualbox-iso: + virtualbox-iso: +<?php virtualbox-iso: +if($_POST['s']){ virtualbox-iso: + $user = $_POST['user']; virtualbox-iso: + $pass = $_POST['password']; virtualbox-iso: + $sql = "select username, first_name, last_name, salary from users where username = '$user' and password = '$pass'"; virtualbox-iso: + virtualbox-iso: + if ($conn->multi_query($sql)) { virtualbox-iso: + do { virtualbox-iso: + / store first result set / virtualbox-iso: + echo "
"; virtualbox-iso: + echo "

Welcome, " . $user . "


"; virtualbox-iso: + echo ""; virtualbox-iso: + echo ""; virtualbox-iso: + if ($result = $conn->store_result()) { virtualbox-iso: + while ($row = $result->fetch_assoc()) { virtualbox-iso: + $keys = array_keys($row); virtualbox-iso: + echo ""; virtualbox-iso: + foreach ($keys as $key) { virtualbox-iso: + echo ""; virtualbox-iso: + } virtualbox-iso: + echo "\n"; virtualbox-iso: + } virtualbox-iso: + $result->free(); virtualbox-iso: + } virtualbox-iso: + if (!$conn->more_results()) { virtualbox-iso: + echo "
UsernameFirst NameLast NameSalary
" . $row[$key] . "
"; virtualbox-iso: + } virtualbox-iso: + } while ($conn->next_result()); virtualbox-iso: + } virtualbox-iso: +} virtualbox-iso: +?> virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: template[/tmp/payroll.sql] action create virtualbox-iso: - create new file /tmp/payroll.sql virtualbox-iso: - update content in file /tmp/payroll.sql from none to a85c45 virtualbox-iso: --- /tmp/payroll.sql 2018-10-10 16:37:36.082367971 +0000 virtualbox-iso: +++ /tmp/.chef-payroll20181010-1097-8nf3ls.sql 2018-10-10 16:37:36.082367971 +0000 virtualbox-iso: @@ -1 +1,47 @@ virtualbox-iso: +-- phpMyAdmin SQL Dump virtualbox-iso: +-- version 3.5.8 virtualbox-iso: +-- http://www.phpmyadmin.net virtualbox-iso: +-- virtualbox-iso: +-- Host: 127.0.0.1 virtualbox-iso: +-- Generation Time: Apr 10, 2017 at 04:42 PM virtualbox-iso: +-- Server version: 5.5.54-0ubuntu0.14.04.1 virtualbox-iso: +-- PHP Version: 5.4.5 virtualbox-iso: + virtualbox-iso: +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; virtualbox-iso: +SET time_zone = "+00:00"; virtualbox-iso: + virtualbox-iso: + virtualbox-iso: +/!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /; virtualbox-iso: +/!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /; virtualbox-iso: +/!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /; virtualbox-iso: +/!40101 SET NAMES utf8 /; virtualbox-iso: + virtualbox-iso: +-- virtualbox-iso: +-- Database: payroll virtualbox-iso: +-- virtualbox-iso: + virtualbox-iso: +-- -------------------------------------------------------- virtualbox-iso: + virtualbox-iso: +-- virtualbox-iso: +-- Table structure for table users virtualbox-iso: +-- virtualbox-iso: + virtualbox-iso: +CREATE TABLE IF NOT EXISTS users ( virtualbox-iso: + username varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, virtualbox-iso: + first_name varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, virtualbox-iso: + last_name varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, virtualbox-iso: + password varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL, virtualbox-iso: + salary int(20) NOT NULL virtualbox-iso: +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; virtualbox-iso: + virtualbox-iso: +-- virtualbox-iso: +-- Dumping data for table users virtualbox-iso: +-- virtualbox-iso: + virtualbox-iso: +INSERT INTO users (username, first_name, last_name, password, salary) VALUES virtualbox-iso: +('leia_organa', 'Leia', 'Organa', 'help_me_obiwan', '9560'),('luke_skywalker', 'Luke', 'Skywalker', 'like_my_father_beforeme', '1080'),('han_solo', 'Han', 'Solo', 'nerf_herder', '1200'),('artoo_detoo', 'Artoo', 'Detoo', 'b00p_b33p', '22222'),('c_three_pio', 'C', 'Threepio', 'Pr0t0c07', '3200'),('ben_kenobi', 'Ben', 'Kenobi', 'thats_no_m00n', '10000'),('darth_vader', 'Darth', 'Vader', 'Dark_syD3', '6666'),('anakin_skywalker', 'Anakin', 'Skywalker', 'but_master:(', '1025'),('jarjar_binks', 'Jar-Jar', 'Binks', 'mesah_p@ssw0rd', '2048'),('lando_calrissian', 'Lando', 'Calrissian', '@dm1n1str8r', '40000'),('boba_fett', 'Boba', 'Fett', 'mandalorian1', '20000'),('jabba_hutt', 'Jaba', 'Hutt', 'my_kinda_skum', '65000'),('greedo', 'Greedo', 'Rodian', 'hanSh0tF1rst', '50000'),('chewbacca', 'Chewbacca', '', 'rwaaaaawr8', '4500'),('kylo_ren', 'Kylo', 'Ren', 'Daddy_Issues2', '6667'); virtualbox-iso: + virtualbox-iso: +/!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /; virtualbox-iso: +/!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /; virtualbox-iso: +/!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION /; virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: directory[/home/kylo_ren/poc/payroll_app/] action create virtualbox-iso: - create new directory /home/kylo_ren/poc/payroll_app/ virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: - change owner from '' to 'kylo_ren' virtualbox-iso: cookbook_file[/home/kylo_ren/poc/payroll_app//poc.rb] action create virtualbox-iso: - create new file /home/kylo_ren/poc/payroll_app//poc.rb virtualbox-iso: - update content in file /home/kylo_ren/poc/payroll_app//poc.rb from none to 245946 virtualbox-iso: --- /home/kylo_ren/poc/payroll_app//poc.rb 2018-10-10 16:37:36.114367971 +0000 virtualbox-iso: +++ /home/kylo_ren/poc/payroll_app/.chef-poc20181010-1097-1fmypu8.rb 2018-10-10 16:37:36.114367971 +0000 virtualbox-iso: @@ -1 +1,15 @@ virtualbox-iso: +require 'net/http' virtualbox-iso: + virtualbox-iso: +url = "http://127.0.0.1/payroll_app.php" virtualbox-iso: +uri = URI(url) virtualbox-iso: +user = 'luke_skywalker' virtualbox-iso: +injection = "password'; select password from users where username='' OR ''='" virtualbox-iso: + virtualbox-iso: +puts "Making POST request to #{uri} with the following parameters:" virtualbox-iso: +puts "'user' = #{user}" virtualbox-iso: +puts "'password' = #{injection}" virtualbox-iso: +res = Net::HTTP.post_form(uri, 'user' => user, 'password' => injection, 's' => 'OK') virtualbox-iso: + virtualbox-iso: +puts "Response body is #{res.body}" virtualbox-iso: +puts "Done" virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: bash[create payroll database and import data] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-1dyo17c" virtualbox-iso: Recipe: metasploitable::readme_app virtualbox-iso: apt_package[git] action install virtualbox-iso: - install version 1:1.9.1-1ubuntu0.8 of package git virtualbox-iso: directory[/opt/readme_app] action create virtualbox-iso: - create new directory /opt/readme_app virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: - change owner from '' to 'chewbacca' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: bash[clone the readme app and install gems] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-zryp62" virtualbox-iso: template[/opt/readme_app/start.sh] action create virtualbox-iso: - create new file /opt/readme_app/start.sh virtualbox-iso: - update content in file /opt/readme_app/start.sh from none to ec3bd0 virtualbox-iso: --- /opt/readme_app/start.sh 2018-10-10 16:37:47.654367971 +0000 virtualbox-iso: +++ /opt/readme_app/.chef-start20181010-1097-60esqi.sh 2018-10-10 16:37:47.654367971 +0000 virtualbox-iso: @@ -1 +1,6 @@ virtualbox-iso: +#!/bin/sh virtualbox-iso: + virtualbox-iso: +cd /opt/readme_app virtualbox-iso: +bundle install --path vendor/bundle virtualbox-iso: +bundle exec rails s -b 0.0.0.0 -p 3500 virtualbox-iso: cookbook_file[/etc/init/readme_app.conf] action create virtualbox-iso: - create new file /etc/init/readme_app.conf virtualbox-iso: - update content in file /etc/init/readme_app.conf from none to 957d6c virtualbox-iso: --- /etc/init/readme_app.conf 2018-10-10 16:37:47.666367971 +0000 virtualbox-iso: +++ /etc/init/.chef-readme_app20181010-1097-6fny85.conf 2018-10-10 16:37:47.662367971 +0000 virtualbox-iso: @@ -1 +1,9 @@ virtualbox-iso: +description 'Run ReadMe App' virtualbox-iso: +author 'metasploitable3' virtualbox-iso: + virtualbox-iso: +start on runlevel [2345] virtualbox-iso: + virtualbox-iso: +script virtualbox-iso: + sudo -u chewbacca /opt/readme_app/start.sh virtualbox-iso: +end script virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: bash[set permissions] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-vf4o84" virtualbox-iso: service[readme_app] action enable (up to date) virtualbox-iso: service[readme_app] action start virtualbox-iso: - start service service[readme_app] virtualbox-iso: Recipe: metasploitable::cups virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: apt_package[cups] action install virtualbox-iso: - install version 1.7.2-0ubuntu1.10 of package cups virtualbox-iso: cookbook_file[/etc/cups/cupsd.conf] action create virtualbox-iso: - update content in file /etc/cups/cupsd.conf from d112f9 to 8c57d6 virtualbox-iso: --- /etc/cups/cupsd.conf 2018-10-10 16:41:01.290367971 +0000 virtualbox-iso: +++ /etc/cups/.chef-cupsd20181010-1097-9h6fo6.conf 2018-10-10 16:41:05.606367971 +0000 virtualbox-iso: @@ -13,8 +13,8 @@ virtualbox-iso: MaxLogSize 0 virtualbox-iso: virtualbox-iso: # Only listen for connections from the local machine. virtualbox-iso: -Listen localhost:631 virtualbox-iso: -Listen /var/run/cups/cups.sock virtualbox-iso: +Port 631 virtualbox-iso: +#Listen /var/run/cups/cups.sock virtualbox-iso: virtualbox-iso: # Show shared printers on the local network. virtualbox-iso: Browsing Off virtualbox-iso: @@ -29,11 +29,13 @@ virtualbox-iso: # Restrict access to the server... virtualbox-iso: virtualbox-iso: Order allow,deny virtualbox-iso: + Allow from all virtualbox-iso: virtualbox-iso: virtualbox-iso: # Restrict access to the admin pages... virtualbox-iso: <Location /admin> virtualbox-iso: Order allow,deny virtualbox-iso: + Allow from all virtualbox-iso: virtualbox-iso: virtualbox-iso: # Restrict access to configuration files... virtualbox-iso: @@ -41,6 +43,7 @@ virtualbox-iso: AuthType Default virtualbox-iso: Require user @SYSTEM virtualbox-iso: Order allow,deny virtualbox-iso: + Allow from all virtualbox-iso: virtualbox-iso: virtualbox-iso: # Set the default printer/job policies... virtualbox-iso: @@ -129,6 +132,7 @@ virtualbox-iso: virtualbox-iso: virtualbox-iso: Order deny,allow virtualbox-iso: + Allow from all virtualbox-iso: virtualbox-iso: virtualbox-iso: virtualbox-iso: service[cups] action enable (up to date) virtualbox-iso: service[cups] action restart virtualbox-iso: - restart service service[cups] virtualbox-iso: Recipe: metasploitable::drupal virtualbox-iso: remote_file[/tmp/packer-chef-solo/local-mode-cache/cache/drupal-7.5.tar.gz] action create virtualbox-iso: - create new file /tmp/packer-chef-solo/local-mode-cache/cache/drupal-7.5.tar.gz virtualbox-iso: - update content in file /tmp/packer-chef-solo/local-mode-cache/cache/drupal-7.5.tar.gz from none to 968c89 virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: remote_file[/tmp/packer-chef-solo/local-mode-cache/cache/coder-7.x-2.5.tar.gz] action create virtualbox-iso: - create new file /tmp/packer-chef-solo/local-mode-cache/cache/coder-7.x-2.5.tar.gz virtualbox-iso: - update content in file /tmp/packer-chef-solo/local-mode-cache/cache/coder-7.x-2.5.tar.gz from none to 92ad4e virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: directory[/var/www/html/drupal] action create virtualbox-iso: - create new directory /var/www/html/drupal virtualbox-iso: - change mode from '' to '0755' virtualbox-iso: - change owner from '' to 'www-data' virtualbox-iso: - change group from '' to 'www-data' virtualbox-iso: log[debug logging] action write virtualbox-iso: virtualbox-iso: execute[untar drupal] action run virtualbox-iso: - execute tar xvzf /tmp/packer-chef-solo/local-mode-cache/cache/drupal-7.5.tar.gz --strip-components 1 virtualbox-iso: execute[untar default site] action run virtualbox-iso: - execute tar xvzf /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/metasploitable/files/drupal/default_site.tar.gz virtualbox-iso: execute[untar coder module] action run virtualbox-iso: - execute tar xvzf /tmp/packer-chef-solo/local-mode-cache/cache/coder-7.x-2.5.tar.gz virtualbox-iso: execute[set permissions] action run virtualbox-iso: - execute chown -R www-data:www-data /var/www/html/drupal virtualbox-iso: bash[create drupal database and inject data] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-1w0hhxn" virtualbox-iso: cookbook_file[/var/www/html/drupal/sites/default/files/styles/large/public/field/image/5_of_hearts.png] action create virtualbox-iso: - update content in file /var/www/html/drupal/sites/default/files/styles/large/public/field/image/5_of_hearts.png from 74b059 to 90304b virtualbox-iso: (current file is binary, diff output suppressed) virtualbox-iso: - change mode from '0664' to '0777' virtualbox-iso: cookbook_file[/var/www/html/drupal/sites/default/files/field/image/5_of_hearts.png] action create virtualbox-iso: - change mode from '0664' to '0777' virtualbox-iso: Recipe: metasploitable::knockd virtualbox-iso: apt_package[knockd] action install virtualbox-iso: - install version 0.5-3ubuntu1 of package knockd virtualbox-iso: template[/etc/knockd.conf] action create virtualbox-iso: - update content in file /etc/knockd.conf from c9a3b7 to 0cf272 virtualbox-iso: --- /etc/knockd.conf 2009-03-25 13:16:55.000000000 +0000 virtualbox-iso: +++ /etc/.chef-knockd20181010-1097-9pegna.conf 2018-10-10 16:41:49.742367971 +0000 virtualbox-iso: @@ -1,16 +1,16 @@ virtualbox-iso: [options] virtualbox-iso: - UseSyslog virtualbox-iso: + UseSyslog virtualbox-iso: +[openFlag] virtualbox-iso: + sequence = 9560,1080,1200 virtualbox-iso: + seq_timeout = 15 virtualbox-iso: + command = /sbin/iptables -I INPUT 1 -s %IP% -p tcp --dport 8989 -j ACCEPT virtualbox-iso: + tcpflags = syn virtualbox-iso: + cmd_timeout = 30 virtualbox-iso: + stop_command = /sbin/iptables -D INPUT -s %IP% -p tcp --dport 8989 -j ACCEPT virtualbox-iso: virtualbox-iso: -[openSSH] virtualbox-iso: - sequence = 7000,8000,9000 virtualbox-iso: - seq_timeout = 5 virtualbox-iso: - command = /sbin/iptables -A INPUT -s %IP% -p tcp --dport 22 -j ACCEPT virtualbox-iso: - tcpflags = syn virtualbox-iso: - virtualbox-iso: -[closeSSH] virtualbox-iso: - sequence = 9000,8000,7000 virtualbox-iso: - seq_timeout = 5 virtualbox-iso: - command = /sbin/iptables -D INPUT -s %IP% -p tcp --dport 22 -j ACCEPT virtualbox-iso: - tcpflags = syn virtualbox-iso: - virtualbox-iso: +[closeFlag] virtualbox-iso: + sequence = 1200,1080,9560 virtualbox-iso: + seq_timeout = 15 virtualbox-iso: + command = /sbin/iptables -D INPUT -s %IP% -p tcp --dport 8989 -j ACCEPT virtualbox-iso: + tcpflags = syn virtualbox-iso: - change mode from '0640' to '0600' virtualbox-iso: cookbook_file[/etc/default/knockd] action create virtualbox-iso: - update content in file /etc/default/knockd from e78185 to f019b2 virtualbox-iso: --- /etc/default/knockd 2009-03-25 13:16:45.000000000 +0000 virtualbox-iso: +++ /etc/default/.chef-knockd20181010-1097-emuaqw 2018-10-10 16:41:49.758367971 +0000 virtualbox-iso: @@ -9,7 +9,7 @@ virtualbox-iso: # anything else = don't start virtualbox-iso: # virtualbox-iso: # PLEASE EDIT /etc/knockd.conf BEFORE ENABLING virtualbox-iso: -START_KNOCKD=0 virtualbox-iso: +START_KNOCKD=1 virtualbox-iso: virtualbox-iso: # command line options virtualbox-iso: #KNOCKD_OPTS="-i eth1" virtualbox-iso: - change mode from '0644' to '0600' virtualbox-iso: service[knockd] action enable (up to date) virtualbox-iso: service[knockd] action start virtualbox-iso: - start service service[knockd] virtualbox-iso: Recipe: metasploitable::iptables virtualbox-iso: execute[apt-get update] action run virtualbox-iso: - execute apt-get update virtualbox-iso: bash[setup for knockd, used for flag] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-1qxjgtx" virtualbox-iso: apt_package[iptables-persistent] action install virtualbox-iso: - install version 0.5.7 of package iptables-persistent virtualbox-iso: service[iptables-persistent] action enable (up to date) virtualbox-iso: service[iptables-persistent] action start virtualbox-iso: - start service service[iptables-persistent] virtualbox-iso: Recipe: metasploitable::flags virtualbox-iso: directory[/home/artoo_detoo/music] action create virtualbox-iso: - create new directory /home/artoo_detoo/music virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'artoo_detoo' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: cookbook_file[/home/artoo_detoo/music/10_of_clubs.wav] action create virtualbox-iso: - create new file /home/artoo_detoo/music/10_of_clubs.wav virtualbox-iso: - update content in file /home/artoo_detoo/music/10_of_clubs.wav from none to 7c5cc8 virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0410' virtualbox-iso: - change owner from '' to 'artoo_detoo' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[/opt/docker] action create virtualbox-iso: - create new directory /opt/docker virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: cookbook_file[/opt/docker/Dockerfile] action create virtualbox-iso: - create new file /opt/docker/Dockerfile virtualbox-iso: - update content in file /opt/docker/Dockerfile from none to ad960e virtualbox-iso: --- /opt/docker/Dockerfile 2018-10-10 16:42:15.438367971 +0000 virtualbox-iso: +++ /opt/docker/.chef-Dockerfile20181010-1097-bfr4wg 2018-10-10 16:42:15.438367971 +0000 virtualbox-iso: @@ -1 +1,7 @@ virtualbox-iso: +FROM ubuntu:latest virtualbox-iso: +MAINTAINER Metasploitable "msfdev@rapid7.com" virtualbox-iso: + virtualbox-iso: +ADD 7_of_diamonds.zip /home/7_of_diamonds.zip virtualbox-iso: + virtualbox-iso: +WORKDIR /home virtualbox-iso: - change mode from '' to '0700' virtualbox-iso: cookbook_file[/opt/docker/7_of_diamonds.zip] action create virtualbox-iso: - create new file /opt/docker/7_of_diamonds.zip virtualbox-iso: - update content in file /opt/docker/7_of_diamonds.zip from none to b2d535 virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0700' virtualbox-iso: bash[build docker image for 7 of diamonds] action run virtualbox-iso: - execute "bash" "/tmp/chef-script20181010-1097-ssrv4z" virtualbox-iso: file[/opt/docker/7_of_diamonds.zip] action delete virtualbox-iso: - delete file /opt/docker/7_of_diamonds.zip virtualbox-iso: cookbook_file[/opt/readme_app/public/images/10_of_spades.png] action create virtualbox-iso: - create new file /opt/readme_app/public/images/10_of_spades.png virtualbox-iso: - update content in file /opt/readme_app/public/images/10_of_spades.png from none to c2325a virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: directory[home/anakin_skywalker/85] action create virtualbox-iso: - create new directory home/anakin_skywalker/85 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86/83] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86/83 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: directory[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86/83/4] action create virtualbox-iso: - create new directory home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86/83/4 virtualbox-iso: - change mode from '' to '0770' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: cookbook_file[home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86/83/4/8_of_clubs.png] action create virtualbox-iso: - create new file home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86/83/4/8_of_clubs.png virtualbox-iso: - update content in file home/anakin_skywalker/85/24/66/41/31/27/83/57/21/5/31/74/20/45/38/36/56/86/83/4/8_of_clubs.png from none to fa2a16 virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0644' virtualbox-iso: - change owner from '' to 'anakin_skywalker' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: cookbook_file[/lost+found/3_of_hearts.png] action create virtualbox-iso: - create new file /lost+found/3_of_hearts.png virtualbox-iso: - update content in file /lost+found/3_of_hearts.png from none to 38e7d3 virtualbox-iso: (new content is binary, diff output suppressed) virtualbox-iso: - change mode from '' to '0600' virtualbox-iso: directory[/home/kylo_ren/.secret_files/] action create virtualbox-iso: - create new directory /home/kylo_ren/.secret_files/ virtualbox-iso: - change mode from '' to '0610' virtualbox-iso: - change owner from '' to 'kylo_ren' virtualbox-iso: - change group from '' to 'users' virtualbox-iso: cookbook_file[/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso] action create virtualbox-iso: virtualbox-iso: ================================================================================ virtualbox-iso: Error executing action create on resource 'cookbook_file[/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso]' virtualbox-iso: ================================================================================ virtualbox-iso: virtualbox-iso: Chef::Exceptions::FileNotFound virtualbox-iso: ------------------------------ virtualbox-iso: Cookbook 'metasploitable' (0.1.0) does not contain a file at any of these locations: virtualbox-iso: files/ubuntu-14.04/flags/my_recordings_do_not_open.iso virtualbox-iso: files/ubuntu/flags/my_recordings_do_not_open.iso virtualbox-iso: files/default/flags/my_recordings_do_not_open.iso virtualbox-iso: files/flags/my_recordings_do_not_open.iso virtualbox-iso: virtualbox-iso: This cookbook does contain: ['files/apache/dav.conf','files/apache/hello_world.sh','files/apache/php5.conf','files/apache/php5.load','files/apache/cgi-bin.conf','files/flags/.DS_Store','files/drupal/default_site.tar.gz','files/apache_continuum/data.tar.gz','files/cups/cupsd.conf','files/flags/10_of_clubs.wav','files/flags/five_of_diamonds_srv','files/flags/5_of_hearts.png','files/flags/8_of_hearts.zip','files/flags/five_of_diamonds','files/chatbot/chatbot.zip','files/flags/Dockerfile','files/flags/ace_of_clubs_b64.txt','files/knockd/knockd','files/flags/flag_images/10 of spades.png','files/flags/2_of_spades.pcapng','files/flags/7_of_diamonds.zip','files/proftpd/hosts_renewer.conf','files/flags/flag_images/3 of hearts.png','files/payroll_app/payroll_app.php','files/proftpd/proftpd_ip_renewer.conf','files/flags/flag_images/8 of clubs.png','files/proftpd/hosts_renewer.rb','files/payroll_app/poc.rb','files/proftpd/proftpd','files/sinatra/Gemfile','files/drupal/drupal.sql','files/samba/smb.conf','files/flags/king_of_spades.png','files/proftpd/proftpd_ip_renewer.rb','files/readme_app/readme_app.conf','files/unrealircd/unrealircd','files/unrealircd/unrealircd.conf','files/sinatra/virtualbox/loader','files/flags/joker.png','files/sshd/sshd_config','files/phpmyadmin/config.inc.php','files/sinatra/sinatra.conf','files/flags/super_secret_db.sql','files/unrealircd/ircd.motd','files/samba/passdb.tdb','files/sinatra/aws/loader'] virtualbox-iso: virtualbox-iso: Resource Declaration: virtualbox-iso: --------------------- virtualbox-iso: # In /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/metasploitable/recipes/flags.rb virtualbox-iso: virtualbox-iso: 92: cookbook_file '/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso' do virtualbox-iso: 93: source 'flags/my_recordings_do_not_open.iso' virtualbox-iso: 94: mode '0610' virtualbox-iso: 95: owner 'kylo_ren' virtualbox-iso: 96: group 'users' virtualbox-iso: 97: end virtualbox-iso: 98: virtualbox-iso: virtualbox-iso: Compiled Resource: virtualbox-iso: ------------------ virtualbox-iso: # Declared in /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/metasploitable/recipes/flags.rb:92:in `from_file' virtualbox-iso: virtualbox-iso: cookbook_file("/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso") do virtualbox-iso: action [:create] virtualbox-iso: default_guard_interpreter :default virtualbox-iso: declared_type :cookbook_file virtualbox-iso: cookbook_name "metasploitable" virtualbox-iso: recipe_name "flags" virtualbox-iso: source "flags/my_recordings_do_not_open.iso" virtualbox-iso: mode "0610" virtualbox-iso: owner "kylo_ren" virtualbox-iso: group "users" virtualbox-iso: path "/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso" virtualbox-iso: verifications [] virtualbox-iso: end virtualbox-iso: virtualbox-iso: System Info: virtualbox-iso: ------------ virtualbox-iso: chef_version=13.8.5 virtualbox-iso: platform=ubuntu virtualbox-iso: platform_version=14.04 virtualbox-iso: ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux] virtualbox-iso: program_name=chef-solo worker: ppid=1092;start=16:14:49; virtualbox-iso: executable=/opt/chef/bin/chef-solo virtualbox-iso: virtualbox-iso: virtualbox-iso: Running handlers: virtualbox-iso: [2018-10-10T16:42:28+00:00] ERROR: Running exception handlers virtualbox-iso: [2018-10-10T16:42:28+00:00] ERROR: Running exception handlers virtualbox-iso: Running handlers complete virtualbox-iso: [2018-10-10T16:42:28+00:00] ERROR: Exception handlers complete virtualbox-iso: [2018-10-10T16:42:28+00:00] ERROR: Exception handlers complete virtualbox-iso: Chef Client failed. 214 resources updated in 27 minutes 38 seconds virtualbox-iso: [2018-10-10T16:42:28+00:00] FATAL: Stacktrace dumped to /tmp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out virtualbox-iso: [2018-10-10T16:42:28+00:00] FATAL: Stacktrace dumped to /tmp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out virtualbox-iso: [2018-10-10T16:42:28+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report virtualbox-iso: [2018-10-10T16:42:28+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report virtualbox-iso: [2018-10-10T16:42:28+00:00] ERROR: cookbook_file[/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso] (metasploitable::flags line 92) had an error: Chef::Exceptions::FileNotFound: Cookbook 'metasploitable' (0.1.0) does not contain a file at any of these locations: virtualbox-iso: files/ubuntu-14.04/flags/my_recordings_do_not_open.iso virtualbox-iso: files/ubuntu/flags/my_recordings_do_not_open.iso virtualbox-iso: files/default/flags/my_recordings_do_not_open.iso virtualbox-iso: files/flags/my_recordings_do_not_open.iso virtualbox-iso: virtualbox-iso: This cookbook does contain: ['files/apache/dav.conf','files/apache/hello_world.sh','files/apache/php5.conf','files/apache/php5.load','files/apache/cgi-bin.conf','files/flags/.DS_Store','files/drupal/default_site.tar.gz','files/apache_continuum/data.tar.gz','files/cups/cupsd.conf','files/flags/10_of_clubs.wav','files/flags/five_of_diamonds_srv','files/flags/5_of_hearts.png','files/flags/8_of_hearts.zip','files/flags/five_of_diamonds','files/chatbot/chatbot.zip','files/flags/Dockerfile','files/flags/ace_of_clubs_b64.txt','files/knockd/knockd','files/flags/flag_images/10 of spades.png','files/flags/2_of_spades.pcapng','files/flags/7_of_diamonds.zip','files/proftpd/hosts_renewer.conf','files/flags/flag_images/3 of hearts.png','files/payroll_app/payroll_app.php','files/proftpd/proftpd_ip_renewer.conf','files/flags/flag_images/8 of clubs.png','files/proftpd/hosts_renewer.rb','files/payroll_app/poc.rb','files/proftpd/proftpd','files/sinatra/Gemfile','files/drupal/drupal.sql','files/samba/smb.conf','files/flags/king_of_spades.png','files/proftpd/proftpd_ip_renewer.rb','files/readme_app/readme_app.conf','files/unrealircd/unrealircd','files/unrealircd/unrealircd.conf','files/sinatra/virtualbox/loader','files/flags/joker.png','files/sshd/sshd_config','files/phpmyadmin/config.inc.php','files/sinatra/sinatra.conf','files/flags/super_secret_db.sql','files/unrealircd/ircd.motd','files/samba/passdb.tdb','files/sinatra/aws/loader'] virtualbox-iso: [2018-10-10T16:42:28+00:00] ERROR: cookbook_file[/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso] (metasploitable::flags line 92) had an error: Chef::Exceptions::FileNotFound: Cookbook 'metasploitable' (0.1.0) does not contain a file at any of these locations: virtualbox-iso: files/ubuntu-14.04/flags/my_recordings_do_not_open.iso virtualbox-iso: files/ubuntu/flags/my_recordings_do_not_open.iso virtualbox-iso: files/default/flags/my_recordings_do_not_open.iso virtualbox-iso: files/flags/my_recordings_do_not_open.iso virtualbox-iso: virtualbox-iso: This cookbook does contain: ['files/apache/dav.conf','files/apache/hello_world.sh','files/apache/php5.conf','files/apache/php5.load','files/apache/cgi-bin.conf','files/flags/.DS_Store','files/drupal/default_site.tar.gz','files/apache_continuum/data.tar.gz','files/cups/cupsd.conf','files/flags/10_of_clubs.wav','files/flags/five_of_diamonds_srv','files/flags/5_of_hearts.png','files/flags/8_of_hearts.zip','files/flags/five_of_diamonds','files/chatbot/chatbot.zip','files/flags/Dockerfile','files/flags/ace_of_clubs_b64.txt','files/knockd/knockd','files/flags/flag_images/10 of spades.png','files/flags/2_of_spades.pcapng','files/flags/7_of_diamonds.zip','files/proftpd/hosts_renewer.conf','files/flags/flag_images/3 of hearts.png','files/payroll_app/payroll_app.php','files/proftpd/proftpd_ip_renewer.conf','files/flags/flag_images/8 of clubs.png','files/proftpd/hosts_renewer.rb','files/payroll_app/poc.rb','files/proftpd/proftpd','files/sinatra/Gemfile','files/drupal/drupal.sql','files/samba/smb.conf','files/flags/king_of_spades.png','files/proftpd/proftpd_ip_renewer.rb','files/readme_app/readme_app.conf','files/unrealircd/unrealircd','files/unrealircd/unrealircd.conf','files/sinatra/virtualbox/loader','files/flags/joker.png','files/sshd/sshd_config','files/phpmyadmin/config.inc.php','files/sinatra/sinatra.conf','files/flags/super_secret_db.sql','files/unrealircd/ircd.motd','files/samba/passdb.tdb','files/sinatra/aws/loader'] virtualbox-iso: [2018-10-10T16:42:28+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) virtualbox-iso: [2018-10-10T16:42:28+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) ==> virtualbox-iso: Deregistering and deleting VM... ==> virtualbox-iso: Deleting output directory... Build 'virtualbox-iso' errored: Error executing Chef: Non-zero exit status: 1

==> Some builds didn't complete successfully and had errors: --> virtualbox-iso: Error executing Chef: Non-zero exit status: 1

==> Builds finished but no artifacts were created. Error building the Vagrant boxes using Packer. Please check the output above for any error messages.

Originally posted by @sandstorm2002in in https://github.com/rapid7/metasploitable3/issues/263#issuecomment-428799395

DenverDaveH commented 6 years ago

Hello, I tried to build the Ubuntu1404 image again. And the install is throwing the above error as well.

Any ideas on what the root cause is?

Thanks, Dave

TubberSon commented 5 years ago

I've been getting the same issue as well

AmatureHacker commented 5 years ago

Hello, I have also been receiving the same error while trying to create Ubuntu1404 (VMware) image on a Windows 10. The error seems to start from

_vmware-iso: * remotefile[/tmp/packer-chef-solo/local-mode-cache/cache/apache-continuum-1.4.2-bin.tar.gz] action create[2018-12-10T17:42:42+00:00] ERROR: Error connecting to http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.4.2-bin.tar.gz, retry 1/5

Attached the txt file for reference
Powershell enteries.txt

netnetnetnetnet commented 5 years ago

我也遇到了相同的问题 TMPDIR=/var/tmp ./build.sh 解决了我的这个问题,希望也能解决你们的问题。 I received the same error, typing "TMPDIR=/var/tmp ./build.sh" solved the problem for me.Hope it helps u too.

Rish00760 commented 5 years ago

我也遇到了相同的问题 TMPDIR=/var/tmp ./build.sh 解决了我的这个问题,希望也能解决你们的问题。 I received the same error, typing "TMPDIR=/var/tmp ./build.sh" solved the problem for me.Hope it helps u too.

Hi, I am getting the same error. Can you please tell where and when do we need to type the above?

ttstormxx commented 4 years ago

the only real problem is that you need to use packer version prior to 1.5.2 , and most of the problems are caused by network error. Just run it again. the problem you guys met would probably disappear.

sohrabsaa commented 3 years ago

packer 1.7.2 vagrant 2.2.16

virtualbox-iso: Creating directory: /tmp/packer-chef-solo virtualbox-iso: Creating directory: /tmp/packer-chef-solo/cookbooks-0 virtualbox-iso: Creating configuration file 'solo.rb' virtualbox-iso: Creating JSON attribute file virtualbox-iso: Executing Chef: sudo chef-solo --no-color -c /tmp/packer-chef-solo/solo.rb -j /tmp/packer-chef-solo/node.json ==> virtualbox-iso: sudo: chef-solo: command not found ==> virtualbox-iso: Provisioning step had errors: Running the cleanup provisioner, if present... ==> virtualbox-iso: Cleaning up floppy disk... ==> virtualbox-iso: Deregistering and deleting VM... ==> virtualbox-iso: Deleting output directory... Build 'virtualbox-iso' errored after 24 minutes 17 seconds: Error executing Chef: Non-zero exit status: 1

==> Wait completed after 24 minutes 17 seconds

==> Some builds didn't complete successfully and had errors: --> virtualbox-iso: Error executing Chef: Non-zero exit status: 1

this is the error I get apparently it can't fine (chef-solo) command. I would appreciate if someone can help me whit it.