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

Trying to configure HTTPS Support error - "There is no current event loop in thread 'Thread-1'.** #25

Open
kpomeroy1979 opened this issue Jun 8, 2020 · 3 comments

Comments

@kpomeroy1979
Copy link

Hi guys,

I just started to test out TrevorC2 and i'm having an issue setting up HTTPS.

I am able to run the Powershell agent and get a connection back to my server. I can run commands and most of the time the output is displayed in the console (sometimes it seems to hang though when I run commands like netstat or arp -a so not sure what may be happening there)... anyway

When I edit the trevorc2_server.py and set the following two options:

Turn to True for SSL support

SSL = True
CERT_FILE = ("/opt/trevorc2/fullchain1.pem") # Your Certificate for SSL

Save and then launch the server I get the following error.

./trevorc2_server

revorC2 - Legitimate Website Covert Channel
Written by: David Kennedy (@HackingDave)
https://www.trustedsec.com
[] Cloning website: https://www.google.com
[
] Site cloned successfully.
[] Starting Trevor C2 Server...
[
] Next, enter the command you want the victim to execute.
[] Client uses random intervals, this may take a few.
[
] Type help for usage. Example commands, list, interact.

trevorc2>[!] Something went wrong, printing error message here: There is no current event loop in thread 'Thread-1'.

Any ideas as to what this might be? I placed what I THINK is my SSL certificate file in /opt/trevorc2/ and made sure the permissions we set so they can be read by the application.

I'm wondering if this functionality hasn't been implemented yet or is there something I'm doing wrong? Is there an easy way to test the SSL functionality?

Thanks for taking the time to read
Cheers

@thecasual
Copy link

I am also getting this same error

@CalfCrusher
Copy link

Same here. also the port needs to change to 443 and not 80 when 'if SSL'

@l0n3-w01f
Copy link

Its simple just
if SSL:
if python_version != "v2": asyncio.set_event_loop(asyncio.new_event_loop()) # paste this line
http_server = tornado.httpserver.HTTPServer(application, ssl_options={'certfile': CERT_FILE, 'ssl_version': ssl.PROTOCOL_TLSv1})
http_server.listen(443)
tornado.ioloop.IOLoop.instance().start()
however, it works only for signed certificates, for self sign certificate you will get error. happy hunting ;)

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

4 participants