This project will use Terraform and Ansible to set up a server on Digital Ocean. I threw in Ansible so that if need be, a different cloud solution provider could be used. That way it's more flexible...
Covenant is a .NET Core command and control (C2) framework that was built to make use of the .NET Core Framework for penetration testers. This is a cross-platform application that we will run on an Ubuntu server.
https://github.com/cobbr/Covenant
This will use Terraform to create multiple servers to mask the true identity of the C2 server where Covenant will run.
We stole the concept of relaying the requests through a HTTP/S and DNS Redirector from the articles below. I highly recommend that you read those. They are very informative.
https://rastamouse.me/2017/08/automated-red-team-infrastructure-deployment-with-terraform-part-1/
I'm running Terraform on Windows in a Docker container in PowerShell. If you are using Linux, do change "${pwd}" to "$(pwd)". Once in the container you will need to change the permissions to execute and run the setup.sh script to configure your ssh keys properly. You will also need to initialize the Terraform plugins. Run the init function after running the setup.sh script.
docker run -d -it --name terraform --entrypoint "/usr/bin/tail" -v ${pwd}:/workspace -w /workspace hashicorp/terraform:light -f /dev/null
docker exec -it terraform sh
chmod +x setup.sh
terraform apply
terraform init
Be sure to set the required variables by creating a variables.tf file and configuring it appropriately. Required variables are: sshdo, dotoken
terraform plan
terraform destroy
exit
docker rm -f terraform
Maybe you don't want to host it on Digital Ocean and there isn't an API to create cloud infrastructure. Using Ansible you can configure the server.
Comming soon...
Comming soonn...
systemctl status covenant.service journalctl -fu covenant.service journalctl -p 3 -u covenant.service