spender-sandbox / cuckoo-modified

Modified edition of cuckoo
392 stars 178 forks source link

Can we configure Authentication on Web GUI #473

Open masifpak opened 6 years ago

masifpak commented 6 years ago

I want authentication to login cuckoo web interface. How can do this.

Nagaev commented 6 years ago

You just have to enable the Web Authentification in $CUCKOO/web/web/settings.py WEB_AUTHENTIFICATION = True You can add accounts through $CUCKOO/web/manage.py

masifpak commented 6 years ago

I am facing the following error.

django.db.utils.OperationalError: no such table: auth_user

image

Cuckoo is going to sqlite3 while i am using mysql. I am using the following way to create a user. sudo /opt/cuckoo/web/manage.py createsuperuser

Nagaev commented 6 years ago

I'm using sqlite for web auth since I have few accounts to add.

If you want to switch to MySQL, you can edit $CUCKOO/web/web/settings.py with the section DATABASES, refer to the Django documentation for the syntax.

You should have to create manually every table in your mysql db to match the default sqlite db.

masifpak commented 6 years ago

Thanks for your reply. Can we use both dbs. mysql for status of tasks and sqlite for authentication.

Nagaev commented 6 years ago

Of course, this is a db dedicated to Web auth and users roles. I'm using Postgres and Sqlite. Actually the web auth DB (sqlite db located in $CUCKOO/web) has nothing to do with the Cuckoo engine. You can change it but I think sqlite is sufficient to manage web auth.

masifpak commented 6 years ago

Then where to set sqlite db for authenticating users only and why is it missing auth_user table .

masifpak commented 6 years ago

I have a service which submit malwares using API like as following, Will it also need credentials to submit malwares or we can exclude this API from authentication.

sudo curl -F file=@/home/itsec/file.exe http://172.20.16.97:8080/api/tasks/create/file/

masifpak commented 6 years ago

Sync your DB and set username and password during this synching.

./manage.py syncdb