Skip to content

An aggressor script that can help automate payload building in Cobalt Strike

Notifications You must be signed in to change notification settings

Workingdaturah/Payload-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Payload-Generator

An aggressor script that can help automate payload building in Cobalt Strike

Requirements

Visual Studio 2022 with .NET Framework 4.8

Usage

The aggressor will only work in a predetermined path which is C:\Tools\cobaltstrike\aggressors\PG, When adding the new aggressor script a new menu button would be added to Cobalt Strikes Menu Bar

image

The aggressor scripts basically automates payload creation, in this example a C# binary with the CreateThread API will be compiled

image

For building the payload, predetermined values are already added to the Menu options as this API only works with x86 binaries, and the assembly type is winexe to avoid a console popup

image

Adding more templates is easy by editing the PG.cna file and placing the new scripts in the /scripts/ folder you can see below that there is a comment highlighting how to add a new menu

image

As shown below we see that it requires the C# Project file to create these binaries as it is being automated by compiling with MSBUILD, I tried adding this with Linux but no success, you are more than free to change this and add more features but these default ones are working for me.

image

This sample payload will get detected by AV. I do recommend adding this path to your exclusions or working with an OS such as COMMANDO VM to avoid any issues. This is running on my Windows 11 Home workstation with an exclusion on this path with no issues. Some small features, such as random variable naming, were added, but other things have been hardcoded as this is intended to be a POC Aggressor. I do recommend checking out the reference to get a deeper look at the building and adding more payloads.

Demo

Payload Generator

Reference

https://github.com/offsecginger/AggressorScripts

About

An aggressor script that can help automate payload building in Cobalt Strike

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages