From d745e10bf111281b1300f7baed0765aaa775ea60 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 16 Aug 2022 12:39:59 +0530 Subject: [PATCH] Agent: Accept event queue in Mimikatz collector's constructor --- .../mimikatz_collector/mimikatz_credential_collector.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_credential_collector.py b/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_credential_collector.py index e6bc04a31..e723b723c 100644 --- a/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_credential_collector.py +++ b/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_credential_collector.py @@ -2,6 +2,7 @@ import logging from typing import Sequence from common.credentials import Credentials, LMHash, NTHash, Password, Username +from common.event_queue import IEventQueue from infection_monkey.i_puppet import ICredentialCollector from infection_monkey.model import USERNAME_PREFIX @@ -12,6 +13,9 @@ logger = logging.getLogger(__name__) class MimikatzCredentialCollector(ICredentialCollector): + def __init__(self, event_queue: IEventQueue): + self._event_queue = event_queue + def collect_credentials(self, options=None) -> Sequence[Credentials]: logger.info("Attempting to collect windows credentials with pypykatz.") windows_credentials = pypykatz_handler.get_windows_creds()