示例#1
0
    def debug(self, path, args, interest):
        """Starts an executable for analysis.
        @param path: executable path
        @param args: executable arguments
        @param interest: file of interest, passed to the cuckoomon config
        @return: process pid
        """
        dll = self.options.get("dll")
        dll_64 = self.options.get("dll_64")
        gw = self.options.get("setgw", None)

        u = Utils()
        if gw:
            u.set_default_gw(gw)

        suspended = True

        p = Process(options=self.options, config=self.config)
        if not p.execute(
                path=path, args=args, suspended=suspended,
                kernel_analysis=False):
            raise CuckooPackageError("Unable to execute the initial process, "
                                     "analysis aborted.")

        is_64bit = p.is_64bit()

        if is_64bit:
            p.debug_inject(dll_64, interest, childprocess=False)
        else:
            p.debug_inject(dll, interest, childprocess=False)
        p.resume()
        p.close()

        return p.pid
示例#2
0
    def debug(self, path, args, interest):
        """Starts an executable for analysis.
        @param path: executable path
        @param args: executable arguments
        @param interest: file of interest, passed to the cuckoomon config
        @return: process pid
        """

        suspended = True

        p = Process(options=self.options, config=self.config)
        if not p.execute(
                path=path, args=args, suspended=suspended,
                kernel_analysis=False):
            raise CuckooPackageError(
                "Unable to execute the initial process, analysis aborted")

        p.debug_inject(interest, childprocess=False)
        p.resume()
        p.close()

        return p.pid