← Documentation / Operator Guide

BOF Reference

All built-in BOFs by category with descriptions and arguments

All 235 built-in BOFs (168 Windows + 67 Linux) organized by category. Each BOF is called by its short name at the operator console.

Windows BOFs (168)

Recon (18 BOFs)

BOFDescriptionUsage
catDisplay remote file contentscat <path>
clipboardRead clipboard text contentsclipboard
drivesEnumerate logical drives (type, free/total)drives
get_privEnable privilege (~prefix for thread token)get_priv <privilege>
get_productidRead Windows ProductId for —machine-lock buildsget-productid
handlesList open handles for current processhandles
hostnamePrint computer hostnamehostname
keylogKeylogger (GetAsyncKeyState, tracks window title)keylog start, keylog stop, keylog dump
listhandlesList open handles for target processlisthandles <pid>
lsList directory (default: .\*)ls [path]
pidShow current process IDpid
ppidShow current PID, parent PID, and parent nameppid
psList running processes (PID, name, user, arch)ps
pwdPrint remote working directorypwd
screenshotCapture desktop to BMPscreenshot [path]
sysinfoOS version, hostname, domain, archsysinfo
tokeninfoToken details for current processtokeninfo
whoamiCurrent user, privileges, and group membershipswhoami

Host Enumeration (15 BOFs)

BOFDescriptionUsage
adv_audit_policiesQuery advanced audit policy settingsadv_audit_policies
driversigsEnumerate loaded driver signaturesdriversigs
enum_local_sessionsEnumerate local interactive sessionsenum_local_sessions
envEnvironment variablesenv
find_loaded_moduleFind processes with specific DLL loadedfind_loaded_module <dll>
get_dpapi_systemRetrieve DPAPI system master keysget_dpapi_system
get_session_infoCurrent session info (ID, user, state)get_session_info
ipconfigNetwork adapter configurationipconfig
listmodsList loaded modules for processlistmods <pid>
localeSystem locale and language infolocale
resourcesSystem resource usage statsresources
uptimeSystem uptimeuptime
useridletimeUser idle/last input timeuseridletime
whoami_fullDetailed whoami (all tokens, groups, privileges)whoami_full
windowlistEnumerate visible windowswindowlist

Execution (8 BOFs)

BOFDescriptionUsage
cmdRun shell command (cmd.exe /C)cmd <command>
execute_assemblyRun .NET assembly via fork & run (full evasion)execute-assembly <path> [args]
execute_assembly_inprocRun .NET assembly in-process (full evasion)execute-assembly-inproc <path> [args]
execute_assembly_inproc_no_evaRun .NET assembly in-process (no evasion, BD-safe)execute-assembly-inproc-noeva <path> [args]
execute_assembly_no_evaRun .NET assembly via fork & run (no evasion, BD-safe)execute-assembly-noeva <path> [args]
execute_assembly_proxyRun .NET assembly via proxy loader (fork & run)execute-assembly-proxy <path> [args]
execute_assembly_stdRun .NET assembly via standard loader (fork & run)execute-assembly-std <path> [args]
powershellRun PowerShell command (hidden, no profile)powershell <command>

File Operations (7 BOFs)

BOFDescriptionUsage
cdChange remote working directorycd <path>
cpCopy remote filecp <src> <dst>
mkdirCreate remote directorymkdir <path>
motw_removeRemove Mark of the Web (Zone.Identifier ADS)motw_remove <path>
mvMove/rename remote filemv <src> <dst>
rmDelete remote filerm <path>
uploadUpload local file to remote pathupload <local> <remote>

File & Hash (6 BOFs)

BOFDescriptionUsage
caclsFile/folder ACL permissionscacls <path>
dirDirectory listing with depth controldir <path> [depth]
md5MD5 hash of filemd5 <path>
sha1SHA1 hash of filesha1 <path>
sha256SHA256 hash of filesha256 <path>
vssenumEnumerate Volume Shadow Copiesvssenum

Network (16 BOFs)

BOFDescriptionUsage
arpARP table (neighbor cache)arp
list_firewall_rulesEnumerate Windows Firewall ruleslist_firewall_rules
listdnsDNS client cache entrieslistdns
netloggedonEnumerate logged-on usersnetloggedon [host]
netloggedon_wtsLogged-on users (WTS API)netloggedon_wts [host]
netsessionEnumerate net sessions (level 0 or 10)netsession [host]
netsession_sweepNet sessions — domain-wide DC sweepnetsession_sweep
netsharesEnumerate network sharesnetshares [host]
netstatActive TCP/UDP connections and listenersnetstat
netuptimeRemote host uptime via NetRemoteTODnetuptime <host>
netuseMap/list network drives (NetUseEnum)netuse [host]
netviewEnumerate network shares and machinesnetview
nslookupDNS lookup (A/AAAA/ANY)nslookup <domain>
probeTCP port connectivity checkprobe <host> <port>
routeprintIP routing tablerouteprint

Lateral Movement (4 BOFs)

BOFDescriptionUsage
psexecLateral move via SCM service create/startpsexec <host> <cmd>
smb_uploadCopy file to remote host via SMB/UNCsmb_upload <local> <\\host\share\path>
winrmRemote exec via WinRM (port 5985)winrm <host> <command>
wmi_execRemote exec via WMI (Win32_Process.Create)wmi_exec <host> <user> <pass> <cmd>

Privilege Escalation (3 BOFs)

BOFDescriptionUsage
getsystem_tokenAdmin→SYSTEM via winlogon.exe token theftgetsystem_token
uacbypass_comUAC bypass via CMSTPLUA COM + PEB masqueradeuacbypass_com <command>
uacbypass_taskschedUAC bypass via VFServer factory + TaskScheduleruacbypass_tasksched <command>

Privesc Enumeration (7 BOFs)

BOFDescriptionUsage
enum_autorunsAutorun entries with path/permission checksenum_autoruns
enum_netlistenersTCP/UDP listening ports with owning processenum_netlisteners
enum_patchesInstalled hotfixes/KBs for exploit matchingenum_patches
enum_persistenceWMI subs, writable PATH, extension handlersenum-persistence [all|wmi|path|ext]
enum_schtasksNon-MS scheduled tasks with writable actionsenum_schtasks
enum_servicesServices with unquoted paths, modifiable configsenum_services
privesc_checksAlwaysInstallElevated, UAC, WDigest, LAPS, LSAprivesc_checks

Credential Dumping (9 BOFs)

BOFDescriptionUsage
dump_chromeDump Chrome cookies/logins (App-Bound Encryption v20+)dump-chrome [cookies|logins|all]
dump_firefoxDump Firefox cookies/logins from all profilesdump-firefox [cookies|logins|all]
hashdumpDump SAM/SYSTEM/SECURITY hives (parse with secretsdump)hashdump
nanodumpDump LSASS to filenanodump [path]
nanodump_handledupLSASS dump via handle duplicationnanodump-handledup
nanodump_speLSASS dump via WerFault Silent Process Exit (LOLBin)nanodump-spe <dump|check|cleanup> [folder]
nanodump_spe_nopdataLSASS dump via SPE without ProcDatananodump-spe-nopdata
racecond_dumpLSASS dump via race conditionracecond-dump
rdp_thiefRDP credential theft via HWBP hooks in mstsc.exerdp-thief <inject|collect|eject> [pid]
samdumpIn-memory SAM hash extraction via registry API (no files)samdump
spe_dumpLSASS dump via Silent Process Exitspe-dump

Credential Hunting (6 BOFs)

