BOF and Extensions
Beacon Object Files
BOF is just a block of position-independent code that receives pointers to some Beacon internal APIs. BOFs are single-file C programs that call Win32 APIs and limited Beacon APIs.
AdaptixC2 expects that your BOFs are single-threaded programs that run for a short period of time. BOFs will block other agent tasks and functionality from executing. BOFs execute inside of your agent. If a BOF crashes, you will lose access. Write your BOFs carefully.
Description of BOF for agents
Beacon BOFsGopher BOFsExtensions
How to execute AxScript
The extension file is an AxScript that must start with a global definition of the metadata variable that has the following properties: .
name- extension name,description- extension descriptionstore- determines whether the extension should be stored in the database (default:true).
Typically, extensions register new commands to call already registered commands. An example of defining a shell command that calls the command ps run -o .... See more details here.
AxScript and BOFs
You'll likely want to use AxScript to run your finalized BOF implementations within AdaptixC2. A BOF is a good place to implement a lateral movement technique, an escalation of privilege tool, or a new reconnaissance capability.
Each agent has its own command to execute BOF. For example, for a beacon agent it is execute bof. Here is a script to run a screenshot_bof BOF:
First, the script gets the note and pid values. The next step is to pack our arguments. The bof_pack function packs arguments in a way that is compatible with Beacon's internal data parser API. This script uses execute_alias to run BOF with its arguments.
Last updated