N7WEra/BofAllTheThings
GitHub: N7WEra/BofAllTheThings
一个系统性地收集和整理公开 Cobalt Strike Beacon Object Files 的资源聚合仓库,覆盖后渗透攻击全流程。
Stars: 600 | Forks: 65
# BofAllTheThings
创建一个包含所有公开 Beacon Object Files (BoFs) 的仓库
其目的是收集现有的所有 Beacon Object Files (BOF) 项目(类似于我的 SharpAllTheThings 项目),这些项目可在 Cobalt Strike 中作为内联执行命令使用。名称灵感来源于了不起的 PayloadAllTheThings github 仓库 (https://github.com/swisskyrepo/PayloadsAllTheThings)
### 交互式搜索
https://chryzsh.github.io/awesome-bof/site/
### BOF 合集
1. TrustedSec BOFS
* BOFS - arp, adcs_enum, adcs_enum_com, adcs_enum_com2, adv_audit_policies, cacls, dir, driversigs, enum_filter_driver, enumLocalSessions, env, findLoadedModule, get_password_policy, ipconfig, ldapsearch, listdns, listmods, listpipes, netstat, netuser, netuse_add, netuse_delete, netuse_list, netview, netGroupList, netGroupListMembers, netLocalGroupList, netLocalGroupListMembers, nslookup, reg_query, reg_query_recursive, routeprint, schtasksenum, schtasksquery, sc_enum, sc_qc, sc_qfailure, sc_qtriggerinfo, sc_query, sc_qdescription, tasklist, whoami, windowlist, wmi_query, netsession, resources, uptime, vssenum, adcs_request, chromeKey, enableuser, procdump, ProcessDestroy, ProcessListHandles, reg_delete, reg_save, reg_set, sc_config, sc_create, sc_delete, sc_description, sc_start, sc_stop, schtaskscreate, schtasksdelete, schtasksstop, setuserpass, shspawnas
* Credit - https://twitter.com/ajpc500
* Link - https://github.com/trustedsec/CS-Situational-Awareness-BOF and https://github.com/trustedsec/CS-Remote-OPs-BOF
2. ajpc500 BOFs Collection
* BOFS - ETW Patching, Syscalls shellcode injection, API Function Utility, Spawn and Syscalls Shellcode Injection, Spawn and Syscalls Shellcode Injection (NtQuereApcThread), Static Syscalls Shellcode Injection, Static syscalls Process Dump, curl
* Credit - https://twitter.com/ajpc500
* Link - https://github.com/ajpc500/BOFs
3. Riccardo Ancarani BOFs Collection
* BOFS - send_shellcode_via_pipe, cat , wts_enum_remote_processes, unhook
* Credit - https://twitter.com/dottor_morte
* Link - https://github.com/RiccardoAncarani/BOFs
4. rvrsh3ll BOFs Collection
* BOFS - GetDomainInfo, GetClipboard, dumpwifi, portscan, registryPersistence
* Credit - https://twitter.com/424f424f
* Link - https://github.com/rvrsh3ll/BOF_Collection
5. Outflank BOFs Collection
* BOFS - AddMachineAccount, Askcreds, Domaininfo, Kerberoast, Lapsdump, Psw, Smbinfo, SprayAD, StartWebClient, Winver
* Credit - https://twitter.com/OutflankNL
* Link - https://github.com/outflanknl/C2-Tool-Collection
6. REDMED-X - OperatorsKit
* BOFS - BlindEventlog, DllEnvHijacking, FindDotnet, FindHandle, FindLib, FindRWX, FindSysmon, HideFile, LoadLib, PSremote, SilenceSysmon
* Credit - 目前未知
* Link - https://github.com/REDMED-X/OperatorsKit
7. Adrenaline
* BOFs - ai_surface, clipboard_grab, window_handles_enum, notepad_grab, schtask_enum, session_view, certstore_loot, process_tokens_list, amsi_etw_detect, app_count, applocker_policy, asr_status, bitlocker_status, com_probe, mdm_policy_artifacts, netjoin_query, user_idle, wallpaper_enum, wef_detect, wevt_logon_enum, window_list, wsc_status, win_version
* Credit - Gavin K (atomiczsec)
* [https://github.com/atomiczsec/Adrenaline](https://github.com/atomiczsec/Adrenaline)
8. Adaptix-Framework Extension-Kit
* BOFs - 数量过多无法一一列举
* Credit - RalfHacker
* Link - https://github.com/Adaptix-Framework/Extension-Kit
### 执行
1. tgtdelegation - 获取当前用户可用的 TGT,且无需主机上的提升权限
* Credit - https://twitter.com/33y0re
* Link - https://github.com/connormcgarr/tgtdelegation
2. BOF.NET - 一个用于 Cobalt Strike Beacon Object Files 的 .NET Runtime
* Credit - https://twitter.com/_EthicalChaos_
* Link - https://github.com/CCob/BOF.NET
3. InlineExecute-Assembly - 概念验证 Beacon Object File (BOF),允许安全专业人员在进程内执行 .NET assembly,作为 Cobalt Strike 传统 fork and run execute-assembly 模块的替代方案
* Credit - https://twitter.com/anthemtotheego
* Link - https://github.com/anthemtotheego/InlineExecute-Assembly
4. Inject-assembly - 在现有进程中执行 .NET。此工具是 Cobalt Strike 传统 fork and run 执行方式的替代方案。加载器可以注入到任何进程中,包括当前 Beacon。长时间运行的 assembly 将继续运行并将输出发回 Beacon,其行为类似于 execute-assembly。
* Credit - https://twitter.com/kyleavery_
* Link - https://github.com/kyleavery/inject-assembly
5. BokuLoader - 一个概念验证 Cobalt Strike Reflective Loader,旨在重建、集成和增强 Cobalt Strike 的规避功能!
* Credit - https://twitter.com/0xBoku
* Link - https://github.com/boku7/BokuLoader
### 态势感知
1. FindObjects-BOF - 一个 Cobalt Strike Beacon Object File (BOF) 项目,使用直接系统调用 (direct system calls) 枚举特定模块或进程句柄的进程。
* Credit - https://twitter.com/Cneelis
* Link - https://github.com/outflanknl/FindObjects-BOF
2. DLL Image Resource Version Enumeration BOF - 顾名思义
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/DLL_Version_Enumeration_BOF
3. Firewall_Enumerator_BOF - 旨在通过 COM 接口与 Windows 防火墙进行交互的补充工具。
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/Firewall_Walker_BOF
4. Process Protection Level Enumerator BOF - 一个仅使用 Syscall 的 BOF 文件,旨在获取进程保护属性,仅限于 Red Team 操作员和渗透测试人员通常感兴趣的少数属性。
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/Process_Protection_Level_BOF
5. xPipe - Cobalt Strike Beacon Object File (BOF),用于列出活动的管道 (Pipes) 并返回其所有者 (Owner) 和自主访问控制列表 (DACL) 权限。
* Credit - https://twitter.com/0xBoku
* Link - https://github.com/boku7/xPipe
6. WhereAmiI - Cobalt Strike Beacon Object File (BOF),使用手写 shellcode 返回进程环境字符串,且不触及任何 DLL。
* Credit - https://twitter.com/0xBoku
* Link - https://github.com/boku7/whereami
7. Readfile - 顾名思义
* Credit - https://twitter.com/trainr3kt
* Link - https://github.com/trainr3kt/Readfile_BoF
8. ChromiumKeyDump - Chlonium 工具的 BOF 实现,用于转储 Chrome/Edge 主密钥并下载 Cookie/Login Data 文件
* Credit - https://twitter.com/cryptopeg
* Link - https://github.com/crypt0p3g/bof-collection
9. LdapSignCheck - Beacon Object File,用于扫描域控制器以查看是否修改了 LdapEnforceChannelBinding 或 LdapServerIntegrity 以缓解中继攻击。
* Credit - https://twitter.com/cube0x0
* Link - https://github.com/cube0x0/LdapSignCheck
10. ScreenshotBOF - Cobalt Strike 的另一种截图功能,使用 WinAPI 且不执行 fork & run。截图在内存中下载。
* Credit - https://twitter.com/codex_tf2
* Link - https://github.com/CodeXTF2/ScreenshotBOF
11. ASRenum - 识别 ASR 规则、操作和排除位置
* Credit - https://twitter.com/mlcsec
* Link - https://github.com/mlcsec/ASRenum-BOF
### 持久化
1. PersistBOF - 一种帮助自动化常见持久化机制的工具。目前支持打印监视器 (SYSTEM)、时间提供程序 (Network Service)、开始文件夹快捷方式劫持 (User)、联结文件夹 (User)、Xll 加载项 (User)。
* Credit - https://twitter.com/i/flow/login?redirect_after_login=%2FN4k3dTurtl3
* Link - https://github.com/N4kedTurtle/PersistBOF
2. BOF_Collection - 通过注册表实现持久化
* Credit - https://twitter.com/424f424f
* Link - https://github.com/rvrsh3ll/BOF_Collection
### 权限提升
1. kernel-mii - Cobalt Strike (CS) Beacon Object File (BOF) 基础库,用于利用 CVE-2021-21551 进行内核利用。
* Credit - https://twitter.com/tijme
* Link - https://github.com/tijme/kernel-mii
2. amd-ryzen-master-driver-v17-exploit - Cobalt Strike (CS) Beacon Object File (BOF),利用 AMD 的 Ryzen Master Driver (版本 17) 进行内核利用。
* Credit - https://twitter.com/tijme
* Link - https://github.com/tijme/amd-ryzen-master-driver-v17-exploit
3. PrivKit - PrivKit 是一个简单的 beacon object file,用于检测由 Windows OS 配置错误引起的权限提升漏洞。
* Credit - https://twitter.com/merterpreter
* Link - https://github.com/mertdas/PrivKit
### 防御规避
1. WdToggle - 一个概念验证 Cobalt Strike Beacon Object File,使用直接系统调用 (direct system calls) 启用 WDigest 凭据缓存并绕过 Credential Guard(如果已启用)。
* Credit - https://twitter.com/Cneelis
* Link - https://github.com/outflanknl/WdToggle
2. InlineWhispers2 - 用于在 Cobalt Strike 的 Beacon Object Files (BOF) 中通过 Syswhispers2 使用直接系统调用 (Direct System Calls) 的工具。
* Credit - https://twitter.com/Sh0ckFR
* Link - https://github.com/Sh0ckFR/InlineWhispers2
3. HOLLOW - Beacon Object File (BOF),以挂起状态从 beacon 内存中生成任意进程,注入 shellcode,使用 APC 劫持主线程,并执行 shellcode;使用 Early Bird 注入技术。
* Credit - https://twitter.com/0xBoku
* Link - https://github.com/boku7/HOLLOW
4. secinject - Beacon Object File (BOF),利用 Native API 通过内存_section mapping 实现进程注入。
* Credit - https://twitter.com/apokryptein
* Link - https://github.com/apokryptein/secinject
5. unhook-bof - 这是一个 Beacon Object File,用于刷新 DLL 并移除其挂钩 (hooks)。代码源自 Cylance 的 Universal Unhooking 研究。
* Credit - https://twitter.com/joevest
* Link - https://github.com/Cobalt-Strike/unhook-bof
6. Self_Deletion_BOF - @jonasLyk 关于可执行文件自我删除研究的 BOF 实现。
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/Self_Deletion_BOF
7. Toggle_Token_Privileges_BOF - 一个(几乎)仅使用 syscall 的 BOF 文件,旨在在当前进程的上下文中添加或移除令牌权限 (token privileges)。
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/Toggle_Token_Privileges_BOF
8. Inject ETW Bypass - 通过 Syscalls (HellsGate|HalosGate) 将 ETW 绕过注入远程进程
* Credit - https://twitter.com/0xBouk
* Link - https://github.com/boku7/injectEtwBypass
9. Inject AMSI Bypass - Cobalt Strike Beacon Object File (BOF),通过代码注入在远程进程中绕过 AMSI。
* Credit - https://twitter.com/0xBouk
* Link - https://github.com/boku7/injectAmsiBypass
10. Trusted Path UAC Bypass - 受信路径 UAC 绕过的 Beacon object file 实现。通过使用 DCOM 对象,可执行文件将在不涉及 "cmd.exe" 的情况下被调用。
* Credit - https://twitter.com/netero_1010
* Link - https://github.com/netero1010/TrustedPath-UACBypass-BOF
11. Detect-Hooks - Detect-Hooks 是一个概念验证 Beacon Object File (BOF),试图检测 AV/EDR 设置的用户态 API 挂钩 (userland API hooks)。
* Credit - https://twitter.com/anthemtotheego
* Link - https://github.com/xforcered/Detect-Hooks
12. Defender Exclusions BOF - 用于确定 Windows Defender 排除项的 BOF。
* Credit - https://twitter.com/the_bit_diddler
* Link - https://github.com/EspressoCake/Defender_Exclusions-BOF
13. ASRenum-BOF - Cobalt Strike BOF,用于识别攻击面减少 (ASR) 规则、操作和排除位置。
* Credit - https://twitter.com/mlcsec
* Link - https://github.com/mlcsec/ASRenum-BOF
14. CobaltWhispers - CobaltWhispers 是一个 aggressor script,利用 Cobalt Strike 的 Beacon Object Files (BOF) 集合执行进程注入、持久化等操作,利用直接系统调用 (SysWhispers2) 绕过 EDR/AV。
* Credit - https://twitter.com/cerbersec
* Link - https://github.com/NVISOsecurity/CobaltWhispers
### 凭据访问
1. Cobalt-Clip - Cobalt-Clip 是 Cobalt Strike 的剪贴板附加组件,用于与受害者的剪贴板进行交互。使用 Cobalt-Clip,你可以转储、编辑和监视剪贴板的内容。
* Credit - https://github.com/DallasFR
* Link - https://github.com/DallasFR/Cobalt-Clip
2. PPLDump BOF - 一个功能完备的 BOF,用于转储任意受保护进程。
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/PPLDump_BOF
3. NoteThief - 使用 Beacon Object File 抓取未保存的记事本内容
* Credit - https://twitter.com/trainr3kt
* Link - https://github.com/trainr3kt/NoteThief
4. CredManBOF - 通过滥用 SeTrustedCredmanAccess 权限转储凭据管理器
* Credit - https://twitter.com/Pullerze
* Link - https://github.com/jsecu/CredManBOF
5. CredBandit - redBandit 是一个概念验证 Beacon Object File (BOF),使用静态 x64 syscalls 执行进程的完整内存转储,并通过你现有的 Beacon 将其发回
* Credit - https://twitter.com/anthemtotheego
* Link - https://github.com/xforcered/CredBandit
6. BofRoast - 用于 Active Directory Roasting 的 Beacon Object File 仓库
* Credit - https://twitter.com/cube0x0
* Link - https://github.com/cube0x0/BofRoast
7. Silent Lsass Dump - 使用 Silent Process 方法转储 Lsass
* Credit - https://github.com/guervild
* Link - https://github.com/guervild/BOFs
8. aad_prt - 提取 Azure AD PRT tokens
* Credit - https://twitter.com/wotwot563
* Link - https://github.com/wotwot563/aad_prt_bof
9. Cookie-Graber-BOF - C 或 BOF 文件,用于提取 WebKit 主密钥以解密用户 cookie。
* Credit - https://twitter.com/MrUn1k0d3r
* Link - https://github.com/Mr-Un1k0d3r/Cookie-Graber-BOF
10. LSA Whisperer BOF - 一个 Beacon Object File (BOF),通过 LSA 非受信/受信客户端接口直接与 Windows 身份验证包通信,而不触及 LSASS 进程内存。
* Credit - Arun Nair (dazzyddos)
* Link - [https://github.com/Mr-Un1k0d3r/Cookie-Graber-BOF](https://github.com/dazzyddos/lsawhisper-bof)
### 横向移动
1. DCOM Lateral Movement - 快速 PoC,通过 beacon object files 使用 DCOM (ShellWindows) 进行横向移动。
* Credit - https://twitter.com/Yas_o_h
* Link - https://github.com/Yaxser/CobaltStrike-BOF
2. WMI Lateral Movement - 快速 PoC,通过 beacon object files 使用 WMI (Win32_Process 和 Event Subscription) 进行横向移动。
* Credit - https://twitter.com/Yas_o_h
* Link - https://github.com/Yaxser/CobaltStrike-BOF
3. ServiceMove-BOF - 通过滥用 Windows Perception Simulation Service 实现 DLL 劫持的横向移动技术
* Credit - https://twitter.com/netero_1010
* Link - https://github.com/netero1010/ServiceMove-BOF
4. DelegationBOF - 此工具使用 LDAP 检查域中已知的可滥用 Kerberos 委派设置。目前,它支持 RBCD、约束性、带协议转换的约束性和非约束性委派检查。
* Credit - https://twitter.com/N4k3dTurtl3
* Link - https://github.com/IcebreakerSecurity/DelegationBOF
5. RDPHijack-BOF - Cobalt Strike Beacon Object File (BOF),使用 WinStationConnect API 执行本地/远程 RDP 会话劫持。
* Credit - https://twitter.com/netero_1010
* Link: https://github.com/netero1010/RDPHijack-BOF
### 数据窃取
### 其他项目
1. DLL Exports Extraction BOF - 顾名思义
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/DLL-Exports-Extraction-BOF
2. DLL Hijack Search Order BOF - 顾名思义
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/DLL-Hijack-Search-Order-BOF
3. PE Import Enumerator BOF - 顾名思义
* Credit - https://github.com/EspressoCake
* Link - https://github.com/EspressoCake/DLL_Imports_BOF
4. Sleeper - BOF,用于调用 SetThreadExecutionState 函数以防止主机进入睡眠状态
* Credit - https://twitter.com/cryptopeg
* Link - https://github.com/crypt0p3g/bof-collection
### BOF 构建工具
1. BOF Template - 此仓库旨在托管为 Cobalt Strike 创建 Beacon Object File 所需的核心文件。
* Credit - https://twitter.com/joevest
* Link - https://github.com/Cobalt-Strike/bof_template
2. BOF-Builder - C# .Net 5.0 项目,用于基于文件夹目录结构批量构建 BOF (Beacon Object Files)。
* Credit - https://twitter.com/Ceramicskate0
* Link - https://github.com/ceramicskate0/BOF-Builder
3. Visual-Studio-BOF-template - 基础模板,可重用于使用 Visual Studio 开发 BOF,无需担心动态函数解析语法、符号剥离、编译器配置、C++ 名称修饰 (name mangling) 或意外的运行时错误
* Credit - https://securify.nl/
* Link - https://github.com/securifybv/Visual-Studio-BOF-template
4. BOF Creation Helper - 我拼凑了这个脚本,让制作 BOF 的过程稍微容易一些。
* Credit - https://dtm.uk/
* Link - https://github.com/dtmsecurity/bof_helper
### 其他语言的 BOF
1. Invoke-Bof - 使用 Powershell 加载任何 Beacon Object File!
* Credit - https://github.com/airbus-cert
* Link - https://github.com/airbus-cert/Invoke-Bof
2. BOF-Nim
* Credit - https://twitter.com/byt3bl33d3r
* Link - https://github.com/byt3bl33d3r/BOF-Nim
标签:AD攻击面, BOF, Cobalt Strike, Mr. Robot, PE 加载器, RFI远程文件包含, Shellcode 注入, Windows 安全, 协议分析, 后渗透, 多人体追踪, 安全工具集, 插件系统, 攻击诱捕, 攻击载荷, 数据展示, 无线安全, 权限提升, 横向移动, 欺骗防御, 流量嗅探, 私有化部署, 端点可见性, 红队, 编程规范, 网络安全, 资源汇总, 防御规避, 隐私保护, 黑客技术