forked from p34709852/monkey
Common: Remove `supported_os` field for exploiters in configuration
This commit is contained in:
parent
142eed72ac
commit
03037b5662
|
@ -1,7 +1,4 @@
|
|||
from marshmallow import Schema, fields, post_load
|
||||
from marshmallow_enum import EnumField
|
||||
|
||||
from common import OperatingSystems
|
||||
|
||||
from .agent_sub_configurations import (
|
||||
CustomPBAConfiguration,
|
||||
|
@ -87,7 +84,6 @@ class ExploitationOptionsConfigurationSchema(Schema):
|
|||
class ExploiterConfigurationSchema(Schema):
|
||||
name = fields.Str()
|
||||
options = fields.Mapping()
|
||||
supported_os = fields.List(EnumField(OperatingSystems))
|
||||
|
||||
@post_load
|
||||
def _make_exploiter_configuration(self, data, **kwargs):
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
from dataclasses import dataclass
|
||||
from typing import Dict, List
|
||||
|
||||
from common import OperatingSystems
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class CustomPBAConfiguration:
|
||||
|
@ -54,7 +52,6 @@ class ExploitationOptionsConfiguration:
|
|||
class ExploiterConfiguration:
|
||||
name: str
|
||||
options: Dict
|
||||
supported_os: List[OperatingSystems]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
|
@ -157,60 +157,44 @@ DEFAULT_AGENT_CONFIGURATION_JSON = """{
|
|||
"brute_force": [
|
||||
{
|
||||
"name": "MSSQLExploiter",
|
||||
"options": {},
|
||||
"supported_os": [
|
||||
"WINDOWS"
|
||||
]
|
||||
"options": {}
|
||||
|
||||
},
|
||||
{
|
||||
"name": "PowerShellExploiter",
|
||||
"options": {},
|
||||
"supported_os": [
|
||||
"WINDOWS"
|
||||
]
|
||||
"options": {}
|
||||
|
||||
},
|
||||
{
|
||||
"name": "SSHExploiter",
|
||||
"options": {},
|
||||
"supported_os": [
|
||||
"LINUX"
|
||||
]
|
||||
"options": {}
|
||||
|
||||
},
|
||||
{
|
||||
"name": "SmbExploiter",
|
||||
"options": {
|
||||
"smb_download_timeout": 30
|
||||
},
|
||||
"supported_os": [
|
||||
"WINDOWS"
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"name": "WmiExploiter",
|
||||
"options": {
|
||||
"smb_download_timeout": 30
|
||||
},
|
||||
"supported_os": [
|
||||
"WINDOWS"
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"vulnerability": [
|
||||
{
|
||||
"name": "HadoopExploiter",
|
||||
"options": {},
|
||||
"supported_os": [
|
||||
"LINUX",
|
||||
"WINDOWS"
|
||||
]
|
||||
"options": {}
|
||||
|
||||
},
|
||||
{
|
||||
"name": "Log4ShellExploiter",
|
||||
"options": {},
|
||||
"supported_os": [
|
||||
"LINUX",
|
||||
"WINDOWS"
|
||||
]
|
||||
"options": {}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue