How to Install Covenant on Kali Linux
This is a quick walkthrough on installing Covenant Command & Control (C&C) framework on Kali Linux. I tested this on Kali 2020.3. but this should work for later version updates as well. Let’s get started.
Covenant has a nicely written installation and setup page over here: https://github.com/cobbr/Covenant/wiki/Installation-And-Startup
..but I hope to summarise what’s needed to get it up and running on Kali Linux in this post.
First, you need to download the .NET Core framework for Linux. At the time of writing the latest version was 3.1. You can find the latest *recommended* release over here:
I have a 64bit Kali linux. I’ve read some recommendations mentioning to use 64bit bit instead of 32bit Kali when installing Covenant. I downloaded the 64bit version of the .NET SDK package from the .NET Core 3.1 download page. Screenshot below:
Once the tar.gz file is downloaded on to my Kali host, I pretty much followed the instructions from here to extract it and set the relevant environment variables. I’ve detailed the steps I took below for clarity.
Go ahead and run the following to extract the tar.gz file:
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-3.1.403-linux-x64.tar.gz -C $HOME/dotnet
The above command will extract the contents to your $HOME/dotnet folder as confirmed below:
Now set the environment variables required with the following commands:
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
And you are done setting up the .NET Core framework needed for Covenant. Now, lets move on to installing Covenant itself.
I installed Covenant under my ~/tools folder, so feel free to change the location as you need:
cd ~/toolsgit clone --recurse-submodules https://github.com/cobbr/Covenant
The above will download Covenant from Github repository. It will use up about 141Mb of space. Once downloaded:
cd Covenant/Covenant
donet build
Running the above command will start building the Covenant project. It built successfully, you should get a message like this:
Now you are ready to run Covenant:
dotnet run
This will start the Covenant web service on TCP port 7443. You can check this via another terminal by running:
# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:7443 0.0.0.0:* LISTEN 1650543/Covenant
Now, open up a web browser and point to port 7443 of your Kali host. For example, if your Kali host IP is 192.168.1.10 you should be trying https://192.168.1.10:7443 , as an example.
You will get a certificate warning, which you can safely ignore for now and proceed, which will redirect you to /covenantuser/login path. If everything has gone well so far, this should take you to the Covenant initial user registration page as shown below:
Prove a username and password to register an account. Make sure you remember this password or save it securely somewhere.
Once logged in, you will be taken to the /home/index path where the Covenant dashboard will be displayed to you as shown below:
Congrats~ You just completed installing Covenant on your Kali host. I will discuss the cool stuff you can do via Covenant in another post. Stay tuned.