From 60f67f9ee40df3855e3a7eeb76a73ba896c653b3 Mon Sep 17 00:00:00 2001 From: Shreya Date: Wed, 15 Jul 2020 00:32:52 +0530 Subject: [PATCH] Update after pulling from develop --- .../cc/services/attack/technique_reports/T1053.py | 3 +++ .../cc/services/attack/technique_reports/T1136.py | 1 - .../cc/services/attack/technique_reports/T1168.py | 3 +++ .../cc/services/attack/technique_reports/pba_technique.py | 7 ++++--- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/services/attack/technique_reports/T1053.py b/monkey/monkey_island/cc/services/attack/technique_reports/T1053.py index 103f2409b..a25bcee91 100644 --- a/monkey/monkey_island/cc/services/attack/technique_reports/T1053.py +++ b/monkey/monkey_island/cc/services/attack/technique_reports/T1053.py @@ -1,4 +1,7 @@ from common.data.post_breach_consts import POST_BREACH_JOB_SCHEDULING +from common.utils.attack_utils import ScanStatus +from monkey_island.cc.database import mongo +from monkey_island.cc.services.attack.technique_reports import AttackTechnique from monkey_island.cc.services.attack.technique_reports.pba_technique import \ PostBreachTechnique diff --git a/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py b/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py index 2022aa3be..086a1c139 100644 --- a/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py +++ b/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py @@ -3,7 +3,6 @@ from common.data.post_breach_consts import ( from monkey_island.cc.services.attack.technique_reports.pba_technique import \ PostBreachTechnique - __author__ = "shreyamalviya" diff --git a/monkey/monkey_island/cc/services/attack/technique_reports/T1168.py b/monkey/monkey_island/cc/services/attack/technique_reports/T1168.py index d7390e913..34d5f9f4a 100644 --- a/monkey/monkey_island/cc/services/attack/technique_reports/T1168.py +++ b/monkey/monkey_island/cc/services/attack/technique_reports/T1168.py @@ -1,4 +1,7 @@ from common.data.post_breach_consts import POST_BREACH_JOB_SCHEDULING +from common.utils.attack_utils import ScanStatus +from monkey_island.cc.database import mongo +from monkey_island.cc.services.attack.technique_reports import AttackTechnique from monkey_island.cc.services.attack.technique_reports.pba_technique import \ PostBreachTechnique diff --git a/monkey/monkey_island/cc/services/attack/technique_reports/pba_technique.py b/monkey/monkey_island/cc/services/attack/technique_reports/pba_technique.py index f603b757e..a7ef96803 100644 --- a/monkey/monkey_island/cc/services/attack/technique_reports/pba_technique.py +++ b/monkey/monkey_island/cc/services/attack/technique_reports/pba_technique.py @@ -1,8 +1,8 @@ import abc -from monkey_island.cc.services.attack.attack_config import AttackConfig -from monkey_island.cc.database import mongo from common.utils.attack_utils import ScanStatus +from monkey_island.cc.database import mongo +from monkey_island.cc.services.attack.attack_config import AttackConfig from monkey_island.cc.services.attack.technique_reports import AttackTechnique @@ -41,9 +41,10 @@ class PostBreachTechnique(AttackTechnique, metaclass=abc.ABCMeta): info = list(mongo.db.telemetry.aggregate(cls.get_pba_query(cls.pba_names))) + status = ScanStatus.UNSCANNED.value if info: successful_PBAs = mongo.db.telemetry.count({ - '$or': [{'data.name': pba_name} for pba_name in post_breach_action_names], + '$or': [{'data.name': pba_name} for pba_name in cls.pba_names], 'data.result.1': True }) status = ScanStatus.USED.value if successful_PBAs else ScanStatus.SCANNED.value