forked from p34709852/monkey
Island: Modify exploit telemetry processing to conform to changes to ExploiterResultData
This commit is contained in:
parent
dff5bde894
commit
e47239f81c
|
@ -78,7 +78,7 @@ class EdgeService(Edge):
|
||||||
def update_based_on_exploit(self, exploit: Dict):
|
def update_based_on_exploit(self, exploit: Dict):
|
||||||
self.exploits.append(exploit)
|
self.exploits.append(exploit)
|
||||||
self.save()
|
self.save()
|
||||||
if exploit["result"]:
|
if exploit["exploitation_success"]:
|
||||||
self.set_exploited()
|
self.set_exploited()
|
||||||
|
|
||||||
def set_exploited(self):
|
def set_exploited(self):
|
||||||
|
|
|
@ -24,7 +24,7 @@ def process_exploit_telemetry(telemetry_json):
|
||||||
|
|
||||||
check_machine_exploited(
|
check_machine_exploited(
|
||||||
current_monkey=Monkey.get_single_monkey_by_guid(telemetry_json["monkey_guid"]),
|
current_monkey=Monkey.get_single_monkey_by_guid(telemetry_json["monkey_guid"]),
|
||||||
exploit_successful=telemetry_json["data"]["result"],
|
exploit_successful=telemetry_json["data"]["exploitation_success"],
|
||||||
exploiter=telemetry_json["data"]["exploiter"],
|
exploiter=telemetry_json["data"]["exploiter"],
|
||||||
target_ip=telemetry_json["data"]["machine"]["ip_addr"],
|
target_ip=telemetry_json["data"]["machine"]["ip_addr"],
|
||||||
timestamp=telemetry_json["timestamp"],
|
timestamp=telemetry_json["timestamp"],
|
||||||
|
@ -65,7 +65,7 @@ def update_network_with_exploit(edge: EdgeService, telemetry_json):
|
||||||
new_exploit.pop("machine")
|
new_exploit.pop("machine")
|
||||||
new_exploit["timestamp"] = telemetry_json["timestamp"]
|
new_exploit["timestamp"] = telemetry_json["timestamp"]
|
||||||
edge.update_based_on_exploit(new_exploit)
|
edge.update_based_on_exploit(new_exploit)
|
||||||
if new_exploit["result"]:
|
if new_exploit["exploitation_success"]:
|
||||||
NodeService.set_node_exploited(edge.dst_node_id)
|
NodeService.set_node_exploited(edge.dst_node_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue