Exemple #1
0
    def __init__(self, args, db_obj, loggers):
        Connector.__init__(self, args, loggers, args.target)
        self.output = []
        self.pwd_list = ['C:', 'Windows', 'System32']
        self.pwd = '\\'.join(self.pwd_list)

        self.exec_method = args.exec_method
        self.sharename = args.fileless_sharename
        self.db = db_obj

        try:
            # Setup Smb Connection
            self.logger.status('Initiating remote connection')
            self.smbcon = SmbCon(self.args, loggers, self.host, self.db)
            self.smbcon.create_smb_con()

            # Execute command to verify permissions
            self.cmd_execution('ECHO %USERDOMAIN%\%USERNAME%')
            self.logger.success(
                'Starting emulated shell (Host: {}) (User: {}) (Method: {}) (Fileless: {})'
                .format(self.host, self.output[0].strip(), self.exec_method,
                        str(args.fileless)))
            self.logger.warning(
                "This is a limited shell and requires full paths for file interactions\n"
            )

        except Exception as e:
            self.logger.fail("Error Starting Shell:".format(str(e)))
            exit(1)
Exemple #2
0
 def __init__(self, args, loggers, host, db):
     Connector.__init__(self, args, loggers, host)
     self.ldaps = False
     self.con = None
     self.data = {}
     self.set_baseDN()
     self.db = db
Exemple #3
0
 def __init__(self, args, loggers, host):
     Connector.__init__(self, args, loggers, host)
     self.pipe = None
     self.rpc_connection = None
     self.dcom = None
     self.wmi_connection = None
     self.port = 445
Exemple #4
0
 def __init__(self, args, loggers, ip, host):
     Connector.__init__(self, args, loggers, ip)
     self.display_ip = ip
     self.display_host = host
     self._debug = False
     self.dcom = None
     self.wmi_con = None
     self.process_list = {}
Exemple #5
0
 def __init__(self, args, loggers, host, db):
     Connector.__init__(self, args, loggers, host)
     self.admin = False
     self.port = 22
     self.key = False
     self.signing = 'N/A'
     self.smbv1 = 'N/A'
     self.auth = False
Exemple #6
0
 def __init__(self, args, loggers, ip, host):
     Connector.__init__(self, args, loggers, ip)
     """Display var passed for output formatting but, IP is used to
        establish to connection, as hostname can be inconsistent"""
     self.display_ip = ip
     self.display_host = host
     self._debug = False
     self.dcom = None
     self.wmi_con = None
     self.process_list = {}
Exemple #7
0
 def __init__(self, args, loggers, host, db):
     Connector.__init__(self, args, loggers, host)
     self.auth       = False
     self.con        = False
     self.client     = ''.join([choice(ascii_letters + digits) for x in range(7)])
     self.smbv1      = False
     self.os         = ''
     self.admin      = False
     self.signing    = False
     self.os_arch    = ''
     self.remote_ops = None
     self.bootkey    = None
     self.db         = db
     self.port       = 445
Exemple #8
0
 def __init__(self,args, loggers, host, db):
     Connector.__init__(self, args, loggers, host)
     self.admin  = False
     self.port   = 22
     self.key    = False