#2689 Fix notebook blue agent actions not functioning correctly.

This commit is contained in:
Archer Bowen
2024-08-09 11:04:12 +01:00
parent 6ec575d18e
commit ddc9acd03a
3 changed files with 54 additions and 20 deletions

View File

@@ -90,7 +90,8 @@ class AbstractC2(Application, identifier="AbstractC2"):
# TODO: Update this post application/services requiring to listen to multiple ports
def __init__(self, **kwargs):
"""Initialise the C2 applications to by default listen for HTTP traffic."""
kwargs["port"] = Port.HTTP # TODO: Update this post application/services requiring to listen to multiple ports
kwargs["listen_on_ports"] = {Port.HTTP, Port.FTP, Port.DNS}
kwargs["port"] = Port.HTTP
kwargs["protocol"] = IPProtocol.TCP
super().__init__(**kwargs)
@@ -241,9 +242,6 @@ class AbstractC2(Application, identifier="AbstractC2"):
)
return False
# TODO: Validation on Ports (E.g only allow HTTP, FTP etc)
# Potentially compare to IPProtocol & Port children? Depends on how listening on multiple ports is implemented.
# Setting the Ports
self.current_masquerade_port = payload.masquerade_port
self.current_masquerade_protocol = payload.masquerade_protocol