desaster / kippo

Kippo - SSH Honeypot
1.62k stars 277 forks source link

Failed to load application: No Option 'rsa_public_key' in section: 'honeypot'. #184

Closed Waseem-farooqui closed 9 years ago

Waseem-farooqui commented 9 years ago

I was running kippo for couples of months but it stops working whenever I start it, it throws me this error.Failed to load application: No Option 'rsa_public_key' in section: 'honeypot' how I can remove.

micheloosterhof commented 9 years ago

Do you have the option 'rsa_public_key' in your [honeypot] session in kippo.cfg?

Waseem-farooqui commented 9 years ago

No, there is no such option is kippo.cfg ?

micheloosterhof commented 9 years ago

There should be. Check https://github.com/desaster/kippo/blob/master/kippo.cfg.dist

On 13 April 2015 at 09:55, Waseem ud din notifications@github.com wrote:

No there is no such option is kippo.cfg ?

— Reply to this email directly or view it on GitHub https://github.com/desaster/kippo/issues/184#issuecomment-92225490.

Waseem-farooqui commented 9 years ago

I am using Honeydrive for a long time its working fine on my other system without rsa_public_key. I added this section in configuration now got this error. An error has occurred: 'Couldn't listen on 0.0.0.0:22: [Errno 13] Permission denied.'

micheloosterhof commented 9 years ago

Maybe there are some issues with the HoneyDrive configuration. Your current error appears because you are trying to listen on port 22, and are probably not root. You probably want a different port to listen on, 2222 is the default. It needs to be higher than 1024 for a non-root user.

On 13 April 2015 at 10:54, Waseem ud din notifications@github.com wrote:

I am using Honeydrive for a long time its working fine on my other system without rsa_public_key. I added this section in configuration now got this error. An error has occurred: 'Couldn't listen on 0.0.0.0:22: [Errno 13] Permission denied.'

— Reply to this email directly or view it on GitHub https://github.com/desaster/kippo/issues/184#issuecomment-92235721.

Waseem-farooqui commented 9 years ago

It was working fine :( some days ago on port 22 and without root user. What can I do to bind it on port 22?

micheloosterhof commented 9 years ago

The first question to ask if it suddenly stopped working is: what changed? Did you upgrade any components? Any automatic upgrades?

Also, all of these do not seem issues with Kippo but with the HoneyDrive distribution. Maybe you can ask over there as well: http://bruteforce.gr/honeydrive

On 13 April 2015 at 11:08, Waseem ud din notifications@github.com wrote:

It was working fine :( some days ago on port 22 and without root user. When can I do to bind it on port 22?

— Reply to this email directly or view it on GitHub https://github.com/desaster/kippo/issues/184#issuecomment-92240267.

Waseem-farooqui commented 9 years ago

Yes It was working fine I restarted the machine with some reasons on starting Kippo service I got this error, I don't think I upgrade any of its component, no idea regarding automatic upgrade.

At this time I want to know how I can bind kippo on port 22 with non-root user.

micheloosterhof commented 9 years ago

http://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-1024-on-l

On 13 April 2015 at 11:16, Waseem ud din notifications@github.com wrote:

Yes It was working fine I restarted the machine with some reasons on starting Kippo service I got this error, I don't think I upgrade any of its component, no idea regarding automatic upgrade.

At this time I want to know how I can bind kippo on port 22 with non-root user.

— Reply to this email directly or view it on GitHub https://github.com/desaster/kippo/issues/184#issuecomment-92243775.

abhinavbom commented 9 years ago

I am having similar issue . I do not see any key file being created in /data. I have changed the ssh port to 22. rest everything is default.

twistd (the Twisted daemon) 13.2.0 Copyright (c) 2001-2013 Twisted Matrix Laboratories. See LICENSE for details. Starting kippo in the background... Generating new RSA keypair... Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 642, in run runApp(config) File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp _SomeApplicationRunner(config).run() File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 376, in run self.application = self.createOrGetApplication() File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 441, in createOrGetApplication application = getApplication(self.config, passphrase) --- --- File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 452, in getApplication application = service.loadApplication(filename, style, passphrase) File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 405, in loadApplication application = sob.loadValueFromFile(filename, 'application', passphrase) File "/usr/lib/python2.7/dist-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile exec fileObj in d, d File "kippo.tac", line 34, in rsa_pubKeyString, rsa_privKeyString = core.ssh.getRSAKeys() File "/opt/kippo/kippo2/kippo/kippo/core/ssh.py", line 271, in getRSAKeys with file(public_key, 'w+b') as f: exceptions.IOError: [Errno 13] Permission denied: 'data/ssh_host_rsa_key.pub'

Failed to load application: [Errno 13] Permission denied: 'data/ssh_host_rsa_key.pub'

micheloosterhof commented 9 years ago

You have a permissions issue. The user under which you run kippo is not allowed to write to the file data/ssh_host_rsa_key.pub.

abhinavbom commented 9 years ago

Any suggestion on how I can get rid of it. I know its a kind of low profile question but just wnat to make sure I follow expert advice.

micheloosterhof commented 9 years ago

I gave you enough to fix the problem, I suggest you read up on UNIX file permissions. Do keep in mind you are running a honeypot, you're on purpose inviting people to attack your system. It's good to know a few things about your own systems security as well before you run these.

abhinavbom commented 9 years ago

Meanwhile I have it up and running now. Had to permit user access to the kippo folder. Managed to make some normal modifications to cfg as well. The system is isolated from any potential environment so I guess I would love people attacking it. Let's see how things go. Thanks for the help.