Danny Reed Posted November 3, 2019 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 ?
Void-Byte Posted November 4, 2019 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.
Danny Reed Posted November 4, 2019 Author 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.
Void-Byte Posted November 4, 2019 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/
Danny Reed Posted November 4, 2019 Author Posted November 4, 2019 Not good at this stuff. Don't suppose you could give me the commands exactly for the h5c2?
Mathias1879 Posted December 19, 2020 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?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.