def run(self): exe_path_dst = "c:\\Users\\avtest\\Desktop\\arg.exe" vmman = VMManagerFus(self.vmrun_path) # 0. revert to snapshot vmman.revertSnapshot(self.vm) # 1. startup vm vmman.startup(self.vm) # 2. copy file vmman.copyFileToGuest(self.vm, self.exe_path, exe_path_dst) # 3. infection c = raw_input("[>] Press Enter to executing infection...\n") x = vmman.executeCmd(self.vm, exe_path_dst) if x is not True: sys.stdout.write("[!] Execution failed\n") vmman.shutdown(self.vm) sys.exit(0) # 4. wait for reboot c = raw_input("[>] Wait 5 min and reboot (press enter when ok)...\n") #sleep(300) vmman.reboot(self.vm) # n. finally shutdown c = raw_input("[>] Press enter to end Analysis and shutdown current VM...\n")
# 0. revert to snapshot # vmman.revertSnapshot(avg) # 1. startup vm vmman.startup(avg) # # 2. copy file vmman.copyFileToGuest(avg, exe_path_src, exe_path_dst) # # 3. infection c = raw_input("[>] Press Enter to executing infection...\n") x = vmman.executeCmd(avg, exe_path_dst) if x is not True: sys.stdout.write("[!] Execution failed\n") vmman.shutdown(avg) sys.exit(0) # # 4. wait for reboot c = raw_input("[>] Wait 5 min and reboot (press enter when ok)...\n") #sleep(300) vmman.reboot(avg) # # n. finally shutdown c = raw_input("[>] Press enter to end Analysis and shutdown current VM...\n") #vmman.shutdown(avg)