From d3a2fa8a4c626f7723cec80d4447022d260270c1 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 5 Oct 2022 16:29:41 +0200 Subject: [PATCH] Agent: Add zerologon exploiter tag to zerologon_utils --- monkey/infection_monkey/exploit/zerologon.py | 3 +-- monkey/infection_monkey/exploit/zerologon_utils/__init__.py | 1 + .../exploit/zerologon_utils/vuln_assessment.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/exploit/zerologon.py b/monkey/infection_monkey/exploit/zerologon.py index 2b0a6dd1a..97f0ea5e8 100644 --- a/monkey/infection_monkey/exploit/zerologon.py +++ b/monkey/infection_monkey/exploit/zerologon.py @@ -25,6 +25,7 @@ from common.tags import ( ) from infection_monkey.exploit.HostExploiter import HostExploiter from infection_monkey.exploit.tools.wmi_tools import WmiTools +from infection_monkey.exploit.zerologon_utils import ZEROLOGON_EXPLOITER_TAG from infection_monkey.exploit.zerologon_utils.dump_secrets import DumpSecrets from infection_monkey.exploit.zerologon_utils.options import OptionsForSecretsdump from infection_monkey.exploit.zerologon_utils.vuln_assessment import get_dc_details, is_exploitable @@ -36,8 +37,6 @@ from infection_monkey.utils.threading import interruptible_iter logger = logging.getLogger(__name__) -ZEROLOGON_EXPLOITER_TAG = "zerologon-exploiter" - EXPLOIT_TAGS = ( ZEROLOGON_EXPLOITER_TAG, T1003_ATTACK_TECHNIQUE_TAG, diff --git a/monkey/infection_monkey/exploit/zerologon_utils/__init__.py b/monkey/infection_monkey/exploit/zerologon_utils/__init__.py index e69de29bb..55ba61ffa 100644 --- a/monkey/infection_monkey/exploit/zerologon_utils/__init__.py +++ b/monkey/infection_monkey/exploit/zerologon_utils/__init__.py @@ -0,0 +1 @@ +ZEROLOGON_EXPLOITER_TAG = "zerologon-exploiter" diff --git a/monkey/infection_monkey/exploit/zerologon_utils/vuln_assessment.py b/monkey/infection_monkey/exploit/zerologon_utils/vuln_assessment.py index 434071165..17f41dec4 100644 --- a/monkey/infection_monkey/exploit/zerologon_utils/vuln_assessment.py +++ b/monkey/infection_monkey/exploit/zerologon_utils/vuln_assessment.py @@ -7,10 +7,11 @@ from impacket.dcerpc.v5 import nrpc, rpcrt from common.common_consts.timeouts import MEDIUM_REQUEST_TIMEOUT from common.tags import T1210_ATTACK_TECHNIQUE_TAG from common.utils.exceptions import DomainControllerNameFetchError -from infection_monkey.exploit.zerologon import ZEROLOGON_EXPLOITER_TAG from infection_monkey.model import VictimHost from infection_monkey.utils.threading import interruptible_iter +from . import ZEROLOGON_EXPLOITER_TAG + logger = logging.getLogger(__name__)