desaster / kippo

Kippo - SSH Honeypot
1.62k stars 277 forks source link

Failed to load application: No module named kippo.core.config #227

Closed Joseph710 closed 6 years ago

Joseph710 commented 6 years ago

Sup fams, Im having troubles with starting kippo. I have made separate user for it and also installed I think all prerequisties but still cant start it. Heres the error: twistd (the Twisted daemon) 15.1.0 Copyright (c) 2001-2015 Twisted Matrix Laboratories. See LICENSE for details. Starting kippo in the background... Unhandled Error Traceback (most recent call last): File "/home/kippo/.local/lib/python2.7/site-packages/twisted/application/app.py", line 642, in run runApp(config) File "/home/kippo/.local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp _SomeApplicationRunner(config).run() File "/home/kippo/.local/lib/python2.7/site-packages/twisted/application/app.py", line 376, in run self.application = self.createOrGetApplication() File "/home/kippo/.local/lib/python2.7/site-packages/twisted/application/app.py", line 441, in createOrGetApplication application = getApplication(self.config, passphrase) --- --- File "/home/kippo/.local/lib/python2.7/site-packages/twisted/application/app.py", line 452, in getApplication application = service.loadApplication(filename, style, passphrase) File "/home/kippo/.local/lib/python2.7/site-packages/twisted/application/service.py", line 403, in loadApplication application = sob.loadValueFromFile(filename, 'application', passphrase) File "/home/kippo/.local/lib/python2.7/site-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile exec fileObj in d, d File "kippo.tac", line 25, in from kippo.core.config import config exceptions.ImportError: No module named kippo.core.config

Failed to load application: No module named kippo.core.config

Aaand heres my pip list: attrs (16.3.0) constantly (15.1.0) cryptography (1.7.1) enum34 (1.1.6) idna (2.2) incremental (16.10.1) ipaddress (1.0.17) pip (9.0.1) pyasn1 (0.1.9) pyasn1-modules (0.0.7) pycrypto (2.6.1) pyOpenSSL (16.2.0) service-identity (16.0.0) setuptools (38.5.1) six (1.10.0) Twisted (15.1.0) virtualenv (15.1.0) zope.interface (4.4.3)

desaster commented 6 years ago

Hard to say from this, but looks like it can't find ./kippo/core/config.py

Joseph710 commented 6 years ago

It is there tho, this is how the core dir looks like - pretty standard tho i would think /root/kippo/kippo/core$ ls auth.py config.py dblog.py exceptions.py fs.py honeypot.py init.py interact.py protocol.py ssh.py ttylog.py utils.py

desaster commented 6 years ago

This doesn't seem standard - why is the kippo main directory in /root?

Make sure you are running from twistd from the same directory as where your .tac is located.

Joseph710 commented 6 years ago

Now I feel stupid.. It should be upper in separate directory then?

desaster commented 6 years ago

I don't quite understand the setup you have, but try following the instructions as a non-root user https://github.com/desaster/kippo/wiki/Running-Kippo

I'll close this issue since there doesn't seem to be an actual bug involved, but feel free to continue the conversation here.

Joseph710 commented 6 years ago

Well there isnt any step to where whould I clone it so I just cloned it to my root directory as thats the home dir for well root. From there I installed all the prerequisties as you can see from "pip list" command and set up redirection for 22 port. After that I tried running it but ended up with that error

Joseph710 commented 6 years ago

Alright I fixed it sort of for anybody that has the same problem I moved it form root to one folder lower. Anyway now I get new error : Failed to load application: [Errno 13] Permission denied: 'data/ssh_host_rsa_key.pub'

Joseph710 commented 6 years ago

and fix for that is "chmod -R 777 /kippo/" or whatever your folder is

desaster commented 6 years ago

Running chmod -R 777 is definitely the wrong approach here - it seems like the ownership of your files is incorrect.

Joseph710 commented 6 years ago

But does it matter if its only for the one folder?