diff --git a/monkey_island/cc/resources/telemetry.py b/monkey_island/cc/resources/telemetry.py index 768f976b9..d7b21035c 100644 --- a/monkey_island/cc/resources/telemetry.py +++ b/monkey_island/cc/resources/telemetry.py @@ -113,6 +113,8 @@ class Telemetry(flask_restful.Resource): @staticmethod def process_exploit_telemetry(telemetry_json): edge = Telemetry.get_edge_by_scan_or_exploit_telemetry(telemetry_json) + Telemetry.encrypt_exploit_creds(telemetry_json) + new_exploit = copy.deepcopy(telemetry_json['data']) new_exploit.pop('machine') @@ -125,8 +127,6 @@ class Telemetry(flask_restful.Resource): if new_exploit['result']: EdgeService.set_edge_exploited(edge) - Telemetry.encrypt_exploit_creds(telemetry_json) - for attempt in telemetry_json['data']['attempts']: if attempt['result']: found_creds = {'user': attempt['user']}