Jump to content

NickBeanDNB

Active Members
  • Posts

    19
  • Joined

  • Last visited

NickBeanDNB's Achievements

  1. I removed the db file and reran the command without https and I can access the WebUI again. I had to reset it up from scratch, but hey, I am happy to be here, lol. Thanks for your help and walking me though this. I really appreciate your time and I know you didn't have to. I hope the rest of your day goes well.
  2. Let's say that is what I did. What would be the correct process to resolve it? Also, seeking to understand here, if I were to remove the CloudC2 directory and database file(s), reboot, and then manually run C2 again, would it start?
  3. Thank you!! Would the next step be the kill the processes by PID and then restarting the .service?
  4. 10510 ? S 0:00 sudo ./c2-3.3.0_amd64_linux -hostname X -https 10511 ? Ss 0:00 sudo ./c2-3.3.0_amd64_linux -hostname X -https 10512 ? Sl 0:00 ./c2-3.3.0_amd64_linux -hostname X -https 10519 ? Tl 0:00 ./c2-3.3.0_amd64_linux -hostname X -https
  5. You are right, I think 2 instances are running somehow. Also, I did not check my processes earlier when you mentioned it. Thank you again for your help. ubuntu@ip-X:~$ sudo ss -tulpn | grep 2022 tcp LISTEN 0 4096 *:2022 *:* users:(("c2-3.3.0_amd64_",pid=10519,fd=7)) ubuntu@ip-X:~$ sudo netstat -tulpn | grep 2022 tcp6 0 0 :::2022 :::* LISTEN 10519/./c2-3.3.0_am
  6. Okay, I saved it and ran the following commands, but still showing an error, so I know I messed up somewhere. (Ubuntu 22.04.1 LTS) sudo systemctl daemon-reload sudo systemctl enable cloudc2.service sudo systemctl start cloudc2.service sudo systemctl status cloudc2.service Active: failed (Result: exit-code) since Wed 2024-01-17 17:12:22 UTC; 11s ago Process: 11402 ExecStart=/usr/local/bin/c2-3.3.0_amd64_linux -hostname x -https -db /var/cloudc2/c2.db (code=exited, status=1/FAILURE) Jan 17 17:12:22 ip-x systemd[1]: Started Hak5 Cloud C2. Jan 17 17:12:22 ip-x c2-3.3.0_amd64_linux[11411]: [*] Initializing Hak5 Cloud C2 v3.3.0 Jan 17 17:12:22 ip-x c2-3.3.0_amd64_linux[11411]: [*] Hostname: x Jan 17 17:12:22 ip-x c2-3.3.0_amd64_linux[11411]: [*] DB Path: /var/cloudc2/c2.db Jan 17 17:12:22 ip-x c2-3.3.0_amd64_linux[11411]: [*] Validating License Jan 17 17:12:22 ip-x c2-3.3.0_amd64_linux[11411]: [*] License Valid Jan 17 17:12:22 ip-x c2-3.3.0_amd64_linux[11411]: [!] Error starting SSH server: listen tcp 0.0.0.0:2022: bind: address already in use Jan 17 17:12:22 ip-x systemd[1]: cloudc2.service: Main process exited, code=exited, status=1/FAILURE Jan 17 17:12:22 ip-x systemd[1]: cloudc2.service: Failed with result 'exit-code'. ~
  7. I thought I resolved that the other day when you first stated it. I should be able to go in and edit it to the correct format and then restart the service, right?
  8. I think I screwed it up when I was following (https://docs.hak5.org/cloud-c2/guides/lets-encrypt-ssl-configuration-and-device-enrollment) I used an IP address rather than a domain even though it literally says that you can't, LOL.
  9. ### /etc/systemd/system/cloudc2.service # [Unit] # Description=Hak5 Cloud C2 # After=cloudc2.service # [Service] # Type=idle # ExecStart=/usr/local/bin/c2-3.3.0_amd64_linux -hostname http://x/ -https -db /var/cloudc2/c2.db # [Install] # WantedBy=multi-user.target What is odd is that I edited it and removed the http:// after host name. Before that, I had my IP in there and you showed me that -https would not work with an IP so that is when I registered the domain and added it into the service file.
  10. See attached for the open ports. I followed the directions to move the C2 binary and service file (cloudc2.service) to systemd so it would stay up, but I think I messed something up there. I was able to access the WebUI at one point before I attempted the Let's Encript and "service on boot" guides on the docs.hak5.org website.
  11. I definitely want to that the simpler route and use Let's Encrypt. I have not used that domain for anything yet and the only intention of obtaining it was for this.
×
×
  • Create New...