コード例 #1
0
ファイル: T1021.py プロジェクト: zkbupt/monkey
 def get_technique_status_and_data():
     attempts = []
     if mongo.db.telemetry.count_documents(T1021.scanned_query):
         attempts = list(mongo.db.telemetry.aggregate(T1021.query))
         if attempts:
             status = ScanStatus.USED.value
             for result in attempts:
                 result['successful_creds'] = []
                 for attempt in result['attempts']:
                     result['successful_creds'].append(parse_creds(attempt))
         else:
             status = ScanStatus.SCANNED.value
     else:
         status = ScanStatus.UNSCANNED.value
     return (status, attempts)
コード例 #2
0
        def get_technique_status_and_data():
            attempts = list(mongo.db.telemetry.aggregate(T1110.query))
            succeeded = False

            for result in attempts:
                result['successful_creds'] = []
                for attempt in result['attempts']:
                    succeeded = True
                    result['successful_creds'].append(parse_creds(attempt))

            if succeeded:
                status = ScanStatus.USED.value
            elif attempts:
                status = ScanStatus.SCANNED.value
            else:
                status = ScanStatus.UNSCANNED.value
            return (status, attempts)
コード例 #3
0
ファイル: T1021.py プロジェクト: wau/monkey
 def get_report_data():
     attempts = []
     if mongo.db.telemetry.count_documents(T1021.scanned_query):
         attempts = list(mongo.db.telemetry.aggregate(T1021.query))
         if attempts:
             status = ScanStatus.USED.value
             for result in attempts:
                 result['successful_creds'] = []
                 for attempt in result['attempts']:
                     result['successful_creds'].append(parse_creds(attempt))
         else:
             status = ScanStatus.SCANNED.value
     else:
         status = ScanStatus.UNSCANNED.value
     data = T1021.get_base_data_by_status(status)
     data.update({'services': attempts})
     return data
コード例 #4
0
    def get_report_data():
        attempts = list(mongo.db.telemetry.aggregate(T1110.query))
        succeeded = False

        for result in attempts:
            result['successful_creds'] = []
            for attempt in result['attempts']:
                succeeded = True
                result['successful_creds'].append(parse_creds(attempt))

        if succeeded:
            status = ScanStatus.USED.value
        elif attempts:
            status = ScanStatus.SCANNED.value
        else:
            status = ScanStatus.UNSCANNED.value
        data = T1110.get_base_data_by_status(status)
        # Remove data with no successful brute force attempts
        attempts = [attempt for attempt in attempts if attempt['attempts']]

        data.update({'services': attempts})
        return data