monkey/chaos_monkey/exploit/__init__.py

22 lines
540 B
Python
Raw Normal View History

2015-08-30 15:27:35 +08:00
from abc import ABCMeta, abstractmethod
__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
2015-12-08 01:08:15 +08:00
def exploit_host(self, host, depth=-1, src_path=None):
2015-08-30 15:27:35 +08:00
raise NotImplementedError()
2015-11-30 20:11:19 +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