monkey/chaos_monkey/exploit/__init__.py

21 lines
529 B
Python
Raw Normal View History

2015-08-30 15:27:35 +08:00
from abc import ABCMeta, abstractmethod
2015-11-30 16:56:20 +08:00
from win_ms08_067 import Ms08_067_Exploiter
from wmiexec import WmiExploiter
from smbexec import SmbExploiter
from rdpgrinder import RdpExploiter
from sshexec import SSHExploiter
2015-08-30 15:27:35 +08:00
__author__ = 'itamar'
2015-11-30 16:56:20 +08:00
2015-08-30 15:27:35 +08:00
class HostExploiter(object):
__metaclass__ = ABCMeta
_target_os_type = []
def is_os_supported(self, host):
2015-11-30 16:56:20 +08:00
return host.os.get('type') in self._target_os_type
2015-08-30 15:27:35 +08:00
@abstractmethod
def exploit_host(self, host, src_path=None):
2015-08-30 15:27:35 +08:00
raise NotImplementedError()