Jump to content

Error setting up on amazon aws/lightsail


LuX

Recommended Posts

followed this tutorial:

 

I made the server exactly as he said on amazons website.

on the terminal i pasted the code, and got a unzip error. realized the code in the description had a /dl instead of a /com after Hak5.org. changed that.

Still doesnt work. New error code:

[!] Error creating database open c2.db: permission denied

 

Any help?

Link to comment
Share on other sites

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

That's the command

After further testing, i got the original code to work with /dl somehow. Now i have the files on the server. I was able to unzip them. so i removed these steps from the code(i already did them) New code:

IP=$(curl -s https://checkip.amazonaws.com) && \
echo "Copy the below setup token and browse to http://$IP:8080" && \
./c2-*_amd64_linux -hostname $IP

And now i am at the c2.db error.

 

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Good afternoon Guys, i have just installed Cloud C2 on the lightsail platform based on the hak5 youtube videos based on the first video i was able to install without any issues and i can access the web interface via the public IP. i am now trying to setup the SSL based on the second Video Hak5 2702, based on the screenshare the commands does not work as i suspect it was created on a previous version of the platform, i have tried to alter the command based on the LS output but was not able to get it working. any assistance would be greatly appreciated and then once this is working i definitely need help with the start on boot as i tried to set it up, i did not get any errors but it also did not work when i rebooted the instance to see if it auto started.

After installation i got the below

Copy the below setup token to browser http://xxx.xxx.xxx.xxx:8080
[*] Initializing Hak5 Cloud C2 v3.1.2
[*] Hostname: xxx.xxx.xxx.xxx-listenip
[*] DB Path: c2.db
[*] Validating License
[*] License Valid
[*] Running Hak5 Cloud C2

the LS output was 
ubuntu@ip-xxx-xxx-xxx-xxx:~$ ls
c2-3.1.2_amd64_darwin       c2-3.1.2_armv6_linux  c2-3.1.2_i386_windows.exe  sha256sums
c2-3.1.2_amd64_linux        c2-3.1.2_armv7_linux  c2.db
c2-3.1.2_amd64_windows.exe  c2-3.1.2_armv8_linux  c2.zip
c2-3.1.2_armv5_linux        c2-3.1.2_i386_linux   c2_setup_token.txt
ubuntu@ip-xxx-xxx-xxx-xxx:~$ 

The Command i ran to setup the SSL was:
Original: Sudo ./c2_community-linux-64 -hostname mydomain.com -https
My version: Sudo ./c2-3.1.2_amd64_linux -hostname mydomain.com -https
The output after running the command is :

ubuntu@ip-xxx-xxx-xxx-xxx:~$ ./c2-3.1.2_amd64_linux -hostname cloudc2.mydomain.com -https
[*] Initializing Hak5 Cloud C2 v3.1.2
[*] Hostname: cloudc2.mydomain.com
[*] DB Path: c2.db

 

 

Link to comment
Share on other sites

Hi chrizree, once i run the command to set up https i am expecting the cloudc2 server to be available via https but it is not, i have my DNS A record in place and i am not getting any errors when i run the updated command. 

The Command i ran to setup the SSL was:
Original Command From the Video: Sudo ./c2_community-linux-64 -hostname mydomain.com -https
My version: Sudo ./c2-3.1.2_amd64_linux -hostname mydomain.com -https

The output after running the command is :

ubuntu@ip-xxx-xxx-xxx-xxx:~$ ./c2-3.1.2_amd64_linux -hostname cloudc2.mydomain.com -https
[*] Initializing Hak5 Cloud C2 v3.1.2
[*] Hostname: cloudc2.mydomain.com
[*] DB Path: c2.db

Link to comment
Share on other sites

Actually, i just figured it out, i had to stop the services and rerun the command to set up the https, it is working now
ubuntu@ip-xxx-xxx-xxx-xxx:~$ sudo ./c2-3.1.2_amd64_linux -hostname cloudc2.mydomain.com -https
[*] Initializing Hak5 Cloud C2 v3.1.2
[*] Hostname: cloudc2.mydomain.com
[*] DB Path: c2.db
[*] Validating License
[*] License Valid
[*] Running Hak5 Cloud C2

Link to comment
Share on other sites

  • 3 weeks later...

I'm having a similar issue that I am hoping someone can help with. Followed the videos and the support info here, everything seems to be working except my domain name. It should have propagated by now and when I run the "-https" command I get the following:

"[*] Initializing Hak5 Cloud C2 v3.1.2
[*] Hostname: my-domain.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"

Any help is greatly appreciated.

Link to comment
Share on other sites

8 hours ago, chrizree said:

What OS are you running the C2 instance on?

Almost exactly like the videos but using the latest Ubuntu (20.04 LTS) on Amazon’s Lightsail server. Got the domain from Google Domains. Should I have gone with version 18.04 instead I wonder?

Link to comment
Share on other sites

6 hours ago, chrizree said:

Haven't experienced that before, I guess you need to tell more in detail about your setup and how you start your C2 instance to be able to troubleshoot any further.

Don't know how much more detail I can add, I literally followed the two videos step by step, even getting my domain from the same place. The only thing I did different, as others have also mentioned, was the video showed this as what was going to be used: ./c2_community-linux-64 
but in the description of the video they updated to this, and it was this that I copy and pasted: 
./c2-3.1.2_amd64_linux

Link to comment
Share on other sites

So running this from the command line does not work at all and throws that error (with a valid domain name of course)

sudo ./c2-3.1.2_amd64_linux -hostname my-domain.com -https

Have you set it up as a service?

Do you run other things other than the C2 instance on that VPS?

Link to comment
Share on other sites

3 hours ago, chrizree said:

So running this from the command line does not work at all and throws that error (with a valid domain name of course)

sudo ./c2-3.1.2_amd64_linux -hostname my-domain.com -https

Have you set it up as a service?

Do you run other things other than the C2 instance on that VPS?

Correct. I have an actual valid domain name that I paid for, assigned the static IP to it, nothing else running except C2. 

Link to comment
Share on other sites

Well, as of right now, I have no ideas of what could be wrong. I run my C2 instance in the exact same way and I've never had such issues. As you run it with sudo and have nothing else already using the port and everything else looks ok, then I can't say what the trouble might be.

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

https://www.youtube.com/watch?v=TIpx_ENurLY

I am also following this YT setting up my C2 Server for the first time. I was at the stage where I was entering the security token part and password. Phone rang, something ate the neighbors chickens last night...maybe a fox, or maybe my 125lb German Shepard who is standing there.....looking at him.....with a chicken in his mouth?

I got a little detracted a while....anywho, neighbor is missing some chickens and I am now missing my security token. Daren talks about it in the video at the 10:05 mark, but I cant quite make out what he is saying to do. "Regenerating C2 Security Token". My ears are ringing too much from the neighbor yellin at me.looking at him.....

Anyone out there able to help me out here, need some rare breed chickens and a security token so I can play with some Crocs, Bunnies, Squirrels and other Critters.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...