mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-18 14:34:22 +01:00
add bash -c (Closes #104)
This commit is contained in:
@@ -291,6 +291,15 @@ class command_yes(HoneyPotCommand):
|
|||||||
self.exit()
|
self.exit()
|
||||||
commands['/usr/bin/yes'] = command_yes
|
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):
|
class command_chmod(HoneyPotCommand):
|
||||||
def call(self):
|
def call(self):
|
||||||
if len(self.args) < 2:
|
if len(self.args) < 2:
|
||||||
@@ -442,8 +451,6 @@ commands['set'] = command_nop
|
|||||||
commands['unset'] = command_nop
|
commands['unset'] = command_nop
|
||||||
commands['export'] = command_nop
|
commands['export'] = command_nop
|
||||||
commands['alias'] = command_nop
|
commands['alias'] = command_nop
|
||||||
commands['/bin/bash'] = command_nop
|
|
||||||
commands['/bin/sh'] = command_nop
|
|
||||||
commands['/bin/kill'] = command_nop
|
commands['/bin/kill'] = command_nop
|
||||||
commands['/bin/su'] = command_nop
|
commands['/bin/su'] = command_nop
|
||||||
commands['/bin/chown'] = command_nop
|
commands['/bin/chown'] = command_nop
|
||||||
|
|||||||
Reference in New Issue
Block a user