forked from p15670423/monkey
Removed should exploit network machines config param - same will be achieved by removing all exploiters.
This commit is contained in:
parent
f70b2240e1
commit
eb4056ab7f
|
@ -196,17 +196,16 @@ class InfectionMonkey(object):
|
|||
LOG.debug("Default server for machine: %r set to %s" % (machine, machine.default_server))
|
||||
|
||||
# Order exploits according to their type
|
||||
if WormConfiguration.should_exploit:
|
||||
self._exploiters = sorted(self._exploiters, key=lambda exploiter_: exploiter_.EXPLOIT_TYPE.value)
|
||||
host_exploited = False
|
||||
for exploiter in [exploiter(machine) for exploiter in self._exploiters]:
|
||||
if self.try_exploiting(machine, exploiter):
|
||||
host_exploited = True
|
||||
VictimHostTelem('T1210', ScanStatus.USED, machine=machine).send()
|
||||
break
|
||||
if not host_exploited:
|
||||
self._fail_exploitation_machines.add(machine)
|
||||
VictimHostTelem('T1210', ScanStatus.SCANNED, machine=machine).send()
|
||||
self._exploiters = sorted(self._exploiters, key=lambda exploiter_: exploiter_.EXPLOIT_TYPE.value)
|
||||
host_exploited = False
|
||||
for exploiter in [exploiter(machine) for exploiter in self._exploiters]:
|
||||
if self.try_exploiting(machine, exploiter):
|
||||
host_exploited = True
|
||||
VictimHostTelem('T1210', ScanStatus.USED, machine=machine).send()
|
||||
break
|
||||
if not host_exploited:
|
||||
self._fail_exploitation_machines.add(machine)
|
||||
VictimHostTelem('T1210', ScanStatus.SCANNED, machine=machine).send()
|
||||
if not self._keep_running:
|
||||
break
|
||||
|
||||
|
|
|
@ -331,13 +331,6 @@ SCHEMA = {
|
|||
"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": {
|
||||
|
|
Loading…
Reference in New Issue