Exemple #1
0
    def __init__(self, domain, services, name):
        super().__init__()
        self.services = services
        self.contact_svc = services.get('contact_svc')
        self.file_svc = services.get('file_svc')
        self.name = name
        self.log = BaseWorld.create_logger('contact_dns_handler')
        self.domain = domain
        self.transport = None

        # Stores received message chunks.
        self.pending_messages = {}

        # Stores completed messages from agents.
        self.completed_messages = {}

        # Stores instructions for agents to fetch
        # Key: message ID.
        # Value: StoredResponse obj
        self.pending_instructions = {}

        # Stores payloads for agents to fetch
        # Key: message ID.
        # Value: StoredResponse obj
        self.pending_payloads = {}

        # Stores payload names for agents to fetch
        # Key: message ID.
        # Value: StoredResponse obj
        self.pending_payload_names = {}
 def __init__(self, services):
     super().__init__()
     self.services = services
     self.handles = [
         Handle(tag='beacon')
     ]
     self.log = BaseWorld.create_logger('udp_handler')
 def __init__(self, services, user_name, user_password):
     super().__init__()
     self.services = services
     self.log = BaseWorld.create_logger('ssh_server')
     self.valid_user_credentials = {
         user_name: user_password
     }
Exemple #4
0
 def __init__(self, services):
     self.check_config()
     self.name = 'ftp'
     self.description = 'Accept agent beacons through ftp'
     self.contact_svc = services.get('contact_svc')
     self.file_svc = services.get('file_svc')
     self.logger = BaseWorld.create_logger('contact_ftp')
     self.host = self.get_config('app.contact.ftp.host')
     self.port = self.get_config('app.contact.ftp.port')
     self.directory = self.get_config('app.contact.ftp.server.dir').lstrip(
         '/')
     self.home = os.path.join('/', self.directory)
     self.user = self.get_config('app.contact.ftp.user')
     self.pword = self.get_config('app.contact.ftp.pword')
     self.server = None
Exemple #5
0
 def __init__(self, services):
     self.services = services
     self.handles = []
     self.log = BaseWorld.create_logger('websocket_handler')
Exemple #6
0
 def __init__(self, services):
     super().__init__()
     self.services = services
     self.log = BaseWorld.create_logger('udp_session')
 def __init__(self, services):
     self.services = services
     self.log = BaseWorld.create_logger('websocket_session')