forked from p15670423/monkey
Agent: Move the definition of ICredentialCollector to i_puppet
Low-level components plug into high-level components. i_puppet defines all of the interfaces that puppets can use, while the concrete implementations of these things rely on the definitions in i_puppet.
This commit is contained in:
parent
c39fb6746d
commit
569159b11a
|
@ -1,6 +1,4 @@
|
|||
from .i_credential_collector import ICredentialCollector
|
||||
from .credential_components.nt_hash import NTHash
|
||||
from .credential_components.lm_hash import LMHash
|
||||
from .credential_components.password import Password
|
||||
from .credential_components.username import Username
|
||||
from .credentials import Credentials
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from dataclasses import dataclass, field
|
||||
|
||||
from ..credential_type import CredentialType
|
||||
from .i_credential_component import ICredentialComponent
|
||||
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from dataclasses import dataclass, field
|
||||
|
||||
from ..credential_type import CredentialType
|
||||
from .i_credential_component import ICredentialComponent
|
||||
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from dataclasses import dataclass, field
|
||||
|
||||
from ..credential_type import CredentialType
|
||||
from .i_credential_component import ICredentialComponent
|
||||
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from dataclasses import dataclass, field
|
||||
|
||||
from ..credential_type import CredentialType
|
||||
from .i_credential_component import ICredentialComponent
|
||||
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
from typing import Iterable
|
||||
|
||||
from infection_monkey.credential_collectors import (
|
||||
Credentials,
|
||||
ICredentialCollector,
|
||||
LMHash,
|
||||
NTHash,
|
||||
Password,
|
||||
Username,
|
||||
)
|
||||
from infection_monkey.credential_collectors import LMHash, NTHash, Password, Username
|
||||
from infection_monkey.i_puppet.credential_collection import Credentials, ICredentialCollector
|
||||
|
||||
from . import pypykatz_handler
|
||||
from .windows_credentials import WindowsCredentials
|
||||
|
||||
|
|
|
@ -10,3 +10,9 @@ from .i_puppet import (
|
|||
UnknownPluginError,
|
||||
)
|
||||
from .i_fingerprinter import IFingerprinter
|
||||
from .credential_collection import (
|
||||
Credentials,
|
||||
CredentialType,
|
||||
ICredentialCollector,
|
||||
ICredentialComponent,
|
||||
)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
from .i_credential_collector import ICredentialCollector
|
||||
from .credentials import Credentials
|
||||
from .i_credential_component import ICredentialComponent
|
||||
from .credential_type import CredentialType
|
|
@ -1,7 +1,7 @@
|
|||
from dataclasses import dataclass
|
||||
from typing import Tuple
|
||||
|
||||
from .credential_components.i_credential_component import ICredentialComponent
|
||||
from .i_credential_component import ICredentialComponent
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
|
@ -1,6 +1,6 @@
|
|||
from abc import ABC, abstractmethod
|
||||
|
||||
from infection_monkey.credential_collectors.credential_type import CredentialType
|
||||
from .credential_type import CredentialType
|
||||
|
||||
|
||||
class ICredentialComponent(ABC):
|
|
@ -2,13 +2,14 @@ from typing import List
|
|||
|
||||
import pytest
|
||||
|
||||
from infection_monkey.credential_collectors import Credentials, LMHash, NTHash, Password, Username
|
||||
from infection_monkey.credential_collectors import LMHash, NTHash, Password, Username
|
||||
from infection_monkey.credential_collectors.mimikatz_collector.mimikatz_cred_collector import (
|
||||
MimikatzCredentialCollector,
|
||||
)
|
||||
from infection_monkey.credential_collectors.mimikatz_collector.windows_credentials import (
|
||||
WindowsCredentials,
|
||||
)
|
||||
from infection_monkey.i_puppet import Credentials
|
||||
|
||||
|
||||
def patch_pypykatz(win_creds: [WindowsCredentials], monkeypatch):
|
||||
|
|
Loading…
Reference in New Issue