Home

Awesome

Random C2 Profile Generator

Cobalt Strike random C2 Profile generator

Author: Joe Vest (@joevest)

Overview

This project is meant to quickly generate a random c2 profile. It is basically a Jinja template with random variables. The idea is to focus on randomization vs a cohesive set of values that support a specific threat actor.

Detailed Malleable C2 profile information can be found at https://github.com/threatexpress/malleable-c2/.

!! OPSEC warning using the default profile !!

The default template may not meet your OPSEC needs. Profiles should always be tweaked to meet your specific needs. You can create your own profile template for customization. Custom templates can be save in the templates directory. Copy the default template and modify as needed.

OPSEC WARNING: Highlights of the default profile you should be aware of before using

Setup

This has been designed and tested with python3

Method 1: Keep your pythons separate and use pipenv (my prefered) - https://pipenv-fork.readthedocs.io/en/latest/basics.html

pipenv --python 3.10
pipenv install
pipenv shell
python random_c2profile.py

Method 2: Via pip3 and the Pipfile

git clone https://github.com/threatexpress/random_c2_profile
cd random_c2_profile
pip3 install -p Pipfile
python3 random_c2profile.py

Generate some profiles

Generate profile from default template

python random_c2profile.py

===================================================================
 ___              _              ___ ___   ___          __ _ _     
| _ \__ _ _ _  __| |___ _ __    / __|_  ) | _ \_ _ ___ / _(_) |___ 
|   / _` | ' \/ _` / _ \ '  \  | (__ / /  |  _/ '_/ _ \  _| | / -_)
|_|_\__,_|_||_\__,_\___/_|_|_|  \___/___| |_| |_| \___/_| |_|_\___|
Cobalt Strike random C2 Profile generator
Joe Vest (@joevest) - 2021
===================================================================

[*] Generating Cobalt Strike Malleable C2 Profile
    Version : 4.7
    template: templates/default_c2profile_template.jinja
[*] Done. Don't forget to validate with c2lint. 
[*] Profile saved to output/UBVOTUIW.profile

Generate profile from custom template

python random_c2profile.py --template templates/my_template.jinja

===================================================================
 ___              _              ___ ___   ___          __ _ _     
| _ \__ _ _ _  __| |___ _ __    / __|_  ) | _ \_ _ ___ / _(_) |___ 
|   / _` | ' \/ _` / _ \ '  \  | (__ / /  |  _/ '_/ _ \  _| | / -_)
|_|_\__,_|_||_\__,_\___/_|_|_|  \___/___| |_| |_| \___/_| |_|_\___|
Cobalt Strike random C2 Profile generator
Joe Vest (@joevest) - 2021
===================================================================

[*] Generating Cobalt Strike Malleable C2 Profile
    Version : 4.7
    template: templates/my_template.jinja
[*] Done. Don't forget to validate with c2lint. 
[*] Profile saved to output/NSJOTVMN.profile

File Descriptions

FileDescription
c2profile_template.jinjaBase template for a c2 profile
variable.pyMapping of python variables to variables used in jinja template. Modify these as you need.
functions.pycontains logic for generating data used in a profile. Additional functions can be added and used in a custom profile template.
html_contents.pycontains a set of html code used to inject 'random' data into a profile

References

Magic MZ

Word list source

Change Log

Note: Get change log from git using git log --pretty=format:" - %cd - %cn : %s"