Exemplo n.º 1
0
    def start(self):
        if self.options.get("analysis") not in ("both", "kernel"):
            return

        try:
            self.capcom = Capcom()
            self.capcom.install()
        except CuckooError as e:
            log.error("Driver issue: %s", e)
            return

        self.capcom.dse(False)

        try:
            d = Driver("zer0m0n", random_name)
        except CuckooError as e:
            log.error("Driver issue: %s", e)
            return

        # Disable the Program Compability Assistant (which would otherwise
        # show an annoying popup about our kernel driver not being signed).
        subprocess_checkcall(["sc", "stop", "PcaSvc"])

        try:
            d.install()
            log.info("Successfully loaded the zer0m0n kernel driver.")
        except CuckooError as e:
            log.error("Error loading zer0m0n: %s", e)

        self.capcom.dse(True)
Exemplo n.º 2
0
 def start(self):
     # verify network
     hostname = "sndbox.com"
     try:
         socket.gethostbyname(hostname)
     except:
         log.exception("Failed to verify network connection.")
         raise CuckooPackageError(
             "Unable to verify network, analysis aborted.")
     # dns flush
     try:
         subprocess_checkcall(["ipconfig.exe", "/flushdns"])
         log.info("Successfully flushed dns.")
     except Exception as e:
         log.error("Error flushing dns: %s", e)