brad-sp / cuckoo-modified

Modified edition of cuckoo
271 stars 98 forks source link

Django Interface (Apache) - Behavioral Analysis Tab Not Functioning Correctly #41

Closed landw1re closed 9 years ago

landw1re commented 9 years ago

I have the Django interface being presented via Apache WSGI and everything seems to be working fine with the exception of the Behavioral Analysis tab.

At first load of that tab everything is there (analysis wise). The problem is when you click any of the color coated icons other than the gray default one I receive the following error.

"Error loading data. Please reload the page and if the error persists contact us."

Are you by chance using Apache to serve up the Django interface? Would you mind sharing your config?

brad-sp commented 9 years ago

I'm only using manage.py

landw1re commented 9 years ago

Are you using that for Production type use cases (centralized sandbox for all the analysts) or just internal lab stuff?

In regards to manage.py, I'm still having some issues with using it. It only works if I give it the --insecure flag after the runserver parameter.

If the --insecure flag is not specified, I get a lot of 304 responses pointing to all the static content and the interface doesn't render (i.e. no javascript loaded because of the 304's).

Would you be able to share your local_settings.py and settings.py?

have you modified anything specific in the following section of settings.py

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
    os.path.join(os.getcwd(), 'static'),
)
KillerInstinct commented 9 years ago

This is a known Apache/mod_wsgi issue in how it handles null POSTs (when you click a button you are not filtering the APIs by default) This is not an issues with Nginx+uWSGI. Here's the fix I put in my code base for apache. It will still work, but in not needed for any other environment.

https://github.com/KillerInstinct/cuckoo-modified/commit/1d2d5596987428507ac7fe08366ccad0e6fe0c7f

landw1re commented 9 years ago

@KillerInstinct that worked like a charm. :+1: Thank you. Everything is up and running without issue under Apache.

landw1re commented 9 years ago

@KillerInstinct I'm starting to see the issue again with the Behavioral Analysis tab. I implemented the PR that you referenced KillerInstinct@1d2d559

I see the following in my Apache access logs (I notice the !null in the GET request):

10.30.98.150 - - [07/May/2015:16:15:03 -0400] "GET /analysis/filtered/66/3560/network/!null/ HTTP/1.1" 403 457 "http://10.30.98.150/cuckoo/analysis/66/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0"

Are you seeing anything similar in your environment? Any suggestions on a fix?

landw1re commented 9 years ago

Disregard... user error. I fixed it. I moved a couple things around in my apache.conf.