Agent: Define integer GUID and use it in ssh_handler
This commit is contained in:
parent
b22ccdb942
commit
39f07603a7
|
@ -2,3 +2,4 @@ import uuid
|
|||
|
||||
# TODO: Find a better place for this
|
||||
GUID = str(uuid.getnode())
|
||||
IGUID = uuid.getnode()
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import glob
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import uuid
|
||||
from time import time
|
||||
from typing import Dict, Iterable
|
||||
|
||||
from common.credentials import Credentials, SSHKeypair, Username
|
||||
from common.event_queue import IEventQueue
|
||||
from common.events import CredentialsStolenEvent
|
||||
from common.utils.attack_utils import ScanStatus
|
||||
from infection_monkey.config import IGUID
|
||||
from infection_monkey.telemetry.attack.t1005_telem import T1005Telem
|
||||
from infection_monkey.telemetry.attack.t1145_telem import T1145Telem
|
||||
from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger
|
||||
|
@ -136,9 +136,9 @@ def _get_ssh_files(
|
|||
|
||||
def _publish_credentials_stolen_event(collected_credentials: Credentials, event_queue: IEventQueue):
|
||||
credentials_stolen_event = CredentialsStolenEvent(
|
||||
source=uuid.getnode(),
|
||||
source=IGUID,
|
||||
target=None,
|
||||
timestamp=time.time(),
|
||||
timestamp=time(),
|
||||
tags=frozenset({SSH_CREDENTIAL_COLLECTOR_TAG, "T1005", "T1145"}),
|
||||
stolen_credentials=[collected_credentials],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue