From 5d9416c385fc7024817f72eed67a703bf03777ab Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Tue, 4 Oct 2022 16:13:42 +0200 Subject: [PATCH] Agent: Use common.tags to publish events in SSHExploiter --- monkey/infection_monkey/exploit/sshexec.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/monkey/infection_monkey/exploit/sshexec.py b/monkey/infection_monkey/exploit/sshexec.py index 600a8c2e3..adbbff028 100644 --- a/monkey/infection_monkey/exploit/sshexec.py +++ b/monkey/infection_monkey/exploit/sshexec.py @@ -7,6 +7,12 @@ import paramiko from common import OperatingSystem from common.common_consts.timeouts import LONG_REQUEST_TIMEOUT, MEDIUM_REQUEST_TIMEOUT from common.credentials import get_plaintext +from common.tags import ( + T1021_ATTACK_TECHNIQUE_TAG, + T1105_ATTACK_TECHNIQUE_TAG, + T1110_ATTACK_TECHNIQUE_TAG, + T1222_ATTACK_TECHNIQUE_TAG, +) from common.utils import Timer from common.utils.attack_utils import ScanStatus from common.utils.exceptions import FailedExploitationError @@ -31,10 +37,6 @@ SSH_CHANNEL_TIMEOUT = MEDIUM_REQUEST_TIMEOUT TRANSFER_UPDATE_RATE = 15 SSH_EXPLOITER_TAG = "ssh-exploiter" -T1105_ATTACK_TECHNIQUE_TAG = "attack-t1105" -T1110_ATTACK_TECHNIQUE_TAG = "attack-t1110" -T1222_ATTACK_TECHNIQUE_TAG = "attack-t1222" -T1021_ATTACK_TECHNIQUE_TAG = "attack-t1021" class SSHExploiter(HostExploiter):