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,16 +176,17 @@ 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
|
||||||
self._exploiters = sorted(self._exploiters, key=lambda exploiter_: exploiter_.EXPLOIT_TYPE.value)
|
if WormConfiguration.should_exploit:
|
||||||
host_exploited = False
|
self._exploiters = sorted(self._exploiters, key=lambda exploiter_: exploiter_.EXPLOIT_TYPE.value)
|
||||||
for exploiter in [exploiter(machine) for exploiter in self._exploiters]:
|
host_exploited = False
|
||||||
if self.try_exploiting(machine, exploiter):
|
for exploiter in [exploiter(machine) for exploiter in self._exploiters]:
|
||||||
host_exploited = True
|
if self.try_exploiting(machine, exploiter):
|
||||||
VictimHostTelem('T1210', ScanStatus.USED.value, machine=machine).send()
|
host_exploited = True
|
||||||
break
|
VictimHostTelem('T1210', ScanStatus.USED.value, machine=machine).send()
|
||||||
if not host_exploited:
|
break
|
||||||
self._fail_exploitation_machines.add(machine)
|
if not host_exploited:
|
||||||
VictimHostTelem('T1210', ScanStatus.SCANNED.value, machine=machine).send()
|
self._fail_exploitation_machines.add(machine)
|
||||||
|
VictimHostTelem('T1210', ScanStatus.SCANNED.value, machine=machine).send()
|
||||||
if not self._keep_running:
|
if not self._keep_running:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -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,31 +21,39 @@ 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 = {
|
||||||
behaviour: {
|
basic: {"ui:order": ["general", "credentials"]},
|
||||||
custom_PBA_linux_cmd: {
|
basic_network: {},
|
||||||
"ui:widget": "textarea",
|
monkey: {
|
||||||
"ui:emptyValue": ""
|
behaviour: {
|
||||||
},
|
custom_PBA_linux_cmd: {
|
||||||
PBA_linux_file: {
|
"ui:widget": "textarea",
|
||||||
"ui:widget": this.PBAlinux
|
"ui:emptyValue": ""
|
||||||
},
|
},
|
||||||
custom_PBA_windows_cmd: {
|
PBA_linux_file: {
|
||||||
"ui:widget": "textarea",
|
"ui:widget": this.PBAlinux
|
||||||
"ui:emptyValue": ""
|
},
|
||||||
},
|
custom_PBA_windows_cmd: {
|
||||||
PBA_windows_file: {
|
"ui:widget": "textarea",
|
||||||
"ui:widget": this.PBAwindows
|
"ui:emptyValue": ""
|
||||||
},
|
},
|
||||||
PBA_linux_filename: {
|
PBA_windows_file: {
|
||||||
classNames: "linux-pba-file-info",
|
"ui:widget": this.PBAwindows
|
||||||
"ui:emptyValue": ""
|
},
|
||||||
},
|
PBA_linux_filename: {
|
||||||
PBA_windows_filename: {
|
classNames: "linux-pba-file-info",
|
||||||
classNames: "windows-pba-file-info",
|
"ui:emptyValue": ""
|
||||||
"ui:emptyValue": ""
|
},
|
||||||
|
PBA_windows_filename: {
|
||||||
|
classNames: "windows-pba-file-info",
|
||||||
|
"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