Scoobthenewb Posted February 18, 2021 Posted February 18, 2021 Step 1. Update, upgrade, and clean your machine. sudo apt -y update && sudo apt -y upgrade && sudo apt clean Step 2. Install required packages. sudo apt -y install unzip ufw Step 3. Open ports depending on your needs (20, 2022, 80, 8080, 443). sudo ufw allow 22,2022,80,8080,443/tcp && sudo ufw enable && sudo ufw reload Step 4. Download and unzip the community ZIP files in the tmp directory. sudo wget https://c2.hak5.org/download/community -O /tmp/community && sudo unzip /tmp/community -d /tmp Step 5. Move the c2_community* file to usr/local/bin, and create the require database directory. sudo mv /tmp/c2-3.1.1_amd64_linux /usr/local/bin && sudo mkdir /var/hak5c2 Step 6. Create a new systemd service to run the Hak5 C2 script. sudo vim /etc/systemd/system/hak5.service * newbie note added once vim editor opens click I to enter text and once your done hit esc : then type wq! hit enter* see template below for options Step 7. Utilize a template below, or build your own * in intrest of newbie users where going to be using port 80 instead of https which is http* Template C (http / port 80) [Unit] Description=Hak5 C2 After=hak5.service [Service] Type=idle ExecStart=/usr/local/bin/c2_community-linux-64 -hostname IPAddressORHostname -listenport 80 -db /var/hak5c2/c2.db [Install] WantedBy=multi-user.target * newbie note* after local/bin youll use this instead of the upper example ExecStart=/usr/local/bin/c2-3.1.1_amd64_linux and after -host name you would erase the place holder and insert your instances ip adress less you have a dns domain name then you would paste that there instead use the about esc qw! to save and exit Step 8. Reload the systemd daemon, enable the service, and start. sudo systemctl daemon-reload && sudo systemctl enable hak5.service && sudo systemctl start hak5.service Step 9. View the status of your service in order to view your key. sudo systemctl status hak5.service after this you should get something like this You will get an output like this: [*] Initializing Hak5 Cloud C2 v3.1.1 [*] Hostname: <ip address of the C2 instance "server"> [*] DB Path: c2.db [*] First Start. Initializing... [*] Initial Setup Required - Setup token: <some token string...> [*] Running Hak5 Cloud C2 5) Now browse to the ip address of the C2 instance, but use port 8080 and no https 6) You will be greeted with the web based Server Setup page i would like to give credit to the original poster of this guide https://wiki.void-byte.com/index.php/Hak5_C2 i edited it and made it into the revised version but its based off his work also i would like to give a big shout out to chrizee for his help during my struggle and his contributions i hope this helps you guys as much as it did me
chrizree Posted February 18, 2021 Posted February 18, 2021 You should change the text you cut from my post in the 3.1.1 release thread to not confuse those following this, the numbering 5) and 6) can be removed as well as the comment I put about "use port 8080" since you in your instruction has already mentioned that the setup is for port 80 ("in intrest of newbie users where going to be using port 80 instead")
Recommended Posts
Archived
This topic is now archived and is closed to further replies.