Havoc Teamserver
Source code of Havoc teamserver. Written in Golang.
Build the Teamserver
- Pre-requisites
- Go1.18
- Native
- To build the Teamserver client locally, run the following command in this folder(
~/Havoc/Teamserver/):make
- That's it! If it ran successfully to completion, you should now have a compiled binary ready for use in the
/binfolder. - Example use with a prewritten profile:
sudo ./teamserver server --profile profiles/havoc.yaotl --verbose - Example use with default profile:
sudo ./teamserver --default --verbose
- To build the Teamserver client locally, run the following command in this folder(
- Docker
- To build the Teamserver client using a local Docker container, run the following commands(assuming you have Docker installed):
- Build the Dockerfile:
sudo docker build -t havoc-teamserver -f Teamserver-Dockerfile .
- (Optional) Create a persistent data volume for the container:
sudo docker volume create havoc-c2-data
- Run the container:
sudo docker run -it -d -v havoc-c2-data:/data havoc-teamserver
- Build the Dockerfile:
- To build the Teamserver client using a local Docker container, run the following commands(assuming you have Docker installed):
- Jenkins Docker
- We can also build the Teamserver binary using a pre-configured Jenkins Docker image.
- From the parent folder(
Havoc), run the following command to build the container:- `sudo docker build -t jenkins-havoc-teamserver -f JT-Dockerfile .``
- (Optionally) Create a persistent data volume for the container:
sudo docker volume create havoc-cicd-c2-data
- Next, we want to run the container:
sudo docker run -p8080:8080 -it -d -v havoc-cicd-c2-data:/data jenkins-havoc-teamserver
- We can now visit Jenkins at
localhost:8080and create a Pipeline to build the Havoc Teamserver!- For a pre-done Groovy script, please see the
Havoc-Teamserver.groovyin theAssetsfolder.
- For a pre-done Groovy script, please see the
- From the parent folder(
- We can also build the Teamserver binary using a pre-configured Jenkins Docker image.
Run the Teamserver
- Base:
- The teamserver can also be used directly:
./teamserver -h./teamserver server --profile profiles/havoc.yaotl -v./teamserver server --default -v
- The teamserver can also be used directly:
- Docker
- We can run the teamserver completely from within a container!
- Build the container:
sudo docker build -f Client-Dockerfile .
- Launch the container (be sure to change the port mapping to match your environment):
sudo docker run -p40056:40056 -p 443:443 -it -d -v havoc-c2-data:/data jenkins-havoc-client
- Access the teamserver at
localhost:40056using your Teamserver client.