How hrtywhy/bof-cobaltstrike works
Project type and purpose
• This is an open-source tooling repository: a curated collection of Cobalt Strike Beacon Object Files (BOFs) organized by function (enumeration, .NET assembly loaders, exploitation, miscellaneous).
• Its purpose is to serve as a one-stop index of standalone BOF plugins that can be loaded into Cobalt Strike for red-teaming or pentesting.
“architecture” from the README
• There is no traditional “frontend” or “backend” code here—just documentation pointing at external BOF modules.
• The core runtime is the Cobalt Strike Beacon, into which these BOF modules (compiled “.o” files) are loaded at runtime.
• Some modules invoke direct syscalls or patch in-memory (AMSI/ETW), others load .NET assemblies or use Aggressor scripts.
Main components
a. Cobalt Strike Beacon (central execution engine)
b. BOF Modules, grouped by category:
• Enumeration BOFs
• .NET Assembly Execution BOFs
• Exploitation & Injection BOFs
• Miscellaneous BOFs & Templates
c. External repositories (shown as “cloud” or “repository” nodes) hosting each BOF
d. Target Host OS / Process Model (Windows API / direct syscalls)
e. Optional loader wrappers (InlineExecute-Assembly, inject-assembly, Aggressor scripts)
Relationships and interactions
• BOF modules call into the Windows API or execute syscalls in the target process.
• .NET loaders inject or spin up a CLR AppDomain inside a native process.
• Aggressor scripts extend Beacon with colorized help or logging functions.
Architectural patterns & design principles
• Plugin architecture: BOFs are *pluggable* object files.
• Opaque execution: direct syscalls or in-memory patching for opsec.
• Categorization: grouping by capability (enumeration vs. exploitation).
• Decoupled delivery: documentation repo separate from actual BOF code repos.
Detailed capture of essential elements
• Flow “User Console → Beacon → [Select BOF] → Inject / Syscall → Target Process.”
• Special features on modules (e.g., “Direct Syscalls,” “In-Memory Patching,” “CLR Host”).
• With example commands (e.g., “whereami,” “FindModule amsi.dll,” “kerberoast SPN”).