Beacon Object Files and In-Memory Tradecraft

Beacon Object Files and In-Memory Tradecraft - article cover image Malware & C2
Time it takes to read this article < 1 minites.

Disclaimer: This article is provided strictly for educational purposes and authorized security testing. Only run these techniques against systems you own or have explicit written permission to assess. Unauthorized access to computer systems is illegal in virtually every jurisdiction and can carry severe penalties.

Introduction

Beacon Object Files execute post-exploitation code in-process without spawning new processes.

They reduce the footprint relative to fork-and-run tooling.

How It Works

BOFs are small position-independent objects loaded and run inside the implant, avoiding noisy child processes.

This complicates process-tree-based detection.

Walkthrough

The BOF entry point skeleton:

void go(char* args, int len){ BeaconPrintf(CALLBACK_OUTPUT, "hello"); }
C

Pivot to process-access telemetry where BOFs touch other processes:

Get-WinEvent -FilterHashtable @{LogName='...Sysmon/Operational';Id=10}
PowerShell

Detection and Defense

Lean on in-memory and API-level telemetry rather than process creation, and monitor handle access patterns.

Use ETW-based sensors that survive in-process evasion.

Conclusion

In-memory tradecraft defeats process-tree detection; API and memory telemetry are the answer.

You Might Also Like

If you found this useful, these related deep-dives cover adjacent techniques and their defenses:

Comments

Copied title and URL