BOFDescriptionUsage
autologonAuto-logon creds in Winlogon registryautologon
cred_filesScan for credential files (web.config, .kdbx, etc)cred_files
dpapi_keysDPAPI master key file enumerationdpapi_keys
enum_credsCredential Manager entries (generic/domain)enum_creds
psh_historyPowerShell ConsoleHost_history.txt (all users)psh_history
wifi_passwordsSaved WiFi profiles and plaintext keyswifi_passwords

Token Manipulation (4 BOFs)

BOFDescriptionUsage
getuidShow current identity (thread or process token)getuid
make_tokenCreate token with alternate network credentialsmake_token <domain\user> <password>
rev2selfRevert to original process identityrev2self
steal_tokenSteal and impersonate token from target processsteal_token <pid>

Persistence (5 BOFs)

BOFDescriptionUsage
persist_comhijackCOM hijack persistence (install/remove/check)persist-comhijack install <dll_path>, persist-comhijack remove, persist-comhijack check
persist_registryRegistry persistence (run/userinit/shell/ifeo/appinit/activeset)persist-registry <method> <install|remove|check> [name] [payload]
persist_schtaskScheduled task persistence (logon trigger)persist_schtask <name> <exe_path>
persist_wmiWMI event subscription persistence (survives reboot)persist-wmi <install|remove|check> <name> [trigger] [payload]

Evasion (3 BOFs)

BOFDescriptionUsage
detect_hooksScan ntdll/kernel32/kernelbase for EDR hooksdetect_hooks
etw_hijackBlind ETW sessions by restarting with fake logetw-hijack
unhook_dllnotifRemove EDR DLL load notification callbacksunhook_dllnotif

Injection (4 BOFs)

BOFDescriptionUsage
createremotethreadInject shellcode via CreateRemoteThreadcreateremotethread <pid> <bin_path>
inject_testTest injection stub (dev/debug)inject_test
knowndll_poisonReplace \KnownDlls handle, hijack DLL loadknowndll-poison <pid> <dll> <payload>
shspawnasSpawn-as with creds + APC shellcode injectshspawnas <domain\user> <pass> <bin_path>
threadless_injectThreadless injection via export hookthreadless-inject <pid> <dll> <export> <shellcode>

Process Operations (3 BOFs)

BOFDescriptionUsage
procdumpMiniDump process memory to fileprocdump <pid> [path]
processdestroyClose handles in target processprocessdestroy <pid>
suspendresumeSuspend or resume a processsuspendresume <pid> suspend, suspendresume <pid> resume

User Management (5 BOFs)

BOFDescriptionUsage
adduserAdd local/remote user accountadduser <name> <password> [host]
addusertogroupAdd user to group (global, falls back local)addusertogroup <user> <group>
disableuserDisable user accountdisableuser <user>
enableuserEnable/unlock user accountenableuser <user>
setuserpassSet user passwordsetuserpass <user> <password>

Service Control (5 BOFs)

BOFDescriptionUsage
sc_createCreate Windows servicesc_create <name> <binpath>
sc_deleteDelete servicesc_delete <name>
sc_startStart servicesc_start <name>
sc_stopStop service (handles dependents)sc_stop <name>
sc_triggerAdd device-arrival trigger to servicesc-trigger <name> <device>

Services & Tasks (9 BOFs)

BOFDescriptionUsage
enum_filter_driverEnumerate filesystem filter drivers (EDR)enum_filter_driver
sc_enumEnumerate servicessc_enum
sc_qcQuery service configurationsc_qc <name>
sc_qdescriptionQuery service descriptionsc_qdescription <name>
sc_qfailureQuery service failure actionssc_qfailure <name>
sc_qtriggerinfoQuery service trigger infosc_qtriggerinfo <name>
sc_queryQuery service statussc_query <name>
schtasksenumEnumerate scheduled tasksschtasksenum
schtasksqueryQuery specific scheduled taskschtasksquery <name>

Registry (4 BOFs)

