Esempio n. 1
0
 def process_system_info_telemetry(telemetry_json):
     users_secrets = {}
     monkey_id = NodeService.get_monkey_by_guid(telemetry_json['monkey_guid']).get('_id')
     if 'ssh_info' in telemetry_json['data']:
         ssh_info = telemetry_json['data']['ssh_info']
         Telemetry.encrypt_system_info_ssh_keys(ssh_info)
         if telemetry_json['data']['network_info']['networks']:
             # We use user_name@machine_ip as the name of the ssh key stolen, thats why we need ip from telemetry
             Telemetry.add_ip_to_ssh_keys(telemetry_json['data']['network_info']['networks'][0], ssh_info)
         Telemetry.add_system_info_ssh_keys_to_config(ssh_info)
     if 'credentials' in telemetry_json['data']:
         creds = telemetry_json['data']['credentials']
         Telemetry.encrypt_system_info_creds(creds)
         Telemetry.add_system_info_creds_to_config(creds)
         Telemetry.replace_user_dot_with_comma(creds)
     if 'mimikatz' in telemetry_json['data']:
         users_secrets = mimikatz_utils.MimikatzSecrets.\
             extract_secrets_from_mimikatz(telemetry_json['data'].get('mimikatz', ''))
     if 'wmi' in telemetry_json['data']:
         wmi_handler = WMIHandler(monkey_id, telemetry_json['data']['wmi'], users_secrets)
         wmi_handler.process_and_handle_wmi_info()
     if 'aws' in telemetry_json['data']:
         if 'instance_id' in telemetry_json['data']['aws']:
             mongo.db.monkey.update_one({'_id': monkey_id},
                                        {'$set': {'aws_instance_id': telemetry_json['data']['aws']['instance_id']}})
Esempio n. 2
0
def process_wmi_info(telemetry_json):
    users_secrets = {}

    if "wmi" in telemetry_json["data"]:
        monkey_id = NodeService.get_monkey_by_guid(telemetry_json["monkey_guid"]).get("_id")
        wmi_handler = WMIHandler(monkey_id, telemetry_json["data"]["wmi"], users_secrets)
        wmi_handler.process_and_handle_wmi_info()
Esempio n. 3
0
def process_mimikatz_and_wmi_info(telemetry_json):
    users_secrets = {}
    if 'mimikatz' in telemetry_json['data']:
        users_secrets = mimikatz_utils.MimikatzSecrets. \
            extract_secrets_from_mimikatz(telemetry_json['data'].get('mimikatz', ''))
    if 'wmi' in telemetry_json['data']:
        monkey_id = NodeService.get_monkey_by_guid(telemetry_json['monkey_guid']).get('_id')
        wmi_handler = WMIHandler(monkey_id, telemetry_json['data']['wmi'], users_secrets)
        wmi_handler.process_and_handle_wmi_info()
Esempio n. 4
0
def process_wmi_info(telemetry_json):
    users_secrets = {}

    if 'wmi' in telemetry_json['data']:
        monkey_id = NodeService.get_monkey_by_guid(
            telemetry_json['monkey_guid']).get('_id')
        wmi_handler = WMIHandler(monkey_id, telemetry_json['data']['wmi'],
                                 users_secrets)
        wmi_handler.process_and_handle_wmi_info()