From 4fcb28516de560d1b5864040c6f86808d931262a Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 10 Mar 2022 18:43:49 +0100 Subject: [PATCH] Island: Remove usage of deleted add_credentials_to_node function --- .../cc/services/telemetry/processing/exploit.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/monkey/monkey_island/cc/services/telemetry/processing/exploit.py b/monkey/monkey_island/cc/services/telemetry/processing/exploit.py index da46cdcc7..dc5b2e638 100644 --- a/monkey/monkey_island/cc/services/telemetry/processing/exploit.py +++ b/monkey/monkey_island/cc/services/telemetry/processing/exploit.py @@ -18,7 +18,6 @@ def process_exploit_telemetry(telemetry_json): encrypt_exploit_creds(telemetry_json) edge = get_edge_by_scan_or_exploit_telemetry(telemetry_json) update_network_with_exploit(edge, telemetry_json) - update_node_credentials_from_successful_attempts(edge, telemetry_json) check_machine_exploited( 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): telemetry_json["data"]["info"]["started"] = dateutil.parser.parse( telemetry_json["data"]["info"]["started"]