cpp-bof

Generate, compile, and debug C++ Beacon Object Files for Cobalt Strike.

15|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/AeonDave/malskill --skill cpp-bof
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-bof
Source: https://github.com/AeonDave/malskill/tree/main/bof/cpp-bof
Command: npx skills add https://github.com/AeonDave/malskill --skill cpp-bof

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables the creation of advanced Beacon Object Files (BOFs) using C++, offering enhanced capabilities for complex tasks within Cobalt Strike or compatible C2 frameworks.

Core Features & Use Cases

  • C++ BOF Development: Generate, compile, and debug BOFs in C++.
  • Advanced Techniques: Leverage RAII, templates, classes, and integrate COM/GDI+.
  • Dual-Build Support: Create BOFs that can also be compiled as standalone EXEs.
  • Use Case: You need to write a BOF that performs complex screen capture and encoding using GDI+; this Skill provides the structure and guidance to do so efficiently in C++.

Quick Start

Use the cpp-bof skill to create a C++ BOF that captures the screen and encodes it as a JPEG.

Frequently Asked Questions about cpp-bof

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Beacon Object Files using C++ instead of C?

Beacon Object Files can be written in C++ to leverage advanced features like RAII, templates, and classes. This approach allows integrating COM and GDI+ for complex tasks such as screen capture and encoding within Cobalt Strike.

Can I compile a BOF as a standalone EXE for debugging?

Yes, dual-build patterns allow compiling Beacon Object Files as standalone EXEs. This enables debugging C++ BOFs locally before deploying them to Cobalt Strike or compatible C2 frameworks.

Do I need mingw-w64 to compile C++ BOFs for Cobalt Strike?

Yes, the mingw-w64 toolchain is required to compile C++ BOFs. Python 3 is also necessary to execute the build scripts that generate and debug the Beacon Object Files.

How do I use GDI+ for screen capture in a Cobalt Strike BOF?

You can integrate GDI+ within a C++ BOF to perform complex screen capture and JPEG encoding. The skill provides the structural guidance needed to leverage these advanced techniques efficiently.

What are the limitations of using C++ for Beacon Object Files?

C++ BOFs require careful management of advanced features like RAII and templates to ensure compatibility with Cobalt Strike. Additionally, the mingw-w64 toolchain and Python 3 must be properly configured for successful compilation.

Why use C++ for malware development in red teaming?

C++ enables complex malware development for red teaming by supporting object-oriented patterns, RAII, and COM integration. This allows creating sophisticated Beacon Object Files for Cobalt Strike beyond standard C implementations.