Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struggles with ssl and api submitting #495

Open
DigiAngel opened this issue Dec 23, 2017 · 1 comment
Open

Struggles with ssl and api submitting #495

DigiAngel opened this issue Dec 23, 2017 · 1 comment

Comments

@DigiAngel
Copy link

Well I've never really got this to work right, and figured now was the time to try again. My goal is to pass multiple options. I have a valid ca cert and site cert setup...works fine in a web browser when I import the ca cert. Here's what I currently use:

#!/bin/bash
curl -k -u user:password -F options="tor = yes" -F file=@$1 "https://user:password@cuckoo/api/tasks/create/file/"

this works, but I can only pass one option...I've tried several different ways (such as "tor=yes,procmemdump=yes"), but in the end I get no options set, or just one after the analysis.

Next up is the submit.py in utils. If I try submit.py with just --ssl I get:

python submit.py -d --remote cuckoo:443 --priority 10 --user user --password 'password' --ssl --options "tor=yes,procmemdump=yes" /home/cuckoo/vmshared/pafish.exe
 
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): cuckoo
Error: unable to send file: HTTPSConnectionPool(host='cuckoo', port=443): Max retries exceeded with url: /tasks/create/file (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

If I add --noverifyssl I get:

python submit.py -d --remote cuckoo:443 --priority 10 --user user --password 'password' --ssl --sslnoverify --options "tor=yes,procmemdump=yes" /home/cuckoo/vmshared/pafish.exe
 
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): cuckoo
/home/user/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
DEBUG:urllib3.connectionpool:https://cuckoo:443 "POST /tasks/create/file HTTP/1.1" 404 None
Error: unable to send file: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))

I've also tried adding the ca-cert to the ca-certficates.crt bundle, with no success. Thank you.

@doomedraven
Copy link
Contributor

i think is related to the next libs:
certifi, pyopenssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants