Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The option to disable fake local shell on exit #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions kippo.cfg.dist
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ ssh_version_string = SSH-2.0-OpenSSH_5.1p1 Debian-5
# (default: not specified)
#banner_file =

# Allow the attacker to exit the honeypot on request or try to 'trick' the attacker with another shell.
# note: depending on the attackers client (e.g. putty), will just quit regardless.
#
# (default: true)
exit_jail = true

# Session management interface.
#
# This is a telnet based service that can be used to interact with active
Expand Down
8 changes: 7 additions & 1 deletion kippo/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ def call(self):

class command_exit(HoneyPotCommand):
def call(self):
cfg = config()
self.exit_jail = True
if cfg.has_option('honeypot', 'exit_jail'):
if (cfg.get('honeypot', 'exit_jail') == "false"):
self.exit_jail = False
if 'PuTTY' in self.honeypot.clientVersion or \
'libssh' in self.honeypot.clientVersion or \
'sshlib' in self.honeypot.clientVersion:
'sshlib' in self.honeypot.clientVersion or \
self.exit_jail is False:
self.honeypot.terminal.loseConnection()
return
self.honeypot.terminal.reset()
Expand Down