MattRedz Posted July 21, 2022 Share Posted July 21, 2022 Dose anyone have an Up-to-date Hak5 C2 Cloud Guide for Ubuntu? I got my C2 up and running easy on http 8080 but it all went completely wrong when trying to get my domain working with 443. I've kind of given up on this as the only really helpful guide I found on the forum was dated 2019. The code that works for me is as follows and is from the original Youtube video wget https://c2.hak5.org/dl -q -O c2.zip && unzip -qq c2.zip && \ IP=$(curl -s https://checkip.amazonaws.com) && \ echo "Copy the below setup token and browse to http://$IP:8080" && \ ./c2-*_amd64_linux -hostname $IP I'm happy with this as it just works and I don't intent to have my EC2 instance online all the time. One thing I would like to do is install it as a service so that when I restart the server it will come online, can I do this with the following? sudo vim /etc/systemd/system/hak5.service And then edit the file as follows [Unit] Description=Hak5 C2 After=hak5.service [Service] Type=idle ExecStart=/usr/local/bin/c2_community-linux-64 -hostname IPAddressORHostname -listenport 8080 -db /var/hak5c2/c2.db [Install] WantedBy=multi-user.target Or start and stop service /etc/init.d/hack5.service stop /etc/init.d/hack5.service start Thanks Quote Link to comment Share on other sites More sharing options...
MattRedz Posted July 21, 2022 Author Share Posted July 21, 2022 Ahh just noticed as well the version I have in /usr/local/bin/ is different to my script, I changed the /etc/systemd/system/hak5.service to the correct C2 version and it all came up. I had to use a new Token though once it started!! ubuntu@ip-x.x.x.x:/usr/local/bin$ ls c2-3.2.0_amd64_linux Quote Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 21, 2022 Share Posted July 21, 2022 Not sure if your "Ahh" reaction in the second post was an indicator that all of your problems was solved. Anyway, if you want to set it up successfully with https, it's all described in the documentation. https://docs.hak5.org/cloud-c2/guides/lets-encrypt-ssl-configuration-and-device-enrollment Setting it up as a service is also documented. https://docs.hak5.org/cloud-c2/guides/enabling-cloud-c-as-a-service-on-boot-and-exfiltration Quote Link to comment Share on other sites More sharing options...
MattRedz Posted July 21, 2022 Author Share Posted July 21, 2022 20 minutes ago, dark_pyrro said: Not sure if your "Ahh" reaction in the second post was an indicator that all of your problems was solved. Anyway, if you want to set it up successfully with https, it's all described in the documentation. https://docs.hak5.org/cloud-c2/guides/lets-encrypt-ssl-configuration-and-device-enrollment Setting it up as a service is also documented. https://docs.hak5.org/cloud-c2/guides/enabling-cloud-c-as-a-service-on-boot-and-exfiltration Yes I got it working fine but then realised some of the limitations of running it in AWS and using 443 🙂 I wanted to see if the service had installed correctly so I shutdown the EC2 and then restarted only to realize my error and that the public IP had changed so my DNS records where now wrong. 😁 Thanks for the links BTW 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.