forked from p15670423/monkey
Agent: Rename variables to make more sense
This commit is contained in:
parent
a9e000f100
commit
125412ee18
|
@ -18,7 +18,7 @@ class UnknownPluginError(Exception):
|
||||||
|
|
||||||
ExploiterResultData = namedtuple(
|
ExploiterResultData = namedtuple(
|
||||||
"ExploiterResultData",
|
"ExploiterResultData",
|
||||||
["exploit_success", "propagation_success", "os", "info", "attempts", "error_message"],
|
["exploitation_success", "propagation_success", "os", "info", "attempts", "error_message"],
|
||||||
)
|
)
|
||||||
PingScanData = namedtuple("PingScanData", ["response_received", "os"])
|
PingScanData = namedtuple("PingScanData", ["response_received", "os"])
|
||||||
PortScanData = namedtuple("PortScanData", ["port", "status", "banner", "service"])
|
PortScanData = namedtuple("PortScanData", ["port", "status", "banner", "service"])
|
||||||
|
|
|
@ -102,7 +102,7 @@ class MockMaster(IMaster):
|
||||||
def _exploit(self):
|
def _exploit(self):
|
||||||
logger.info("Exploiting victims")
|
logger.info("Exploiting victims")
|
||||||
(
|
(
|
||||||
exploit_result,
|
exploitation_result,
|
||||||
propagation_result,
|
propagation_result,
|
||||||
os,
|
os,
|
||||||
info,
|
info,
|
||||||
|
@ -114,7 +114,7 @@ class MockMaster(IMaster):
|
||||||
ExploitTelem(
|
ExploitTelem(
|
||||||
"PowerShellExploiter",
|
"PowerShellExploiter",
|
||||||
self._hosts["10.0.0.1"],
|
self._hosts["10.0.0.1"],
|
||||||
exploit_result,
|
exploitation_result,
|
||||||
propagation_result,
|
propagation_result,
|
||||||
info,
|
info,
|
||||||
attempts,
|
attempts,
|
||||||
|
@ -122,7 +122,7 @@ class MockMaster(IMaster):
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
exploit_result,
|
exploitation_result,
|
||||||
propagation_result,
|
propagation_result,
|
||||||
os,
|
os,
|
||||||
info,
|
info,
|
||||||
|
@ -134,7 +134,7 @@ class MockMaster(IMaster):
|
||||||
ExploitTelem(
|
ExploitTelem(
|
||||||
"SSHExploiter",
|
"SSHExploiter",
|
||||||
self._hosts["10.0.0.3"],
|
self._hosts["10.0.0.3"],
|
||||||
exploit_result,
|
exploitation_result,
|
||||||
propagation_result,
|
propagation_result,
|
||||||
info,
|
info,
|
||||||
attempts,
|
attempts,
|
||||||
|
|
|
@ -155,7 +155,7 @@ class Propagator:
|
||||||
):
|
):
|
||||||
if result.propagation_success:
|
if result.propagation_success:
|
||||||
logger.info(f"Successfully propagated to {host} using {exploiter_name}")
|
logger.info(f"Successfully propagated to {host} using {exploiter_name}")
|
||||||
elif result.exploit_success:
|
elif result.exploitation_success:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Successfully exploited (but did not propagate to) {host} using {exploiter_name}"
|
f"Successfully exploited (but did not propagate to) {host} using {exploiter_name}"
|
||||||
)
|
)
|
||||||
|
@ -169,7 +169,7 @@ class Propagator:
|
||||||
ExploitTelem(
|
ExploitTelem(
|
||||||
exploiter_name,
|
exploiter_name,
|
||||||
host,
|
host,
|
||||||
result.exploit_success,
|
result.exploitation_success,
|
||||||
result.propagation_success,
|
result.propagation_success,
|
||||||
result.info,
|
result.info,
|
||||||
result.attempts,
|
result.attempts,
|
||||||
|
|
|
@ -10,7 +10,7 @@ class ExploitTelem(BaseTelem):
|
||||||
self,
|
self,
|
||||||
name: str,
|
name: str,
|
||||||
host: VictimHost,
|
host: VictimHost,
|
||||||
exploit_result: bool,
|
exploitation_result: bool,
|
||||||
propagation_result: bool,
|
propagation_result: bool,
|
||||||
info: Dict,
|
info: Dict,
|
||||||
attempts: List,
|
attempts: List,
|
||||||
|
@ -19,8 +19,10 @@ class ExploitTelem(BaseTelem):
|
||||||
Default exploit telemetry constructor
|
Default exploit telemetry constructor
|
||||||
:param name: The name of exploiter used
|
:param name: The name of exploiter used
|
||||||
:param host: The host machine
|
:param host: The host machine
|
||||||
:param exploit_result: The result of exploitation from the 'exploit_host' method
|
:param exploitation_result: The result of the exploitation attempt from the 'exploit_host'
|
||||||
:param propagation_result: The result of propagation from the 'exploit_host' method
|
method
|
||||||
|
:param propagation_result: The result of the propagation attempt from the 'exploit_host'
|
||||||
|
method
|
||||||
:param info: Information about the exploiter
|
:param info: Information about the exploiter
|
||||||
:param attempts: Information about the exploiter's attempts
|
:param attempts: Information about the exploiter's attempts
|
||||||
"""
|
"""
|
||||||
|
@ -28,7 +30,7 @@ class ExploitTelem(BaseTelem):
|
||||||
|
|
||||||
self.name = name
|
self.name = name
|
||||||
self.host = host.__dict__
|
self.host = host.__dict__
|
||||||
self.exploit_result = exploit_result
|
self.exploitation_result = exploitation_result
|
||||||
self.propagation_result = propagation_result
|
self.propagation_result = propagation_result
|
||||||
self.info = info
|
self.info = info
|
||||||
self.attempts = attempts
|
self.attempts = attempts
|
||||||
|
@ -37,7 +39,7 @@ class ExploitTelem(BaseTelem):
|
||||||
|
|
||||||
def get_data(self) -> Dict:
|
def get_data(self) -> Dict:
|
||||||
return {
|
return {
|
||||||
"exploit_result": self.exploit_result,
|
"exploitation_result": self.exploitation_result,
|
||||||
"propagation_result": self.propagation_result,
|
"propagation_result": self.propagation_result,
|
||||||
"machine": self.host,
|
"machine": self.host,
|
||||||
"exploiter": self.name,
|
"exploiter": self.name,
|
||||||
|
|
Loading…
Reference in New Issue