forked from p15670423/monkey
Added 'should_exploit' configuration field, minor fixes
This commit is contained in:
parent
cdd3270730
commit
c3aa316c07
|
@ -205,6 +205,7 @@ class Configuration(object):
|
||||||
# exploiters config
|
# exploiters config
|
||||||
###########################
|
###########################
|
||||||
|
|
||||||
|
should_exploit = True
|
||||||
skip_exploit_if_file_exist = False
|
skip_exploit_if_file_exist = False
|
||||||
|
|
||||||
ms08_067_exploit_attempts = 5
|
ms08_067_exploit_attempts = 5
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"should_exploit": true,
|
||||||
"command_servers": [
|
"command_servers": [
|
||||||
"192.0.2.0:5000"
|
"192.0.2.0:5000"
|
||||||
],
|
],
|
||||||
|
|
|
@ -176,6 +176,7 @@ class InfectionMonkey(object):
|
||||||
machine.set_default_server(self._default_server)
|
machine.set_default_server(self._default_server)
|
||||||
|
|
||||||
# Order exploits according to their type
|
# Order exploits according to their type
|
||||||
|
if WormConfiguration.should_exploit:
|
||||||
self._exploiters = sorted(self._exploiters, key=lambda exploiter_: exploiter_.EXPLOIT_TYPE.value)
|
self._exploiters = sorted(self._exploiters, key=lambda exploiter_: exploiter_.EXPLOIT_TYPE.value)
|
||||||
host_exploited = False
|
host_exploited = False
|
||||||
for exploiter in [exploiter(machine) for exploiter in self._exploiters]:
|
for exploiter in [exploiter(machine) for exploiter in self._exploiters]:
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Root(flask_restful.Resource):
|
||||||
if not action:
|
if not action:
|
||||||
return Root.get_server_info()
|
return Root.get_server_info()
|
||||||
elif action == "reset":
|
elif action == "reset":
|
||||||
return jwt_required()(Database.reset_db())
|
return jwt_required()(Database.reset_db)()
|
||||||
elif action == "killall":
|
elif action == "killall":
|
||||||
return Root.kill_all()
|
return Root.kill_all()
|
||||||
elif action == "is-up":
|
elif action == "is-up":
|
||||||
|
|
|
@ -14,7 +14,7 @@ SCHEMA = {
|
||||||
"SmbExploiter"
|
"SmbExploiter"
|
||||||
],
|
],
|
||||||
"title": "SMB Exploiter",
|
"title": "SMB Exploiter",
|
||||||
"attack_techniques": ["T1110", "T1210", "T1075"]
|
"attack_techniques": ["T1110", "T1075"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -54,55 +54,49 @@ SCHEMA = {
|
||||||
"SSHExploiter"
|
"SSHExploiter"
|
||||||
],
|
],
|
||||||
"title": "SSH Exploiter",
|
"title": "SSH Exploiter",
|
||||||
"attack_techniques": ["T1110", "T1210"]
|
"attack_techniques": ["T1110"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"ShellShockExploiter"
|
"ShellShockExploiter"
|
||||||
],
|
],
|
||||||
"title": "ShellShock Exploiter",
|
"title": "ShellShock Exploiter"
|
||||||
"attack_techniques": ["T1210"]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"SambaCryExploiter"
|
"SambaCryExploiter"
|
||||||
],
|
],
|
||||||
"title": "SambaCry Exploiter",
|
"title": "SambaCry Exploiter"
|
||||||
"attack_techniques": ["T1210"]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"ElasticGroovyExploiter"
|
"ElasticGroovyExploiter"
|
||||||
],
|
],
|
||||||
"title": "ElasticGroovy Exploiter",
|
"title": "ElasticGroovy Exploiter"
|
||||||
"attack_techniques": ["T1210"]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"Struts2Exploiter"
|
"Struts2Exploiter"
|
||||||
],
|
],
|
||||||
"title": "Struts2 Exploiter",
|
"title": "Struts2 Exploiter"
|
||||||
"attack_techniques": ["T1210"]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"WebLogicExploiter"
|
"WebLogicExploiter"
|
||||||
],
|
],
|
||||||
"title": "Oracle Web Logic Exploiter",
|
"title": "Oracle Web Logic Exploiter"
|
||||||
"attack_techniques": ["T1210"]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"HadoopExploiter"
|
"HadoopExploiter"
|
||||||
],
|
],
|
||||||
"title": "Hadoop/Yarn Exploiter",
|
"title": "Hadoop/Yarn Exploiter"
|
||||||
"attack_techniques": ["T1210"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -184,9 +178,22 @@ SCHEMA = {
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"basic": {
|
"basic": {
|
||||||
"title": "Basic - Credentials",
|
"title": "Basic - Exploits",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"general": {
|
||||||
|
"title": "General",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"should_exploit": {
|
||||||
|
"title": "Exploit network machines",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": True,
|
||||||
|
"attack_techniques": ["T1210"],
|
||||||
|
"description": "Determines if monkey should try to safely exploit machines on the network"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"credentials": {
|
"credentials": {
|
||||||
"title": "Credentials",
|
"title": "Credentials",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -399,7 +406,7 @@ SCHEMA = {
|
||||||
"title": "Harvest Azure Credentials",
|
"title": "Harvest Azure Credentials",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": True,
|
"default": True,
|
||||||
"attack_techniques": ["T1110", "T1078"],
|
"attack_techniques": ["T1003", "T1078"],
|
||||||
"description":
|
"description":
|
||||||
"Determine if the Monkey should try to harvest password credentials from Azure VMs"
|
"Determine if the Monkey should try to harvest password credentials from Azure VMs"
|
||||||
},
|
},
|
||||||
|
@ -413,7 +420,7 @@ SCHEMA = {
|
||||||
"title": "Should use Mimikatz",
|
"title": "Should use Mimikatz",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": True,
|
"default": True,
|
||||||
"attack_techniques": ["T1110", "T1078"],
|
"attack_techniques": ["T1003", "T1078"],
|
||||||
"description": "Determines whether to use Mimikatz"
|
"description": "Determines whether to use Mimikatz"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,10 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
this.initialConfig = {};
|
this.initialConfig = {};
|
||||||
this.initialAttackConfig = {};
|
this.initialAttackConfig = {};
|
||||||
this.sectionsOrder = ['attack', 'basic', 'basic_network', 'monkey', 'cnc', 'network', 'exploits', 'internal'];
|
this.sectionsOrder = ['attack', 'basic', 'basic_network', 'monkey', 'cnc', 'network', 'exploits', 'internal'];
|
||||||
this.uiSchema = {
|
this.uiSchemas = {
|
||||||
|
basic: {"ui:order": ["general", "credentials"]},
|
||||||
|
basic_network: {},
|
||||||
|
monkey: {
|
||||||
behaviour: {
|
behaviour: {
|
||||||
custom_PBA_linux_cmd: {
|
custom_PBA_linux_cmd: {
|
||||||
"ui:widget": "textarea",
|
"ui:widget": "textarea",
|
||||||
|
@ -46,6 +49,11 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
"ui:emptyValue": ""
|
"ui:emptyValue": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
cnc: {},
|
||||||
|
network: {},
|
||||||
|
exploits: {},
|
||||||
|
internal: {}
|
||||||
};
|
};
|
||||||
// set schema from server
|
// set schema from server
|
||||||
this.state = {
|
this.state = {
|
||||||
|
@ -409,7 +417,7 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
displayedSchema['definitions'] = this.state.schema['definitions'];
|
displayedSchema['definitions'] = this.state.schema['definitions'];
|
||||||
}
|
}
|
||||||
let config_content = (<Form schema={displayedSchema}
|
let config_content = (<Form schema={displayedSchema}
|
||||||
uiSchema={this.uiSchema}
|
uiSchema={this.uiSchemas[this.state.selectedSection]}
|
||||||
formData={this.state.configuration[this.state.selectedSection]}
|
formData={this.state.configuration[this.state.selectedSection]}
|
||||||
onChange={this.onChange}
|
onChange={this.onChange}
|
||||||
noValidate={true}>
|
noValidate={true}>
|
||||||
|
|
Loading…
Reference in New Issue