From 417f40d62d49c4fd6c27a711d8edbebe0a9bbadd Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Mon, 14 Feb 2022 17:13:59 +0530 Subject: [PATCH] Agent: Add TODOs in automated master and process collection list PBA --- monkey/infection_monkey/master/automated_master.py | 3 +++ .../post_breach/actions/collect_processes_list.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/master/automated_master.py b/monkey/infection_monkey/master/automated_master.py index 28994d673..c29e3c6f3 100644 --- a/monkey/infection_monkey/master/automated_master.py +++ b/monkey/infection_monkey/master/automated_master.py @@ -176,6 +176,9 @@ class AutomatedMaster(IMaster): ) def _run_pba(self, pba: Tuple[str, Dict]): + # TODO: This is the class's name right now. We need `display_name` (see the + # ProcessListCollection PBA). This is shown in the Security report as the PBA + # name and is checked against in the T1082's mongo query in the ATT&CK report. name = pba[0] options = pba[1] diff --git a/monkey/infection_monkey/post_breach/actions/collect_processes_list.py b/monkey/infection_monkey/post_breach/actions/collect_processes_list.py index 7e9e1b059..cae3658c4 100644 --- a/monkey/infection_monkey/post_breach/actions/collect_processes_list.py +++ b/monkey/infection_monkey/post_breach/actions/collect_processes_list.py @@ -16,6 +16,9 @@ except NameError: class ProcessListCollection(PBA): + # TODO: (?) Move all PBA consts into their classes + display_name = POST_BREACH_PROCESS_LIST_COLLECTION + def __init__(self): super().__init__(POST_BREACH_PROCESS_LIST_COLLECTION) @@ -51,4 +54,4 @@ class ProcessListCollection(PBA): } continue - return self.command, [str(processes), success_state] + return self.command, (str(processes), success_state)