forked from p15670423/monkey
Island: Remove usage of deleted add_credentials_to_node function
This commit is contained in:
parent
adc1010355
commit
4fcb28516d
|
@ -18,7 +18,6 @@ def process_exploit_telemetry(telemetry_json):
|
||||||
encrypt_exploit_creds(telemetry_json)
|
encrypt_exploit_creds(telemetry_json)
|
||||||
edge = get_edge_by_scan_or_exploit_telemetry(telemetry_json)
|
edge = get_edge_by_scan_or_exploit_telemetry(telemetry_json)
|
||||||
update_network_with_exploit(edge, telemetry_json)
|
update_network_with_exploit(edge, telemetry_json)
|
||||||
update_node_credentials_from_successful_attempts(edge, 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"]),
|
||||||
|
@ -29,16 +28,6 @@ def process_exploit_telemetry(telemetry_json):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def update_node_credentials_from_successful_attempts(edge: EdgeService, telemetry_json):
|
|
||||||
for attempt in telemetry_json["data"]["attempts"]:
|
|
||||||
if attempt["result"]:
|
|
||||||
found_creds = {"user": attempt["user"]}
|
|
||||||
for field in ["password", "lm_hash", "ntlm_hash", "ssh_key"]:
|
|
||||||
if len(attempt[field]) != 0:
|
|
||||||
found_creds[field] = attempt[field]
|
|
||||||
NodeService.add_credentials_to_node(edge.dst_node_id, found_creds)
|
|
||||||
|
|
||||||
|
|
||||||
def update_network_with_exploit(edge: EdgeService, telemetry_json):
|
def update_network_with_exploit(edge: EdgeService, telemetry_json):
|
||||||
telemetry_json["data"]["info"]["started"] = dateutil.parser.parse(
|
telemetry_json["data"]["info"]["started"] = dateutil.parser.parse(
|
||||||
telemetry_json["data"]["info"]["started"]
|
telemetry_json["data"]["info"]["started"]
|
||||||
|
|
Loading…
Reference in New Issue