BOFDescriptionUsage
reg_deleteDelete registry key or valuereg_delete <key> [value]
reg_queryQuery registry key/value remotelyreg_query <host> <key> [value]
reg_saveSave registry key to filereg_save <key> <path>
reg_setSet registry valuereg_set <key> <value> <data> <type>

Environment Recon (8 BOFs)

BOFDescriptionUsage
defender_configDefender status, exclusions, ASR rules, tamperdefender_config
defender_ctrlDisable/enable RTP, add/remove path exclusionsdefender-ctrl <action> [path]
enum_dns_cacheDNS resolver cache dump (internal host mapping)enum_dns_cache
enum_firewallFirewall profiles, default actions, enabled rulesenum_firewall
enum_pipesNamed pipes (services, IPC, impersonation targets)enum_pipes
path_hijackWritable PATH directories for DLL hijackingpath_hijack
sysmon_detectDetect Sysmon service, driver, event log, binarysysmon_detect
wsus_configWSUS HTTP server check (WSUS injection)wsus_config

AD Recon (2 BOFs)

BOFDescriptionUsage
enum_adcsAD CS template misconfigs (ESC1-ESC4, ESC6, ESC8)enum_adcs
enum_kerberoastKerberoastable accounts (users with SPNs)enum_kerberoast

Active Directory (15 BOFs)

BOFDescriptionUsage
aadjoininfoAzure AD join info for hostaadjoininfo
adcs_enumEnumerate AD Certificate Services templatesadcs_enum
adcs_enum_comADCS enumeration via COM interfaceadcs_enum_com
adcs_enum_com_altADCS enumeration via COM (alternate method)adcs_enum_com_alt
get_password_policyQuery domain/local password policyget_password_policy
ldapsearchLDAP search with custom filterldapsearch <filter> [attrs]
ldapsecuritycheckLDAP security config auditldapsecuritycheck
netgroupEnumerate domain groups / membersnetgroup [group]
netlocalgroupEnumerate local groups / membersnetlocalgroup [group]
netlocalgroup_apiLocal group membership (NetLocalGroupGetMembers)netlocalgroup_api <group>
netuserDetailed user account infonetuser <user>
netuserenumEnumerate domain/local usersnetuserenum
regsessionEnumerate registry-based sessionsregsession
tasklistWMI process list (remote capable)tasklist [host]
wmi_queryRun arbitrary WMI querywmi_query <query>

System (1 BOF)

BOFDescriptionUsage
shutdownShutdown or reboot (local/remote)shutdown [host]

Linux BOFs (67)

Recon (18 BOFs)

BOFDescriptionUsage
arp_tableARP/neighbor cache for host discoveryarp-table
catRead file contents (1MB max)cat <path>
cloud_detectDetect AWS/GCP/Azure/DO via DMI/cloud-initcloud-detect
containerDetect Docker/K8s/LXC/VM environmentcontainer
cronsEnumerate crontabs, systemd timers, at jobscrons
dmesg_leaksScan dmesg for kernel pointers and credentialsdmesg-leaks
dnsDNS lookup (forward or reverse)dns <host|ip> [-r]
envEnvironment variablesenv
fstab_mountsParse fstab/mounts for nosuid gaps, cred leaksfstab-mounts
hostnameSystem hostnamehostname
iduid/gid/groups (like id command)id
ifconfigNetwork interfaces (IPv4/IPv6, flags)ifconfig
lsDirectory listing with permissionsls [path]
netstatTCP/UDP connections from /proc/netnetstat
pidAgent PID and image pathpid
ppidAgent PID, parent PID, and parent imageppid
psList processes from /procps
pwdCurrent working directorypwd
uname_modKernel version and system infouname
unix_socketsFind writable UNIX sockets owned by rootunix-sockets
whoamiCurrent user (uid/euid)whoami

File Operations (7 BOFs)

BOFDescriptionUsage
cdChange agent working directorycd <path>
chmodChange file permissions (octal mode)chmod <mode> <path>
cpCopy file (preserves permissions)cp <src> <dst>
mkdirCreate directory (-p for recursive)mkdir <path> [-p]
mvMove/rename file or directorymv <src> <dst>
rmRemove file/directory (-r recursive)rm <path> [-r]
uploadUpload file to remote pathupload <local> <remote>

Execution (2 BOFs)

BOFDescriptionUsage
bashExecute command via /bin/bash -c (stderr merged)bash <command>
shExecute command via /bin/sh (stderr merged)sh <command>

Credential Access (8 BOFs)

BOFDescriptionUsage
backup_filesFind .bak, .sql, .db, .kdbx backup filesbackup-files
historyRead shell history files for all usershistory
kerberos_enumKeytabs, krb5cc caches, Samba/SSSD credential DBskerberos-enum
mail_enumRead user mail for credentials (/var/mail)mail-enum
passwd_policyPassword aging, complexity, login.defs policypasswd-policy
proc_credsFind cred files in /proc/fd and secrets in environproc-creds
shadowRead /etc/shadow password hashesshadow
sshkeysHarvest SSH keys from all userssshkeys

Privilege Escalation (11 BOFs)

BOFDescriptionUsage
capsEnumerate process and file capabilitiescaps
kernel_suggestSuggest kernel exploits by version (CVE database)kernel-suggest
ldso_hijackCheck ld.so.preload/conf for writable pathsldso-hijack
pam_auditAudit PAM configs for rogue auth modulespam-audit
passwd_addAdd uid=0 user to /etc/passwd (needs write access)passwd-add <user> <pass>
profile_d_permsWritable scripts in profile.d, init.d, cron.dprofile-d-perms
sudo_checkCheck sudo -l for NOPASSWD and GTFOBins abusesudo-check
sudo_tokensCheck for reusable sudo timestamp tokenssudo-tokens
suidFind SUID/SGID binariessuid
svc_misconfigAudit systemd services for writable ExecStartsvc-misconfig
sys_protectionsASLR, ptrace, seccomp, AppArmor, SELinux statussys-protections
writableFind writable sensitive files and PATH binarieswritable

Persistence (4 BOFs)

BOFDescriptionUsage
persist_bashrcShell profile hook (.bashrc/.profile injection)persist-bashrc <cmd> [target]
persist_cronCrontab persistence (default */5 * * * *)persist-cron <cmd> [sched]
persist_preloadLD_PRELOAD persistence (requires root)persist-preload <so_path>
persist_systemdSystemd service (user if non-root, system if root)persist-systemd <name> <cmd>

Lateral Movement (4 BOFs)

BOFDescriptionUsage
portscanTCP connect scan with async socketsportscan <host> [ports]
ssh_copyCopy file to remote host via SCPssh-copy <src> <user@host:dst> [key]
ssh_execExecute command via SSH on remote hostssh-exec <user@host> <cmd> [key]
ssh_spraySpray all discovered SSH keys against targetssh-spray <host> [users]

Evasion (4 BOFs)

BOFDescriptionUsage
filehideHide file (dot rename, immutable attr, or both)filehide <path> [method]
logcleanScrub utmp/wtmp/btmp/lastlog + auth.log/securelogclean <user> [host]
procmaskChange process name via prctl (e.g. kworker/0:1)procmask <name>
timestompCopy timestamps from reference file or set explicittimestomp <file> <ref|time>

Container Escape (5 BOFs)

BOFDescriptionUsage
cgroup_escapeCgroup v1 release_agent host command executioncgroup-escape <cmd>
docker_sockDocker socket escape — run cmd on host via containerdocker-sock [sock] [cmd]
k8s_tokensFind K8s service account tokens and kubeconfigsk8s-tokens
mount_escapeMount namespace escape via /proc/1/root or remountmount-escape [file]
nsenter_hostNsenter into host PID 1 namespaces for cmd executionnsenter-host [cmd]