forked from p15670423/monkey
Common: Add TCPScanEvent to agent events
This commit is contained in:
parent
f62ab10d1c
commit
28ca462ce5
|
@ -1,3 +1,4 @@
|
||||||
from .abstract_agent_event import AbstractAgentEvent
|
from .abstract_agent_event import AbstractAgentEvent
|
||||||
from .credentials_stolen_events import CredentialsStolenEvent
|
from .credentials_stolen_events import CredentialsStolenEvent
|
||||||
from .ping_scan_event import PingScanEvent
|
from .ping_scan_event import PingScanEvent
|
||||||
|
from .tcp_scan_event import TCPScanEvent
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
from ipaddress import IPv4Address
|
||||||
|
|
||||||
|
from common.types import NetworkPort, PortStatus
|
||||||
|
|
||||||
|
from . import AbstractAgentEvent
|
||||||
|
|
||||||
|
|
||||||
|
class TCPScanEvent(AbstractAgentEvent):
|
||||||
|
"""
|
||||||
|
An event that occurs when the Agent performs a TCP scan on its network
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
:param port: Port on which the scan was performed
|
||||||
|
:param port_status: Status of the port (closed/open)
|
||||||
|
:param banner: Information from the tcp response
|
||||||
|
:param service: Name of the service which runs on the port
|
||||||
|
"""
|
||||||
|
|
||||||
|
target: IPv4Address
|
||||||
|
port: NetworkPort
|
||||||
|
port_status: PortStatus
|
||||||
|
banner: str
|
||||||
|
service: str
|
|
@ -7,7 +7,7 @@ from common.agent_configuration.agent_sub_configurations import (
|
||||||
CustomPBAConfiguration,
|
CustomPBAConfiguration,
|
||||||
ScanTargetConfiguration,
|
ScanTargetConfiguration,
|
||||||
)
|
)
|
||||||
from common.agent_events import PingScanEvent
|
from common.agent_events import PingScanEvent, TCPScanEvent
|
||||||
from common.credentials import Credentials, LMHash, NTHash
|
from common.credentials import Credentials, LMHash, NTHash
|
||||||
from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory
|
from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory
|
||||||
from monkey_island.cc.event_queue import IslandEventTopic, PyPubSubIslandEventQueue
|
from monkey_island.cc.event_queue import IslandEventTopic, PyPubSubIslandEventQueue
|
||||||
|
@ -313,6 +313,10 @@ IAgentLogRepository.get_agent_log
|
||||||
# TODO: Remove once #2268 is closed
|
# TODO: Remove once #2268 is closed
|
||||||
PingScanEvent
|
PingScanEvent
|
||||||
|
|
||||||
|
# TODO: Remove once #2267 is closed
|
||||||
|
TCPScanEvent
|
||||||
|
TCPScanEvent.port_status
|
||||||
|
|
||||||
# pydantic base models
|
# pydantic base models
|
||||||
underscore_attrs_are_private
|
underscore_attrs_are_private
|
||||||
extra
|
extra
|
||||||
|
|
Loading…
Reference in New Issue