forked from p15670423/monkey
Agent: Rename credentials_store -> propagation_credentials_repository
This commit is contained in:
parent
c3557caf1c
commit
1d79d98689
|
@ -203,12 +203,14 @@ class InfectionMonkey:
|
||||||
control_channel = ControlChannel(
|
control_channel = ControlChannel(
|
||||||
self._control_client.server_address, GUID, self._control_client.proxies
|
self._control_client.server_address, GUID, self._control_client.proxies
|
||||||
)
|
)
|
||||||
credentials_store = AggregatingPropagationCredentialsRepository(control_channel)
|
propagation_credentials_repository = AggregatingPropagationCredentialsRepository(
|
||||||
|
control_channel
|
||||||
|
)
|
||||||
|
|
||||||
event_queue = PyPubSubEventQueue(Publisher())
|
event_queue = PyPubSubEventQueue(Publisher())
|
||||||
InfectionMonkey._subscribe_events(event_queue, credentials_store)
|
InfectionMonkey._subscribe_events(event_queue, propagation_credentials_repository)
|
||||||
|
|
||||||
puppet = self._build_puppet(credentials_store, event_queue)
|
puppet = self._build_puppet(propagation_credentials_repository, event_queue)
|
||||||
|
|
||||||
victim_host_factory = self._build_victim_host_factory(local_network_interfaces)
|
victim_host_factory = self._build_victim_host_factory(local_network_interfaces)
|
||||||
|
|
||||||
|
@ -216,7 +218,7 @@ class InfectionMonkey:
|
||||||
ExploitInterceptingTelemetryMessenger(
|
ExploitInterceptingTelemetryMessenger(
|
||||||
self._telemetry_messenger, self._monkey_inbound_tunnel
|
self._telemetry_messenger, self._monkey_inbound_tunnel
|
||||||
),
|
),
|
||||||
credentials_store,
|
propagation_credentials_repository,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._master = AutomatedMaster(
|
self._master = AutomatedMaster(
|
||||||
|
@ -226,16 +228,19 @@ class InfectionMonkey:
|
||||||
victim_host_factory,
|
victim_host_factory,
|
||||||
control_channel,
|
control_channel,
|
||||||
local_network_interfaces,
|
local_network_interfaces,
|
||||||
credentials_store,
|
propagation_credentials_repository,
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _subscribe_events(
|
def _subscribe_events(
|
||||||
event_queue: IEventQueue, credentials_store: IPropagationCredentialsRepository
|
event_queue: IEventQueue,
|
||||||
|
propagation_credentials_repository: IPropagationCredentialsRepository,
|
||||||
):
|
):
|
||||||
event_queue.subscribe_type(
|
event_queue.subscribe_type(
|
||||||
CredentialsStolenEvent,
|
CredentialsStolenEvent,
|
||||||
add_credentials_from_event_to_propagation_credentials_repository(credentials_store),
|
add_credentials_from_event_to_propagation_credentials_repository(
|
||||||
|
propagation_credentials_repository
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -247,7 +252,9 @@ class InfectionMonkey:
|
||||||
return local_network_interfaces
|
return local_network_interfaces
|
||||||
|
|
||||||
def _build_puppet(
|
def _build_puppet(
|
||||||
self, credentials_store: IPropagationCredentialsRepository, event_queue: IEventQueue
|
self,
|
||||||
|
propagation_credentials_repository: IPropagationCredentialsRepository,
|
||||||
|
event_queue: IEventQueue,
|
||||||
) -> IPuppet:
|
) -> IPuppet:
|
||||||
puppet = Puppet()
|
puppet = Puppet()
|
||||||
|
|
||||||
|
@ -290,7 +297,7 @@ class InfectionMonkey:
|
||||||
)
|
)
|
||||||
|
|
||||||
zerologon_telemetry_messenger = CredentialsInterceptingTelemetryMessenger(
|
zerologon_telemetry_messenger = CredentialsInterceptingTelemetryMessenger(
|
||||||
self._telemetry_messenger, credentials_store
|
self._telemetry_messenger, propagation_credentials_repository
|
||||||
)
|
)
|
||||||
zerologon_wrapper = ExploiterWrapper(zerologon_telemetry_messenger, agent_repository)
|
zerologon_wrapper = ExploiterWrapper(zerologon_telemetry_messenger, agent_repository)
|
||||||
puppet.load_plugin(
|
puppet.load_plugin(
|
||||||
|
|
Loading…
Reference in New Issue