Closed BenU closed 5 years ago
From the information you provided, it appears you did a keyboard interrupt while King Phisher was setting up its pipenv
environment. Steps to have King Phisher reinstall its pipenv
dependencies is located in the FAQ
The installation process could hang on the pipenv
step for quite awhile, upwards of 15 minutes if I remember correctly. About how long did you wait at that phase?
You should be able to do the following, as root from in the /opt/king-phisher
directory:
pipenv --rm
pipenv install
tools/install.sh
That last step should work as all of the OS packages have already been installed by the first run on the installer. @wolfthefallen do you know of any that are missing, given that this user is running the master branch and not dev?
Very grateful to you both. I couldn't figure out how to implement the commands described in the FAQ's in this environment though that might work.
I waited over an hour previously and, with your note, @zeroSteiner, I waited over 16 minutes again. Still, I did implement the commands you describe which got hung up as well for over 10 minutes at the point below:
ubuntu@ip-XXX:~$ sudo su -
root@ip-XXX:~# cd /opt/king-phisher/
root@ip-XXX:/opt/king-phisher# pipenv --rm
Removing virtualenv (/opt/king-phisher/.venv)…
root@ip-XXX:/opt/king-phisher# pipenv install
Creating a virtualenv for this project…
Pipfile: /opt/king-phisher/Pipfile
Using /usr/bin/python3 (3.6.7) to create virtualenv…
⠏ Creating virtual environment...Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /root/.local/share/virtualenvs/king-phisher-RbupqVtz/bin/python3
Also creating executable in /root/.local/share/virtualenvs/king-phisher-RbupqVtz/bin/python
Installing setuptools, pip, wheel...
done.
✔ Successfully created virtual environment!
Virtualenv location: /root/.local/share/virtualenvs/king-phisher-RbupqVtz
Installing dependencies from Pipfile.lock (49fa41)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 15/66 — 00:00:21
After around 10 minutes:
An error occurred while installing advancedhttpserver==2.1.0 --hash=sha256:2dd28a788aaaebcf7aa7a2bfb788e6bdbf02f85684e5c0ac27b588b15288e479!
Will try again.
An error occurred while installing alembic==1.0.2 --hash=sha256:04bcb970ca8659c3607ddd8ffd86cc9d6a99661c9bc590955e8813c66bfa582b!
Will try again.
This stuff mean anything?
If pipenv has issues installing a dependency, It will let you know and then attempt to install them again after all other pypi packages have completed, as @zeroSteiner stated it can take sometime to complete.
Time did seem to help the pipenv install
though I had to restart it several times and give it hours. Still, tools/install.sh
hangs at INFO: Synchronizing King Phisher's pipenv environment
which I let run for 12 hours overnight. More context below. I guess no-one else is having this problem so perhaps the problem is within TrustedSec's Pen Testing Framework.. Thanks again for everything.
...gir1.2-vte-2.91 is already the newest version (0.52.2-1ubuntu1~18.04.2).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
INFO: Successfully installed gir1.2-webkit2-4.0 with apt-get
INFO: Synchronizing Python package dependencies from PyPi
pip 19.0.3 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
Requirement already up-to-date: pip in /usr/local/lib/python3.6/dist-packages (19.0.3)
pip 19.0.3 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
Requirement already up-to-date: setuptools in /usr/local/lib/python3.6/dist-packages (40.8.0)
Requirement already up-to-date: six in /usr/local/lib/python3.6/dist-packages (1.12.0)
Requirement already satisfied: pipenv in /usr/local/lib/python3.6/dist-packages (2018.11.26)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/local/lib/python3.6/dist-packages (from pipenv) (0.5.1)
Requirement already satisfied: setuptools>=36.2.1 in /usr/local/lib/python3.6/dist-packages (from pipenv) (40.8.0)
Requirement already satisfied: pip>=9.0.1 in /usr/local/lib/python3.6/dist-packages (from pipenv) (19.0.3)
Requirement already satisfied: virtualenv in /usr/local/lib/python3.6/dist-packages (from pipenv) (16.4.3)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from pipenv) (2018.1.18)
INFO: Synchronizing King Phisher's pipenv environment
by chance are you running through a proxy?
Yes. On aws lightsail per the setup in The Hacker Playbook 3: Practical Guide To Penetration Testing. Is that the problem?
Ok I think I know what the issue is. pipenv
is hanging when trying to connect with pypi
because ssl certificate is failing through the proxy. Try the following to see if it will resolve the issue.
do export PIP_TRUSTED_HOST=pypi.org
then try reinstalling.
So are were we able to get this issue resolved or are we still trying to figure out why it's hanging. Strictly speaking, I don't think we've tested KP on AWS Lights and depending on the flavor of Linux it may not be supported.
Sorry for delay. I haven't yet tried that last step and you can mark this issue as closed. Lightsail on AWS offers Ubuntu LTS 16.04 and 18.04 and I was using 18.04.
I'm really very impressed by the great work you both do with King Phisher and how patient and responsive you've been to an insignificant user like me. I'm sure that the internet is much more secure because of your work. Thank you.
tl;dr I confess that I set the project aside, bothered by the book, The Hacker Playbook 3's, errors. I don't expect a technology book to be completely up-to-date and error free but it should have a dynamic errata page to correct issues and/or the community to discuss work-arounds like those needed here. I got stuck here within the first pages in the 1st chapter and can't be the only person having this problem. I suspect the author uses some VPN besides lightsail on AWS and wrote about light sail because there's a cheap intro level without testing it or maybe Ubuntu 16.04 without specifying which Ubuntu.
We all start somewhere and we're glad you decided to try out King Phisher. If you have more issues in the future just open another ticket and we'll help you out.
Issue Description
I'm installing King Physher as part of TrustedSec's The PenTester's Framework: PTF Github page
It got hung up each time at the
INFO: Synchronizing King Phisher's pipenv environment
point despite having googled that error message and attempting to install python, python3, cairo, etc. Based on issue #353 I also tried:cd /opt/king-phisher
sudo ./KingPhisherServer -L DEBUG -f ./server_config.yml
Which produced the error:ModuleNotFoundError: No module named 'termcolor'
More context below.Reproduction Steps
sudo su -
git clone https://github.com/trustedsec/ptf /opt/ptf
cd /opt/ptf && ./ptf
use modules/exploitation/install_update_all
The above freezes at:INFO: Synchronizing King Phisher's pipenv environment
Environment Details
Host OS: Ubuntu 18.04 LTS King Phisher Version: x.y.z -- not sure of this. I assume the latest version.
Error Details / Stack Trace
Note that the trace below got hung up for over an hour at
INFO: Synchronizing King Phisher's pipenv environment
and was interrupted by me with^C
andexit
which I also included because of additional data generated.Trying the install as described in #353 generates the following:
Very grateful for this project and everything the King Phisher team does. Thank you!