diff --git a/chaos_monkey/exploit/elasticgroovy.py b/chaos_monkey/exploit/elasticgroovy.py index de415aa79..f5a12e3ce 100644 --- a/chaos_monkey/exploit/elasticgroovy.py +++ b/chaos_monkey/exploit/elasticgroovy.py @@ -20,8 +20,6 @@ LOG = logging.getLogger(__name__) class ElasticGroovyExploiter(HostExploiter): - _target_os_type = ['linux', 'windows'] - # attack URLs BASE_URL = 'http://%s:%s/_search?pretty' MONKEY_RESULT_FIELD = "monkey_result" @@ -38,6 +36,7 @@ class ElasticGroovyExploiter(HostExploiter): def __init__(self, host): super(ElasticGroovyExploiter, self).__init__(host) + self._target_os_type = ['linux', 'windows'] self._config = __import__('config').WormConfiguration self.skip_exist = self._config.skip_exploit_if_file_exist diff --git a/chaos_monkey/exploit/rdpgrinder.py b/chaos_monkey/exploit/rdpgrinder.py index 34bbba5d7..03fe76ddc 100644 --- a/chaos_monkey/exploit/rdpgrinder.py +++ b/chaos_monkey/exploit/rdpgrinder.py @@ -232,10 +232,10 @@ class CMDClientFactory(rdp.ClientFactory): class RdpExploiter(HostExploiter): - _target_os_type = ['windows'] def __init__(self, host): super(RdpExploiter, self).__init__(host) + self._target_os_type = ['windows'] self._config = __import__('config').WormConfiguration self._guid = __import__('config').GUID diff --git a/chaos_monkey/exploit/sambacry.py b/chaos_monkey/exploit/sambacry.py index d40306b57..db5cae191 100644 --- a/chaos_monkey/exploit/sambacry.py +++ b/chaos_monkey/exploit/sambacry.py @@ -31,7 +31,6 @@ class SambaCryExploiter(HostExploiter): SambaCry exploit module, partially based on the following implementation by CORE Security Technologies' impacket: https://github.com/CoreSecurity/impacket/blob/master/examples/sambaPipe.py """ - _target_os_type = ['linux'] # Name of file which contains the monkey's commandline SAMBACRY_COMMANDLINE_FILENAME = "monkey_commandline.txt" @@ -52,6 +51,7 @@ class SambaCryExploiter(HostExploiter): def __init__(self, host): super(SambaCryExploiter, self).__init__(host) + self._target_os_type = ['linux'] self._config = __import__('config').WormConfiguration def exploit_host(self): diff --git a/chaos_monkey/exploit/shellshock.py b/chaos_monkey/exploit/shellshock.py index 2f6ef3577..5853ff99a 100644 --- a/chaos_monkey/exploit/shellshock.py +++ b/chaos_monkey/exploit/shellshock.py @@ -21,14 +21,13 @@ DOWNLOAD_TIMEOUT = 300 # copied from rdpgrinder class ShellShockExploiter(HostExploiter): - _target_os_type = ['linux'] - _attacks = { "Content-type": "() { :;}; echo; " } def __init__(self, host): super(ShellShockExploiter, self).__init__(host) + self._target_os_type = ['linux'] self._config = __import__('config').WormConfiguration self.HTTP = [str(port) for port in self._config.HTTP_PORTS] self.success_flag = ''.join( diff --git a/chaos_monkey/exploit/smbexec.py b/chaos_monkey/exploit/smbexec.py index b370ea4ef..8e3a74c59 100644 --- a/chaos_monkey/exploit/smbexec.py +++ b/chaos_monkey/exploit/smbexec.py @@ -14,8 +14,6 @@ LOG = getLogger(__name__) class SmbExploiter(HostExploiter): - _target_os_type = ['windows'] - KNOWN_PROTOCOLS = { '139/SMB': (r'ncacn_np:%s[\pipe\svcctl]', 139), '445/SMB': (r'ncacn_np:%s[\pipe\svcctl]', 445), @@ -24,6 +22,7 @@ class SmbExploiter(HostExploiter): def __init__(self, host): super(SmbExploiter, self).__init__(host) + self._target_os_type = ['windows'] self._config = __import__('config').WormConfiguration self._guid = __import__('config').GUID diff --git a/chaos_monkey/exploit/sshexec.py b/chaos_monkey/exploit/sshexec.py index 61b4a3d66..479c1b26b 100644 --- a/chaos_monkey/exploit/sshexec.py +++ b/chaos_monkey/exploit/sshexec.py @@ -18,10 +18,10 @@ TRANSFER_UPDATE_RATE = 15 class SSHExploiter(HostExploiter): - _target_os_type = ['linux', None] def __init__(self, host): super(SSHExploiter, self).__init__(host) + self._target_os_type = ['linux', None] self._config = __import__('config').WormConfiguration self._update_timestamp = 0 self.skip_exist = self._config.skip_exploit_if_file_exist diff --git a/chaos_monkey/exploit/win_ms08_067.py b/chaos_monkey/exploit/win_ms08_067.py index 7d94f4db5..604f4e8cb 100644 --- a/chaos_monkey/exploit/win_ms08_067.py +++ b/chaos_monkey/exploit/win_ms08_067.py @@ -152,12 +152,12 @@ class SRVSVC_Exploit(object): class Ms08_067_Exploiter(HostExploiter): - _target_os_type = ['windows'] _windows_versions = {'Windows Server 2003 3790 Service Pack 2': WindowsVersion.Windows2003_SP2, 'Windows Server 2003 R2 3790 Service Pack 2': WindowsVersion.Windows2003_SP2} def __init__(self, host): super(Ms08_067_Exploiter, self).__init__(host) + self._target_os_type = ['windows'] self._config = __import__('config').WormConfiguration self._guid = __import__('config').GUID diff --git a/chaos_monkey/exploit/wmiexec.py b/chaos_monkey/exploit/wmiexec.py index 9ce6ff589..f2f3f3432 100644 --- a/chaos_monkey/exploit/wmiexec.py +++ b/chaos_monkey/exploit/wmiexec.py @@ -14,10 +14,9 @@ LOG = logging.getLogger(__name__) class WmiExploiter(HostExploiter): - _target_os_type = ['windows'] - def __init__(self, host): super(WmiExploiter, self).__init__(host) + self._target_os_type = ['windows'] self._config = __import__('config').WormConfiguration self._guid = __import__('config').GUID