cuckoosandbox / cuckoo

Cuckoo Sandbox is an automated dynamic malware analysis system
http://www.cuckoosandbox.org
Other
5.55k stars 1.71k forks source link

Failure in AnalysisManager.run #696

Closed threedanes closed 8 years ago

threedanes commented 8 years ago

All, I have searched around and have not really been able to find anything specific to this error. Also I have only been introduced to the world of Cuckoo in the last few months so I admit I am playing catch.

I am running the following code; Cuckoo Sandbox 2.0-dev www.cuckoosandbox.org Copyright (c) 2010-2015

Checking for updates... Okay! You are running a development version.

I am running into the error when I run an analysis either on a URL or a file

[lib.cuckoo.core.scheduler] ERROR: Failure in AnalysisManager.run Traceback (most recent call last): File "/home/cuckoo/cuckoo/lib/cuckoo/core/scheduler.py", line 439, in run success = self.launch_analysis() File "/home/cuckoo/cuckoo/lib/cuckoo/core/scheduler.py", line 326, in launch_analysis self.guest_manage(options) File "/home/cuckoo/cuckoo/lib/cuckoo/core/scheduler.py", line 254, in guest_manage guest.start_analysis(options, monitor) File "/home/cuckoo/cuckoo/lib/cuckoo/core/guest.py", line 390, in start_analysis r.json().get("version"), self.vmid, self.ipaddr) File "/usr/lib/python2.7/dist-packages/requests/models.py", line 741, in json return json.loads(self.text, kwargs) File "/usr/lib/python2.7/json/init**.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Looking at the value error I have tried installing python-cjson and python-simplejson. Neither of those had resolved the issue so I removed those.

As this is my first time posting I am not sure what else I should provide. Thank you in advance for any help

Threedanes

jbremer commented 8 years ago

Thanks for the bug report. Could you please inform us which version of the Cuckoo Agent you have installed in the VM? It would appear something is going wrong there.

threedanes commented 8 years ago

Dang think I used the agent from the 1.2 as I cloned the guest over to the new Cuckoo server. I am modifying the guest build and the snapshot now.

Is there a command to get the version of the agent? I apologize I am still learning as I go

threedanes commented 8 years ago

I copied the agent.py from the /cuckoo/agent folder over to the guest, replaced the agent.py from the 1.2 build, rebooted, did another snapshot and ran another analysis on a URL and received the same error.

threedanes commented 8 years ago

Just to make sure that I did not miss anything I created a new guest with a fresh install of everything including the 2.0-dev agent. I noticed something on both guests. Nothing comes across the agent command window when I send an analysis to the guest.

jbremer commented 8 years ago

Are you able to curl manually curl the cuckoo agent? The 1.2 Agent should be working just fine. And no need for apologies ;-)

threedanes commented 8 years ago

I pulled a known working agent from my other environment to the 2.0 dev environment with the same results. I think the best option for me right now will be to rebuild this server. I have pretty much made a mess of it adding and removing packages.

I am going to start that now and test again. I followed the dev install documentation and utilized pip install with the requirements.txt I will post again once I have the requirements and cuckoo back in place.
If there are any tips or hints I can find some where that would be greatly appreciated.

jbremer commented 8 years ago

Well, what does curl guest_ip:8000 say when you've booted the VM?

threedanes commented 8 years ago

There was a lot of text so I threw it into a txt file.

curl.to.guest.txt

jbremer commented 8 years ago

Hint: don't you find it odd to see Squid mentioned all over the place? ;-)

threedanes commented 8 years ago

lol I suppose that would be a hint. I will start tracking that down. Honestly I was not sure what the expected outcome was supposed to be when I CURL to the guest.

jbremer commented 8 years ago

Closing this issue as it's definitely an issue on your side - your Squid setup for some reason intercepts the requests to what is supposed to be the VM.