From 95f1e3cb7bca143b3b744174d9754e1e312b6251 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 6 Oct 2022 12:48:15 +0200 Subject: [PATCH] Agent: Modify tags methods to be properties in SSHExploiter --- monkey/infection_monkey/exploit/sshexec.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/monkey/infection_monkey/exploit/sshexec.py b/monkey/infection_monkey/exploit/sshexec.py index 59848b06a..9d88c0472 100644 --- a/monkey/infection_monkey/exploit/sshexec.py +++ b/monkey/infection_monkey/exploit/sshexec.py @@ -3,7 +3,7 @@ import logging from ipaddress import IPv4Address from pathlib import PurePath from time import time -from typing import Optional, Tuple +from typing import Optional import paramiko @@ -49,11 +49,8 @@ SSH_EXPLOITER_TAG = "ssh-exploiter" class SSHExploiter(HostExploiter): _EXPLOITED_SERVICE = "SSH" - def _exploiter_tags(self) -> Tuple[str, ...]: - return (SSH_EXPLOITER_TAG, T1110_ATTACK_TECHNIQUE_TAG, T1021_ATTACK_TECHNIQUE_TAG) - - def _propagation_tags(self) -> Tuple[str, ...]: - return (SSH_EXPLOITER_TAG, T1105_ATTACK_TECHNIQUE_TAG, T1222_ATTACK_TECHNIQUE_TAG) + _EXPLOITER_TAGS = (SSH_EXPLOITER_TAG, T1110_ATTACK_TECHNIQUE_TAG, T1021_ATTACK_TECHNIQUE_TAG) + _PROPAGATION_TAGS = (SSH_EXPLOITER_TAG, T1105_ATTACK_TECHNIQUE_TAG, T1222_ATTACK_TECHNIQUE_TAG) def __init__(self): super(SSHExploiter, self).__init__()