Closed zoubida43 closed 4 years ago
Start King Phisher in the foreground with debugging output and post the results here please.
DEBUG target directory: /opt/king-phisher
INFO checking for the pipenv environment
DEBUG pipenv path: '/usr/local/bin/pipenv'
DEBUG pipenv Pipfile: /opt/king-phisher/Pipfile
Loading .env environment variables…
DEBUG king phisher version: 1.16.0-beta (rev: 51185b4a2afd) python version: 3.7.5
DEBUG using plugin-specific library path: /var/king-phisher/lib/python3.7/site-packages
INFO listening on 172.22.98.207:80
INFO serving files has been enabled
INFO initializing database connection with driver postgresql
DEBUG postgresql-setup was not found
DEBUG starting external process: /usr/bin/systemctl status postgresql.service
DEBUG postgresql service is already running via systemctl
DEBUG starting external process: su postgres -c psql -At -c "SELECT usename FROM pg_user"
DEBUG starting external process: su postgres -c psql -At -c "SELECT datname FROM pg_database"
DEBUG current database schema version: 9 (latest)
DEBUG connected to postgresql database: king_phisher
INFO restored 0 valid sessions and skipped 0 expired sessions from the database
DEBUG use pam service 'sshd' for authentication
DEBUG forked an authenticating process with pid: 6327
INFO the job manager has been started
INFO adding new job with id: a50949d0-9bb4-45d5-99ac-055fff13b92c and callback function: _maintenance
INFO adding new job with id: ac0ef1b7-fa71-47b8-9b3b-6c54004f67dc and callback function: ping_all
DEBUG web socket manager worker running in tid: 0x7f73cecd8700
DEBUG initialized the table api dataset (schema version: 8)
DEBUG server request test id initialized with value: IXcC9vGUhPvzS799ZdLFtZ1J
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/king-phisher/king_phisher/server/main.py", line 264, in
Thank you for the help
I can confirm I had the same problem on a fresh Ubuntu 18.04 install. I manually downloaded "GeoLite2-City.mmdb" to "/var/king-phisher/" which seems to have fixed the problem after a reboot. I am guessing this is related to the recent changes Maxmind did where they now require an API key to download this file. You might have to register to the Maxmind website to download this file manually.
Thanks for pointing that out. It resolved my issue
Hey, it's possible that this is a bug that I may have introduced in some changes I made recently. Can you please run file data/server/king_phisher/GeoLite2-City.mmdb; ls -lha data/server/king_phisher/GeoLite2-City.mmdb
from your King Phisher directory and send me the output?
I'm wondering if shipping the database file with LFS is breaking it for new installations.
Sure thing! Here is the output:
root@ip-172-x-x-x:/opt/king-phisher# file data/server/king_phisher/GeoLite2-City.mmdb; ls -lha data/server/king_phisher/GeoLite2-City.mmdb
data/server/king_phisher/GeoLite2-City.mmdb: ASCII text
-rw-r--r-- 1 root king-phisher 133 Jan 23 17:05 data/server/king_phisher/GeoLite2-City.mmdb
root@ip-172-x-x-x:/opt/king-phisher# cat data/server/king_phisher/GeoLite2-City.mmdb
version https://git-lfs.github.com/spec/v1
oid sha256:a253d9cd68fe17b00087da24375f31f07cd4bb3852dc5fe3afe37b8f59e5abd0
size 61615395
Yup, thanks that confirms my suspicion. This is a bug.
Alright so the changes I made to address #418 require the user to have git-lfs
installed in order to check out the large database that I'm now distributing. Since git-lfs
should be included as a dependency in the install file, but it looks like some older versions of Linux that we still support don't have it (Fedora 26 for example).
To fix this, I'm also distributing the file over S3. If the database appears to be corrupt, a new one will be downloaded, either from MaxMind if a license is specified (which isn't fully exposed to the user at this time) or the older version from S3. That should fix the issue so you'll have a database and the server can start whether or not you have git-lfs
installed.
Changes are in commit 9a15a0c246ba3169b427af5652e9dba956d8b3cf.
INFO: You can start the King Phisher client with the following command: /opt/king-phisher/KingPhisher
pleas help
Issue Description
installed King-phisher on Kali
Reproduction Steps
Environment Details
Host OS: Kali 2, King Phisher Version
Jan 22 20:47:02 kingkali systemd[1]: king-phisher.service: Can't open PID file /run/king-phisher.pid (yet?) after start: No such file or directory Jan 22 20:47:05 kingkali su[776]: (to postgres) root on none Jan 22 20:47:05 kingkali su[776]: pam_unix(su:session): session opened for user postgres by (uid=0) Jan 22 20:47:05 kingkali su[776]: pam_unix(su:session): session closed for user postgres Jan 22 20:47:05 kingkali su[803]: (to postgres) root on none Jan 22 20:47:05 kingkali su[803]: pam_unix(su:session): session opened for user postgres by (uid=0) Jan 22 20:47:05 kingkali su[803]: pam_unix(su:session): session closed for user postgres Jan 22 20:48:24 kingkali systemd[1]: king-phisher.service: start operation timed out. Terminating. Jan 22 20:48:24 kingkali systemd[1]: king-phisher.service: Failed with result 'timeout'. Jan 22 20:48:24 kingkali systemd[1]: Failed to start King Phisher Server. e logs here.