Danny Reed Posted November 3, 2019 Share Posted November 3, 2019 I'm hosting on a ubuntu ec2 instance on AWS. How do I run c2 cloud in the background or as a service ? Quote Link to comment Share on other sites More sharing options...
Void-Byte Posted November 4, 2019 Share Posted November 4, 2019 Hi Danny, Lets get started with making a custom bash script. We will begin by doing "vim H5C2", and creating a script with the following content. #!/bin/bash ./c2_community-linux-64 -hostname mysub.hostname.com -https We will then use the nohup command to keep the process running in the backgroup even after we exit the terminal as so. nohup ./H5C2 & The script will now run in the background even after your exit/close terminal. 1 Quote Link to comment Share on other sites More sharing options...
Danny Reed Posted November 4, 2019 Author Share Posted November 4, 2019 That helps. How do I make this persistent. Like to a crontab task ? If my aws instance restarts i'd want to make sure this starts up again. Quote Link to comment Share on other sites More sharing options...
Void-Byte Posted November 4, 2019 Share Posted November 4, 2019 Just now, Danny Reed said: That helps. How do I make this persistent. Like to a crontab task ? If my aws instance restarts i'd want to make sure this starts up again. Hi Danny, Here's an excellent guide on doing exactly that. https://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/ Quote Link to comment Share on other sites More sharing options...
Danny Reed Posted November 4, 2019 Author Share Posted November 4, 2019 Not good at this stuff. Don't suppose you could give me the commands exactly for the h5c2? Quote Link to comment Share on other sites More sharing options...
Danny Reed Posted November 6, 2019 Author Share Posted November 6, 2019 Figured it out. Thanks 🙂 Quote Link to comment Share on other sites More sharing options...
Mathias1879 Posted December 19, 2020 Share Posted December 19, 2020 Hi everyone! I am also hosting C2 latest version on AWS Lightsail. I setup Cloud C2 with no issues but while adding a device I got booted off. I rebooted my Ubuntu instance and tried again.. Cloud C2 not available. So I figured that the web server wasn't running and found this thread. I followed the advise Void-Byte and entered... On 11/3/2019 at 5:02 PM, Void-Byte said: ./c2_community-linux-64 -hostname mysub.hostname.com -https I ended up with .... ubuntu@ip-xxx-xx-xx-10:~$ ./c2_community-linux-64 -hostname mysub.hostname.com -https [*] Initializing Hak5 Cloud C2 v3.0.2 [*] Hostname: mysub.hostname.com [*] DB Path: c2.db [*] Validating License [*] License Valid [*] Running Hak5 Cloud C2 [!] Webserver failed to start: listen tcp 0.0.0.0:80: bind: permission denied [*] Shutting down gracefully [*] Server stopped Where should I go from here? Quote Link to comment Share on other sites More sharing options...
chrizree Posted December 19, 2020 Share Posted December 19, 2020 try running it with sudo Quote Link to comment Share on other sites More sharing options...
Mental Posted February 20, 2021 Share Posted February 20, 2021 Thanks for the help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.