diff --git a/monkey/infection_monkey/exploit/smbexec.py b/monkey/infection_monkey/exploit/smbexec.py index 9a572135c..618a04afa 100644 --- a/monkey/infection_monkey/exploit/smbexec.py +++ b/monkey/infection_monkey/exploit/smbexec.py @@ -9,6 +9,12 @@ from impacket.dcerpc.v5.scmr import DCERPCSessionError from common.common_consts.timeouts import LONG_REQUEST_TIMEOUT from common.credentials import get_plaintext +from common.tags import ( + T1021_ATTACK_TECHNIQUE_TAG, + T1105_ATTACK_TECHNIQUE_TAG, + T1110_ATTACK_TECHNIQUE_TAG, + T1210_ATTACK_TECHNIQUE_TAG, +) from common.utils.attack_utils import ScanStatus, UsageEnum from infection_monkey.exploit.HostExploiter import HostExploiter from infection_monkey.exploit.tools.helpers import get_agent_dst_path @@ -23,6 +29,7 @@ from infection_monkey.utils.commands import build_monkey_commandline from infection_monkey.utils.threading import interruptible_iter logger = getLogger(__name__) +SMBEXEC_EXPLOITER_TAG = "smbexec-exploiter" @dataclass @@ -42,6 +49,22 @@ class SMBExploiter(HostExploiter): USE_KERBEROS = False SMB_SERVICE_NAME = "InfectionMonkey" + def _EXPLOITER_TAGS(self) -> Tuple[str, ...]: + return ( + SMBEXEC_EXPLOITER_TAG, + T1021_ATTACK_TECHNIQUE_TAG, + T1110_ATTACK_TECHNIQUE_TAG, + T1210_ATTACK_TECHNIQUE_TAG, + ) + + def _PROPAGATION_TAGS(self) -> Tuple[str, ...]: + return ( + SMBEXEC_EXPLOITER_TAG, + T1021_ATTACK_TECHNIQUE_TAG, + T1105_ATTACK_TECHNIQUE_TAG, + T1210_ATTACK_TECHNIQUE_TAG, + ) + def _exploit_host(self): dest_path = get_agent_dst_path(self.host)