View Issue Details

IDProjectCategoryView StatusLast Update
0005048Kali Linux[All Projects] General Bugpublic2018-10-26 12:16
ReporterskacpAssigned Tosbrun 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version2018.4 
Summary0005048: King-Phisher service doesn't start
DescriptionError starting the King-Phiser service

systemctl start king-phisher
ournalctl -xe


Okt 22 14:42:45 kali systemd[1]: king-phisher.service: Start operation timed out. Terminating.
Okt 22 14:42:45 kali systemd[1]: king-phisher.service: Failed with result 'timeout'.
Okt 22 14:42:45 kali systemd[1]: Failed to start King Phisher Server.


occures since apt-get dist-upgrade on 22/10/2018

debug output attached.

Activities

skacp

skacp

2018-10-22 12:53

reporter  

king-phisher-debug.txt (7,000 bytes)
2018-10-22 14:41:17,883 KingPhisher.Server.CLI                             DEBUG    king phisher version: 1.11.0 python version: 3.6.6
2018-10-22 14:41:17,888 AdvancedHTTPServer                                 INFO     listening on 0.0.0.0:80
2018-10-22 14:41:17,889 KingPhisher.Server                                 INFO     serving files has been enabled
2018-10-22 14:41:17,892 KingPhisher.Server.Database                        INFO     initializing database connection with driver postgresql
2018-10-22 14:41:17,893 KingPhisher.Server.Database                        DEBUG    postgresql-setup was not found
2018-10-22 14:41:17,916 KingPhisher.Server.Database                        DEBUG    postgresql service is already running via systemctl
2018-10-22 14:41:19,154 KingPhisher.Server.Database                        DEBUG    encountered a sqlalchemy OperationalError while initializing the database
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2158, in _wrap_pool_connect
    return fn()
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 345, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 791, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 532, in checkout
    rec = pool._do_get()
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 1196, in _do_get
    self._dec_overflow()
  File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 187, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 1193, in _do_get
    return self._create_connection()
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 350, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 477, in __init__
    self.__connect(first_connect_check=True)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 674, in __connect
    connection = pool._invoke_creator(self)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/strategies.py", line 106, in connect
    return dialect.connect(*cargs, **cparams)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 411, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  password authentication failed for user "king_phisher"
FATAL:  password authentication failed for user "king_phisher"


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/share/king-phisher/king_phisher/server/database/manager.py", line 337, in init_database
    inspector = sqlalchemy.inspect(engine)
  File "/usr/lib/python3/dist-packages/sqlalchemy/inspection.py", line 63, in inspect
    ret = reg(subject)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/reflection.py", line 139, in _insp
    return Inspector.from_engine(bind)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/reflection.py", line 134, in from_engine
    return bind.dialect.inspector(bind)
  File "/usr/lib/python3/dist-packages/sqlalchemy/dialects/postgresql/base.py", line 2028, in __init__
    reflection.Inspector.__init__(self, conn)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/reflection.py", line 109, in __init__
    bind.connect().close()
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2102, in connect
    return self._connection_cls(self, **kwargs)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 90, in __init__
    if connection is not None else engine.raw_connection()
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2188, in raw_connection
    self.pool.unique_connection, _connection)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2162, in _wrap_pool_connect
    e, dialect, self)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1476, in _handle_dbapi_exception_noconnection
    exc_info
  File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 186, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2158, in _wrap_pool_connect
    return fn()
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 345, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 791, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 532, in checkout
    rec = pool._do_get()
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 1196, in _do_get
    self._dec_overflow()
  File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 187, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 1193, in _do_get
    return self._create_connection()
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 350, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 477, in __init__
    self.__connect(first_connect_check=True)
  File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 674, in __connect
    connection = pool._invoke_creator(self)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/strategies.py", line 106, in connect
    return dialect.connect(*cargs, **cparams)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 411, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  password authentication failed for user "king_phisher"
