Kali Linux

CobaltStrikeParser : Python parser for CobaltStrike Beacon’s configuration

CobaltStrikeParser is a Python parser for CobaltStrike Beacon’s configuration.

Use parse_beacon_config.py for stageless beacons, memory dumps or C2 urls with metasploit compatibility mode (default true).
Many stageless beacons are PEs where the beacon code itself is stored in the .data section and xored with 4-byte key.
The script tries to find the xor key and data heuristically, decrypt the data and parse the configuration from it.

This is designed so it can be used as a library too.

The repo now also includes a small commuincation module (comm.py) that can help with communcating to a C2 server as a beacon.

Usage

usage: parse_beacon_config.py [-h] [–json] [–quiet] [–version VERSION] beacon
Parses CobaltStrike Beacon’s configuration from PE, memory dump or URL.
positional arguments:
beacon This can be a file path or a url (if started with http/s)
optional arguments:
-h, –help show this help message and exit
–json Print as json
–quiet Do not print missing or empty settings
–version VERSION Try as specific cobalt version (3 or 4). If not specified, tries both.

Extra

To use the communication poc copy it to the main folder and run it from there. For installing the M2Crypto library (a requirement for the poc) on Windows, it’s easiest with installers found online, and not through pip.

R K

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

1 week ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

2 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

3 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

3 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

3 weeks ago