Open adam44-44 opened 4 years ago
there are two medothe: Secure et no Secure, the first one is to make the same value of api_token in (.cuckoo/conf/cuckoo.cofig ) and the call file (or in the command line), the second methode it's very essay : dellete the value api_token in .cuckoo/conf/cuckoo.cofig and in the command call. thank's
Hi, Same issue, I also try disable the api_token. And I still got same behavior. Any ideia how can solve?
Hi,
I am having the same problem as @rleal124. The message persists in both cases, when I set a api_token and when I delete that line from cuckoo.conf file. Has anyone found a solution to this ?
Check if have more than 2 cuckoo API instances running at same time?
@rleal124 I did a fresh installation of cuckoo to make sure everything is clear. After that I did the following steps:
api_token = {{ cuckoo.cuckoo.api_token }}
to ``api_token = MY TOKEN" in cuckoo.confcurl -H "Authorization: Bearer MY TOKEN" -F file=path_to_my_file http://localhost:8090/tasks/create/file
The request failed even though there was only one instance of the API. I tried as well to send the request via python and requests module for python but the same message persist. I am running out of ideas how to trubelshoot at this point.
If you can share some steps that helped you solve this problem, it would be helpful to me.
curl -H "Authorization: Bearer SIMPLE" -F file=path_to_my_file http://localhost:8090/tasks/create/file change to curl -H "Authorization: Bearer MY TOKEN" -F file=path_to_my_file http://localhost:8090/tasks/create/file
@rleal124 Sorry that was just a typo. I had already changed it when I sent the request, but it did not work. I will edit my previous comment
please give me output ps -aux | grep cuckoo
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName 87 6 920 600 0.03 7040 1 cuckoo 87 6 932 612 0.02 7340 1 cuckoo
I see there are 2 processes running
cuckoo -d api -H CUCKOO IP -p 8090
please read the folwing documentaion: https://cuckoo.readthedocs.io/en/latest/usage/api/#
Also you can have one cockoo instance runing
I checked and both processes are attached to the same cuckoo instance. I tried starting the api with your command, but it did not change the result of curl request. I guess I have to dig a bit longer on this issue.
please give me output ps -aux | grep cuckoo
I am using Windows so I am attaching the output of the alternative command to ps -aux | grep cuckoo. Below as well are details for each process separately
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName 91 6 916 4048 0.03 22696 2 cuckoo 87 6 916 4044 0.03 24120 2 cuckoo
The output of Get-Process -ID 22696 | Select-Object *
.... Name : cuckoo Id : 22696 PriorityClass : Normal TotalProcessorTime : 00:00:00.0312500 SI : 2 Handles : 91 Path : C:\Users...\Anaconda3\envs\cuckoo-env\Scripts\cuckoo.exe CPU : 0.03125 __NounName : Process HasExited : False Handle : 3204 Modules : {System.Diagnostics.ProcessModule (cuckoo.exe), ProcessName : cuckoo ProcessorAffinity : 255 Responding : True SessionId : 2 StartTime : 1/8/2021 6:00:50 PM Threads : {23800}
The output of Get-Process -ID 24120 | Select-Object *
:
Name : cuckoo Id : 24120 PriorityClass : Normal TotalProcessorTime : 00:00:00.0312500 SI : 2 Handles : 87 Path : C:\Users...\Anaconda3\envs\cuckoo-env\Scripts\cuckoo.exe CPU : 0.03125 __NounName : Process BasePriority : 8 HasExited : False Handle : 2884 SafeHandle : Microsoft.Win32.SafeHandles.SafeProcessHandle MainModule : System.Diagnostics.ProcessModule (cuckoo.exe) MaxWorkingSet : 1413120 MinWorkingSet : 204800 Modules : {System.Diagnostics.ProcessModule (cuckoo.exe), PrivilegedProcessorTime : 00:00:00.0312500 ProcessName : cuckoo Responding : True SessionId : 2 StartInfo : System.Diagnostics.ProcessStartInfo StartTime : 1/8/2021 6:00:45 PM Threads : {12112}
from i can see the cuckoo api not running
2021-01-08 18:34:06,697 [werkzeug] WARNING: Debugger is active! 2021-01-08 18:34:06,706 [werkzeug] INFO: Debugger PIN: 593-688-948 2021-01-08 18:34:06,714 [werkzeug] INFO: * Running on http://127.0.0.1:8090/ (Press CTRL+C to quit) 2021-01-08 18:38:09,342 [werkzeug] INFO: 127.0.0.1 - - [08/Jan/2021 18:38:09] "GET / HTTP/1.1" 401
From the terminal where I run the api I get this output, so I guess it is running. Every time the curl request fails as well in the terminal I get the 401 error
on my Ubuntu terminal simple way. On terminal I run cuckoo -d (this will start the cuckoo webgui)
On second terminal cuckoo -d api -H CUCKOO IP -p 8090 (this will start the restapi)
Thanks for creating an issue! But first: did you read our community guidelines? https://cuckoo.sh/docs/introduction/community.html
My issue is: I am Running cuckoo API server on https://x.x.x.x over Nginx. I am getting this { "message": "Authentication in the form of an 'Authorization: Bearer' header is required" } . Through Postman it is working fine. But i have to integrate it with other tool which does not support Api_token. so please help how can i disable the API Authorization in cuckoo.
My Cuckoo version and operating system are: Cuckoo Sandbox 2.0.7 on Ubuntu 16.04.
This can be reproduced by:
The log, error, files etc can be found at:
Getting this message while browsing to API server at https://x.x.x.x { "message": "Authentication in the form of an 'Authorization: Bearer' header is required"
}
please help!!!!