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

cp Command: Copy Files and Directories in Linux

The cp command, short for "copy," is the main Linux utility for duplicating files and directories. Whether…

7 days ago

Image OSINT

Introduction In digital investigations, images often hold more information than meets the eye. With the…

7 days ago

cat Command: Read and Combine File Contents in Linux

The cat command short for concatenate, It is a fast and versatile tool for viewing and merging…

7 days ago

Port In Networking

What is a Port? A port in networking acts like a gateway that directs data…

1 week ago

ls Command: List Directory Contents in Linux

The ls command is fundamental for anyone working with Linux. It’s used to display the files and…

1 week ago

pwd Command: Find Your Location in Linux

The pwd (Print Working Directory) command is essential for navigating the Linux filesystem. It instantly shows your…

1 week ago