scVENUS / PeekabooAV-Installer

This repository provides scripts and configuration files to install, update and test a Peekaboo installation
GNU General Public License v3.0
7 stars 9 forks source link

Error with virtualenv, failling switching python version. #40

Closed GeneralBenobi closed 5 years ago

GeneralBenobi commented 5 years ago

Hello there, I got an error (see below) when I try to install Peekaboo with the installer. I use a ubuntu-18.04.2-live-server-amd64 VM.

TASK [Force python version switch in Peekaboo virtualenv] *** fatal: [localhost]: FAILED! => {"msg": "The conditional check 'peekaboo_python.stat.lnk_target != python_exe' failed. The error was: error while evaluating conditional (peekaboo_python.stat.lnk_target != python_exe): 'dict object' has no attribute 'lnk_target'\n\nThe error appears to have been in '/root/peekabooav-installer/PeekabooAV-install.yml': line 392, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Force python version switch in Peekaboo virtualenv\n ^ here\n"} to retry, use: --limit @/root/peekabooav-installer/PeekabooAV-install.retry

PLAY RECAP ** localhost : ok=34 changed=7 unreachable=0 failed=1

ERROR: 'ansible-playbook' failed. Please fix manually

Thanks for your help and quick response!

michaelweiser commented 5 years ago

Hi @GeneralBenobi: First off, our README makes you check out the current devel state. That's a doc bug IMO. Can you try release 1.7 or do you actually want to try latest devel state? You can try git checkout --recurse-submodules v1.7 and run the installer again.

Regarding the actual error: You've spotted a bug in the installer logic. Thanks! We'll fix it. In the meantime, if you want to test latest devel state, you can create the symlink we're making ansible check for as a workaround:

mkdir -p /opt/peekaboo/bin
ln -sfn python2 /opt/peekaboo/bin/python
GeneralBenobi commented 5 years ago

Hello @michaelweiser, thanks for the quick response and the help so far!

I did as you suggested (creating the symlink, however I did not perform an update to the dev-version) and it worked, but I get a new error, a little bit later, which I can't fix myself.

TASK [Start Peekaboo] *** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unable to start service peekaboo: Job for peekaboo.service failed because the control process exited with error code.\nSee \"systemctl status peekaboo.service\" and \"journalctl -xe\" for details.\n"} to retry, use: --limit @/root/peekabooav-installer/PeekabooAV-install.retry

PLAY RECAP ** localhost : ok=48 changed=16 unreachable=0 failed=1

I found out, with the journalctl -xe command that "[root] CRITICAL: CuckooCriticalError: Unable to bind ResultServer on 192.168.56.5:2042: [Errno 99] Cannot assign requested address" this is creating the error.

I found a source what the error means, but I don't know how to fix it within the installer.

michaelweiser commented 5 years ago

Our setup assumes that you're running Peekaboo in a VirtualBox VM and 192.168.56.0/24 is VirtualBox's default network for host-only networking. If you can't or don't want to make the IPs match our expectations you can reconfigure them either in the installed Cuckoo configuration in /var/lib/peekaboo/.cuckoo/conf/{cuckoo,routing,virtualbox}.conf (which you should back up because another run of the installer will overwrite it) or change PeekabooAV-Installer/cuckoo/custom.kv.conf to match your environment and reinstall. The format of the latter is <config-file>.<section>.<setting> = value. You're currently running into cuckoo.resultserver.ip but would likely also need to adjust the analysis VM settings. See http://docs.cuckoosandbox.org/en/latest/installation/host/configuration/ for documentation of the settings and mechanics.

michaelweiser commented 5 years ago

Were you able to resolve your installation issues and can I close this issue?