feat(backend): add C2Connector ABC + payload mapping + factory (B0.4)
- abstract C2Connector with authenticate / list_hosts / execute_task / get_task_result / cancel_task / execute_cleanup; stream_task_output optional v1 (NotImplementedError). - Payload / TaskHandle / TaskResult / TaskStatus frozen dataclasses. - UnsupportedPayloadType raised when no native command maps to the chosen (c2_type, payload_type) pair. - Mythic payload_type → native command map populated (spec §7 table). - HOME map left empty until PR2 is closed. - ConnectorFactory: register_connector decorator + build(c2_type) that instantiates + authenticates via an injected config resolver. No real Mythic / Home implementations land in this sprint.
This commit is contained in:
27
backend/src/mimic/connectors/__init__.py
Normal file
27
backend/src/mimic/connectors/__init__.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""C2Connector abstraction.
|
||||
|
||||
Sprint 0 ships the interface + dataclasses + payload mapping + factory.
|
||||
Concrete `MythicConnector` and `HomeConnector` implementations land after
|
||||
PR1 and PR2 respectively.
|
||||
"""
|
||||
|
||||
from mimic.connectors.base import (
|
||||
C2Connector,
|
||||
Payload,
|
||||
TaskHandle,
|
||||
TaskResult,
|
||||
TaskStatus,
|
||||
UnsupportedPayloadType,
|
||||
)
|
||||
from mimic.connectors.factory import ConnectorFactory, register_connector
|
||||
|
||||
__all__ = [
|
||||
"C2Connector",
|
||||
"ConnectorFactory",
|
||||
"Payload",
|
||||
"TaskHandle",
|
||||
"TaskResult",
|
||||
"TaskStatus",
|
||||
"UnsupportedPayloadType",
|
||||
"register_connector",
|
||||
]
|
||||
Reference in New Issue
Block a user