BOF Development and Tradecraft
Learn how to write and unit test Beacon Object Files (BOFs) for use in Cobalt Strike and other C2 frameworks.
This course provides instruction on writing Beacon Object Files (BOFs) for use in Cobalt Strike and other C2 frameworks. It begins with the set up of development environments on both Windows and Linux before introducing the Windows API and Cobalt Strike's Aggressor language. Students will learn various tips, techniques, and strategies while following step-by-step instructions to create 3 operation-ready BOFs that can be added to their toolkits.
The practical examples that students work through grow increasingly complex as the course progresses. They begin with the creation of an original ransomware simulation BOF and its unit tests, before moving on to converting an open-source UAC bypass tool to BOF format, and finally exploring how BOFs and position-independent code (PIC) can be combined to create long-running in-Beacon-process tasks.
Introduction
FREE PREVIEWAuthor's Note
How to use this course
Software Requirements
Before we begin...
Windows Environment Setup
Linux Environment Setup
Resources
Background and Basics
Windows API
COFFLoader
BOF Development on Linux
BOF Development on Windows
FREE PREVIEWAggressor Scripting
Introduction
FREE PREVIEWInitial Setup
Finding the Desktop folder
Code Download
Changing the Wallpaper and Leaving the Ransom Note
Code Download
Renaming Files
Code Download
Aggressor Script
Code Download
Closing
Introduction
FREE PREVIEWInitial Setup
Code Review, Testing, and Analysis
Initial Port of Code
Code Download
Replacing Resource Functionality
Code Download
Offensive Tradecraft
Code Download
Code Cleanup
Code Download
Aggressor Script
Code Download
Closing
Resources
Introduction
FREE PREVIEWInitial Setup
Introduction to Stardust
Calling Beacon APIs from Stardust
Code Download
Integrating Stardust into the BOF
Code Download
Monitoring for New Logins
Code Download
Dumping TGTs Automagically
Code Download
Patching BOF Arguments
Code Download
Teardown and Cleanup
Code Download
Aggressor Script
Code Download
Dancing with Sleep Mask
Code Download
Closing
Resources
No, students are expected to build their own development environment using the instructions and resources provided in the course.
No. While access to Cobalt Strike will enable students to get the most out of this course, it is not strictly required nor will it be provided. The course leverages a modified version of TrustedSec's COFFLoader project to allow students to run BOFs without access to a C2 framework.
This course assumes basic familiarity with red team topics/tools like Kerberos/Rubeus, UAC, and process injection. Some basic familiarity with C and/or C++ is recommended (e.g. what does malloc do, understand conditional logic, etc)
There is no exam, but you can earn a certificate of course completion by finishing all the chapters.
I think this course offers tremendous value for both the time and money spent. I enjoyed working through the material and found it to be a very comprehens...
Read MoreI think this course offers tremendous value for both the time and money spent. I enjoyed working through the material and found it to be a very comprehensive introduction to BOF development. Some might even say it is "dense," which I happen to appreciate. In fact, that was the most compelling aspect of the course for me. This course was not simply a collection of bullet points and flowcharts. It delves into the underlying questions, integrates relevant external material, and doesn't shy away from expanding on topics to ensure they are fully covered (e.g., PIC/Reflective DLLs). This course kept the material engaging, on-point, and well-paced, I never felt lost in the details. As a result, I came out the other side with a significantly increased understanding of the concepts, not just a rote knowledge of which, "buttons to push". If you're interested in learning how to spin up real-world, functional Beacon Object Files to support your Red Teaming efforts, this course will get you there.
Read Less