Tutorial on Setting up Covenant C2 - Paiet/Capstone GitHub Wiki
Covenant is an open-source command and control (C2) framework that allows you to manage and control a network of compromised machines. In this tutorial, we will go over how to set up a Covenant C2 server for use in penetration testing.
Step 1: Install the .NET Core SDK and runtime Before installing Covenant C2 on Kali Linux, you need to install the .NET Core SDK and runtime. To do this, follow these steps:
- Open a terminal window on Kali Linux.
- Run the following command to download the Microsoft repository GPG keys:
wget -q https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb
- Run the following command to install the Microsoft package signing key:
sudo dpkg -i packages-microsoft-prod.deb
- Run the following command to add the Microsoft package repository:
sudo apt-get update
- Run the following command to install the .NET Core SDK and runtime:
sudo apt-get install -y dotnet-sdk-3.1
Step 2: Download and Install Covenant C2 Server To download and install Covenant C2 server on Kali Linux, follow these steps:
- Open a terminal window on Kali Linux.
- Run the following command to download the latest version of Covenant C2 from the GitHub repository:
git clone --recurse-submodules https://github.com/cobbr/Covenant.git
- Navigate to the extracted directory:
cd Covenant/Covenant
- Run the following command to build and run the Covenant C2 server:
dotnet run
Step 3: Set up a Listener After setting up the Covenant C2 server, the next step is to set up a listener. The listener is used to receive incoming connections from target systems. To set up a listener, follow these steps:
- In the Covenant C2 server, click on the "Listeners" tab.
- Click on the "Add Listener" button and select the type of listener you want to create, such as HTTP, HTTPS, or DNS.
- Enter the necessary details for the listener, such as the IP address and port number.
- Click on the "Create Listener" button to create the listener.
Step 4: Create an Implant The implant is the payload that will be executed on the target system to establish a connection with the Covenant C2 server. To create an implant, follow these steps:
- In the Covenant C2 server, click on the "Grunt" tab.
- Click on the "Add Grunt" button to create a new implant.
- Enter the necessary details for the implant, such as the name, operating system, and architecture.
- Select the listener you want to use for the implant.
- Click on the "Create Grunt" button to create the implant.
Step 5: Execute the Implant The next step is to execute the implant on the target system. The implant can be executed using various methods, such as phishing emails, social engineering, or exploiting vulnerabilities in the target system.
Step 6: Monitor the Connection After executing the implant, the connection will be established with the Covenant C2 server. You can monitor the connection and control the target system through the Covenant C2 server. The server provides various features, such as command execution, file upload/download, and keylogging.