add bash -c (Closes #104)

This commit is contained in:
Upi Tamminen
2014-08-09 14:49:00 +03:00
parent acbb5dbb3c
commit a0b1f2a138

View File

@@ -291,6 +291,15 @@ class command_yes(HoneyPotCommand):
self.exit()
commands['/usr/bin/yes'] = command_yes
class command_sh(HoneyPotCommand):
def call(self):
if len(self.args) and self.args[0].strip() == '-c':
self.honeypot.cmdstack[0].cmdpending.append(
' '.join(self.args[1:]))
commands['/bin/bash'] = command_sh
commands['/bin/sh'] = command_sh
class command_chmod(HoneyPotCommand):
def call(self):
if len(self.args) < 2:
@@ -442,8 +451,6 @@ commands['set'] = command_nop
commands['unset'] = command_nop
commands['export'] = command_nop
commands['alias'] = command_nop
commands['/bin/bash'] = command_nop
commands['/bin/sh'] = command_nop
commands['/bin/kill'] = command_nop
commands['/bin/su'] = command_nop
commands['/bin/chown'] = command_nop