Hak5 C2

From Void-Byte
Jump to navigation Jump to search

About

Installation Guide

Step 1. Update, upgrade, and clean your machine.

sudo apt -y update && sudo apt -y upgrade && sudo apt clean

Hak5c2 step1.png

Step 2. Install required packages.

sudo apt -y install unzip ufw

Hak5c2 step2.png

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

Hak5c2 step3.png

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

Hak5c2 step4.png

Step 5. Move the c2_community* file to usr/local/bin, and create the require database directory.

sudo mv /tmp/c2_community-linux-64 /usr/local/bin && sudo mkdir /var/hak5c2

Hak5c2 step5.png

Step 6. Create a new systemd service to run the Hak5 C2 script.

sudo vim /etc/systemd/system/hak5.service

Hak5c2 step6.png

Step 7. Utilize a template below, or build your own.

Template A (https)

[Unit]
Description=Hak5 C2
After=hak5.service
[Service]
Type=idle
ExecStart=/usr/local/bin/c2_community-linux-64 -hostname IPAddressORHostname -https -db /var/hak5c2/c2.db
[Install]
WantedBy=multi-user.target

Hak5c2 templateA.png

Template B (http)

[Unit]
Description=Hak5 C2
After=hak5.service
[Service]
Type=idle
ExecStart=/usr/local/bin/c2_community-linux-64 -hostname IPAddressORHostname -db /var/hak5c2/c2.db
[Install]
WantedBy=multi-user.target

Hak5c2 templateB.png

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

Hak5c2 templateC.png

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

Hak5c2 step8.png

Step 9. View the status of your service in order to view your key.

sudo systemctl status hak5.service

Hak5c2 step9.png

Step 10. Visit your website and fill in the required information to finalize.

Hak5c2 web1.png

Step 11. Sign into your Hak5 C2 website.

Hak5c2 web2.png

Step 12. Add devices, export logs, and more!

Hak5c2 web3.png