mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-05 07:14:24 +01:00
Merge branch 'exitjail' of https://github.com/g0tmi1k/kippo
This commit is contained in:
@@ -146,6 +146,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
|
||||
|
||||
@@ -52,9 +52,15 @@ commands['exxxit'] = command_exxxit
|
||||
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user