FATAL:  password authentication failed for user "king_phisher"
 (Background on this error at: http://sqlalche.me/e/e3q8)
2018-10-22 14:41:19,202 KingPhisher.Server.CLI                             CRITICAL server failed to build with error: initialization failed
2018-10-22 14:41:19,203 KingPhisher.Plugins.Manager                        INFO     unloading 0 plugins
king-phisher-debug.txt (7,000 bytes)
skacp

skacp

2018-10-22 13:56

reporter   ~0009824

after resetting the king-phisher database + db_user starting the server works again.

however, the client isn't able to connect. error is "an unknown error occured"
this works in an older version auf kali

debug of client and server attached
skacp

skacp

2018-10-22 13:58

reporter  

client-debug.txt (582 bytes)
INFO     connecting to local king phisher instance
DEBUG    using serializer: application/json
DEBUG    using serializer: binary/message-pack
DEBUG    calling RPC method: version
INFO     successfully connected to the king phisher server (version: 1.11.0 rpc api version: 6.1)
DEBUG    calling RPC method: login
DEBUG    successfully authenticated to the remote king phisher service
INFO     connecting to the server event socket
ERROR    failed to connect to the server event socket
ERROR    failed to connect the server event socket
DEBUG    shutting down the server event socket
client-debug.txt (582 bytes)
skacp

skacp

2018-10-22 14:00

reporter  

server-debug.txt (1,470 bytes)
2018-10-22 15:50:57,412 KingPhisher.Server.RequestHandler                  DEBUG    127.0.0.1 tid: 0x7f1 9aa6dc700 running http request handler
2018-10-22 15:50:57,413 KingPhisher.Server.RPC                             DEBUG    calling RPC method rpc_  version
2018-10-22 15:50:57,413 AdvancedHTTPServer                                 INFO     127.0.0.1 "RPC /vers ion HTTP 1.1" 200 -
2018-10-22 15:50:57,415 KingPhisher.Server.RequestHandler                  DEBUG    127.0.0.1 tid: 0x7f19aa 6dc700 running http request handler
2018-10-22 15:50:57,416 KingPhisher.Server.Authenticator                   DEBUG    checking authentication for user root with cached password hash
2018-10-22 15:50:57,456 KingPhisher.Server.SessionManager                  INFO     invalidated 1 previously existing session for user 1
2018-10-22 15:50:57,456 KingPhisher.Server.Authentication                  INFO     successful login request from 127.0.0.1 for user root
2018-10-22 15:50:57,457 AdvancedHTTPServer                                 INFO     127.0.0.1 "RPC /log in HTTP/ 1.1" 200 -
2018-10-22 15:50:57,459 KingPhisher.Server.RequestHandler                  DEBUG    127.0.0.1 tid: 0x7f19  aa6dc700 running http request handler
2018-10-22 15:50:57,460 AdvancedHTTPServer                                 INFO     127.0.0.1 "GET /_/ws/een ts/js on HTTP/1.1" 101 -
2018-10-22 15:50:57,462 KingPhisher.Server.WebSocket.EventPublisher        INFO     web socket has been connected
server-debug.txt (1,470 bytes)
sbrun

sbrun

2018-10-26 12:16

manager   ~0009837

fixed in version 1.11.0-0kali2

Issue History

Date Modified Username Field Change
2018-10-22 12:53 skacp New Issue
2018-10-22 12:53 skacp File Added: king-phisher-debug.txt
2018-10-22 13:56 skacp Note Added: 0009824
2018-10-22 13:58 skacp File Added: client-debug.txt
2018-10-22 14:00 skacp File Added: server-debug.txt
2018-10-26 09:57 sbrun Assigned To => sbrun
2018-10-26 09:57 sbrun Status new => acknowledged
2018-10-26 12:16 sbrun Status acknowledged => resolved
2018-10-26 12:16 sbrun Resolution open => fixed
2018-10-26 12:16 sbrun Fixed in Version => 2018.4
2018-10-26 12:16 sbrun Note Added: 0009837