Agent: Use common.tags to publish events in SSHExploiter

This commit is contained in:
Ilija Lazoroski 2022-10-04 16:13:42 +02:00
parent 5948537d4a
commit 5d9416c385
1 changed files with 6 additions and 4 deletions

View File

@ -7,6 +7,12 @@ import paramiko
from common import OperatingSystem from common import OperatingSystem
from common.common_consts.timeouts import LONG_REQUEST_TIMEOUT, MEDIUM_REQUEST_TIMEOUT from common.common_consts.timeouts import LONG_REQUEST_TIMEOUT, MEDIUM_REQUEST_TIMEOUT
from common.credentials import get_plaintext 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 import Timer
from common.utils.attack_utils import ScanStatus from common.utils.attack_utils import ScanStatus
from common.utils.exceptions import FailedExploitationError from common.utils.exceptions import FailedExploitationError
@ -31,10 +37,6 @@ SSH_CHANNEL_TIMEOUT = MEDIUM_REQUEST_TIMEOUT
TRANSFER_UPDATE_RATE = 15 TRANSFER_UPDATE_RATE = 15
SSH_EXPLOITER_TAG = "ssh-exploiter" 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): class SSHExploiter(HostExploiter):