/sandbox-process-bof

A Beacon Object File (BOF) to sandbox a process

Primary LanguageC

Sandbox AVs (or other processes)

This is a BOF implementation using direct syscalls of the excellent technique by Elastic's Gabriel Landau. Make sure to getsystem first using Cobalt Strike, or elevate your shell to SYSTEM when running standalone first!

Usage

Note: only x64 supported currently!

Load the CNA script in Cobalt Strike, then run sandbox-process <pid> in a Beacon that has SYSTEM privileges (easy using getsystem).

This will set the token of target process to Untrusted as well as strip all token privileges.

Building

Make sure mingw-w64 is installed and run make. The BOF will be written to the bin directory.

Running make test will result in an x64 executable you can use for testing or when you're on a target system.

Credits