LogoLogo
EmpireStarkillerBlogDiscord
  • Empire
  • Quickstart
    • Installation
    • Server
  • Starkiller
    • Introduction
    • Agent Tasks
  • Listeners
    • Dropbox
    • OneDrive
    • HTTP
    • Malleable C2
  • Stagers
    • multi_generate_agent
  • Plugins
    • Development
      • Imports
      • Lifecycle Hooks
      • Execution
      • Hooks and Filters
      • Plugin Tasks
      • Notifications
      • Database Usage
      • Settings
      • Migration
  • Modules
    • Autorun Modules
    • Module Development
      • PowerShell Modules
      • Python Modules
      • C# Modules
      • BOF Modules
  • Agents
    • Python
      • Main Agent Class
      • Stage Class
      • Packet Handler Class
      • Extended Packet Handler Class
    • Go
      • Main Agent Class
      • Packet Handler Class
      • Main.go Template
    • Staging
  • RESTful API
  • Settings
    • Logging
    • Bypasses
    • IP Filtering
Powered by GitBook
On this page
  • Format String
  • Example BOF

Was this helpful?

  1. Modules
  2. Module Development

BOF Modules

BOF modules are configured similarly to PowerShell modules with a few key differences:

  • The script, script_path, and script_end fields are no longer used.

  • bof.x86 and bof.x64 refer to the path of the beacon object file for each architecture (x86 and x64).

  • bof.entry_point is an optional field to define the object file's entry point.

  • An Architecture field is required.

  • format_string is used to define how data should be passed.

Format String

Type
Description
Unpack With (C)

b

Binary data

BeaconDataExtract

i

4-byte integer

BeaconDataInt

s

2-byte short integer

BeaconDataShort

z

Zero-terminated + encoded string

BeaconDataExtract

Z

Zero-terminated wide-char string (wchar_t *)

BeaconDataExtract

Example BOF

options:
  - name: Architecture
    description: Architecture of the beacon_funcs.o to generate with (x64 or x86).
    required: true
    value: x64
    strict: true
    suggested_values:
      - x64
      - x86
  - name: Filepath
    description: Filepath to search for permissions.
    required: true
    value: 'C:\\windows\\system32\\cmd.exe'
    format: Z
bof:
  x86: bof/situational_awareness/cacls.x86.o
  x64: bof/situational_awareness/cacls.x64.o
  entry_point: ''
  format_string: Z

BOF modules also support the advanced.custom_generate method of generating the script.

PreviousC# ModulesNextAgents

Last updated 1 month ago

Was this helpful?