R3dy / capsulecorp-pentest

Vagrant VirtualBox environment for conducting an internal network penetration test
https://www.manning.com/books/the-art-of-network-penetration-testing?a_aid=royce
827 stars 158 forks source link

[.xsesison file] the field 'become' has an invalid value (pentest), and could not be converted to an bool. #27

Closed avictory6 closed 3 years ago

avictory6 commented 3 years ago

Hello, When running "vagrant provision pentest" I got an error (see below). Any suggestion?

Thanks, Avi

/mnt/c/capsulecorp-pentest$ vagrant provision pentest
==> pentest: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.10.8).

Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode

    pentest: Running ansible-playbook...
/home/avi/.local/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature

PLAY [pentest] *****************************************************************

TASK [Gathering Facts] *********************************************************
[DEPRECATION WARNING]: Distribution Ubuntu 18.04 on host pentest should use
/usr/bin/python3, but is using /usr/bin/python for backward compatibility with
prior Ansible releases. A future Ansible release will default to using the
discovered platform python for this host. See https://docs.ansible.com/ansible/
2.10/reference_appendices/interpreter_discovery.html for more information. This
 feature will be removed in version 2.12. Deprecation warnings can be disabled
by setting deprecation_warnings=False in ansible.cfg.
ok: [pentest]

TASK [crackmapexec : set_fact] *************************************************
ok: [pentest]

TASK [crackmapexec : Check if CME is already installed] ************************
ok: [pentest]

TASK [crackmapexec : shell] ****************************************************
skipping: [pentest]

TASK [crackmapexec : Ensure pip --user enabled in .bashrc] *********************
skipping: [pentest]

TASK [crackmapexec : Pip install CrackMapExec] *********************************
skipping: [pentest]

TASK [nmap : Make sure no lock files are present] ******************************
changed: [pentest] => (item=/var/lib/dpkg/lock)
changed: [pentest] => (item=/var/lib/dpkg/lock-frontend)

TASK [nmap : Apt install nmap deps] ********************************************
ok: [pentest] => (item=git)
ok: [pentest] => (item=wget)
ok: [pentest] => (item=build-essential)
ok: [pentest] => (item=checkinstall)
ok: [pentest] => (item=libpcre3-dev)
ok: [pentest] => (item=libssl-dev)
ok: [pentest] => (item=libpcap-dev)
ok: [pentest] => (item=autoconf)

TASK [nmap : Mkdir $HOME/src/] *************************************************
ok: [pentest]

TASK [nmap : Git checkout nmap source] *****************************************
ok: [pentest]

TASK [nmap : Run nmap configure] ***********************************************
ok: [pentest]

TASK [nmap : Run nmap make] ****************************************************
ok: [pentest]

TASK [nmap : Run nmap make install] ********************************************
ok: [pentest]

TASK [rvm : Add RVM GPG keys] **************************************************
changed: [pentest]

TASK [rvm : Pull down RVM and install with latest stable] **********************
changed: [pentest]

TASK [rvm : Add RVM bin path to $PATH] *****************************************
ok: [pentest]

TASK [rvm : Add pentest to the RVM group] **************************************
changed: [pentest]

TASK [rvm : Source the rvm-path.sh file] ***************************************
changed: [pentest]

TASK [metasploit : set_fact] ***************************************************
ok: [pentest]

TASK [metasploit : Install necessary gem bundler] ******************************
changed: [pentest]

TASK [metasploit : Install necessary gem wirble] *******************************
changed: [pentest]

TASK [metasploit : Install necessary gem sqlite3] ******************************
changed: [pentest]

TASK [metasploit : Apt install metasploit deps] ********************************
ok: [pentest] => (item=gpgv2)
ok: [pentest] => (item=autoconf)
ok: [pentest] => (item=bison)
ok: [pentest] => (item=build-essential)
ok: [pentest] => (item=curl)
changed: [pentest] => (item=git-core)
ok: [pentest] => (item=libapr1)
ok: [pentest] => (item=libaprutil1)
ok: [pentest] => (item=libcurl4-openssl-dev)
ok: [pentest] => (item=libgmp3-dev)
ok: [pentest] => (item=libpcap-dev)
ok: [pentest] => (item=libpq-dev)
ok: [pentest] => (item=libreadline6-dev)
ok: [pentest] => (item=libsqlite3-dev)
ok: [pentest] => (item=libssl-dev)
ok: [pentest] => (item=libsvn1)
ok: [pentest] => (item=libtool)
ok: [pentest] => (item=libxml2)
ok: [pentest] => (item=libxml2-dev)
ok: [pentest] => (item=libxslt-dev)
ok: [pentest] => (item=libyaml-dev)
ok: [pentest] => (item=locate)
ok: [pentest] => (item=ncurses-dev)
ok: [pentest] => (item=openssl)
ok: [pentest] => (item=postgresql)
ok: [pentest] => (item=postgresql-contrib)
ok: [pentest] => (item=wget)
ok: [pentest] => (item=xsel)
ok: [pentest] => (item=zlib1g)
ok: [pentest] => (item=zlib1g-dev)

TASK [metasploit : Mkdir msf directory] ****************************************
ok: [pentest]

TASK [metasploit : Git checkout metasploit source] *****************************
ok: [pentest]

TASK [metasploit : Make sure no Gemfile.lock is present] ***********************
ok: [pentest] => (item=/home/pentest/msf/Gemfile.lock)

TASK [metasploit : Run bundle install] *****************************************
changed: [pentest]

TASK [pentest : Snap install Remmina RDP client] *******************************
changed: [pentest]

TASK [pentest : Apt remove light-locker] ***************************************
changed: [pentest]

TASK [xrdp : Fix XRDP file] ****************************************************
changed: [pentest]

TASK [xrdp : Create the .xsesison file] ****************************************
fatal: [pentest]: FAILED! => {"msg": "the field 'become' has an invalid value (pentest), and could not be converted to an bool.The error was: The value 'pentest' is not a valid boolean.  Valid booleans include: 0, 'on', 'f', 'false', 1, 'no', 'n', '1', '0', 't', 'y', 'off', 'yes', 'true'"}

PLAY RECAP *********************************************************************
pentest                    : ok=27   changed=13   unreachable=0    failed=1    skipped=3    rescued=0    ignored=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
R3dy commented 3 years ago

I think become is no longer supported and should be become_user which should be resolved in #26 try to git pull and re-provision the VM

avictory6 commented 3 years ago

Works great now! Thanks.