spender-sandbox / cuckoo-modified

Modified edition of cuckoo
395 stars 178 forks source link

Cuckoo cant start virtual machines for analysis #397

Closed phant0m3 closed 7 years ago

phant0m3 commented 7 years ago

I followed the install tutorial and got cuckoo running perfectly and everything was fine, however after a reboot I cant seem to get cuckoo to start the analysis.

OS:Ubuntu 16.04 Hypervisor: Virtualbox

I checked that the vboxnet0 interface is up and running but i keep getting the following error. (As mentioned everything was working perfectly before a reboot, VM boots fine if I boot it from virtualbox, VM is installed under the same user as cuckoo is running)

2016-12-28 14:46:10,504 [lib.cuckoo.core.resultserver] DEBUG: ResultServer running on 192.168.56.1:2042.

2016-12-28 14:46:10,505 [lib.cuckoo.core.scheduler] INFO: Using "virtualbox" machine manager with max_analysis_count=0, max_machines_count=0, and max_vmstartup_count=10

2016-12-28 14:46:34,121 [lib.cuckoo.core.scheduler] ERROR: Task #19: Failure in AnalysisManager.run: child watchers are only available on the default loop

Traceback (most recent call last): File "/opt/cuckoo/lib/cuckoo/core/scheduler.py", line 443, in run success = self.launch_analysis() File "/opt/cuckoo/lib/cuckoo/core/scheduler.py", line 341, in launch_analysis machinery.stop(self.machine.label) File "/opt/cuckoo/modules/machinery/virtualbox.py", line 108, in stop if self._status(label) in [self.POWEROFF, self.ABORTED]: File "/opt/cuckoo/modules/machinery/virtualbox.py", line 181, in _status close_fds=True) File "/home/cuckoo/.local/lib/python2.7/site-packages/gevent/subprocess.py", line 534, in init reraise(*exc_info) File "/home/cuckoo/.local/lib/python2.7/site-packages/gevent/subprocess.py", line 503, in init restore_signals, start_new_session) File "/home/cuckoo/.local/lib/python2.7/site-packages/gevent/subprocess.py", line 1112, in _execute_child self.pid = fork_and_watch(self._on_child, self._loop, True, fork) File "/home/cuckoo/.local/lib/python2.7/site-packages/gevent/os.py", line 341, in fork_and_watch watcher = loop.child(pid, ref=ref) File "gevent/corecext.pyx", line 511, in gevent.corecext.loop.child (gevent/gevent.corecext.c:9881) File "gevent/corecext.pyx", line 1876, in gevent.corecext.child.init (gevent/gevent.corecext.c:32615) TypeError: child watchers are only available on the default loop

SeanKim777 commented 7 years ago

Can you move '/home/cuckoo/.local/lib/python2.7/site-packages/gevent/' directory to temporary place to backup and execute cuckoo? seems gevent.subprocess used instead of subprocess module

phant0m3 commented 7 years ago

Fixed / Solved

A quick update, first I moved gevent from /home/cuckoo/.local/lib/python2.7/site-packages/gevent/ to a backup location as suggested but still got the same error.

I then tried uninstalling gevent using pip but still got the same error.

What ended up working was moving gevent from /usr/local/lib/python2.7/dist-packages/gevent (not sure why removing it with pip did not remove this).

Cuckoo now works even after a reboot (will try and see if I can figure out how to reproduce the error and if any of my other apps need gevent)

Thanks for your help!