Common: Remove `supported_os` field for exploiters in configuration

This commit is contained in:
Shreya Malviya 2022-06-22 08:28:57 -07:00
parent 142eed72ac
commit 03037b5662
3 changed files with 14 additions and 37 deletions

View File

@ -1,7 +1,4 @@
from marshmallow import Schema, fields, post_load from marshmallow import Schema, fields, post_load
from marshmallow_enum import EnumField
from common import OperatingSystems
from .agent_sub_configurations import ( from .agent_sub_configurations import (
CustomPBAConfiguration, CustomPBAConfiguration,
@ -87,7 +84,6 @@ class ExploitationOptionsConfigurationSchema(Schema):
class ExploiterConfigurationSchema(Schema): class ExploiterConfigurationSchema(Schema):
name = fields.Str() name = fields.Str()
options = fields.Mapping() options = fields.Mapping()
supported_os = fields.List(EnumField(OperatingSystems))
@post_load @post_load
def _make_exploiter_configuration(self, data, **kwargs): def _make_exploiter_configuration(self, data, **kwargs):

View File

@ -1,8 +1,6 @@
from dataclasses import dataclass from dataclasses import dataclass
from typing import Dict, List from typing import Dict, List
from common import OperatingSystems
@dataclass(frozen=True) @dataclass(frozen=True)
class CustomPBAConfiguration: class CustomPBAConfiguration:
@ -54,7 +52,6 @@ class ExploitationOptionsConfiguration:
class ExploiterConfiguration: class ExploiterConfiguration:
name: str name: str
options: Dict options: Dict
supported_os: List[OperatingSystems]
@dataclass(frozen=True) @dataclass(frozen=True)

View File

@ -157,60 +157,44 @@ DEFAULT_AGENT_CONFIGURATION_JSON = """{
"brute_force": [ "brute_force": [
{ {
"name": "MSSQLExploiter", "name": "MSSQLExploiter",
"options": {}, "options": {}
"supported_os": [
"WINDOWS"
]
}, },
{ {
"name": "PowerShellExploiter", "name": "PowerShellExploiter",
"options": {}, "options": {}
"supported_os": [
"WINDOWS"
]
}, },
{ {
"name": "SSHExploiter", "name": "SSHExploiter",
"options": {}, "options": {}
"supported_os": [
"LINUX"
]
}, },
{ {
"name": "SmbExploiter", "name": "SmbExploiter",
"options": { "options": {
"smb_download_timeout": 30 "smb_download_timeout": 30
}, }
"supported_os": [
"WINDOWS"
]
}, },
{ {
"name": "WmiExploiter", "name": "WmiExploiter",
"options": { "options": {
"smb_download_timeout": 30 "smb_download_timeout": 30
}, }
"supported_os": [
"WINDOWS"
]
} }
], ],
"vulnerability": [ "vulnerability": [
{ {
"name": "HadoopExploiter", "name": "HadoopExploiter",
"options": {}, "options": {}
"supported_os": [
"LINUX",
"WINDOWS"
]
}, },
{ {
"name": "Log4ShellExploiter", "name": "Log4ShellExploiter",
"options": {}, "options": {}
"supported_os": [
"LINUX",
"WINDOWS"
]
} }
] ]
} }