forked from p15670423/monkey
Agent: Define SSH_COLLECTOR_EVENT_TAGS as a frozenset
This commit is contained in:
parent
5747c2e8b4
commit
2c3b29493f
|
@ -20,12 +20,14 @@ T1003_ATTACK_TECHNIQUE_TAG = "attack-t1003"
|
||||||
T1005_ATTACK_TECHNIQUE_TAG = "attack-t1005"
|
T1005_ATTACK_TECHNIQUE_TAG = "attack-t1005"
|
||||||
T1145_ATTACK_TECHNIQUE_TAG = "attack-t1145"
|
T1145_ATTACK_TECHNIQUE_TAG = "attack-t1145"
|
||||||
|
|
||||||
SSH_COLLECTOR_EVENT_TAGS = {
|
SSH_COLLECTOR_EVENT_TAGS = frozenset(
|
||||||
SSH_CREDENTIAL_COLLECTOR_TAG,
|
(
|
||||||
T1003_ATTACK_TECHNIQUE_TAG,
|
SSH_CREDENTIAL_COLLECTOR_TAG,
|
||||||
T1005_ATTACK_TECHNIQUE_TAG,
|
T1003_ATTACK_TECHNIQUE_TAG,
|
||||||
T1145_ATTACK_TECHNIQUE_TAG,
|
T1005_ATTACK_TECHNIQUE_TAG,
|
||||||
}
|
T1145_ATTACK_TECHNIQUE_TAG,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_ssh_info(
|
def get_ssh_info(
|
||||||
|
@ -165,7 +167,7 @@ def to_credentials(ssh_info: Iterable[Dict]) -> Sequence[Credentials]:
|
||||||
|
|
||||||
def _publish_credentials_stolen_event(collected_credentials: Credentials, event_queue: IEventQueue):
|
def _publish_credentials_stolen_event(collected_credentials: Credentials, event_queue: IEventQueue):
|
||||||
credentials_stolen_event = CredentialsStolenEvent(
|
credentials_stolen_event = CredentialsStolenEvent(
|
||||||
tags=frozenset(SSH_COLLECTOR_EVENT_TAGS),
|
tags=SSH_COLLECTOR_EVENT_TAGS,
|
||||||
stolen_credentials=[collected_credentials],
|
stolen_credentials=[collected_credentials],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue